Douglas Gregor | bd30031 | 2009-03-12 16:53:44 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only -verify %s |
2 | |||||
3 | template<int I, int J> | ||||
4 | struct Bitfields { | ||||
5 | int simple : I; // expected-error{{bit-field 'simple' has zero width}} | ||||
6 | int parens : (J); | ||||
7 | }; | ||||
8 | |||||
9 | void test_Bitfields(Bitfields<0, 5> *b) { | ||||
10 | (void)sizeof(Bitfields<10, 5>); | ||||
11 | (void)sizeof(Bitfields<0, 1>); // expected-note{{in instantiation of template class 'struct Bitfields<0, 1>' requested here}} | ||||
12 | } |