This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/31924] New: gcc accepts invalid suffixes for decimal float constants
- From: "janis at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 May 2007 20:50:31 -0000
- Subject: [Bug c/31924] New: gcc accepts invalid suffixes for decimal float constants
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The change to the C preprocessor to recognize "df", "dd", and "dl" as suffixes
for decimal floating point constants also allows "fd" and "ld"; a check for
that assumed that the the letters are examined from left to right, but they are
examined from right to left. There are no errors for the following:
double a = 1.ld;
double b = 1.fd;
I'm testing a fix, but wanted a PR to reference for a patch to the 4.2 branch.
--
Summary: gcc accepts invalid suffixes for decimal float constants
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c
AssignedTo: janis at gcc dot gnu dot org
ReportedBy: janis at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31924