Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
87192773
Commit
87192773
authored
May 27, 2003
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert change on wrong branch
From-SVN: r67191
parent
7a6cdb44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
gcc/testsuite/g++.dg/warn/Wswitch-1.C
+6
-6
gcc/testsuite/g++.dg/warn/Wswitch-2.C
+4
-4
No files found.
gcc/testsuite/g++.dg/warn/Wswitch-1.C
View file @
87192773
...
...
@@ -20,16 +20,16 @@ foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
default:
break
;
}
switch
(
ei
)
{
/* { dg-warning "enumeration value `e1' not handled in switch" "enum e1" } */
}
/* { dg-warning "enumeration value `e2' not handled in switch" "enum e2"
{ target *-*-* } 23
} */
{
/* { dg-warning "enumeration value `e1' not handled in switch" "enum e1"
{ target *-*-* } 24
} */
}
/* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
switch
(
ej
)
{
default:
break
;
}
switch
(
ek
)
/* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
switch
(
ek
)
{
case
e1
:
return
1
;
}
}
/* { dg-warning "enumeration value `e2' not handled in switch" "enum e2" } */
switch
(
el
)
{
case
e1
:
return
1
;
...
...
@@ -46,12 +46,12 @@ foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
case
e2
:
return
2
;
default:
break
;
}
switch
(
eo
)
/* { dg-warning "case value `3' not in enumerated type `e'" "excess 3" } */
switch
(
eo
)
{
case
e1
:
return
1
;
case
e2
:
return
2
;
case
3
:
return
3
;
}
}
/* { dg-warning "case value `3' not in enumerated type `e'" "excess 3" } */
switch
(
ep
)
{
case
e1
:
return
1
;
...
...
gcc/testsuite/g++.dg/warn/Wswitch-2.C
View file @
87192773
...
...
@@ -13,19 +13,19 @@ foo (enum e ei, int j)
case
e3
:
return
2
;
case
e4
:
return
3
;
}
/* No warning here since e2 has the same value as e3. */
switch
(
ei
)
/* { dg-warning "enumeration value `e4' not handled in switch" "enum e4" } */
switch
(
ei
)
{
case
e1
:
return
1
;
case
e2
:
return
2
;
}
}
/* { dg-warning "enumeration value `e4' not handled in switch" "enum e4" } */
switch
((
int
)
ei
)
{
case
e1
:
return
1
;
}
/* No warning here since switch condition was cast to int. */
switch
((
enum
e
)
j
)
/* { dg-warning "enumeration value `e1' not handled in switch" "enum e1" } */
switch
((
enum
e
)
j
)
{
case
e2
:
return
1
;
case
e4
:
return
2
;
}
}
/* { dg-warning "enumeration value `e1' not handled in switch" "enum e1" } */
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment