------- Comment #2 from hjl dot tools at gmail dot com  2008-05-02 12:48 -------
A simple testcase:

bash-3.2$ cat x.c
int foo [10];

int
bar (int i)
{
  if (8 == 8)
    return foo [1];
  else
   return foo [-1];
}
bash-3.2$  ./xgcc -B./ -O2 x.c -c -Wall -Werror
cc1: warnings being treated as errors
x.c: In function ‘bar’:
x.c:9: error: array subscript is negative
bash-3.2$ 


-- 


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

Reply via email to