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: [patch] fix c++/18016 - warn about self-initialization in constructor init-list


On 05/22/2011 05:11 PM, Jonathan Wakely wrote:
As I said in the audit trail, -Winit-self is broken for C++ (PR
c++/34772)

Not anymore. :)


Even if -Winit-self wasn't broken I don't think it applies here,
there's no valid reason to initialize a member with itself, if you
really want to leave a member uninitialized then don't use a
mem-initializer in the constructor (which will work at least until
someone fixes PR c++/2972)

...at which point we would want it to be controlled by -Winit-self, so let's use -Winit-self now.


OK with that change.

Jason



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