------- Comment #2 from burnus at gcc dot gnu dot org  2010-08-18 17:44 -------
(In reply to comment #1)
> (In reply to comment #0)
> > In some cases, one might need to check for the unsave_math_optimization flag
> > before changing, e.g., "2+(a-2)" to "a" - or rather "(a)".
> 
> The whole point of PAREN_EXPR in the middle-end is to avoid transforming
> 2 + (a - 2) even _with_ -funsafe-math-optimizations / -ffast-math!

Well, I am talking about FE optimizations with -fno-protect-parens (note the
"no-"). The PAREN_EXPR protection *is* and *should* one done with
-fprotect-parens (which is the default setting).

In terms of the middle end, -fno-protect-parens and -fprotect-parens are both
properly handled.


-- 


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

Reply via email to