This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

malloc returns int?


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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]