|
From: | Bob Paddock |
Subject: | Re: [avr-gcc-list] LIBC 1.2.6 vs 1.4.0 header files, FLASH and EEPROM |
Date: | Tue, 06 Dec 2005 15:17:58 -0500 |
User-agent: | Opera M2/8.50 (Win32, build 7700) |
Why not test for #if __AVR_LIBC_VERSION__ < 10400UL put old code here #endif
Any C preprocessor macro that hasn't been defined but is used in a preprocessor expression as shown above automatically evaluates to 0, so the above test will work.
Lint would not like it. In this case there is no issue with that usage, but I don't like relying on implied evaluations as they can lead to very subtle bugs.
[Prev in Thread] | Current Thread | [Next in Thread] |