[cfe-dev] warn when ctor-initializer leaves uninitialized data?

Jordan Rose jediknil at belkadan.com
Mon Apr 9 12:54:01 PDT 2012

I like this idea, though like David said it might not be great for all projects. I think it should be off for POD structs, though, like your first example:

> // warning about a
> struct A { int a; };

I think fewer people mistakenly expect POD structs to be initialized, and of course initializing 'a' would make the struct no-longer POD. The issues I've come across while working with Clang are always POD members in non-POD structures. What do you think?


More information about the cfe-dev mailing list