This is the mail archive of the gcc-bugs@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]

[Bug c/24976] New: simple hexadecimal number parsed as C99 hex float


This testcase:

  int a = 0xe+100;

Produces a diagnostic message that would surprise
most users:

 foo.c:1:9: error: invalid suffix "+100" on integer constant


I'm not sure what the standard says about ambiguity
between the hex float notation and the regular + operator,
but many users are going to think of this behavior as
a parser bug.


-- 
           Summary: simple hexadecimal number parsed as C99 hex float
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bernie at develer dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24976


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