mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
libcpp/
* expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
gcc/testsuite/
* gcc.dg/fltconst-pedantic-dfp.c: New test.
From-SVN: r124731
This commit is contained in:
committed by
Janis Johnson
parent
30e0492187
commit
5a6bb57eb9
@@ -273,6 +273,10 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token)
|
||||
return CPP_N_INVALID;
|
||||
}
|
||||
|
||||
if ((result & CPP_N_DFLOAT) && CPP_PEDANTIC (pfile))
|
||||
cpp_error (pfile, CPP_DL_PEDWARN,
|
||||
"decimal float constants are a GCC extension");
|
||||
|
||||
result |= CPP_N_FLOATING;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user