OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PR c++/36254
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wswitch-default-1.C
1
// PR C++/21123
2
/* { dg-do compile } */
3
/* { dg-options "-Wswitch-default" } */
4
5
6
template <typename ArrayType>
7
void foo( )
8
{
9
int i = 0;
10
11
switch ( i ) /* { dg-bogus "switch missing default case" } */
12
{
13
case 9:
14
default:
15
break;
16
}
17
}
18
19
void f()
20
{
21
foo<int>();
22
}