Re: [C++ Patch] PR 54170

2012-12-03 Thread Jason Merrill
OK, thanks. Jason

Re: [C++ Patch] PR 54170

2012-12-01 Thread Paolo Carlini
Hi, On 12/01/2012 07:13 AM, Jason Merrill wrote: On 11/30/2012 04:05 PM, Paolo Carlini wrote: @@ -219,10 +219,15 @@ cp_convert_to_pointer (tree type, tree expr, tsubs -expr = build_int_cst (type, 0); +expr = (TREE_SIDE_EFFECTS (expr) +? build_nop (type, expr) +: build_in

Re: [C++ Patch] PR 54170

2012-11-30 Thread Jason Merrill
On 11/30/2012 04:05 PM, Paolo Carlini wrote: @@ -219,10 +219,15 @@ cp_convert_to_pointer (tree type, tree expr, tsubs - expr = build_int_cst (type, 0); + expr = (TREE_SIDE_EFFECTS (expr) + ? build_nop (type, expr) + : build_int_cst (type, 0)); This seems

[C++ Patch] PR 54170

2012-11-30 Thread Paolo Carlini
Hi, this wrong code PR is some sort of continuation of PR 52988, where we discard side-effects of expression of nullptr_t. Here too, in cp_convert_to_pointer and in build_ptrmemfunc, we don't check for side-effects and we replace the expression with a plain int_cst or nullptr_node. The testca