First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 9209
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Neil Booth <neil@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: 121269@bugs.debian.org
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 9209 depends on: Show dependency tree
Show dependency graph
Bug 9209 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2003-01-06 15:06
[ 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

------- Comment #1 From Wolfgang Bangerth 2003-01-06 16:43 -------
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.

------- Comment #2 From Giovanni Bajo 2003-05-17 07:32 -------
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.

------- Comment #3 From Neil Booth 2003-05-17 20:31 -------
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed in 3.4.  See 3.4 CPP documentation for the gory details.

------- Comment #4 From Neil Booth 2003-05-17 20:35 -------
Responsible-Changed-From-To: gdr->unassigned
Responsible-Changed-Why: http://gcc.gnu.org/ml/gcc-cvs/2003-05/msg00698.html

------- Comment #5 From Neil Booth 2003-05-17 20:35 -------
State-Changed-From-To: closed->feedback
State-Changed-Why: Add a URL to the patch

------- Comment #6 From Neil Booth 2003-05-17 20:35 -------
State-Changed-From-To: feedback->closed
State-Changed-Why: Silly GNATS, this is fixed.

------- Comment #7 From Giovanni Bajo 2003-05-18 02:53 -------
Responsible-Changed-From-To: unassigned->neil
Responsible-Changed-Why: Author of the mainline patch.

------- Comment #8 From Giovanni Bajo 2003-05-18 02:53 -------
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.

------- Comment #9 From Mark Mitchell 2003-07-02 04:59 -------
This PR is not critical enough to hold up the 3.3.1 release.

------- Comment #10 From Mark Mitchell 2003-10-02 21:32 -------
Postponed until GCC 3.3.3.

------- Comment #11 From Eric Botcazou 2003-12-12 09:44 -------
Fixed in GCC 3.4.

------- Comment #12 From Giovanni Bajo 2003-12-15 18:01 -------
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.

------- Comment #13 From Eric Botcazou 2003-12-15 18:59 -------
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.

------- Comment #14 From Gabriel Dos Reis 2003-12-15 20:06 -------
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

------- Comment #15 From Giovanni Bajo 2003-12-16 01:22 -------
OK, then sorry for the noise.

First Last Prev Next    No search results available      Search page      Enter new bug