[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] GCC question



On Mon, 15 Nov 2010 21:49:31 , "Helmut Karlowski" <helmut.karlowski@ish.de> wrote:
> Am 15.11.2010, 19:32 Uhr, schrieb Peter Slegg <p.slegg@scubadivers.co.uk>:
>
> > Can someone enlighten me ?
> >
> > #define TREE_XYWH(tree)
> > tree[0].ob_x-3,tree[0].ob_y-3,tree[0].ob_width+6,tree[0].ob_height+6
> > .
> > .
> > objc_draw(dlog, start, MAX_DEPTH, TREE_XYWH(dlog));
> >
> > I thought that the macro above would be inserted into the second line
> > before it was compiled but I am getting this error.
> >
> > newsaes.c:651:52: error: macro "objc_draw" requires 7 arguments, but
> > only 4 given
>
> True. TREE_XYWH should be expanded first. gcc -E might tell more. Maybe
> you are missing a \, or put the def in one line:

Oddly I got some other errors a couple of days ago which clearly
showed that gcc was expanding a macro before compiling it.

>   #define TREE_XYWH(tree)
> tree[0].ob_x-3,tree[0].ob_y-3,tree[0].ob_width+6,tree[0].ob_height+6
>

It was originally.

Peter