------- Comment #4 from rguenth at gcc dot gnu dot org  2010-05-29 17:46 -------
(In reply to comment #3)
> I don't think this bug is of any use.  Unlike nonnull, unused return values do
> not trigger undesirable optimizations and (as far as I can tell) cannot
> possibly result in miscompilation.
> 
> This bug is indeed about a loophole, and one that could indeed cause some bugs
> (even security bugs).  But, fixing it would also make it impossible for many
> projects to use -Werror, since they have to deal with the fact that __wur was
> used inappropriately by glibc.
> 
> Adding another attribute and making __wur overridable BTW would not be a
> solution since glibc would certainly switch to the new __really_wur attribute
> and we'd be in the same situation.  :-)

True, but if int dummy = foo() works then we can also make (void) foo ()
work.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44321

Reply via email to