This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Prague GCC folks meeting summary report
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 24 Sep 2009 15:59:59 +0000 (UTC)
- Subject: Re: Prague GCC folks meeting summary report
- References: <alpine.LNX.2.00.0909241234100.4520@zhemvz.fhfr.qr>
On Thu, 24 Sep 2009, Richard Guenther wrote:
> The regular problem of emitting warnings for unreachable code may
> be addressed by using a new variant of debug statements. Those
> would queue up warnings and if still around emit them during
> expansion. Currently queueing a warning can be done with inserting
> a __builtin_warning function call.
If queueing a warning you need to be careful about i18n - probably queue
the exact text that would be emitted (as affected by options such as
-fdiagnostics-show-*) and then make sure it does not get passed through
translation again.
Other cases for queueing warnings are where the issue is not unreachable
code but some other property that may be proved during optimization, such
as whether an expression implicitly converted from signed to unsigned can
ever actually be negative. There are several places where the C front end
lowers expressions (calls c_fully_fold) prematurely to avoid bogus
warnings in such cases, and if all folding (and probably then the other
lowering c_fully_fold does) is to be moved to gimplification time or later
then a solution to these warnings is needed.
--
Joseph S. Myers
joseph@codesourcery.com