c++: P1937R2 - Fixing inconsistencies between const{expr,eval} functions
authorJakub Jelinek <jakub@redhat.com>
Mon, 24 Feb 2020 14:23:23 +0000 (15:23 +0100)
committerJakub Jelinek <jakub@redhat.com>
Mon, 24 Feb 2020 14:24:33 +0000 (15:24 +0100)
commitfb6a8b230ad98ab3c42efc2968483ceb5ef62886
tree8a14c72ec40ebc1023260c067e1602c7f4a62d1f
parent8566286eaeb9a977339df88212826150767f1203
c++: P1937R2 - Fixing inconsistencies between const{expr,eval} functions

The following patch implements my understanding of P1937R2, though I wonder
if https://eel.is/c++draft/expr.const#14.example-1 shouldn't have been
also either removed or adjusted by the P1937R2 paper.

2020-02-24  Jakub Jelinek  <jakub@redhat.com>

P1937R2 - Fixing inconsistencies between const{expr,eval} functions
* call.c (build_over_call): Don't evaluate immediate functions in
unevaluated operands.

* g++.dg/ext/consteval1.C: Change dg-{message,error} into dg-bogus.
* g++.dg/cpp2a/consteval6.C: Likewise.
* g++.dg/cpp2a/consteval3.C: Change dg-error for unevaluated operands
into dg-bogus.
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/consteval3.C
gcc/testsuite/g++.dg/cpp2a/consteval6.C
gcc/testsuite/g++.dg/ext/consteval1.C