repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
fail11653.d
blob
4eeb9bea521768e58a6d092a4be0749e81d63e0c
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail11653.d(18): Error: switch case fallthrough - use 'goto case;' if intended
5
fail_compilation/fail11653.d(23): Error: switch case fallthrough - use 'goto default;' if intended
6
---
7
*/
8
9
void
main
()
10
{
11
int
test
=
12412
;
12
int
output
=
0
;
13
switch
(
test
)
14
{
15
case
1
:
16
output
=
1
;
17
//break; //Oops..
18
case
2
: ..
case
3
:
19
output
=
2
;
20
break
;
21
case
4
:
22
output
=
3
;
23
default
:
24
output
=
4
;
25
}
26
}