This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: SML-NJ for CygWin32
- To: Fuehrer at seabase dot com
- Subject: RE: SML-NJ for CygWin32
- From: Sigbjorn Finne <sof at dcs dot gla dot ac dot uk>
- Date: Thu, 28 Aug 1997 19:17:44 +0100 (BST)
- Cc: gnu-win32 at cygnus dot com, denis dot trcek at ijs dot si
- References: <6CC63E2E4FC1D011A2A700609716117A266F0A@seawolf>
> > >
> > > This is clearly incorrect behavior on the part of CygWin's gcc.
> > Dollar
> > > signs are not valid leading characters of C (or C++) identifiers.
> > >
> Until this is fixed in the preprocessor, the work-around for building
> SML-NJ is to add a space separator between the "$" and the constant. I
> will NOT submit this change to the SML-NJ team. They would likely
> reject it anyhow (I would).
Hi,
AFAIK, it is ANSI that forbids $ in ids. I'd expect this restriction
to be enabled via -ansi (as per gcc docs.) For whatever reason, the
gcc2 snap included in b18 doesn't pass -$ to cpp with -ansi..
foo$ gcc -v
Reading specs from
c:\usr\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-970404\specs
gcc version cygnus-2.7.2-970404
foo$ echo 'subl $FOO, %eax' | gcc -E -Wp,-P -DFOO=4 -
subl $FOO, %eax
foo$ echo 'subl $FOO, %eax' | gcc -E -Wp,-P -DFOO=4 -ansi -
subl $FOO, %eax
Suggested workaround: use -Wp,-$
foo$ echo 'subl $FOO, %eax' | gcc -E -Wp,-P -DFOO=4 -Wp,-$ -
subl $4 , %eax
HTH,
--Sigbjorn
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".