[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#158704: gcc: gcc compiles incorrect loop



Package: gcc
Version: 2:2.95.4-16
Severity: normal

gcc compiles following program without emitting warning even with
-Wall -ansi -pedantic. gcc-3.2 also compiles this program.

int main() 
{
  int a = 0;
  
  while (a == 0) {
    a = 1;
  } while (1);
  
  return 0;
}

-- System Information
Debian Release: 3.0
Kernel Version: Linux tanya 2.4.18 #1 Fri Apr 19 18:18:18 MSD 2002 i686 unknown unknown GNU/Linux

Versions of the packages gcc depends on:
ii  cpp-2.95       2.95.4-2       The GNU C preprocessor.
ii  cpp            2.95.4-16      The GNU C preprocessor.
ii  gcc-2.95       2.95.4-2       The GNU C compiler.



Reply to: