blob: bdf7d39325e94eae9d6e90971b788793e1e0c647 [file] [log] [blame]
Erik Pilkingtonf6e77312019-02-16 01:51:19 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 | FileCheck -allow-empty %s
Serge Guelton5ef88bd2019-02-01 06:11:44 +00002// 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
14int main(void)
15{
16 double foo = 1.0;
17
18 if (ISNAN(foo))
19 return 1;
20 return 0;
21}