Bug#121269: c/9209: cc allows dollars in identifiers by default on i386 but fails
- To: 121269@bugs.debian.org, ballombe@debian.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org
- Subject: Bug#121269: c/9209: cc allows dollars in identifiers by default on i386 but fails
- From: bangerth@dealii.org
- Date: 7 Jan 2003 00:43:22 -0000
- Message-id: <[🔎] 20030107004322.13689.qmail@sources.redhat.com>
- Reply-to: bangerth@dealii.org, 121269@bugs.debian.org, ballombe@debian.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org, 121269@bugs.debian.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
Reply to: