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
Dead
[official-gcc.git]
/
gomp-20050608-branch
/
gcc
/
testsuite
/
g++.dg
/
ext
/
case-range1.C
blob
0e313d6b6021bef65c0afab006d55046f8e9063a
1
// { dg-do compile }
2
// Tests if case ranges (a GNU extension) are accepted
3
// { dg-options "" }
4
const int low = -2;
5
const int high = 15;
6
7
template <typename T>
8
T f2 (T i)
9
{
10
switch (i)
11
{
12
case low ... high : return i + 1;
13
default : return 0;
14
}
15
}
16
17
int f (int i)
18
{
19
switch (i) {
20
case 1 ... 10: return i + 1;
21
default: return f2 (i);
22
}
23
}