re PR c++/92343 ([[likely]]/[[unlikely]] prevent method from being a constant expression)
authorJakub Jelinek <jakub@redhat.com>
Tue, 5 Nov 2019 10:16:39 +0000 (11:16 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 5 Nov 2019 10:16:39 +0000 (11:16 +0100)
commit81012684569cfb64b0274f117d68740cde52ffdd
tree922cd8129f527b702c8f2c150cf2f0a5f933a67e
parent8f119c559e7f56eb3deac726b32f70e2befaf58d
re PR c++/92343 ([[likely]]/[[unlikely]] prevent method from being a constant expression)

PR c++/92343
* constexpr.c (potential_constant_expression_1): Return true rather
than false for PREDICT_EXPR.

* g++.dg/cpp2a/attr-likely6.C: New test.

From-SVN: r277819
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/attr-likely6.C [new file with mode: 0644]