[Bug c++/92343] [[likely]]/[[unlikely]] prevent method from being a constant expression
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 8 19:00:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92343
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Nov 8 19:00:02 2019
New Revision: 277988
URL: https://gcc.gnu.org/viewcvs?rev=277988&root=gcc&view=rev
Log:
Backported from mainline
2019-11-05 Jakub Jelinek <jakub@redhat.com>
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.
Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp2a/attr-likely6.C
Modified:
branches/gcc-9-branch/gcc/cp/ChangeLog
branches/gcc-9-branch/gcc/cp/constexpr.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list