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
e2f6a3cf
Commit
e2f6a3cf
authored
Jul 07, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(duplicate_decls): Merge DECL_IN_SYSTEM_HEADER between duplicate decls.
From-SVN: r1492
parent
176e81eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
gcc/c-decl.c
+12
-4
No files found.
gcc/c-decl.c
View file @
e2f6a3cf
...
@@ -1449,7 +1449,11 @@ duplicate_decls (newdecl, olddecl)
...
@@ -1449,7 +1449,11 @@ duplicate_decls (newdecl, olddecl)
if
(
TREE_READONLY
(
newdecl
))
if
(
TREE_READONLY
(
newdecl
))
TREE_READONLY
(
olddecl
)
=
1
;
TREE_READONLY
(
olddecl
)
=
1
;
if
(
TREE_THIS_VOLATILE
(
newdecl
))
if
(
TREE_THIS_VOLATILE
(
newdecl
))
TREE_THIS_VOLATILE
(
olddecl
)
=
1
;
{
TREE_THIS_VOLATILE
(
olddecl
)
=
1
;
if
(
TREE_CODE
(
newdecl
)
==
VAR_DECL
)
make_var_volatile
(
newdecl
);
}
/* Keep source location of definition rather than declaration. */
/* Keep source location of definition rather than declaration. */
if
(
DECL_INITIAL
(
newdecl
)
==
0
&&
DECL_INITIAL
(
olddecl
)
!=
0
)
if
(
DECL_INITIAL
(
newdecl
)
==
0
&&
DECL_INITIAL
(
olddecl
)
!=
0
)
...
@@ -1458,14 +1462,18 @@ duplicate_decls (newdecl, olddecl)
...
@@ -1458,14 +1462,18 @@ duplicate_decls (newdecl, olddecl)
DECL_SOURCE_FILE
(
newdecl
)
=
DECL_SOURCE_FILE
(
olddecl
);
DECL_SOURCE_FILE
(
newdecl
)
=
DECL_SOURCE_FILE
(
olddecl
);
}
}
/* Merge the unused-warning information. */
if
(
DECL_IN_SYSTEM_HEADER
(
olddecl
))
DECL_IN_SYSTEM_HEADER
(
newdecl
)
=
1
;
else
if
(
DECL_IN_SYSTEM_HEADER
(
newdecl
))
DECL_IN_SYSTEM_HEADER
(
olddecl
)
=
1
;
/* Merge the initialization information. */
/* Merge the initialization information. */
if
(
DECL_INITIAL
(
newdecl
)
==
0
)
if
(
DECL_INITIAL
(
newdecl
)
==
0
)
DECL_INITIAL
(
newdecl
)
=
DECL_INITIAL
(
olddecl
);
DECL_INITIAL
(
newdecl
)
=
DECL_INITIAL
(
olddecl
);
/* Keep the old rtl since we can safely use it. */
/* Keep the old rtl since we can safely use it. */
DECL_RTL
(
newdecl
)
=
DECL_RTL
(
olddecl
);
DECL_RTL
(
newdecl
)
=
DECL_RTL
(
olddecl
);
if
(
TREE_CODE
(
newdecl
)
==
VAR_DECL
&&
TREE_THIS_VOLATILE
(
newdecl
))
make_var_volatile
(
newdecl
);
}
}
/* If cannot merge, then use the new type and qualifiers,
/* If cannot merge, then use the new type and qualifiers,
and don't preserve the old rtl. */
and don't preserve the old rtl. */
...
...
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