aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-03-01 15:20:03 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-03-01 15:20:03 +0100
commit1259cb6d0034f36cce26ca8fd3d22d40bafce04a (patch)
treef0b32a4e2a747b9f23167114d3bd16b4a456e95d /libgo
parentc5effe9673bd266887b5c4cb968cce61ce137ca1 (diff)
downloadgcc-1259cb6d0034f36cce26ca8fd3d22d40bafce04a.zip
gcc-1259cb6d0034f36cce26ca8fd3d22d40bafce04a.tar.gz
gcc-1259cb6d0034f36cce26ca8fd3d22d40bafce04a.tar.bz2
Implement P1002R1, Try-catch blocks in constexpr functions PR c++/89513
Implement P1002R1, Try-catch blocks in constexpr functions PR c++/89513 * parser.c (cp_parser_ctor_initializer_opt_and_function_body): Diagnose constexpr ctor or function with function-try-block with pedwarn for c++17 and earlier. Formatting fix. (cp_parser_try_block): Use pedwarn instead of error and only for c++17 and earlier when try block appears in constexpr function. * constexpr.c (build_constexpr_constructor_member_initializers): Handle TRY_BLOCK here instead of erroring on it. * g++.dg/cpp2a/constexpr-try1.C: New test. * g++.dg/cpp2a/constexpr-try2.C: New test. * g++.dg/cpp2a/constexpr-try3.C: New test. * g++.dg/cpp2a/constexpr-try4.C: New test. * g++.dg/cpp2a/constexpr-try5.C: New test. * g++.dg/cpp0x/constexpr-ctor10.C: Don't expect error for C++2a. From-SVN: r269314
Diffstat (limited to 'libgo')
0 files changed, 0 insertions, 0 deletions