aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2020-11-16 19:59:35 -0500
committerMarek Polacek <polacek@redhat.com>2020-11-21 16:08:33 -0500
commit6f20c42cc162ac3725584547ab4933bae4c78665 (patch)
treea32c6e9475135528dc07fdd8cfd68404d99cdbf1 /gcc/cp/parser.c
parent0999f26098598fe0a499c5b79ad23678ccfe583a (diff)
downloadgcc-6f20c42cc162ac3725584547ab4933bae4c78665.zip
gcc-6f20c42cc162ac3725584547ab4933bae4c78665.tar.gz
gcc-6f20c42cc162ac3725584547ab4933bae4c78665.tar.bz2
c++: Reject identifier label in constexpr [PR97846]
[dcl.constexpr]/3 says that the function-body of a constexpr function shall not contain an identifier label, but we aren't enforcing that. This patch implements that. Of course, we can't reject artificial labels. gcc/cp/ChangeLog: PR c++/97846 * constexpr.c (potential_constant_expression_1): Reject LABEL_EXPRs that use non-artifical LABEL_DECLs. gcc/testsuite/ChangeLog: PR c++/97846 * g++.dg/cpp1y/constexpr-label.C: New test.
Diffstat (limited to 'gcc/cp/parser.c')
0 files changed, 0 insertions, 0 deletions