https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91346

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Aug  7 14:20:40 2019
New Revision: 274169

URL: https://gcc.gnu.org/viewcvs?rev=274169&root=gcc&view=rev
Log:
        PR c++/91346 - Implement P1668R1, allow unevaluated asm in constexpr.
        * constexpr.c (cxx_eval_constant_expression): Handle ASM_EXPR.
        (potential_constant_expression_1) <case ASM_EXPR>: Allow.
        * cp-tree.h (finish_asm_stmt): Adjust.
        * parser.c (cp_parser_asm_definition): Grab the locaion of "asm" and
        use it.  Change an error to a pedwarn.  Allow asm in C++2a, warn
        otherwise.
        * pt.c (tsubst_expr): Pass a location down to finish_asm_stmt.
        * semantics.c (finish_asm_stmt): New location_t parameter.  Use it.

        * g++.dg/cpp2a/inline-asm1.C: New test.
        * g++.dg/cpp2a/inline-asm2.C: New test.
        * g++.dg/cpp1y/constexpr-neg1.C: Adjust dg-error.

Added:
    trunk/gcc/testsuite/g++.dg/cpp2a/inline-asm1.C
    trunk/gcc/testsuite/g++.dg/cpp2a/inline-asm2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-neg1.C

Reply via email to