This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/9209: cc allows dollars in identifiers by default on i386 but fails
- From: bangerth at dealii dot org
- To: 121269 at bugs dot debian dot org, ballombe at debian dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 7 Jan 2003 00:43:22 -0000
- Subject: Re: c/9209: cc allows dollars in identifiers by default on i386 but fails
- Reply-to: bangerth at dealii dot org, 121269 at bugs dot debian dot org, ballombe at debian dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: cc allows dollars in identifiers by default on i386 but fails
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Jan 6 16:43:21 2003
State-Changed-Why:
Confirmed.
There are several things that are wrong:
- The warning has no effect, i.e. it does not warn when
dollars _are_ in identifiers.
- C++ and ISO C do not allow dollars in identifiers. And
they say so: compiling with -std=c99 and without the
flag in question yields errors
- The documentation says that this is a flag that controls
the _C++_ dialect, yet it is accepted by the C front end
as well
- The documentation states:
`-fdollars-in-identifiers'
Accept `$' in identifiers. You can also explicitly prohibit use of
`$' with the option `-fno-dollars-in-identifiers'. (GNU C allows
`$' by default on most target systems, but there are a few
exceptions.) Traditional C allowed the character `$' to form part
of identifiers. However, ISO C and C++ forbid `$' in identifiers.
Linux alone certainly does not mean "most", but it is an
important system and if it does not work there, the
sentence about "most systems" might mislead about the
portability of code that uses dollars in identifiers.
That being said, my opinion clearly is: just don't do it :-)
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9209