🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #6148

Re: Parse error?

#6148
From: Eyal Ben-Avraham
Date: Sun, 17 Nov 1996 00:00
47 lines
1295 bytes
Hi,

It's not a bug. The ANSI C standard requires
that a floating point constant should be specified
using decimal digits only.

The -0x2E+0 constant uses hexdecimal digits. Other 
compilers which allow it deviate from the standard.

Bye,
Eyal



: Date: Sun, 17 Nov 96 08:40:14 IST
: From: orid@taux01.nsc.com (Ori Dvir)
: Message-Id: <9611170640.AA00525@tasu5k.nsc.com>
: To: bug-gcc@prep.ai.mit.edu
: Subject: Parse error?
: Status: R
: 
: Hi,
: 
: I have a problem of parsing:
: when i compile this file :
: 
: main(){
: int a;
: a = 0x2e+0;
: }
: 
: >gcc t.c
: 
: I get :
: 
: t.c: In function `main':
: t.c:6: garbage at end of number
: 
: The expresion should stand for: 0x2e + 0 ( hex + decimal ).
: 
: I'm using gcc version 2.7.2 on Sun meachines.
: 
: Thanks,
: Ori dvir :  orid@taux01.nsc.com.il
:  
: 
Technical Details
Message-ID: <9611170715.AA16220@dsp.co.il>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,39f8d0ab16fe7db1,start
X-Google-Attributes: gid113d02,public
From: eyal@dsp.co.il (Eyal Ben-Avraham)
Subject: Re:  Parse error?
Date: 1996/11/17
Message-ID: <9611170715.AA16220@dsp.co.il>
X-Deja-AN: 196996765
sender: bug-gcc-request@prep.ai.mit.edu
x-gateway: relay7.UU.NET from bug-gcc to gnu.gcc.bug; Sun, 17 Nov 1996 02:16:46 EST
newsgroups: gnu.gcc.bug