[cfe-commits] r64919 - /cfe/trunk/lib/Headers/tgmath.h

Douglas Gregor dgregor at apple.com
Wed Feb 18 09:23:06 PST 2009


Author: dgregor
Date: Wed Feb 18 11:23:05 2009
New Revision: 64919

URL: http://llvm.org/viewvc/llvm-project?rev=64919&view=rev
Log:
Add an unavailable __tg_promote function to attract incorrect uses of type-generic macros, rom Howard Hinnant.

Modified:
    cfe/trunk/lib/Headers/tgmath.h

Modified: cfe/trunk/lib/Headers/tgmath.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/tgmath.h?rev=64919&r1=64918&r2=64919&view=diff

==============================================================================
--- cfe/trunk/lib/Headers/tgmath.h (original)
+++ cfe/trunk/lib/Headers/tgmath.h Wed Feb 18 11:23:05 2009
@@ -37,6 +37,9 @@
 
 // promotion
 
+typedef void _Argument_type_is_not_arithmetic;
+static _Argument_type_is_not_arithmetic __tg_promote(...) \
+  __attribute__((__unavailable__,__overloadable__));
 static double               _TG_ATTRSp __tg_promote(int);
 static double               _TG_ATTRSp __tg_promote(unsigned int);
 static double               _TG_ATTRSp __tg_promote(long);





More information about the cfe-commits mailing list