> You can't get very meaningful errors here - I have not found any way to get
> a user-defined error message in conjunction with static asserts.
I added ##_##message, to NAME2_ and updated everything else as needed,
so now I get
static_assert( 1 == 2, One_Not_Equal_To_Two ); that looks like:
asser
On 30/08/2011 14:03, Bob Paddock wrote:
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.
The error
>> 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
On 29/08/2011 22:03, Dave Hansen wrote:
> From: graceindustr...@gmail.com
[...]
> So that explains the difference. Seems like there could be a better
> error message for this case, 'don't use enum here', alas "The
> preprocessor does not know anything about types in the language"...
Here's
> From: graceindustr...@gmail.com
[...]
> So that explains the difference. Seems like there could be a better
> error message for this case, 'don't use enum here', alas "The
> preprocessor does not know anything about types in the language"...
Here's a cute/ugly little macro that might help yo
On Mon, Aug 29, 2011 at 3:15 PM, Wim Lewis wrote:
> On Mon, 29 Aug 2011, Weddington, Eric wrote:
>>
>> For the preprocessor purposes, I would bet that somehow "last" evaluates
>> to 0, so of course the condition will always be true.
> "[6] Identifiers that are not macros, which are all consider
On Mon, 29 Aug 2011, Weddington, Eric wrote:
For the preprocessor purposes, I would bet that somehow "last" evaluates
to 0, so of course the condition will always be true.
Yes, I think this is part of the language standard (for better or worse).
I don't have a standard cite but it's described
-gcc-list-bounces+eric.weddington=atmel@nongnu.org] On
> Behalf Of Bob Paddock
> Sent: Monday, August 29, 2011 12:37 PM
> To: AVR-GCC
> Subject: [avr-gcc-list] Can enumerator values be used in a #if
> preprocessordirective?
>
> I have the following file test.c:
>
> #define MAX (