Paul Eggert wrote:
> Something like this:
>
> enum {
> abc = (verify_true (1 + 1 == 2) ? 7 : UINT_MAX)
> };
Thanks. I see: you avoid a expression of type 'void', because such an
expression can only be used in a "comma expression", and a "comma expression"
is not valid inside an enum initializer.
One can also avoid the strange UINT_MAX alternative by doing
enum {
abc = verify_true (1 + 1 == 2) * 0 + 7
};
I'm adding this to the test cases in tests/test-verify.c.
Bruno
_______________________________________________
bug-gnulib mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnulib