[libstdc++] more operator precedence bugs

Sylvain Pion Sylvain.Pion@sophia.inria.fr
Fri Apr 12 11:07:00 GMT 2002


> -	      if (__mode & ios_base::ate
> +	      if ((__mode & ios_base::ate)

I don't understand why these parenthesis are needed.
What am I missing ?

Maybe GCC could warn about these kind of possible bugs ?
I know Visual C++ emits the following warning in this situation :
: warning C4554: '&' : check operator precedence for possible error; use      
parentheses to clarify precedence                                             

-- 
Sylvain



More information about the Gcc-patches mailing list