This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] PR19917: Calls to weak functions may trap
- From: Graham Stott <graham dot stott at btinternet dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 13 Feb 2005 14:38:50 +0000
- Subject: Re: [PATCH] PR19917: Calls to weak functions may trap
- References: <Pine.LNX.firstname.lastname@example.org>
This doesn't appear correct to me. I don't see why a "const weak" fn should
be treated any different to a "const" fn w.r.t may trap.
I think the real problem is "if (foo)" is being treated as alays true as
evidenced by this "warning: the address of 'foo', will always evaluate as 'true'
which is correct for a "non-weak" fn but not correct for a "weak" fn.