Skip to content
Snippets Groups Projects
Commit 3b2db49f authored by Mark Mitchell's avatar Mark Mitchell Committed by Mark Mitchell
Browse files

PR c++/23171, c++/23172, c++/25417.

	* c-decl.c (compound_literal_number): Remove.
	(build_compound_literal): Use set_compound_literal_name.
	* c-common.c (compound_literal_number): New variable.
	(set_compound_literal_name): New function.
	* c-common.h (set_compound_literal_name): Declare.

	PR c++/23171, c++/23172, c++/25417.
	* typeck.c (build_unary_op): Create temporary variables for
	compound literals whose addresses are taken.
	* init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
	* decl.c (reshape_init_vector): Likewise.
	(reshape_init): Give it external linkage.
	(check_initializer): Use COMPOUND_LITERAL_P.
	(initialize_artificial_var): Allow the initializer to be a
	CONSTRUCTOR.
	* call.c (make_temporary_var_for_ref_to_temp): Use
	create_temporary_var.
	* cp-tree.h (COMPOUND_LITERAL_P): New macro.
	(rehape_init): Declare.
	* typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
	* semantics.c (finish_compound_literal): Use reshape_init.

	PR c++/23172
	* g++.dg/ext/complit4.C: New test.

	PR c++/25417
	* g++.dg/ext/complit5.C: Likewise.

From-SVN: r109075
parent 103a4b39
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment