I was trying to get the fbounds checking to work, but I did not succeed. I get a following error:
/tmp/cczxKZzn.s: Assembler messages:
/tmp/cczxKZzn.s:48: Error: invalid instruction suffix for `push'
/tmp/cc9xD8T3.s:125: Error: invalid instruction suffix for `pop'
while my makefile looks like this (with simple makefile everything is compiling properly):
all: error check
error: error.c
/usr/local/gcc-4.0.2/bin/gcc -fbounds-checking -g -Wall -pedantic $< -o $@
.PHONY: clean check
clean:
-rm error
check: error
./error
Since that code has nothing to do with assembler, I don't know what to do. Assembler problems are the only ones I can see in my google search on that topic.
Can You propose other solutions checking for example for being outside an array? Such as (this is my error.c):
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a[1][10];
a[0][11]=42;
return 0;
}
EDIT. Can it be a version incompatibility; gcc 4.4+ is installed and I'm doing that with path to a little modified gcc 4.0.2 ?