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
c0aad677
Commit
c0aad677
authored
May 09, 2017
by
Jason Merrill
Committed by
Jason Merrill
May 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* class.c (check_bases): Ignore empty bases.
From-SVN: r247816
parent
824c3184
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletions
+17
-1
gcc/cp/ChangeLog
+2
-0
gcc/cp/class.c
+3
-1
gcc/testsuite/g++.dg/ext/is_std_layout1.C
+12
-0
No files found.
gcc/cp/ChangeLog
View file @
c0aad677
2017-05-09 Jason Merrill <jason@redhat.com>
2017-05-09 Jason Merrill <jason@redhat.com>
* class.c (check_bases): Ignore empty bases.
PR c++/70979 - literal class and closure types
PR c++/70979 - literal class and closure types
* class.c (finalize_literal_type_property): Handle closures
* class.c (finalize_literal_type_property): Handle closures
specifically.
specifically.
...
...
gcc/cp/class.c
View file @
c0aad677
...
@@ -1860,7 +1860,9 @@ check_bases (tree t,
...
@@ -1860,7 +1860,9 @@ check_bases (tree t,
members */
members */
for
(
basefield
=
TYPE_FIELDS
(
basetype
);
basefield
;
for
(
basefield
=
TYPE_FIELDS
(
basetype
);
basefield
;
basefield
=
DECL_CHAIN
(
basefield
))
basefield
=
DECL_CHAIN
(
basefield
))
if
(
TREE_CODE
(
basefield
)
==
FIELD_DECL
)
if
(
TREE_CODE
(
basefield
)
==
FIELD_DECL
&&
DECL_SIZE
(
basefield
)
&&
!
integer_zerop
(
DECL_SIZE
(
basefield
)))
{
{
if
(
field
)
if
(
field
)
CLASSTYPE_NON_STD_LAYOUT
(
t
)
=
1
;
CLASSTYPE_NON_STD_LAYOUT
(
t
)
=
1
;
...
...
gcc/testsuite/g++.dg/ext/is_std_layout1.C
0 → 100644
View file @
c0aad677
// { dg-do compile { target c++11 } }
template
<
int
>
struct
E
{
};
struct
E1
:
E
<
0
>
,
E
<
1
>
{
};
struct
E2
:
E
<
2
>
,
E
<
3
>
{
};
struct
A1x
{
int
n
;
};
struct
D2
:
A1x
,
E1
,
E2
{
};
#define SA(X) static_assert((X),#X)
SA
(
__is_standard_layout
(
D2
));
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