* cppexp.c (cpp_classify_number): Accept '.' after "0x".
* testsuite/gcc.dg/cpp/c99-hexfloat-3.c: New file.
From-SVN: r65091
+2003-03-31 Michael Matz <matz@suse.de>
+
+ * cppexp.c (cpp_classify_number): Accept '.' after "0x".
+ * testsuite/gcc.dg/cpp/c99-hexfloat-3.c: New file.
+
2003-03-31 Nathan Sidwell <nathan@codesourcery.com>
* gcov.c: Add -a & -u options.
str++;
/* Require at least one hex digit to classify it as hex. */
- if ((*str == 'x' || *str == 'X') && ISXDIGIT (str[1]))
+ if ((*str == 'x' || *str == 'X')
+ && (str[1] == '.' || ISXDIGIT (str[1])))
{
radix = 16;
str++;
--- /dev/null
+/* Test for hex floating point constants: in C99 only. Compiler test. */
+/* Origin: Michael Matz <matz@suse.de> */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+double d = 0x.2p2; /* { dg-bogus "radix 16" "bogus C99 hex float error" } */