except.c (process_start_catch_block_old): Call start_decl_1 for catch parm.
* except.c (process_start_catch_block_old): Call start_decl_1 for catch parm. * decl.c (start_decl_1): Avoid duplicate error. * init.c (expand_default_init): Only perform the initialization if it will do something. * parse.y (base_class): Check for invalid base class. From-SVN: r21353
This commit is contained in:
parent
ca2b325127
commit
25eb19ff0a
@ -1,3 +1,16 @@
|
||||
1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* except.c (process_start_catch_block_old): Call start_decl_1 for
|
||||
catch parm.
|
||||
* decl.c (start_decl_1): Avoid duplicate error.
|
||||
|
||||
* init.c (expand_default_init): Only perform the initialization if
|
||||
it will do something.
|
||||
|
||||
1998-07-23 H.J. Lu (hjl@gnu.org)
|
||||
|
||||
* parse.y (base_class): Check for invalid base class.
|
||||
|
||||
1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* decl2.c (import_export_template): Fold in...
|
||||
|
@ -6617,6 +6617,7 @@ start_decl_1 (decl)
|
||||
cp_error ("variable `%#D' has initializer but incomplete type",
|
||||
decl);
|
||||
initialized = 0;
|
||||
type = TREE_TYPE (decl) = error_mark_node;
|
||||
}
|
||||
else if (TYPE_SIZE (complete_type (TREE_TYPE (type))) == NULL_TREE)
|
||||
{
|
||||
@ -6639,8 +6640,7 @@ start_decl_1 (decl)
|
||||
decl);
|
||||
/* Change the type so that assemble_variable will give
|
||||
DECL an rtl we can live with: (mem (const_int 0)). */
|
||||
TREE_TYPE (decl) = error_mark_node;
|
||||
type = error_mark_node;
|
||||
type = TREE_TYPE (decl) = error_mark_node;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -699,7 +699,9 @@ process_start_catch_block_old (declspecs, declarator)
|
||||
DECL_INITIAL (decl) = init;
|
||||
decl = pushdecl (decl);
|
||||
|
||||
cp_finish_decl (decl, init, NULL_TREE, 0, LOOKUP_ONLYCONVERTING);
|
||||
start_decl_1 (decl);
|
||||
cp_finish_decl (decl, DECL_INITIAL (decl),
|
||||
NULL_TREE, 0, LOOKUP_ONLYCONVERTING);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1200,7 +1200,8 @@ expand_default_init (binfo, true_exp, exp, init, alias_this, flags)
|
||||
|
||||
rval = build_method_call (exp, ctor_identifier,
|
||||
parms, binfo, flags);
|
||||
expand_expr_stmt (rval);
|
||||
if (TREE_SIDE_EFFECTS (rval))
|
||||
expand_expr_stmt (rval);
|
||||
}
|
||||
|
||||
/* This function is responsible for initializing EXP with INIT
|
||||
|
750
gcc/cp/parse.c
750
gcc/cp/parse.c
File diff suppressed because it is too large
Load Diff
@ -2237,7 +2237,14 @@ base_class_list:
|
||||
base_class:
|
||||
base_class.1
|
||||
{
|
||||
tree type = TREE_TYPE ($1);
|
||||
tree type;
|
||||
if ($1 == NULL_TREE)
|
||||
{
|
||||
error ("invalid base class");
|
||||
type = error_mark_node;
|
||||
}
|
||||
else
|
||||
type = TREE_TYPE ($1);
|
||||
if (! is_aggr_type (type, 1))
|
||||
$$ = NULL_TREE;
|
||||
else if (current_aggr == signature_type_node
|
||||
@ -2262,7 +2269,14 @@ base_class:
|
||||
}
|
||||
| base_class_access_list see_typename base_class.1
|
||||
{
|
||||
tree type = TREE_TYPE ($3);
|
||||
tree type;
|
||||
if ($3 == NULL_TREE)
|
||||
{
|
||||
error ("invalid base class");
|
||||
type = error_mark_node;
|
||||
}
|
||||
else
|
||||
type = TREE_TYPE ($3);
|
||||
if (current_aggr == signature_type_node)
|
||||
error ("access and source specifiers not allowed in signature");
|
||||
if (! is_aggr_type (type, 1))
|
||||
|
Loading…
Reference in New Issue
Block a user