cp-tree.h (finish_class_definition): Add parameter.
* cp-tree.h (finish_class_definition): Add parameter. * parse.y (structsp): Use it. Don't call pop_scope here. * parse.c: Regenerated. * semantics.c (finish_class_definition): Pop it here. From-SVN: r26537
This commit is contained in:
parent
fac6189871
commit
fbdd002411
@ -1,3 +1,10 @@
|
||||
1999-04-18 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* cp-tree.h (finish_class_definition): Add parameter.
|
||||
* parse.y (structsp): Use it. Don't call pop_scope here.
|
||||
* parse.c: Regenerated.
|
||||
* semantics.c (finish_class_definition): Pop it here.
|
||||
|
||||
1999-04-17 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* decl.c (xref_tag): Revise handling of nested template
|
||||
|
@ -3272,7 +3272,7 @@ extern tree finish_template_type_parm PROTO((tree, tree));
|
||||
extern tree finish_template_template_parm PROTO((tree, tree));
|
||||
extern tree finish_parmlist PROTO((tree, int));
|
||||
extern tree begin_class_definition PROTO((tree));
|
||||
extern tree finish_class_definition PROTO((tree, tree, int));
|
||||
extern tree finish_class_definition PROTO((tree, tree, int, int));
|
||||
extern void finish_default_args PROTO((void));
|
||||
extern void begin_inline_definitions PROTO((void));
|
||||
extern void finish_inline_definitions PROTO((void));
|
||||
|
749
gcc/cp/parse.c
749
gcc/cp/parse.c
File diff suppressed because it is too large
Load Diff
@ -2150,7 +2150,8 @@ structsp:
|
||||
yychar = YYLEX;
|
||||
semi = yychar == ';';
|
||||
|
||||
$<ttype>$ = finish_class_definition ($1.t, $6, semi);
|
||||
$<ttype>$ = finish_class_definition ($1.t, $6, semi,
|
||||
$1.new_type_flag);
|
||||
}
|
||||
pending_defargs
|
||||
{
|
||||
@ -2159,8 +2160,6 @@ structsp:
|
||||
pending_inlines
|
||||
{
|
||||
finish_inline_definitions ();
|
||||
if ($1.new_type_flag)
|
||||
pop_scope (CP_DECL_CONTEXT (TYPE_MAIN_DECL ($<ttype>7)));
|
||||
$$.t = $<ttype>7;
|
||||
$$.new_type_flag = 1;
|
||||
}
|
||||
|
@ -1426,10 +1426,11 @@ finish_member_declaration (decl)
|
||||
type. */
|
||||
|
||||
tree
|
||||
finish_class_definition (t, attributes, semi)
|
||||
finish_class_definition (t, attributes, semi, pop_scope_p)
|
||||
tree t;
|
||||
tree attributes;
|
||||
int semi;
|
||||
int pop_scope_p;
|
||||
{
|
||||
/* finish_struct nukes this anyway; if finish_exception does too,
|
||||
then it can go. */
|
||||
@ -1454,6 +1455,8 @@ finish_class_definition (t, attributes, semi)
|
||||
|
||||
if (! semi)
|
||||
check_for_missing_semicolon (t);
|
||||
if (pop_scope_p)
|
||||
pop_scope (CP_DECL_CONTEXT (TYPE_MAIN_DECL (t)));
|
||||
if (current_scope () == current_function_decl)
|
||||
do_pending_defargs ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user