aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2022-01-20 05:45:02 -0500
committerJason Merrill <jason@redhat.com>2022-01-22 22:18:02 -0500
commit053bcc97f4a59e3f2811b8a1edf60fd733a580a0 (patch)
tree67c0720cf64acec9f7a48c8e0f16b3e9936dc2b5 /gcc/config.gcc
parentd43be9dcc1bef95d70fb411d98b4de0d83c6b85d (diff)
downloadgcc-053bcc97f4a59e3f2811b8a1edf60fd733a580a0.zip
gcc-053bcc97f4a59e3f2811b8a1edf60fd733a580a0.tar.gz
gcc-053bcc97f4a59e3f2811b8a1edf60fd733a580a0.tar.bz2
c++: constexpr and -fno-elide-constructors [PR101072]
We've been trying for a while to avoid TARGET_EXPRs in template code, but there were still a few that snuck through, and the one in this case broke the code that tried to handle it. Fixed by using IMPLICIT_CONV_EXPR, as we have done elsewhere. I also noticed that finish_compound_literal was assuming that all T{init} were for aggregate T, and we got a few more TARGET_EXPRs from that. Fixed by only messing with TARGET_EXPR if we actually have an aggregate init. PR c++/101072 gcc/cp/ChangeLog: * cp-tree.h (build_implicit_conv_flags): Declare. * call.cc (build_implicit_conv_flags): Split out from... (perform_implicit_conversion_flags): ...here. * decl.cc (check_initializer): Use it. * pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling. * semantics.cc (finish_compound_literal): Don't treat scalar values like CONSTRUCTORs. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-empty14a.C: New test.
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions