This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is this a compiler bug?
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Sun, 21 Sep 2014 22:15:01 -0700
- Subject: Re: Is this a compiler bug?
- Authentication-results: sourceware.org; auth=none
- References: <20140922012346 dot GA4376 at troutmask dot apl dot washington dot edu> <CA+=Sn1nT8by8dUHugr_Ye8TYmSbGS6Axbbmau7d+-d7WCUVPfQ at mail dot gmail dot com> <20140922015627 dot GA4508 at troutmask dot apl dot washington dot edu> <CA+=Sn1=d1uHGWoV=0=vUgjR4f6cJw81JKYOGTYDPOAqwC4VnrA at mail dot gmail dot com> <20140922030836 dot GB4708 at troutmask dot apl dot washington dot edu>
On Sun, Sep 21, 2014 at 8:08 PM, Steve Kargl
<sgk@troutmask.apl.washington.edu> 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
>> <sgk@troutmask.apl.washington.edu> wrote:
>> > + is a binary operator. 0x3ffe is a hexidecimal-constant according
>> > to 6.6.4.1 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 6.4.4.2.
>
> 6.4.4.2 applies to floating point constant.
> 6.4.4.1 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.
Thanks,
Andrew Pinski
>
> --
> Steve