malloc returns int?

John Giffin gif@Henson.sandstorm.net
Tue Jul 25 11:48:00 GMT 2000


using gcc v 2.95.2 on a freeBSD box,
this program:

main()
{
  void *bar = malloc(10);
}

returns this warning when compiled:
point.c: In function `main':
point.c:3: warning: initialization makes pointer from integer without a cast

malloc should be returning void *, not int, yes?


More information about the Gcc-bugs mailing list