[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#121269: dollars in identifiers, even with -fno-dollars-in-identifiers



Matthias Klose <doko@cs.tu-berlin.de> writes:

> As Chris and Martin have pointed out, the behaviour should not be
> changed. To get the warning, use `-std=c89' or `-std=c99'. But I'm
> unsure, why compiling with -fno-dollars-in-identifiers doesn't print a
> warning. Is this correct?

No, that's a bug in the compiler. In cppinit.c:set_lang,
dollars_in_ident is only initialized from lang_defaults::dollars_in_ident,
ignoring the global variable dollars_in_ident.

OTOH, the global variable dollars_in_ident is initialized with
DOLLARS_IN_IDENTIFIERS if it is not explicitly specified on the
command line. So outright copying the global variable into CPP_OPTIONS
would not be correct, either, as it would ignore the choice of
language.

I believe these mechanisms (language default, target default, command
line) need to be combined somehow.

Regards,
Martin


-- 
To UNSUBSCRIBE, email to debian-gcc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: