new cpp preprocessor fails

Neil Booth neilb@earthling.net
Tue Nov 14 10:17:00 GMT 2000


Please provide all the macros needed to reproduce your result.

Neil.

jarausch@igpm.rwth-aachen.de wrote:-
> 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
> 


More information about the Gcc-bugs mailing list