This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/19912] GCC does not disclose parentheses
- From: "l_belev at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Feb 2005 23:09:19 -0000
- Subject: [Bug middle-end/19912] GCC does not disclose parentheses
- References: <20050211212331.19912.l_belev@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From l_belev at yahoo dot com 2005-02-11 23:09 -------
(In reply to comment #1)
> Note that the first expression can involve undefined behavior when the
> second doesn't, so transformations between these forms would be invalid
> with -ftrapv and until we have internal overflow flags on expressions we
> could only transform in one direction without -fwrapv.
The compiler does know what options are passed to it, so it can disable
such transformations in the rare cases when -ftrapv is specified.
I dont understand what the purpose of -fwrapv is, because the compiler
always knows whether the machine it's currently generating code for,
wraps around the results on arithmetic overflow.
Anyway surely the first consideration applies in this case too,
that is, the transformations could be disabled if they are not applicable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19912