C++ init-list: using non-initialized members to initialize others gives no warning
问题 Neither g++ (4.4 and 4.6) nor clang++ (3.2) nor coverity, with -Wall and -Wextra (+ some others) or -Weverything respectively gives me a warning for the following code snippet: class B { char *t2; char *t; public: B() : t2(t), t(new char[100]) {} }; I would at least expect a small warning about the usage of uninitialized (member-) variables. Is there something I'm missing? Is this a wanted "no-warning"-scenario. I have (now had) at least one bug in my software which was hard to find. EDIT :