|
From: | Raphael Assenat |
Subject: | Re: [avr-gcc-list] possible compiler/optimizer problem (?) |
Date: | Mon, 30 May 2005 14:08:34 -0400 |
User-agent: | Mozilla Thunderbird 1.0 (X11/20050118) |
Gary Douglas wrote:
Hi all,Not sure if this is a bug, or if what I'm trying to do is just incorrect C syntax. Regardless, the compiler doesn't warn about the following:void led_blinky() { static uint8_t value= 1;value != value;//This is the problem line - always true
This line does nothing. != is a boolean operator.If you add the -Wall argument when compiling, gcc will give a warning: statement with no effect
Regards, Raphael Assenat
[Prev in Thread] | Current Thread | [Next in Thread] |