This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/42238] New: Missing warning about uninitialized variable


When compiling the following code I expect a warning about usage of
uninitialized variable.

int main(int argc, const char*[]){
        do {
                int a = a;
        } while(1);

        return 0;
}

Even when compiled with "-Wall -Winit-self" I get no warning. I have tried with
both g++-4.4.2 and g++-4.2.4 with the same result.

This is a simplification of the case I posted on the gcc-help list
(http://gcc.gnu.org/ml/gcc-help/2009-11/msg00250.html).


-- 
           Summary: Missing warning about uninitialized variable
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ext at sidvind dot com
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42238


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]