]>
Commit | Line | Data |
---|---|---|
007a787d CB |
1 | /* Test for case labels not integer constant expressions but folding |
2 | to integer constants (used in Linux kernel). */ | |
3 | /* { dg-do compile } */ | |
b944e97a | 4 | /* { dg-options "-pedantic" } */ |
007a787d CB |
5 | |
6 | extern unsigned int u; | |
7 | ||
8 | void | |
9 | b (int c) | |
10 | { | |
11 | switch (c) | |
12 | { | |
b944e97a | 13 | case (int) (2 | ((4 < 8) ? 8 : u)): /* { dg-warning "case label is not an integer constant expression" } */ |
007a787d CB |
14 | ; |
15 | } | |
16 | } | |
17 |