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
31d06664
Commit
31d06664
authored
Jul 21, 2010
by
Jason Merrill
Committed by
Jason Merrill
Jul 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
From-SVN: r162378
parent
557165ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
gcc/cp/ChangeLog
+2
-0
gcc/cp/tree.c
+14
-4
No files found.
gcc/cp/ChangeLog
View file @
31d06664
2010-07-21 Jason Merrill <jason@redhat.com>
* tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
* parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
to cp_finish_decl.
...
...
gcc/cp/tree.c
View file @
31d06664
...
...
@@ -2023,11 +2023,21 @@ cp_tree_equal (tree t1, tree t2)
/* We need to do this when determining whether or not two
non-type pointer to member function template arguments
are the same. */
if
(
!
(
same_type_p
(
TREE_TYPE
(
t1
),
TREE_TYPE
(
t2
))
/* The first operand is RTL. */
&&
TREE_OPERAND
(
t1
,
0
)
==
TREE_OPERAND
(
t2
,
0
)))
if
(
!
same_type_p
(
TREE_TYPE
(
t1
),
TREE_TYPE
(
t2
))
||
CONSTRUCTOR_NELTS
(
t1
)
!=
CONSTRUCTOR_NELTS
(
t2
))
return
false
;
return
cp_tree_equal
(
TREE_OPERAND
(
t1
,
1
),
TREE_OPERAND
(
t2
,
1
));
{
tree
field
,
value
;
unsigned
int
i
;
FOR_EACH_CONSTRUCTOR_ELT
(
CONSTRUCTOR_ELTS
(
t1
),
i
,
field
,
value
)
{
constructor_elt
*
elt2
=
CONSTRUCTOR_ELT
(
t2
,
i
);
if
(
!
cp_tree_equal
(
field
,
elt2
->
index
)
||
!
cp_tree_equal
(
value
,
elt2
->
value
))
return
false
;
}
}
return
true
;
case
TREE_LIST
:
if
(
!
cp_tree_equal
(
TREE_PURPOSE
(
t1
),
TREE_PURPOSE
(
t2
)))
...
...
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