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: PR 23572 warnings for out of range floating-point constants


On 21 Jan 2007 13:38:25 -0600, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
"Joseph S. Myers" <joseph@codesourcery.com> writes:

| The general issue is floating constants that are not exactly
| representable.  Particular cases of interest are overflow, underflow and
| hex constants (where C99 recommends a diagnostic for hex floating
| constants that are not exactly representable); warning for such cases as
| 0.1 being inexact is of less interest.

Agreed.


I don't see how this has anything to do with my patch, but yes, I do agree.


| Perhaps there should be a warning
| option -Winexact with different levels to cover the different cases.

and the diagnostic will probably have to be moved to the preprocessor.


Floating point constants are processed in c-lex.c. Why should the diagnostic be moved elsewhere ?

Cheers,

Manuel.


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