]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Use empty field in constexpr eval.
authorJason Merrill <jason@redhat.com>
Mon, 25 Jan 2021 22:02:57 +0000 (17:02 -0500)
committerJason Merrill <jason@redhat.com>
Thu, 29 Apr 2021 18:41:45 +0000 (14:41 -0400)
commitbc99c54de5a262ffc5f7801e16d919d335a53a8b
tree2feef056d55d6a95faa2e9ee5437e03e64448f3c
parenta0fdff3cf33f72848d3f894272431a5d49fe6a16
c++: Use empty field in constexpr eval.

In discussion of PR98463, Jakub noted that cxx_fold_indirect_ref_1 was
bailing out early for empty bases even when we do have fields for them (in
C++17 mode or later).  This corrects that.

gcc/cp/ChangeLog:

* constexpr.c (cxx_fold_indirect_ref_1): Only set *empty_base if we
don't find a field.
gcc/cp/constexpr.c