This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/19031] [4.0 Regression] #pragma weak handling changes in 4.0.0
- From: "aj at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Dec 2004 10:30:04 -0000
- Subject: [Bug c/19031] [4.0 Regression] #pragma weak handling changes in 4.0.0
- References: <20041216104306.19031.pth@suse.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From aj at gcc dot gnu dot org 2004-12-17 10:30 -------
Further testing showed that this is a fallout from unit-at-a-time:
aj@reger:~/tmp> /opt/gcc/4.0-devel/bin/gcc -c test.c
aj@reger:~/tmp> nm test.o
0000000000000000 r bar
0000000000000000 V foo
aj@reger:~/tmp> /opt/gcc/4.0-devel/bin/gcc -c test.c -O2
aj@reger:~/tmp> nm test.o
U bar
aj@reger:~/tmp> /opt/gcc/4.0-devel/bin/gcc -c test.c -O2 -fno-unit-at-a-time
aj@reger:~/tmp> nm test.o
0000000000000000 r bar
0000000000000000 V foo
The question still remains, what are the symantics? Do we have to declare
the variable as extern or not?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |jh at suse dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19031