[cfe-commits] tgmath.h
Douglas Gregor
dgregor at apple.com
Tue Feb 17 23:10:22 PST 2009
On Feb 17, 2009, at 3:30 PM, Howard Hinnant wrote:
> Oh, and:
>
> -------------
> none of the above:
> -------------
> 81 lines of output starting with:
>
> 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))
>
> :-)
I just added some more toys that should help improve this. First of
all, I wired up the Objective-C "unavailable" attribute so that it
works like a C++0x deleted function, e.g.,
void f(int) __attribute__((__unavailable__));
f(5); // error: called an unavailable function
Second, we now allow "overloadable" functions in C to be variadic
without any named parameters, e.g., this is well-formed
void f(...) __attribute__((__overloaded__));
I'm sure that'll help improve the diagnostics in tgmath.h :)
- Doug
More information about the cfe-commits
mailing list