Re: [C++ Patch/RFC] PR 53025

2014-10-02 Thread Paolo Carlini
Hi, On 10/02/2014 07:37 PM, Jason Merrill wrote: On 10/02/2014 12:44 PM, Paolo Carlini wrote: + s->noexcept_operand = scope_chain ? cp_noexcept_operand : 0; s->x_stmt_tree.stmts_are_full_exprs_p = true; scope_chain = s; @@ -6182,6 +6183,7 @@ pop_from_top_level_1 (void) current_fun

Re: [C++ Patch/RFC] PR 53025

2014-10-02 Thread Jason Merrill
On 10/02/2014 12:44 PM, Paolo Carlini wrote: + s->noexcept_operand = scope_chain ? cp_noexcept_operand : 0; s->x_stmt_tree.stmts_are_full_exprs_p = true; scope_chain = s; @@ -6182,6 +6183,7 @@ pop_from_top_level_1 (void) current_function_decl = s->function_decl; cp_unevaluated_o

Re: [C++ Patch/RFC] PR 53025

2014-10-02 Thread Paolo Carlini
Hi, On 10/02/2014 04:26 PM, Jason Merrill wrote: On 10/02/2014 08:11 AM, Paolo Carlini wrote: +/* Nonzero if we are parsing the operand of a noexcept operator. */ + +extern int cp_noexcept_operand; Rather than add a global variable, let's look it up in scope_chain directly, like current_nam

Re: [C++ Patch/RFC] PR 53025

2014-10-02 Thread Jason Merrill
On 10/02/2014 08:11 AM, Paolo Carlini wrote: +/* Nonzero if we are parsing the operand of a noexcept operator. */ + +extern int cp_noexcept_operand; Rather than add a global variable, let's look it up in scope_chain directly, like current_namespace and such. Jason

Re: [C++ Patch/RFC] PR 53025

2014-10-02 Thread Paolo Carlini
Hi, On 10/02/2014 05:22 AM, Jason Merrill wrote: On 10/01/2014 12:31 PM, Paolo Carlini wrote: in this issue Daniel argued that the value of a noexcept expression should not depend on constructor elision. I'm open to that, but I don't think it's at all clear in the standard. Ok. Personally, I

Re: [C++ Patch/RFC] PR 53025

2014-10-01 Thread Jason Merrill
On 10/01/2014 12:31 PM, Paolo Carlini wrote: in this issue Daniel argued that the value of a noexcept expression should not depend on constructor elision. I'm open to that, but I don't think it's at all clear in the standard. Then, in the audit trail Marc tentatively suggested something like

[C++ Patch/RFC] PR 53025

2014-10-01 Thread Paolo Carlini
Hi, in this issue Daniel argued that the value of a noexcept expression should not depend on constructor elision. Then, in the audit trail Marc tentatively suggested something like the parser.c hunk below, which just disables our -felide-constructors optimization when parsing the noexcept exp