This is the mail archive of the 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: Is this a compiler bug?

On Sun, 2014-09-21 at 22:15 -0700, Andrew Pinski wrote:
> On Sun, Sep 21, 2014 at 8:08 PM, Steve Kargl
> <> wrote:
> > On Sun, Sep 21, 2014 at 07:57:45PM -0700, Andrew Pinski wrote:
> >> On Sun, Sep 21, 2014 at 6:56 PM, Steve Kargl
> >> <> wrote:
> >> > + is a binary operator.  0x3ffe is a hexidecimal-constant according
> >> > to in n1256.pdf.  63 is, of course, a decimal-constant.
> >>
> >>
> >> This is before tokens happen and during lexing of the program.
> >> e+64 is exponent-part see
> >
> > applies to floating point constant.
> > is for integer constants.
> Nope again, this time from bug 3885:
> Strange as it may seem, the behavior is correct, and mandated by the C
> Standard.  0x00E-0x00A is a single preprocessor token, of type
> pp-number, and it must become a single compiler token, but it can't.
> The gotcha is the `E-' sequence, that makes it seem like the exponent
> notation of floating-point constants.
> Looks like this is a common misunderstood part of C.

If people tend to get this wrong, should we issue a warning for it?

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