This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: new cpp preprocessor fails
- To: jarausch at igpm dot rwth-aachen dot de
- Subject: Re: new cpp preprocessor fails
- From: Neil Booth <neilb at earthling dot net>
- Date: Tue, 14 Nov 2000 18:16:41 +0000
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <200011141036.LAA06341@numa1.igpm.rwth-aachen.de>
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
>