OK.
Jason
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
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
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
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
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
Hi,
this bug is a sort of follow up to 10416, which I fixed some time ago
and was about avoiding -Wunused warnings for class types with
destructors with side-effects.
In this issue reporter notes that we don't handle in the same way
references, thus, considering the testcase, we do not warn