This is the mail archive of the
mailing list for the GCC project.
Re: Strange gcc-3.0.1 preprocessor
- To: Nick Kurshev <nickols_k at mail dot ru>
- Subject: Re: Strange gcc-3.0.1 preprocessor
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Sun, 14 Oct 2001 16:12:22 +0100
- Cc: gcc at gcc dot gnu dot org
- References: <firstname.lastname@example.org>
Nick Kurshev wrote:-
> In file included from biewlib/biewlib.h:25,
> from biewlib/bbio.h:21,
> from biewlib/bbio.c:26:
> biewlib/sysdep/_sys_dep.h:30:14: warning: pasting "/" and "__MACHINE__" does not give a valid preprocessing token
> biewlib/sysdep/_sys_dep.h:30:22: biewlib/sysdep/__MACHINE__/__config.h: No such file or directory
> biewlib/sysdep/_sys_dep.h:31:14: warning: pasting "/" and "__MACHINE__" does not give a valid preprocessing token
> biewlib/sysdep/_sys_dep.h:31:22: biewlib/sysdep/__MACHINE__/_inlines.h: No such file or directory
> Only one question: Is it a bug or is it a new feature of gcc-3.0.1?
The warning tells you the problem. Do you know what ## does?
> Any previouse versions of gcc since 22.214.171.124 upto 2.95.3 handle this
> code correctly.
They are incorrect; from the code it would appear they used to expand
__MACHINE__. That macro should not be expanded, since it is being
operated on by ##.
I suspect you can get the result you want by losing the ##.