This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
cpp macro expansion bug
- To: gcc-bugs at gcc dot gnu dot org
- Subject: cpp macro expansion bug
- From: Mumit Khan <khan at NanoTech dot Wisc dot EDU>
- Date: Tue, 25 Apr 2000 14:35:03 -0500
While trying to bootstrap recent snapshots, came about this odd cpp
behaviour. To reproduce this on any platform, please add the following
to your *predefines specs entry along with whatever's there already:
*predefines:
-D__stdcall=__attribute__((__stdcall__)) -D_stdcall=__attribute__((__stdcall__))
Now preprocess the following (__stdcall expansion recurses):
#define NTAPI __stdcall
NTAPI void foo ();
$ ./xgcc -B./ -specs specs.test -c -E cpp-bug.c
# 1 "cpp-bug.c"
__attribute__((__attribute__((__stdcall__)))) void foo ();
With older gcc using old cpp, I get the expected output:
# 1 "cpp-bug.c"
__attribute__((__stdcall__)) void foo ();
Regards,
Mumit