Nuno Lopes | f231998 | 2009-02-02 15:00:55 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
2 | |||||
3 | // PR3459 | ||||
4 | struct bar { | ||||
5 | char n[1]; | ||||
6 | }; | ||||
7 | |||||
8 | struct foo { | ||||
9 | char name[(int)&((struct bar *)0)->n]; | ||||
Nuno Lopes | 1dfa6e1 | 2009-02-02 22:32:08 +0000 | [diff] [blame] | 10 | char name2[(int)&((struct bar *)0)->n - 1]; //expected-error{{fields must have a constant size}} |
Nuno Lopes | f231998 | 2009-02-02 15:00:55 +0000 | [diff] [blame] | 11 | }; |