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
1c682d06
Commit
1c682d06
authored
May 09, 2011
by
Fabien Chêne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PR C++/48859
From-SVN: r173583
parent
03808d17
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
0 deletions
+27
-0
gcc/cp/ChangeLog
+6
-0
gcc/cp/init.c
+3
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/g++.dg/init/pr48859.C
+14
-0
No files found.
gcc/cp/ChangeLog
View file @
1c682d06
2011-05-07 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/48859
* init.c (diagnose_uninitialized_cst_or_ref_member_1): stop the
recursion if there is user defined constructor.
2011-05-09 Jason Merrill <jason@redhat.com>
2011-05-09 Jason Merrill <jason@redhat.com>
PR c++/34772
PR c++/34772
...
...
gcc/cp/init.c
View file @
1c682d06
...
@@ -1915,6 +1915,9 @@ diagnose_uninitialized_cst_or_ref_member_1 (tree type, tree origin,
...
@@ -1915,6 +1915,9 @@ diagnose_uninitialized_cst_or_ref_member_1 (tree type, tree origin,
field_type
=
strip_array_types
(
TREE_TYPE
(
field
));
field_type
=
strip_array_types
(
TREE_TYPE
(
field
));
if
(
type_has_user_provided_constructor
(
field_type
))
continue
;
if
(
TREE_CODE
(
field_type
)
==
REFERENCE_TYPE
)
if
(
TREE_CODE
(
field_type
)
==
REFERENCE_TYPE
)
{
{
++
error_count
;
++
error_count
;
...
...
gcc/testsuite/ChangeLog
View file @
1c682d06
2001-05-07 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/48859
* g++.dg/init/pr48859.C: New.
2011-05-09 Jason Merrill <jason@redhat.com>
2011-05-09 Jason Merrill <jason@redhat.com>
* gcc.dg/gcc.dg/uninit-D.c: Move to c-c++-common.
* gcc.dg/gcc.dg/uninit-D.c: Move to c-c++-common.
...
...
gcc/testsuite/g++.dg/init/pr48859.C
0 → 100644
View file @
1c682d06
// PR c++/48859
// { dg-do compile }
struct
HasConstructor
{
HasConstructor
()
{}
};
class
ConstMember
{
const
HasConstructor
empty_
;
};
void
foo
()
{
new
ConstMember
;
}
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