https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67629

--- Comment #9 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Matthew Woehlke from comment #8)
> Given what -Wreturn-type is trying to accomplish, I wonder if a "delayed
> issuance" strategy would be in order? IOW, have the front end "trigger" the
> warning, as now, but stuff it in a queue or such, continue on with
> optimization, then go back and check the queue to see if the warning still
> looks legitimate, and only *then* emit it.
> 
> Where this gets sticky is that at -O0, we still may not know that the
> warning is spurious. We might, ideally, want to perform optimization anyway
> on a function with a "pending" -Wreturn-type warning, but throw out the
> result.

I think Martin Sebor's work to introduce a __builtin_warning() function might
be relevant here...

Reply via email to