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
091871ea
Commit
091871ea
authored
Sep 10, 2012
by
Jason Merrill
Committed by
Jason Merrill
Sep 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* semantics.c (sort_constexpr_mem_initializers): Tweak.
From-SVN: r191139
parent
d75171f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
12 deletions
+18
-12
gcc/cp/ChangeLog
+4
-0
gcc/cp/semantics.c
+14
-12
No files found.
gcc/cp/ChangeLog
View file @
091871ea
2012-09-07 Jason Merrill <jason@redhat.com>
* semantics.c (sort_constexpr_mem_initializers): Tweak.
2012-09-09 Mark Kettenis <kettenis@openbsd.org>
2012-09-09 Mark Kettenis <kettenis@openbsd.org>
* decl.c (reshape_init_class): Avoid dereferencing a
* decl.c (reshape_init_class): Avoid dereferencing a
...
...
gcc/cp/semantics.c
View file @
091871ea
...
@@ -5903,24 +5903,26 @@ check_constexpr_ctor_body (tree last, tree list)
...
@@ -5903,24 +5903,26 @@ check_constexpr_ctor_body (tree last, tree list)
static
VEC
(
constructor_elt
,
gc
)
*
static
VEC
(
constructor_elt
,
gc
)
*
sort_constexpr_mem_initializers
(
tree
type
,
VEC
(
constructor_elt
,
gc
)
*
vec
)
sort_constexpr_mem_initializers
(
tree
type
,
VEC
(
constructor_elt
,
gc
)
*
vec
)
{
{
if
(
!
CLASSTYPE_HAS_PRIMARY_BASE_P
(
type
)
tree
pri
=
CLASSTYPE_PRIMARY_BINFO
(
type
);
||
(
CLASSTYPE_PRIMARY_BINFO
(
type
)
constructor_elt
elt
;
==
BINFO_BASE_BINFO
(
TYPE_BINFO
(
type
),
0
)))
int
i
;
if
(
pri
==
NULL_TREE
||
pri
==
BINFO_BASE_BINFO
(
TYPE_BINFO
(
type
),
0
))
return
vec
;
return
vec
;
/* Find the element for the primary base and move it to the beginning of
/* Find the element for the primary base and move it to the beginning of
the vec. */
the vec. */
tree
pri
=
BINFO_TYPE
(
CLASSTYPE_PRIMARY_BINFO
(
type
));
VEC
(
constructor_elt
,
gc
)
&
v
=
*
vec
;
VEC
(
constructor_elt
,
gc
)
&
v
=
*
vec
;
int
pri_idx
;
pri
=
BINFO_TYPE
(
pri
);
for
(
i
=
1
;
;
++
i
)
for
(
pri_idx
=
1
;
;
++
pri_idx
)
if
(
TREE_TYPE
(
v
[
i
].
index
)
==
pri
)
if
(
TREE_TYPE
(
v
[
pri_idx
].
index
)
==
pri
)
break
;
break
;
constructor_elt
pri_elt
=
v
[
pri_idx
];
for
(
int
i
=
0
;
i
<
pri_idx
;
++
i
)
elt
=
v
[
i
];
v
[
i
+
1
]
=
v
[
i
];
for
(;
i
>
0
;
--
i
)
v
[
0
]
=
pri_elt
;
v
[
i
]
=
v
[
i
-
1
];
v
[
0
]
=
elt
;
return
vec
;
return
vec
;
}
}
...
...
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