On Fri, May 25, 2012 at 10:11:54AM +0200, Dodji Seketeli wrote: > --- a/libcpp/lex.c > +++ b/libcpp/lex.c > @@ -589,8 +589,8 @@ search_line_fast (const uchar *s, const uchar *end > ATTRIBUTE_UNUSED) > > { > #define N (sizeof(vc) / sizeof(long)) > - > - typedef char check_count[(N == 2 || N == 4) * 2 - 1]; > + /* The below is a static assertion. */ > + extern char check_count[(N == 2 || N == 4) * 2 - 1]; > union { > vc v; > unsigned long l[N];
Alternatively you could put the static assertion with the comment into the l field, i.e. /* Statically assert that N is 2 or 4. */ unsigned long l[(N == 2 || N == 4) ? N : -1]; Jakub