http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48829
Summary: g++ no warning initializing a variable using itself
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
This code issues a warning:
g++ -Wall
int i = 5 + i;
warning: āiā may be used uninitialized in this function
This code does not:
string s = string("str") + s;
Neither this:
string s(string("str") + s);
Shouldnt the 2 last ones issue warnings too?