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: unassig...@gcc.gnu.org
        ReportedBy: mfribe...@gmail.com


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?

Reply via email to