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

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

[avr-gcc-list] Feature request - compiler warning for "if" stmts that d


From: Nathan Smith
Subject: [avr-gcc-list] Feature request - compiler warning for "if" stmts that do nothing
Date: Mon, 13 Dec 2004 15:40:13 +1000
User-agent: Mozilla Thunderbird 0.8 (Windows/20040913)

I'm using avrgcc 3.3 so please just flame me to death if more recent versions already have this :)

A feature I'm requesting is that the compiler generate a warning for control statements that don't do anything.
e.g.

if(value==10);
{
}

The problem being the semi-colon at the end of the if statement.

I'm used to other compilers for other platforms (PC) and if I were to write the above code they would display a warning at compile time.

Just a suggestion, I have no idea if this is allowed by the relevant standards etc.





reply via email to

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