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
8e5e53da
Commit
8e5e53da
authored
Aug 12, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(duplicate_decls): Suppress -Wredundant-decls warning if we have
already given an error. From-SVN: r7900
parent
7b9032dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
gcc/c-decl.c
+3
-2
No files found.
gcc/c-decl.c
View file @
8e5e53da
...
@@ -1303,6 +1303,7 @@ duplicate_decls (newdecl, olddecl)
...
@@ -1303,6 +1303,7 @@ duplicate_decls (newdecl, olddecl)
&&
DECL_INITIAL
(
newdecl
)
!=
0
);
&&
DECL_INITIAL
(
newdecl
)
!=
0
);
tree
oldtype
=
TREE_TYPE
(
olddecl
);
tree
oldtype
=
TREE_TYPE
(
olddecl
);
tree
newtype
=
TREE_TYPE
(
newdecl
);
tree
newtype
=
TREE_TYPE
(
newdecl
);
char
*
errmsg
=
0
;
if
(
TREE_CODE
(
newtype
)
==
ERROR_MARK
if
(
TREE_CODE
(
newtype
)
==
ERROR_MARK
||
TREE_CODE
(
oldtype
)
==
ERROR_MARK
)
||
TREE_CODE
(
oldtype
)
==
ERROR_MARK
)
...
@@ -1528,7 +1529,7 @@ duplicate_decls (newdecl, olddecl)
...
@@ -1528,7 +1529,7 @@ duplicate_decls (newdecl, olddecl)
}
}
else
else
{
{
char
*
errmsg
=
redeclaration_error_message
(
newdecl
,
olddecl
);
errmsg
=
redeclaration_error_message
(
newdecl
,
olddecl
);
if
(
errmsg
)
if
(
errmsg
)
{
{
error_with_decl
(
newdecl
,
errmsg
);
error_with_decl
(
newdecl
,
errmsg
);
...
@@ -1625,7 +1626,7 @@ duplicate_decls (newdecl, olddecl)
...
@@ -1625,7 +1626,7 @@ duplicate_decls (newdecl, olddecl)
}
}
/* Optionally warn about more than one declaration for the same name. */
/* Optionally warn about more than one declaration for the same name. */
if
(
warn_redundant_decls
&&
DECL_SOURCE_LINE
(
olddecl
)
!=
0
if
(
errmsg
=
0
&&
warn_redundant_decls
&&
DECL_SOURCE_LINE
(
olddecl
)
!=
0
/* Dont warn about a function declaration
/* Dont warn about a function declaration
followed by a definition. */
followed by a definition. */
&&
!
(
TREE_CODE
(
newdecl
)
==
FUNCTION_DECL
&&
DECL_INITIAL
(
newdecl
)
!=
0
&&
!
(
TREE_CODE
(
newdecl
)
==
FUNCTION_DECL
&&
DECL_INITIAL
(
newdecl
)
!=
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