can gcc provide information for stack array overran checking ?

Xiaoshan Sun
Tue Apr 19 05:37:00 GMT 2005

 the following program has a stack array overran and static arrary overran .
overran of this kind may be a very hard to find bug in a software .so can
gcc provide extra information for other debugging tools to check if an
array is overran ?

int static[5];

int main(void)
  int stack[5];

  static[5] = 0;
  stack [5] = 0;
  return 0;

i have no idea about whom to ask ,gdb or gcc or both ??

More information about the Gcc-help mailing list