public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14516] New: [3.4/3.5 regression] -fleading-underscore does not work correctly for file static variables
@ 2004-03-10 19:24 ian at wasabisystems dot com
  2004-03-10 19:28 ` [Bug c/14516] " pinskia at gcc dot gnu dot org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: ian at wasabisystems dot com @ 2004-03-10 19:24 UTC (permalink / raw)
  To: gcc-bugs

Compile this:

int i;
static int j;
int foo()
{
  static int k;
  return k;
}

with -fleading-underscore (gcc -S -fleading-underscore foo.c).  The variable k
is compiled as "k.0" with no leading underscore.  This worked correctly in 3.3.

I suspect that this problem also appears in a compiler targeted for sh-elf,
which sets USER_LABEL_PREFIX to "_".  In that case there is no need to use
-fleading-underscore, as it is implied.  The problem came up on the gdb-patches
list, and I tried recreating it using -fleading-underscore rather than building
an sh-elf compiler.

-- 
           Summary: [3.4/3.5 regression] -fleading-underscore does not work
                    correctly for file static variables
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ian at wasabisystems dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14516


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2004-08-19 20:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-10 19:24 [Bug c/14516] New: [3.4/3.5 regression] -fleading-underscore does not work correctly for file static variables ian at wasabisystems dot com
2004-03-10 19:28 ` [Bug c/14516] " pinskia at gcc dot gnu dot org
2004-05-29 18:49 ` mmitchel at gcc dot gnu dot org
2004-05-29 20:06 ` pinskia at gcc dot gnu dot org
2004-05-30 14:00 ` geoffk at gcc dot gnu dot org
2004-06-12 22:15 ` mmitchel at gcc dot gnu dot org
2004-06-12 23:09 ` geoffk at geoffk dot org
2004-06-13  1:43 ` ian at wasabisystems dot com
2004-06-13  2:12 ` geoffk at geoffk dot org
2004-06-18 23:59 ` mmitchel at gcc dot gnu dot org
2004-06-19  0:43 ` geoffk at geoffk dot org
2004-08-05  5:52 ` cvs-commit at gcc dot gnu dot org
2004-08-05  6:03 ` geoffk at gcc dot gnu dot org
2004-08-05  6:07 ` [Bug c/14516] [3.4 " pinskia at gcc dot gnu dot org
2004-08-05  6:13 ` geoffk at gcc dot gnu dot org
2004-08-09 21:20 ` pinskia at gcc dot gnu dot org
2004-08-19 20:42 ` mmitchel at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).