bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU make 3.81.90 prerelease available


From: Edward Welbourne
Subject: Re: GNU make 3.81.90 prerelease available
Date: Mon, 12 Jul 2010 17:45:05 +0200

>> > >  char *alloca ();

>> Is this the right return type though?  Wouldn't it be void*?

> I have no idea.  You will see that I didn't touch that line in the
> patch, precisely because I don't know what is correct and for which
> platform(s).

In GNU/Linux's gcc/glibc, it is indeed void*, but it's not in POSIX,
so I doubt it is at all standardised.  I would not be at all surprised
if something with pre-ANSI heritage used char* for its return type.

Note, also, that (in gcc/glibc) it's not specified to return NULL on
error, in case you expected that - I've seen some code that tries
testing for NULL return, but its behaviour on insufficient memory is
(specified as) undefined; in practice that means crash.  (Try asking
glibc's sscanf() to read an integral value from a string consisting of
a few megabytes of digits.)

        Eddy.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]