Commit 8a72a046 by Mark Mitchell Committed by Mark Mitchell

decl2.c (delete_sanity): Pass integer_zero_node, not integer_two_node, to build_vec_delete.

	* decl2.c (delete_sanity): Pass integer_zero_node, not
	integer_two_node, to build_vec_delete.
	* init.c (build_array_eh_cleanup): Remove.
	(expand_vec_init_try_block): New function.
	(expand_vec_init_catch_clause): Likewise.
	(build_vec_delete_1): Don't deal with case that auto_delete_vec
	might be integer_two_node anymore.
	(expand_vec_init): Rework for initialization-correctness and
	exception-correctness.
	* typeck2.c (process_init_constructor): Make mutual exclusivity
	of cases more obvious.

From-SVN: r23455
parent 66d88624
1998-10-30 Mark Mitchell <mark@markmitchell.com>
* decl2.c (delete_sanity): Pass integer_zero_node, not
integer_two_node, to build_vec_delete.
* init.c (build_array_eh_cleanup): Remove.
(expand_vec_init_try_block): New function.
(expand_vec_init_catch_clause): Likewise.
(build_vec_delete_1): Don't deal with case that auto_delete_vec
might be integer_two_node anymore.
(expand_vec_init): Rework for initialization-correctness and
exception-correctness.
* typeck2.c (process_init_constructor): Make mutual exclusivity
of cases more obvious.
1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (lookup_name_real): OK, only warn if not lexing.
......
......@@ -1211,7 +1211,7 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
if (doing_vec)
return build_vec_delete (t, maxindex, integer_one_node,
integer_two_node, use_global_delete);
integer_zero_node, use_global_delete);
else
{
if (IS_AGGR_TYPE (TREE_TYPE (type))
......
......@@ -1006,7 +1006,7 @@ process_init_constructor (type, init, elts)
members = expr_tree_cons (NULL_TREE, next1, members);
}
}
if (TREE_CODE (type) == RECORD_TYPE)
else if (TREE_CODE (type) == RECORD_TYPE)
{
register tree field;
......@@ -1108,8 +1108,7 @@ process_init_constructor (type, init, elts)
IDENTIFIER_POINTER (DECL_NAME (field)));
}
}
if (TREE_CODE (type) == UNION_TYPE)
else if (TREE_CODE (type) == UNION_TYPE)
{
register tree field = TYPE_FIELDS (type);
register tree next1;
......
int i;
struct S {
S (int) {
++i;
if (i == 3)
throw 3;
};
S () {}
~S() {
--i;
}
};
int main()
{
try {
S s[5] = { 0, 1, 2, 3, 4 };
} catch (...) {
}
if (i != 1)
return 1;
}
int i;
struct S {
S () {
++i;
};
S (int) {
};
};
int main()
{
S s[3][3] = { 2 };
if (i != 8)
return 1;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment