This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] PR19917: Calls to weak functions may trap


Roger,

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.

Cheers
Graham


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