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

Re: [MiNT] GCC question



On Tue, 16 Nov 2010 23:08:23 , "m0n0" <ole@monochrom.net> wrote:
> Hello,
>
> let me understand this problem...
>
> Is it really true that I can't use macros during parameter passing?
>
> like this:
>
> #define MY_MACRO( x ) (x+1)
> function( MY_MACRO(1) );
>
> ?? Or does the problem only arise when it is used within another macro,
> like this:
> #define MY_MACRO( x ) (x+1)
> #define YEAH( y ) (y + 2 + MY_MACRO( y ))
> function( YEAH(1) );
>
> objc_draw is documented as a function - everywhere ( ;) ) - so I guess the
> gemlib is also implementing objc_draw as a function.  If not - why not? It
> also has an return value! So I'm sure objc_draw is NO macro. If it is
> anyway - then I guess: because it is an wrapper around mt_objc_draw().
>
> I can't believe I shouldn't use macros within calls to functions, that
> would be annoying! ;)
>
> Greets,
> m
>

>From my limited knowledge I think this problem arises because
it is a macro within a macro.

Peter