This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

Re: gcc compiler output


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 (benny@crocodial.de)
Crocodial Communications EntwicklungsGmbH
Ruhrstraße 61, D-22761 Hamburg, Germany
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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