mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 10:45:03 +08:00
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
This commit is contained in:
parent
27283c7340
commit
7f1fc38ea4
@ -1,3 +1,8 @@
|
||||
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++;
|
||||
|
6
gcc/testsuite/gcc.dg/cpp/c99-hexfloat-3.c
Normal file
6
gcc/testsuite/gcc.dg/cpp/c99-hexfloat-3.c
Normal file
@ -0,0 +1,6 @@
|
||||
/* 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" } */
|
Loading…
Reference in New Issue
Block a user