Re: [C++ Path] PR 38958

2013-06-12 Thread Jason Merrill
OK. Jason

Re: [C++ Path] PR 38958

2013-06-12 Thread Paolo Carlini
Hi, On 06/12/2013 07:46 PM, Jason Merrill wrote: On 06/12/2013 01:37 PM, Paolo Carlini wrote: Rewording: as the one line comment says, I only call non_reference at the outset when I know that either we'll end up producing the normal unused-variable warning or nothing at all. Oh, I see. But th

Re: [C++ Path] PR 38958

2013-06-12 Thread Jason Merrill
On 06/12/2013 01:37 PM, Paolo Carlini wrote: Rewording: as the one line comment says, I only call non_reference at the outset when I know that either we'll end up producing the normal unused-variable warning or nothing at all. Oh, I see. But that's a rather subtle difference; better to have

Re: [C++ Path] PR 38958

2013-06-12 Thread Paolo Carlini
Humpf, >I understand the general issue, but I'm not sure we can't use 'type' >here: we don't even consider emitting the unused-but-set warning when >TREE_USED (decl) is false and in this case I don't call non_reference >at the outset. I meant *only* in this case I call non_reference, you see my

Re: [C++ Path] PR 38958

2013-06-12 Thread Paolo Carlini
Hi, Jason Merrill ha scritto: >On 06/12/2013 11:58 AM, Paolo Carlini wrote: >> - && TREE_CODE (TREE_TYPE (decl)) != REFERENCE_TYPE >> + && TREE_CODE (type) != REFERENCE_TYPE > >This change is wrong; we specifically want to suppress the >unused-but-set warning fo

Re: [C++ Path] PR 38958

2013-06-12 Thread Jason Merrill
On 06/12/2013 11:58 AM, Paolo Carlini wrote: -&& TREE_CODE (TREE_TYPE (decl)) != REFERENCE_TYPE +&& TREE_CODE (type) != REFERENCE_TYPE This change is wrong; we specifically want to suppress the unused-but-set warning for reference variables. Drop it and