This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/50082] -Wstrict-overflow mishandles typedef
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 16 Aug 2011 09:10:12 +0000
- Subject: [Bug c/50082] -Wstrict-overflow mishandles typedef
- Auto-submitted: auto-generated
- References: <bug-50082-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50082
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-16 09:10:12 UTC ---
(In reply to comment #5)
> "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> writes:
>
> > I suppose the forwprop code wants to force a warning at -Wstrict-overflow=1
> > if the conditional becomes optimized to a constant at compile-time?
>
> Yes. But perhaps it is overly aggressive--are these conditionals being
> optimized to a constant? Maybe the condition for the first argument to
> fold_undefer_overflow_warnings needs to be fixed.
In this case not. forwprop doesn't do anything more fancy than calling
fold, so fold should already handle optimizing to a constant specially, no?
So I guess the first argument to fold_undefer_overflow_warnings should be
zero? I'll be posting a patch and CC you.