PR c++/70167 - array prvalue treated as lvalue
commit27fa846684a0e6d4f52eac665fa05c98a7e4c237
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 May 2017 13:48:58 +0000 (9 13:48 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 May 2017 13:48:58 +0000 (9 13:48 +0000)
tree815f68ce3b1ebd2059c5d426b0319427a127795a
parent91c18b955d5faed9825b11af19368d178875ff90
PR c++/70167 - array prvalue treated as lvalue

* cp-tree.h (CONSTRUCTOR_C99_COMPOUND_LITERAL): New.
(enum fcl_t): New.
* semantics.c (finish_compound_literal): Add fcl_context parameter.
Only make a static variable for C99 syntax.
* parser.c (cp_parser_postfix_expression): Pass it.
* pt.c (tsubst_copy_and_build): Likewise.
* call.c (extend_ref_init_temps): Set
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247793 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/testsuite/g++.dg/cpp0x/initlist-array6.C [new file with mode: 0644]