Fix p24939.
From-SVN: r30765
This commit is contained in:
parent
38a7fbac35
commit
2fbfe9b812
3 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
1999-12-02 Mike Stump <mrs@wrs.com>
|
||||
|
||||
* init.c (perform_member_init): Handle parse errors better.
|
||||
|
||||
1999-12-01 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* cp-tree.h (min_tree_cons): Remove.
|
||||
|
|
|
@ -144,6 +144,9 @@ perform_member_init (member, name, init, explicit)
|
|||
|
||||
decl = build_component_ref (current_class_ref, name, NULL_TREE, explicit);
|
||||
|
||||
if (decl == error_mark_node)
|
||||
return;
|
||||
|
||||
/* Deal with this here, as we will get confused if we try to call the
|
||||
assignment op for an anonymous union. This can happen in a
|
||||
synthesized copy constructor. */
|
||||
|
|
13
gcc/testsuite/g++.old-deja/g++.mike/s24939.C
Normal file
13
gcc/testsuite/g++.old-deja/g++.mike/s24939.C
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Build don't link:
|
||||
|
||||
class A;
|
||||
|
||||
class B {
|
||||
public:
|
||||
B();
|
||||
private:
|
||||
A a; // ERROR -
|
||||
};
|
||||
|
||||
class A { };
|
||||
B::B() { }
|
Loading…
Add table
Reference in a new issue