Re: [C++ Patch] PR 58102 aka DR 1405

2014-09-03 Thread Paolo Carlini
Hi, On 09/02/2014 05:45 PM, Jason Merrill wrote: On 09/02/2014 11:07 AM, Paolo Carlini wrote: Anyway, what about the below? Certainly works for the tests which we have got. Hmm. This is definitely an improvement, as it allows a subset of a non-volatile glvalue of literal type that refers

Re: [C++ Patch] PR 58102 aka DR 1405

2014-09-03 Thread Jason Merrill
On 09/03/2014 06:53 AM, Paolo Carlini wrote: The issue, AFAICS, boils down to the difference itself between cxx_eval_outermost_constant_expr and cxx_eval_constant_expression: changing constant_value_1 means that in principle all the calls of the latter (for VAR_DECLs) are impacted. Oh, right.

Re: [C++ Patch] PR 58102 aka DR 1405

2014-09-02 Thread Paolo Carlini
Hi, On 09/02/2014 04:11 PM, Jason Merrill wrote: On 09/01/2014 09:47 AM, Paolo Carlini wrote: -constexpr A b = a;// { dg-error mutable } +constexpr A b = a; This is wrong; we still need to get an error here. Hum, interesting. Neither current EDG nor current clang error out there.

Re: [C++ Patch] PR 58102 aka DR 1405

2014-09-02 Thread Jason Merrill
On 09/01/2014 09:47 AM, Paolo Carlini wrote: -constexpr A b = a; // { dg-error mutable } +constexpr A b = a; This is wrong; we still need to get an error here. Jason

Re: [C++ Patch] PR 58102 aka DR 1405

2014-09-02 Thread Jason Merrill
On 09/02/2014 10:17 AM, Paolo Carlini wrote: Let's see if I can tease the case out... I think you need to leave that hunk alone, and instead fix the new testcase by treating = {} more like {}, just as we already don't require a copy constructor call for copy-list-initialization. Jason

Re: [C++ Patch] PR 58102 aka DR 1405

2014-09-02 Thread Paolo Carlini
Hi, On 09/02/2014 04:28 PM, Jason Merrill wrote: On 09/02/2014 10:17 AM, Paolo Carlini wrote: Let's see if I can tease the case out... I think you need to leave that hunk alone, and instead fix the new testcase by treating = {} more like {}, just as we already don't require a copy

Re: [C++ Patch] PR 58102 aka DR 1405

2014-09-02 Thread Paolo Carlini
Hi again, On 09/02/2014 04:28 PM, Jason Merrill wrote: On 09/02/2014 10:17 AM, Paolo Carlini wrote: Let's see if I can tease the case out... I think you need to leave that hunk alone, and instead fix the new testcase by treating = {} more like {}, just as we already don't require a copy

Re: [C++ Patch] PR 58102 aka DR 1405

2014-09-02 Thread Jason Merrill
On 09/02/2014 11:07 AM, Paolo Carlini wrote: Anyway, what about the below? Certainly works for the tests which we have got. Hmm. This is definitely an improvement, as it allows a subset of a non-volatile glvalue of literal type that refers to a non-volatile object whose lifetime began

[C++ Patch] PR 58102 aka DR 1405

2014-09-01 Thread Paolo Carlini
Hi, I think that in order to implement the resolution we simply have to remove the check. Tested x86_64-linux. Thanks, Paolo. // /cp 2014-09-01 Paolo Carlini paolo.carl...@oracle.com DR 1405 PR c++/58102 * semantics.c