This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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] |
This one is an interesting case, since there are strong arguments on both sides.
I enabled the C++ warning about the precedence of&& and || (it's been in C for many years). It found real bugs in real code, bugs that had existed for years.
I think for ordinary programmers, the fact that AND binds more tightly than OR is not well known. After all it makes no intrinsic sense (the connection via boolean logic with * and + is obscure to say the least).
P.S. I like Ada's viewpoint here of requiring parenthesization in this case.
Ian
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |