This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PING: [patch] fix c++/18016 - warn about self-initialization in constructor init-list


On 24 December 2010 00:31, Jonathan Wakely wrote:
> Merry Pingmas, one and all.

And a pingy new year.

Still hoping for this patch to be reviewed...

> On 21 December 2010 15:25, Jonathan Wakely wrote:
>> Here's my attempt to fix PR c++/18016 so that we get a warning from
>>
>> struct S {
>> ?int i;
>> ?S() : i(i) { }
>> };
>>
>> -Winit-self is broken for C++ (PR c++/34772) so I made this warn with
>> -Wuninitialized. ?If you want to suppress the warning just don't put a
>> mem-initializer in the constructor (which will work at least until
>> someone fixes PR c++/2972)
>>
>> cp/ChangeLog:
>>
>> ? ? ? ?PR c++/18016
>> ? ? ? ?* init.c (perform_member_init): Check for self-initialization.
>>
>>
>> testsuite/ChangeLog:
>>
>> ? ? ? ?PR c++/18016
>> ? ? ? ?* g++.dg/warn/pr18016.C: New.
>>
>>
>> tested x86_64-linux with no regressions, ok for trunk?
>>
>

Attachment: 18016-2.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]