This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/86515] std::initializer_list constructor is not a constant expression


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with:

commit 27fa846684a0e6d4f52eac665fa05c98a7e4c237
Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Tue May 9 13:48:58 2017 +0000

            PR c++/70167 - array prvalue treated as lvalue

            * cp-tree.h (CONSTRUCTOR_C99_COMPOUND_LITERAL): New.
            (enum fcl_t): New.
            * semantics.c (finish_compound_literal): Add fcl_context parameter.
            Only make a static variable for C99 syntax.
            * parser.c (cp_parser_postfix_expression): Pass it.
            * pt.c (tsubst_copy_and_build): Likewise.
            * call.c (extend_ref_init_temps): Set
            DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.

    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247793
138bc75d-0d04-0410-961f-82ee72b054a4

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]