|
From: | Bob Paddock |
Subject: | Re: [avr-gcc-list] Can enumerator values be used in a #if preprocessordirective? |
Date: | Tue, 30 Aug 2011 08:03:13 -0400 |
>> Refinements of the concept left as an exercise for the reader. Regards, >> > > Does that mean I am not allowed to post my refinements? No. Please post. Extra points for using __FILE__ __FUNCITON__ and __LINE__ to give meaningful error message. Digging out my old issue of Embedded Systems on Compile Time Assertions we find this: http://www.eetimes.com/discussion/programming-pointers/4025549/Catching-errors-early-with-compile-time-assertions One thing to watch out for in some of the examples I've seen is in C99 a zero length variable array could be created.
[Prev in Thread] | Current Thread | [Next in Thread] |