]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: unset COMPOUND_LITERAL_P [PR100079]
authorJason Merrill <jason@redhat.com>
Thu, 15 Apr 2021 21:04:24 +0000 (17:04 -0400)
committerJason Merrill <jason@redhat.com>
Thu, 29 Apr 2021 18:33:39 +0000 (14:33 -0400)
commit3f0de4dd51fd9a1e9628411b4fd728f5841256fe
treeaf3e957d72b4b8b8005c81047b611418db51cc84
parentefeca0ac4155b76ce713155f190422aac20537c5
c++: unset COMPOUND_LITERAL_P [PR100079]

Once a CONSTRUCTOR has been digested and used as an initializer, it no
longer represents a compound literal by itself, so we can clear the flag,
letting us use it consistently to distinguish between digested and
undigested initializer-lists.

gcc/cp/ChangeLog:

* cp-tree.h: Clarify comments.
* pt.c (get_template_parm_object): Add assert.
* semantics.c (finish_compound_literal): Clear TREE_HAS_CONSTRUCTOR.
* tree.c (zero_init_expr_p): Check TREE_HAS_CONSTRUCTOR.
* typeck2.c (store_init_value): Likewise.
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/cp/typeck2.c