#include
int foo(int *a, int size){
memset (a, 0, size);
if (a != NULL)
return 1;
else
return 0;
}
this function always return 1
gcc 4.9 default opens -fdelete-null-pointer-checks
but memset's first funtion parameters is "nonull attribute", so else section will be removed
沒有留言:
張貼留言