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
3b24f55b
Commit
3b24f55b
authored
Feb 23, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(check_for_full_enumeration_handling): Handle nameless type.
From-SVN: r3516
parent
b4e3b9e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
gcc/stmt.c
+24
-12
No files found.
gcc/stmt.c
View file @
3b24f55b
...
...
@@ -3602,12 +3602,18 @@ check_for_full_enumeration_handling (type)
;
if
(
!
chain
)
warning
(
"case value `%d' not in enumerated type `%s'"
,
TREE_INT_CST_LOW
(
n
->
low
),
IDENTIFIER_POINTER
((
TREE_CODE
(
TYPE_NAME
(
type
))
==
IDENTIFIER_NODE
)
?
TYPE_NAME
(
type
)
:
DECL_NAME
(
TYPE_NAME
(
type
))));
{
if
(
TYPE_NAME
(
type
)
==
0
)
warning
(
"case value `%d' not in enumerated type"
,
TREE_INT_CST_LOW
(
n
->
low
));
else
warning
(
"case value `%d' not in enumerated type `%s'"
,
TREE_INT_CST_LOW
(
n
->
low
),
IDENTIFIER_POINTER
((
TREE_CODE
(
TYPE_NAME
(
type
))
==
IDENTIFIER_NODE
)
?
TYPE_NAME
(
type
)
:
DECL_NAME
(
TYPE_NAME
(
type
))));
}
if
(
!
tree_int_cst_equal
(
n
->
low
,
n
->
high
))
{
for
(
chain
=
TYPE_VALUES
(
type
);
...
...
@@ -3616,12 +3622,18 @@ check_for_full_enumeration_handling (type)
;
if
(
!
chain
)
warning
(
"case value `%d' not in enumerated type `%s'"
,
TREE_INT_CST_LOW
(
n
->
high
),
IDENTIFIER_POINTER
((
TREE_CODE
(
TYPE_NAME
(
type
))
==
IDENTIFIER_NODE
)
?
TYPE_NAME
(
type
)
:
DECL_NAME
(
TYPE_NAME
(
type
))));
{
if
(
TYPE_NAME
(
type
)
==
0
)
warning
(
"case value `%d' not in enumerated type"
,
TREE_INT_CST_LOW
(
n
->
high
));
else
warning
(
"case value `%d' not in enumerated type `%s'"
,
TREE_INT_CST_LOW
(
n
->
high
),
IDENTIFIER_POINTER
((
TREE_CODE
(
TYPE_NAME
(
type
))
==
IDENTIFIER_NODE
)
?
TYPE_NAME
(
type
)
:
DECL_NAME
(
TYPE_NAME
(
type
))));
}
}
}
...
...
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