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/25575] New: some uninitialized warning disappear when compile without -O


Hello,

see example:

---->
$ cat warning.c
int main()
{
  int i;
  return i;
}
$ gcc -Wall warning.c
$ gcc -Wall -O0 warning.c
$ gcc -Wall -O warning.c
warning.c: In function â??mainâ??:
warning.c:4: warning: â??iâ?? is used uninitialized in this function
warning.c
$ gcc -Wall -O1 warning.c
warning.c: In function â??mainâ??:
warning.c:4: warning: â??iâ?? is used uninitialized in this function
$ gcc -Wall -O2 warning.c
warning.c: In function â??mainâ??:
warning.c:4: warning: â??iâ?? is used uninitialized in this function
$ gcc -Wall -O3 warning.c
warning.c: In function â??mainâ??:
warning.c:4: warning: â??iâ?? is used uninitialized in this function
$
<------


-- 
           Summary: some uninitialized warning disappear when compile
                    without -O
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lidaobing at gmail dot com


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


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