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]

new cpp preprocessor fails


When using gcc_20001024 built with --enable-cpp --enable-c-cpplib
it fails to evaluate a symbol multiple times:

in file  sim-n-core.h ( from current gdb-cvs/sim/common )
there is
      val = T2H_M (*(unsigned_M*) sim_core_translate (mapping, addr));

where we have

#define unsigned_M XCONCAT2(unsigned_,M)
and from symcat.h

#define CONCAT2(a,b)	 a##b
#define XCONCAT2(a,b)     CONCAT2(a,b)

This is only partially evaluated to
      val = endian_t2h_16(*(XCONCAT2(unsigned_,16)*) sim_core_translate (mapping, addr));
                            ^^^^^^^^^^^^^^^^^^^^^^

At other places within im-n-core.h 
unsigned_M
is evaluated correctly


Thanks  for looking into it.

Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany


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