This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]