summaryrefslogtreecommitdiff
path: root/test/Sema/switch.c
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-07-15 17:07:12 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-07-15 17:07:12 +0000
commit4e58654b47e89efbb1a8ca032c08fd354c3b0b61 (patch)
tree5e946d69177464379cb1a38ac18206180d763639 /test/Sema/switch.c
parent4ba675006b5a8edfc48b6a9bd3dcf54a70cc08f2 (diff)
Notes
Diffstat (limited to 'test/Sema/switch.c')
-rw-r--r--test/Sema/switch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/Sema/switch.c b/test/Sema/switch.c
index bb4822916cc72..4e39e0f0c2d5d 100644
--- a/test/Sema/switch.c
+++ b/test/Sema/switch.c
@@ -50,12 +50,14 @@ void test4()
}
switch (cond) {
- case g() && 0: // expected-error {{expression is not an integer constant expression}} // expected-note {{subexpression not valid in an integer constant expression}}
+ case g() && 0: // expected-error {{expression is not an integer constant expression}} // expected-note {{subexpression not valid in an integer constant expression}} \
+ expected-warning {{use of logical && with constant operand}}
break;
}
switch (cond) {
- case 0 ... g() || 1: // expected-error {{expression is not an integer constant expression}} // expected-note {{subexpression not valid in an integer constant expression}}
+ case 0 ... g() || 1: // expected-error {{expression is not an integer constant expression}} // expected-note {{subexpression not valid in an integer constant expression}} \\
+ expected-warning {{use of logical || with constant operand}}
break;
}
}