This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Does weak work on PPC with -O2?


> Date: Sun, 11 Mar 2001 21:14:03 -0800
> From: "H . J . Lu" <hjl@gnu.org>
> Cc: gcc-bugs@gcc.gnu.org

> Well, undefined weak symbol has a well defined semantics. Glibc
> uses undefined weak symbol. I don't believe glibc is the only
> package which uses it. It sounds a serious bug to me. Fortunately,
> it works on ia32 "by accident".

Feel free to fix it.  A good fix would be to detect that the
variable is weak and then permitting such references to trap; that
would fix both the performance and the correctness problem.

> BTW, if gcc cannot do it right, shouldn't it issue a warning instead
> of generating incorrect code?

That would be as hard as getting it right.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]