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
a784882b
Commit
a784882b
authored
Oct 01, 1994
by
Richard Earnshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(shadow_label): Emit an error if the label is already
declared at this label scope. From-SVN: r8191
parent
b5eda776
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
gcc/c-decl.c
+15
-0
No files found.
gcc/c-decl.c
View file @
a784882b
...
...
@@ -2440,6 +2440,21 @@ shadow_label (name)
if
(
decl
!=
0
)
{
register
tree
dup
;
/* Check to make sure that the label hasn't already been declared
at this label scope */
for
(
dup
=
named_labels
;
dup
;
dup
=
TREE_CHAIN
(
dup
))
if
(
TREE_VALUE
(
dup
)
==
decl
)
{
error
(
"duplicate label declaration `%s'"
,
IDENTIFIER_POINTER
(
name
));
error_with_decl
(
TREE_VALUE
(
dup
),
"this is a previous declaration"
);
/* Just use the previous declaration. */
return
lookup_label
(
name
);
}
shadowed_labels
=
tree_cons
(
NULL_TREE
,
decl
,
shadowed_labels
);
IDENTIFIER_LABEL_VALUE
(
name
)
=
decl
=
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