This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

cpp macro expansion bug


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


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