Mail Archives: cygwin/1997/08/31/12:10:43
> > >
> > > 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 AT cygnus DOT com" with one line of text: "help".
- Raw text -