Re: sizeof(function) functionality

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

 



On Tuesday 8 July 2003 11:20 pm, Alexandre Oliva wrote:
> > DEFINE_SIZED_FUNCTION(float, myfunc, (float x, float y), {
> >     return (float)sqrt(x*x + y*y);
> > })
>
> Beware!
>
> DEFINE_SIZED_FUNCTION(float, myfunc, (float x, float y), {
>   float x2 = x*x, y2 = y*y;
>              // ^ oops, this is not a macro argument separator
>   return (float)sqrt(x2+y2);
> }

You're right - it gives an error (even with the ")" added after the "}"). I 
thought the { } would protect it.

Do you have a suggestion for how to make this work?

Ben


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux