anon2.C: New test.
* g++.dg/lookup/anon2.C: New test. * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for anonymous structs. From-SVN: r59647
This commit is contained in:
parent
ff944b4986
commit
f6a83eb0a7
@ -1,3 +1,8 @@
|
||||
2002-11-29 Joe Buck <jbuck@synopsys.com>
|
||||
|
||||
* parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
|
||||
anonymous structs.
|
||||
|
||||
2002-11-29 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* class.c (walk_subobject_offsets): Recur on binfos as well as on
|
||||
|
@ -2524,6 +2524,8 @@ class_head_defn:
|
||||
make_anon_name (),
|
||||
0));
|
||||
$$.new_type_flag = 0;
|
||||
CLASSTYPE_DECLARED_CLASS (TREE_TYPE ($$.t))
|
||||
= $1 == class_type_node;
|
||||
yyungetc ('{', 1);
|
||||
}
|
||||
;
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-11-29 Joe Buck <jbuck@synopsys.com>
|
||||
|
||||
* g++.dg/lookup/anon2.C: New test.
|
||||
|
||||
2002-11-28 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* gcc.c-torture/execute/strct-varg-1.x: Remove xfail on the
|
||||
|
6
gcc/testsuite/g++.dg/lookup/anon2.C
Normal file
6
gcc/testsuite/g++.dg/lookup/anon2.C
Normal file
@ -0,0 +1,6 @@
|
||||
// { dg-do compile }
|
||||
// { dg-options "" }
|
||||
|
||||
class { int i; } a; // { dg-error "private" }
|
||||
void foo() { a.i; } // { dg-error "context" }
|
||||
|
Loading…
Reference in New Issue
Block a user