Path: utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!CS.UTAH.EDU!caeco!jj From: caeco!jj@CS.UTAH.EDU (Jeff Jennings) Newsgroups: gnu.gcc.bug Subject: Bug in C preprocessor Message-ID: <8903271852.AA16332@sol.systems.com> Date: 27 Mar 89 18:52:07 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 30 I have found what I believe to be a bug in cpp version 1.34. The problem is that macros are not expanded if they appear as operands to the concatenation operator. The configuration is "config.gcc sun3". $ cat bug.c #define PREFIX abc_ #define XYZ(name) PREFIX ## name() main () { XYZ(func); } $ gcc -v -E bug.c gcc version 1.34 /usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 bug.c GNU CPP version 1.34 # 1 "bug.c" main () { PREFIXfunc() ; } -------- Jeff Jennings Silicon Compiler Systems uunet!iconsys!caeco!jj 7090 South Union Park Ave., Suite 200 caeco!jj@cs.utah.edu Midvale, Utah 84047 USA (801)255-8880