This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Preprocessor: some dollars-in-identifiers mishap broke cris-axis-elf
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: gcc-bugs at gcc dot gnu dot org, <neil at daikokuya dot co dot uk>
- Date: Tue, 10 Jun 2003 08:31:05 -0400 (EDT)
- Subject: Re: Preprocessor: some dollars-in-identifiers mishap broke cris-axis-elf
On Thu, 22 May 2003, Hans-Peter Nilsson wrote:
> Some change between 2003-05-16 and 2003-05-20 make me see in
> gcc.log:
> Excess errors:
> <built-in>:56:21: warning: '$' in identifier or number
>
> "everywhere" (1000:s of test-cases) for example
> gcc.dg/20000111-1.c. Note #define REGISTER_PREFIX "$" but
> that's all dollar-wise.
As I guessed, it's exactly (in a callee of) the
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
in c-cppbuiltin.c that the warning is emitted.
I think GCC shouldn't warn on that macro definition in
particular and perhaps not on builtin definitions in general.
Neil, what's preferred and what's the best way to accomplish it?
Perhaps by replacing all builtin calls to cpp_define in
c-cppbuiltin.c with calls to a new function cpp_define_nowarn
which wraps cpp_define calls, unsetting unwanted bits like
pfile->warn_dollars for the duration of the call?
brgds, H-P
PS. Still >3 weeks behind on mailing lists.