Re: [C++ Patch] PR 34927 (Take 2)

2011-10-08 Thread Jason Merrill
OK. Jason

[C++ Patch] PR 34927 (Take 2)

2011-10-08 Thread Paolo Carlini
Hi again, today I had a look to clone_function_decl & co, and came up with the below. I understand DECL_DELETING_DESTRUCTOR_P would work as well... Tested x86_64-linux. Thanks, Paolo. /// 2011-10-08 Paolo Carlini PR c++/34927 * typeck2.c (abstract_virtuals

Re: [C++ Patch] PR 34927

2011-10-08 Thread Paolo Carlini
> Yes, isn't simply not using a static a rather straightforward alternative? Ok, now I see: since it's easy, better avoid using *any* sort of flag, I'll do it. Paolo

Re: [C++ Patch] PR 34927

2011-10-08 Thread Paolo Carlini
Hi, > This seems like it will only complain once per translation unit about virtual > destructors. Oops, sorry, but this specific issue could be solved rather easily by not using a static, right? > How about instead of this flag, we look at which variant it is and only > complain about one o

Re: [C++ Patch] PR 34927

2011-10-08 Thread Jason Merrill
On 10/08/2011 12:56 AM, Paolo Carlini wrote: The fix seems easy: output a cloned destructor only once (+ output any other member functions normally). + static bool done_cloned_dest = false; This seems like it will only complain once per translation unit about virtual destructors. H

[C++ Patch] PR 34927

2011-10-07 Thread Paolo Carlini
Hi, this diagnostic PR is about duplicate inform messages for this kind of testcase, where C has a cloned destructor: class A {}; struct C : A { virtual ~C () = 0; } c; The fix seems easy: output a cloned destructor only once (+ output any other member functions normally). Patch tested x8