This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/7544] [3.3/3.4/4.0 regression] #pragma weak problem
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Nov 2004 01:27:35 -0000
- Subject: [Bug c/7544] [3.3/3.4/4.0 regression] #pragma weak problem
- References: <20020808130601.7544.poulot@wanadoo.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jsm28 at gcc dot gnu dot org 2004-11-24 01:27 -------
The bug, as described, is a bug and is still present. The thread
referenced talks about the case where foo isn't declared, but the bug
is about the case where bar isn't declared. Where bar isn't declared, but
foo is defined in that translation unit, 2.95 generates output which assembles
to an object file with a weak alias, while current GCC doesn't. Per Sun's
specification <http://docs.sun.com/source/817-5064/sun.specific.html#48658>,
this is a bug.
#pragma weak bar = foo
void foo(void) {}
generates symbols
00000000 W bar
00000000 T foo
00000000 t gcc2_compiled.
with 2.95,
00000000 W bar
00000000 T foo
with 3.0, but just
00000000 T foo
with later versions. The manual referred to in the referenced thread is
an old C++ manual and so irrelevant to this bug.
Setting milestone to 4.0.0 as not expecting to fix this on earlier branches.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |jsm28 at gcc dot gnu dot org
Status|RESOLVED |REOPENED
Resolution|INVALID |
Summary|#pragma weak problem |[3.3/3.4/4.0 regression]
| |#pragma weak problem
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7544