P
Paminu
On a gentoo linux system i don't get any warnings when I comlpile this code:
#include <stdio.h>
typedef struct test
{
void *content;
struct test_ *bob;
} test_;
int main(void)
{
test_ *tt;
tt =(test_ *) malloc(sizeof(test_));
return 0;
}
But on my home Ubuntu box I get this warning:
mos@ubuntu:~/lab1$ gcc test2.c -o test2
test2.c: In function 'main':
test2.c:16: warning: incompatible implicit declaration of built-in function
'malloc'
mos@ubuntu:~/lab1$
What does this warning mean and why does it appear on one system while it
does not appear on another?
#include <stdio.h>
typedef struct test
{
void *content;
struct test_ *bob;
} test_;
int main(void)
{
test_ *tt;
tt =(test_ *) malloc(sizeof(test_));
return 0;
}
But on my home Ubuntu box I get this warning:
mos@ubuntu:~/lab1$ gcc test2.c -o test2
test2.c: In function 'main':
test2.c:16: warning: incompatible implicit declaration of built-in function
'malloc'
mos@ubuntu:~/lab1$
What does this warning mean and why does it appear on one system while it
does not appear on another?