Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22029

difference between and

$
0
0

When I use malloc in a C program, I get a warning:

warning: incompatible implicit declaration of built-in function 'malloc' [enabled by default]

I can then include <malloc.h> or <stdlib.h> to get rid of the warning although it works without it as well.

So I was wondering, what's the difference between these headers and which one does gcc links when I don't include anything?

(I'm using ubuntu 12.04 64-bit with gcc 4.6.3)


Viewing all articles
Browse latest Browse all 22029

Trending Articles