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
3afdfae8
Commit
3afdfae8
authored
Dec 11, 2001
by
Tom Tromey
Committed by
Tom Tromey
Dec 11, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
From-SVN: r47860
parent
d7a5e253
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
gcc/java/ChangeLog
+4
-0
gcc/java/check-init.c
+2
-12
No files found.
gcc/java/ChangeLog
View file @
3afdfae8
2001-12-10 Tom Tromey <tromey@redhat.com>
* check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
Mon Dec 10 06:09:57 2001 Douglas B. Rupp <rupp@gnat.com>
* Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
...
...
gcc/java/check-init.c
View file @
3afdfae8
...
...
@@ -429,9 +429,6 @@ struct alternatives
struct
alternatives
*
alternatives
=
NULL
;
/* True if we've seen a DEFAULT_EXPR for the current SWITCH_EXPR. */
static
int
current_switch_has_default
;
/* Begin handling a control flow branch.
BEFORE is the state of [un]assigned variables on entry.
CURRENT is a struct alt to manage the branch alternatives. */
...
...
@@ -689,9 +686,7 @@ check_init (exp, before)
case
SWITCH_EXPR
:
{
struct
alternatives
alt
;
int
saved_current_switch_has_default
=
current_switch_has_default
;
word
buf
[
2
];
current_switch_has_default
=
0
;
check_init
(
TREE_OPERAND
(
exp
,
0
),
before
);
BEGIN_ALTERNATIVES
(
before
,
alt
);
alt
.
saved
=
ALLOC_BUFFER
(
buf
,
num_current_words
);
...
...
@@ -699,19 +694,14 @@ check_init (exp, before)
alt
.
block
=
exp
;
check_init
(
TREE_OPERAND
(
exp
,
1
),
before
);
done_alternative
(
before
,
&
alt
);
if
(
!
current_switch_has_default
)
{
if
(
!
SWITCH_HAS_DEFAULT
(
exp
))
done_alternative
(
alt
.
saved
,
&
alt
);
}
FREE_BUFFER
(
alt
.
saved
,
buf
);
END_ALTERNATIVES
(
before
,
alt
);
current_switch_has_default
=
saved_current_switch_has_default
;
return
;
}
case
DEFAULT_EXPR
:
current_switch_has_default
=
1
;
/* .. then fall through ... */
case
CASE_EXPR
:
case
DEFAULT_EXPR
:
{
int
i
;
struct
alternatives
*
alt
=
alternatives
;
...
...
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