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
2ac3624b
Commit
2ac3624b
authored
Jul 02, 1993
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(label): Use `convert_and_check' when checking for
overflow in case labels. From-SVN: r4824
parent
9f8373c3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
gcc/c-parse.in
+5
-3
No files found.
gcc/c-parse.in
View file @
2ac3624b
...
...
@@ -1853,7 +1853,8 @@ label: CASE expr_no_commas ':'
if
(
value
!=
error_mark_node
)
{
tree
duplicate
;
int
success
=
pushcase
(
value
,
label
,
&
duplicate
);
int
success
=
pushcase
(
value
,
convert_and_check
,
label
,
&
duplicate
);
if
(
success
==
1
)
error
(
"case label not within a switch statement"
);
else
if
(
success
==
2
)
...
...
@@ -1878,7 +1879,8 @@ label: CASE expr_no_commas ':'
if
(
value1
!=
error_mark_node
&&
value2
!=
error_mark_node
)
{
tree
duplicate
;
int
success
=
pushcase_range
(
value1
,
value2
,
label
,
int
success
=
pushcase_range
(
value1
,
value2
,
convert_and_check
,
label
,
&
duplicate
);
if
(
success
==
1
)
error
(
"case label not within a switch statement"
);
...
...
@@ -1900,7 +1902,7 @@ label: CASE expr_no_commas ':'
tree
duplicate
;
register
tree
label
=
build_decl
(
LABEL_DECL
,
NULL_TREE
,
NULL_TREE
);
int
success
=
pushcase
(
NULL_TREE
,
label
,
&
duplicate
);
int
success
=
pushcase
(
NULL_TREE
,
0
,
label
,
&
duplicate
);
stmt_count
++
;
if
(
success
==
1
)
error
(
"default label not within a switch statement"
);
...
...
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