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]

Re: RFC: -Wall by default


Robert Dewar <dewar@adacore.com> writes:
>> I've got a radically different experience here, real bugs were
>> introduced while trying to remove this warning, and as far as I can
>> tell, I've never found any bugs involving precedence of&&  and || --
>> in the code I'm working on --, whose precedence is really well known
>> from everyone.
>
> You simply can't make a claim on behalf of everyone like this, and it's
> very easy to prove you wrong, i personally know many competent
> programmers who do NOT know this rule.

... and it's quite possible that such bugs resulting from adding
parentheses means that the programmer "fixing" the code didn't
actually know the right precedence!

I think the relative precedence of * and + can be safely termed "very
well known", but in the case of && and ||, it's not so clear...

-miles

-- 
Brain, n. An apparatus with which we think we think.


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