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
[NDS32] Add intrinsic functions for TLB operation and data prefech.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr59304.c
blob
f56ebc374bd8776ce0d4e6e06759dd30dd442ad7
1
/* { dg-do compile } */
2
enum
EE
3
{
4
ONE
,
TWO
,
THREE
5
};
6
7
int
f
(
enum
EE e
)
8
{
9
int
r
=
0
;
10
11
#pragma GCC diagnostic push
12
#pragma GCC diagnostic error
"-Wswitch-enum"
13
14
switch
(
e
)
15
{
16
case
ONE
:
17
r
=
1
;
18
break
;
19
case
TWO
:
20
r
=
2
;
21
break
;
22
case
THREE
:
23
r
=
3
;
24
break
;
25
}
26
27
#pragma GCC diagnostic pop
28
29
switch
(
e
)
30
{
31
case
ONE
:
32
r
=
1
;
33
break
;
34
case
TWO
:
35
r
=
2
;
36
break
;
37
}
38
39
return
r
;
40
}