| 1 |
// RUN: %clang_cc1 -triple x86_64-apple-darwin -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 | FileCheck -allow-empty %s |
| 2 |
// CHECK: warning: |
| 3 |
// CHECK: expanded from macro 'ISNAN' |
| 4 |
// CHECK: expanded from macro 'isnan' |
| 5 |
|
| 6 |
#include <warn-in-system-macro-def.c.inc> |
| 7 |
|
| 8 |
#define isnan(x) \ |
| 9 |
(sizeof (x) == sizeof (float) \ |
| 10 |
? __isnanf (x) \ |
| 11 |
: sizeof (x) == sizeof (double) \ |
| 12 |
? __isnan (x) : __isnanl (x)) |
| 13 |
|
| 14 |
int main(void) |
| 15 |
{ |
| 16 |
double foo = 1.0; |
| 17 |
|
| 18 |
if (ISNAN(foo)) |
| 19 |
return 1; |
| 20 |
return 0; |
| 21 |
} |