Commit 7f1fc38e by Michael Matz Committed by Michael Matz

cppexp.c (cpp_classify_number): Accept '.' after "0x".

	* cppexp.c (cpp_classify_number): Accept '.' after "0x".
	* testsuite/gcc.dg/cpp/c99-hexfloat-3.c: New file.

From-SVN: r65091
parent 27283c73
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.
......
......@@ -175,7 +175,8 @@ cpp_classify_number (pfile, token)
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++;
......
/* 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" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment