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:
Janis Johnson
2007-05-14 23:45:40 +00:00
committed by Janis Johnson
parent 30e0492187
commit 5a6bb57eb9
4 changed files with 14 additions and 0 deletions

View File

@@ -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