[cfe-commits] tgmath.h

Chris Lattner clattner at apple.com
Tue Feb 17 14:37:49 PST 2009


On Feb 17, 2009, at 2:29 PM, Howard Hinnant wrote:

>>
>> Would it be possible to silence to tg_promote diagnostics by adding  
>> a version that takes ...?
>
> I know how to solve this neatly in C++. ;-)
>
> Oh, well, I note that if I add:
>
> static void                 _TG_ATTRSp __tg_promote(void);
>
> the error message gets *a little* better.
>
> test.c:7:8: error: no matching function for call to '__tg_promote'
>   x = acos(x);
>       ^~~~~~~
> ./tgmath.h:88:29: note: instantiated from:
> #define acos(__x) __tg_acos(__tg_promote1((__x))(__x))
>
>
> "..." doesn't work as I get:
>
> ./tgmath.h:40:53: error: ISO C requires a named argument before '...'
> static void                 _TG_ATTRSp __tg_promote(...);
>
>
> I'll keep looking for a better solution...

does () work?  () is roughly equivalent to (...) in C++.

-Chris



More information about the cfe-commits mailing list