This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
[ Reported to the Debian BTS as report #121269. Please CC 121269@bugs.debian.org on replies. Log of report can be found at http://bugs.debian.org/121269 ] this changed from gcc-2.95 to gcc-3.x. Even when using -Wall, -fno-dollars-in-identifiers doesn't warn about dollars in identifiers and does not give any error messages. $ gcc-2.95 -fno-dollars-in-identifiers bug-121269.c bug-121269.c:1: `$' in identifier bug-121269.c: In function `main': bug-121269.c:4: `$' in identifier bug-121269.c:4: `$' in identifier bug-121269.c:4: `$' in identifier bug-121269.c:6: `$' in identifier $ gcc-3.2 -fno-dollars-in-identifiers bug-121269.c /tmp/ccpP3lr8.s: Assembler messages: /tmp/ccpP3lr8.s:15: Error: suffix or operands invalid for `mov' /tmp/ccpP3lr8.s:17: Error: suffix or operands invalid for `cmp' /tmp/ccpP3lr8.s:26: Error: suffix or operands invalid for `inc' ------------- int $b; main() { for($b=0;$b<10;$b++) { printf("%d\n",$b); } } ------------- Release: gcc-3.3 branch 20021231 Environment: i386-linux
State-Changed-From-To: open->analyzed 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.
Responsible-Changed-From-To: unassigned->gdr Responsible-Changed-Why: Diangostic mantainer. Situation about this warning is very confusing. It seems to be better on mainline (we get a warning now, but only if also -pedantic is specified), but it is still not clear. At the very least, documentation should be updated.
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed in 3.4. See 3.4 CPP documentation for the gory details.
Responsible-Changed-From-To: gdr->unassigned Responsible-Changed-Why: http://gcc.gnu.org/ml/gcc-cvs/2003-05/msg00698.html
State-Changed-From-To: closed->feedback State-Changed-Why: Add a URL to the patch
State-Changed-From-To: feedback->closed State-Changed-Why: Silly GNATS, this is fixed.
Responsible-Changed-From-To: unassigned->neil Responsible-Changed-Why: Author of the mainline patch.
State-Changed-From-To: closed->analyzed State-Changed-Why: Neil, this is still a 3.3 regression. If you can't backport the patch from mainline it's fine of course, but this should be kept open until the 3.3 branch is closed.
This PR is not critical enough to hold up the 3.3.1 release.
Postponed until GCC 3.3.3.
Fixed in GCC 3.4.
This is a regression on the 3.3 branch. Even if it's fixed on 3.4, the bug should stay open until the branch is closed.
What is this policy for? Doing so unnecessarily clutters Bugzilla. The bug will be fixed in GCC 3.4 and not in GCC 3.3.x as clearly indicated by the milestone. Everybody except you closes in this case.
Subject: Re: [3.3 regression] cc allows dollars in identifiers by default on i386 but fails "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes: | What is this policy for? Doing so unnecessarily clutters | Bugzilla. The bug will be fixed in GCC 3.4 and not in GCC 3.3.x as | clearly indicated by the milestone. I think Eric is right. The PR should be closed since we have no plan to fix it on 3.3.x and it is already fixed in 3.4.x -- Gaby
OK, then sorry for the noise.