[4.5 patch] allow d or D suffix for double for c/39027
Joseph S. Myers
joseph@codesourcery.com
Thu Feb 26 02:13:00 GMT 2009
On Wed, 25 Feb 2009, Janis Johnson wrote:
> + /* A suffix for double is a GCC extension via decimal float support.
> + If the suffix also specifies an imaginary value we'll catch that
> + later. */
> + if ((result == CPP_N_MEDIUM) && CPP_PEDANTIC (pfile))
> + cpp_error (pfile, CPP_DL_WARNING,
> + "suffix for double constant is a GCC extension");
This needs to be CPP_DL_PEDWARN not CPP_DL_WARNING since it's a constraint
violation (6.4#2, "Each preprocessing token that is converted to a token
shall have the lexical form of a keyword, an identifier, a constant, a
string literal, or a punctuator.").
> Index: gcc/testsuite/gcc.dg/fltconst-pedantic-double.c
There should be an associated copy of this testcase using -pedantic-errors
and dg-error in place of dg-warning.
OK for 4.5 and c-4_5-branch with those changes.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list