From c481f72857ded28e7e4b06e0ecc6ea61d5a07aeb Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 25 Jul 2008 18:41:57 +0000 Subject: [PATCH] Add test case for hex floating point constants in < C99 mode - For: rdar://6096838 llvm-svn: 54036 --- clang/test/Lexer/rdr-6096838.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 clang/test/Lexer/rdr-6096838.c diff --git a/clang/test/Lexer/rdr-6096838.c b/clang/test/Lexer/rdr-6096838.c new file mode 100644 index 000000000000..1b56a910db71 --- /dev/null +++ b/clang/test/Lexer/rdr-6096838.c @@ -0,0 +1,14 @@ +/* RUN: clang -fsyntax-only -verify %s && + * RUN: clang -std=gnu89 -fsyntax-only -verify %s && + * RUN: clang -DPEDANTIC -pedantic -std=gnu89 -fsyntax-only -verify %s + */ + +#ifdef PEDANTIC + +long double d = 0x0.0000003ffffffff00000p-16357L; /* expected-warning {{ hexadecimal floating constants are a C99 feature }} */ + +#else + +long double d = 0x0.0000003ffffffff00000p-16357L; + +#endif