regarding type promotion

Ian Lance Taylor iant@google.com
Tue Aug 19 17:02:00 GMT 2008


Richard Harvey Chapman <hchapman@3gfp.com> writes:

> Bob Plantz wrote:
>> Another rule I gave them is "multiplication and division have higher
>> precedence than addition and subtraction; use parentheses in all other
>> cases."
> ++
>
> I used to always get tripped up in embedded code because "==" has
> precedence over "&" which I do not believe is intuitive to most
> people.

That's why gcc warns about it, with -Wparentheses, which is part of
-Wall.

Ian



More information about the Gcc-help mailing list