avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Feature request - compiler warning for "if" stmts tha


From: Curtis Maloney
Subject: Re: [avr-gcc-list] Feature request - compiler warning for "if" stmts that do nothing
Date: Tue, 14 Dec 2004 09:06:34 +1100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Joerg Wunsch wrote:
Loops of this kind are often used as spin-loops:

        while ((SPSR & (1 << SPIF)) == 0)
                ;

Warning on this would be a bit wasteful.


Personaly, I'd see a warning on this as valid.  An _error_ on this would be 
wrong.

I'd rather have a few warnings on things I know are ok _this time_, that not have warnings on something that _might_ be wrong. Like the "suggest parenthesis around assignment in condition" warning. Helpful for finding the time when you accidently put = instead of ==, but some times it's what you meant.

--
Curtis Maloney


reply via email to

[Prev in Thread] Current Thread [Next in Thread]