2 /* { dg-do compile } */
3 /* { dg-prune-output "case label value exceeds" } */
9 extern bool foo (void);
14 switch (b
) /* { dg-warning "switch condition has" } */
24 switch (a
&& b
) /* { dg-warning "switch condition has" } */
29 switch ((bool) (a
&& b
)) /* { dg-warning "switch condition has" } */
34 switch ((a
&& b
) || a
) /* { dg-warning "switch condition has" } */
39 /* No warnings on following. */
40 switch ((int) (a
&& b
))
42 switch ((unsigned int) (a
&& b
))
44 switch ((unsigned short int) (a
&& b
))
46 switch ((char) (a
&& b
))
53 switch (!!a
) /* { dg-warning "switch condition has" } */
58 switch (!a
) /* { dg-warning "switch condition has" } */
68 switch (foo ()) /* { dg-warning "switch condition has" } */
78 switch (a
== 3) /* { dg-warning "switch condition has" } */
83 switch (a
!= 3) /* { dg-warning "switch condition has" } */
88 switch (a
> 3) /* { dg-warning "switch condition has" } */
93 switch (a
< 3) /* { dg-warning "switch condition has" } */
98 switch (a
<= 3) /* { dg-warning "switch condition has" } */
103 switch (a
>= 3) /* { dg-warning "switch condition has" } */
108 switch (foo (), foo (), a
>= 42) /* { dg-warning "switch condition has" } */
113 switch (a
== 3, a
& 4, a
^ 5, a
)
115 switch ((int) (a
== 3))
117 switch ((int) (a
!= 3))
124 switch (b
) /* { dg-warning "switch condition has" } */
129 switch (!b
) /* { dg-warning "switch condition has" } */
140 switch (b
= 1) /* { dg-warning "switch condition has" } */
154 switch ((unsigned int) i
)
156 switch ((bool) i
) /* { dg-warning "switch condition has" } */