This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libstdc++] more operator precedence bugs


> -	      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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]