Bound checking in c/c++
Karaoulis Marios
marios at lemnos.geo.auth.gr
Wed Jun 16 19:07:59 EEST 2004
Exo auto to programma
#include <stdio.h>
#include <stdlib.h>
int main()
{
float a[5];
int i;
a[0]=0;
a[1]=1;
a[2]=2;
a[3]=3;
a[4]=4;
a[15]=5;
for (i=0;i<=4;i++) printf("%f\n",a[i]);
printf("%f\n",a[15]);
return 0;
}
to kano compile os
gcc -fbound-checking foo.c
Alla den gurnaei kapio warning
otan to trexo gyrnaei apotelesma gia to a[15]
Ti ginetai?
Den pianei to flag?
More information about the Linux-greek-users
mailing list