[4.5 patch] allow d or D suffix for double for c/39027

Joseph S. Myers joseph@codesourcery.com
Wed Feb 25 01:36:00 GMT 2009


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



More information about the Gcc-patches mailing list