Hi again,

On 19/01/2018 23:55, Paolo Carlini wrote:
...Therefore It seems to me that a way to more cleanly solve the bug would be moving something like || !DECL_NONTRIVIALLY_INITIALIZED_P to the the above check in check_for_uninitialized_const_var, and therefore remove completely the uninitialized case from potential_constant_expression_1, ...
Of course this doesn't work. check_for_uninitialized_const would really need to know that the VAR_DECL appears in a statement expression which is initializing a constexpr variable, nothing to do with DECL_NONTRIVIALLY_INITIALIZED_P. I'll give the issue more thought over the we, but removing completely the check from potential_constant_expression_1 seems very tough to me, assuming of course we really care about diagnosing the uninitialized inner in stmtexpr20.C, which is my invention, isn't in the testsuite yet ;)

Paolo.

Reply via email to