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
f3209e2f
Commit
f3209e2f
authored
Jan 09, 1996
by
Doug Evans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(merge_attributes): Moved here from c-typeck.c.
From-SVN: r10955
parent
a3e11772
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
gcc/tree.c
+38
-0
No files found.
gcc/tree.c
View file @
f3209e2f
...
...
@@ -3114,6 +3114,44 @@ lookup_attribute (attr_name, list)
return
NULL_TREE
;
}
/* Return an attribute list that is the union of a1 and a2. */
tree
merge_attributes
(
a1
,
a2
)
register
tree
a1
,
a2
;
{
tree
attributes
;
/* Either one unset? Take the set one. */
if
(
!
(
attributes
=
a1
))
attributes
=
a2
;
/* One that completely contains the other? Take it. */
else
if
(
a2
&&
!
attribute_list_contained
(
a1
,
a2
))
if
(
attribute_list_contained
(
a2
,
a1
))
attributes
=
a2
;
else
{
/* Pick the longest list, and hang on the other list. */
/* ??? For the moment we punt on the issue of attrs with args. */
if
(
list_length
(
a1
)
<
list_length
(
a2
))
attributes
=
a2
,
a2
=
a1
;
for
(;
a2
;
a2
=
TREE_CHAIN
(
a2
))
if
(
lookup_attribute
(
IDENTIFIER_POINTER
(
TREE_PURPOSE
(
a2
)),
attributes
)
==
NULL_TREE
)
{
a1
=
copy_node
(
a2
);
TREE_CHAIN
(
a1
)
=
attributes
;
attributes
=
a1
;
}
}
return
attributes
;
}
/* Return a type like TYPE except that its TYPE_READONLY is CONSTP
and its TYPE_VOLATILE is VOLATILEP.
...
...
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