This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.5 patch] allow d or D suffix for double for c/39027
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Janis Johnson <janis187 at us dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 24 Feb 2009 23:48:33 +0000 (UTC)
- Subject: Re: [4.5 patch] allow d or D suffix for double for c/39027
- References: <1235511058.6088.9.camel@janis-laptop>
On Tue, 24 Feb 2009, Janis Johnson wrote:
> Draft N1312 of draft Technical Report 24732 for decimal float support
> in C specifies an optional suffix of 'd' or 'D' for type double. This
> patch recognizes that suffix and allows it to be used with i, I, j, or
> J for an imaginary value in a constant of a complex double type.
You need an appropriate pedwarn-if-pedantic for this since it still isn't
a standard C suffix, just like the
if ((result & CPP_N_DFLOAT) && CPP_PEDANTIC (pfile))
cpp_error (pfile, CPP_DL_PEDWARN,
"decimal float constants are a GCC extension");
and an associated testcase that these constants are properly diagnosed
with -pedantic. (This is not a review of the rest of the patch.)
--
Joseph S. Myers
joseph@codesourcery.com