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: As can be read in this new question I realized that coverity warns about this problem in some cases.