------- Comment #2 from pault at gcc dot gnu dot org  2010-02-05 05:36 -------
(In reply to comment #1)

> Why there is a negative check? Well, I do not know. I also can speculate about
> a poor man's overflow check, which sometimes indeed works, but often fails.

I suspect that you are being generous and that this is rather a sin of omission
rather than commission.


> Paul, what do you think?

I think that your arguments are correct.

> 
> (PS: POSIX Allows "ptr = malloc(0); free(ptr)", where "malloc(0)" returns
> either NULL or a unique pointer.)

Indeed.

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42958

Reply via email to