Subject: Re: gcc compiler output
From: [email-masked] (Benjamin Riefenstahl)

28 Apr 1998 16:33:37 -0700
Message-ID: <[email-masked]>
References: <c=ES%a=_%p=FAGOR?AUTOMATION%l=[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
To: "[email-masked]'" <[email-masked]>

Hi Oskar,

OSKAR BERRETEAGA wrote:
> when compiling, gcc -c, the following source file
> ...
>         unsigned        i386:1; /* <------- Parse error */
> ...
> I get the following:
> prg.c:6: parse error before `1'

Gcc has 'i386' as a pre-defined identifier indicating your hardware
platform. The ANSI language standard prohibits the compiler from
introducing such names exactly so you as a programmer can use them. You
need to call gcc with the '-ansi' option to get that behaviour though.
You could still detect your platform by checking for '__i386__'
(identifiers starting with underscores are reserved for the
implmentation and should not be used by the programmer). BTW, for new
code I also use the gcc options '-pendantic' and '-Wall' to get all the
help I can get from the compiler.

so long, benny
======================================
Benjamin Riefenstahl ([email-masked])
Crocodial Communications EntwicklungsGmbH
Ruhrstraße 61, D-22761 Hamburg, Germany
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".