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
66ba7273
Commit
66ba7273
authored
May 17, 2004
by
Ranjit Mathew
Committed by
Ranjit Mathew
May 17, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* check-init.c: Correct minor typos.
From-SVN: r81940
parent
a2824db3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
gcc/java/ChangeLog
+4
-0
gcc/java/check-init.c
+12
-12
No files found.
gcc/java/ChangeLog
View file @
66ba7273
2004
-
05
-
17
Ranjit
Mathew
<
rmathew
@
hotmail
.
com
>
*
check
-
init
.
c
:
Correct
minor
typos
.
2004
-
05
-
13
Diego
Novillo
<
dnovillo
@
redhat
.
com
>
*
Make
-
lang
.
in
,
expr
.
c
,
java
-
gimplify
.
c
:
Rename
...
...
gcc/java/check-init.c
View file @
66ba7273
/* Code to test for "definitive [un]assignment".
Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2003
, 2004
Free Software Foundation, Inc.
This file is part of GCC.
...
...
@@ -36,7 +36,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* The basic idea is that we assign each local variable declaration
and each blank final field an index, and then we pass around
bitstrings, where the (2*i)'th bit is set if decl whose DECL_BIT_INDEX
is i is definitely assigned, and the
the (2*i=
1)'th bit is set if
is i is definitely assigned, and the
(2*i+
1)'th bit is set if
decl whose DECL_BIT_INDEX is i is definitely unassigned */
/* One segment of a bitstring. */
...
...
@@ -45,7 +45,7 @@ typedef unsigned int word;
/* Pointer to a bitstring. */
typedef
word
*
words
;
/* Number of local
s
variables currently active. */
/* Number of local variables currently active. */
static
int
num_current_locals
=
0
;
/* The value of num_current_locals when we entered the closest
...
...
@@ -198,7 +198,7 @@ static void
final_assign_error
(
tree
name
)
{
static
const
char
format
[]
=
"
can't reassign a value to the final variable '
%s'"
;
=
"
Can't reassign a value to the final variable `
%s'"
;
parse_error_context
(
wfl
,
format
,
IDENTIFIER_POINTER
(
name
));
}
...
...
@@ -305,7 +305,7 @@ check_bool2_init (enum tree_code code, tree exp0, tree exp1,
/* Check a boolean expression EXP for definite [un]assignment.
BEFORE is the set of variables definitely [un]assigned before the
conditional. (This bitstring may be modified arbitrarily in this function.)
On output, WHEN_FALSE is the set of variables
[un]definitely
assigned after
On output, WHEN_FALSE is the set of variables
definitely [un]
assigned after
the conditional when the conditional is false.
On output, WHEN_TRUE is the set of variables definitely [un]assigned after
the conditional when the conditional is true.
...
...
@@ -452,8 +452,8 @@ done_alternative (words after, struct alternatives *current)
WORDS_NEEDED
(
2
*
current
->
num_locals
));
}
/* Used when we done with a control flow branch and are all merged again.
*
AFTER is the merged state of [un]assigned variables,
/* Used when we
are
done with a control flow branch and are all merged again.
AFTER is the merged state of [un]assigned variables,
CURRENT is a struct alt that was passed to BEGIN_ALTERNATIVES. */
#define END_ALTERNATIVES(after, current) \
...
...
@@ -465,7 +465,7 @@ done_alternative (words after, struct alternatives *current)
start_current_locals = current.save_start_current_locals; \
}
/* Check for
(un)
initialized local variables in EXP. */
/* Check for
[un]
initialized local variables in EXP. */
static
void
check_init
(
tree
exp
,
words
before
)
...
...
@@ -480,7 +480,7 @@ check_init (tree exp, words before)
&&
DECL_NAME
(
exp
)
!=
this_identifier_node
)
{
int
index
=
DECL_BIT_INDEX
(
exp
);
/* We don't want to report and mark as non
initialized class
/* We don't want to report and mark as non
-
initialized class
initialization flags. */
if
(
!
LOCAL_CLASS_INITIALIZATION_FLAG_P
(
exp
)
&&
index
>=
0
&&
!
ASSIGNED_P
(
before
,
index
))
...
...
@@ -502,7 +502,7 @@ check_init (tree exp, words before)
if
(
index
>=
0
&&
!
ASSIGNED_P
(
before
,
index
))
{
parse_error_context
(
wfl
,
"variable
'
%s' may not have been initialized"
,
(
wfl
,
"variable
`
%s' may not have been initialized"
,
IDENTIFIER_POINTER
(
DECL_NAME
(
tmp
)));
/* Suppress further errors. */
DECL_BIT_INDEX
(
tmp
)
=
-
2
;
...
...
@@ -623,7 +623,7 @@ check_init (tree exp, words before)
"hypothetical" analysis model. We do something much
simpler: We just disallow assignments inside loops to final
variables declared outside the loop. This means we may
disallow some contrived assignments that the JLS, but I
disallow some contrived assignments that the JLS
allows
, but I
can't see how anything except a very contrived testcase (a
do-while whose condition is false?) would care. */
...
...
@@ -974,7 +974,7 @@ check_for_initialization (tree body, tree mdecl)
if
(
index
>=
0
&&
!
ASSIGNED_P
(
before
,
index
))
{
if
(
!
is_finit_method
)
error
(
"%Jfinal field
'
%D' may not have been initialized"
,
error
(
"%Jfinal field
`
%D' may not have been initialized"
,
decl
,
decl
);
}
else
if
(
is_finit_method
)
...
...
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