www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2016/04/24/16:24:31

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
Date: Sun, 24 Apr 2016 16:24:25 -0400
Message-Id: <201604242024.u3OKOPPt008589@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <571D24D5.4030105@gmx.de> (djgpp-workers@delorie.com)
Subject: Re: Test build of gcc-6.0.1-20160415
References: <5713789D DOT 8070708 AT iki DOT fi> <57152494 DOT 6040808 AT gmx DOT de> <57154DC1 DOT 2080907 AT iki DOT fi> <5717FF70 DOT 3020801 AT gmx DOT de> <57184BDE DOT 5050901 AT iki DOT fi> <571D0950 DOT 50907 AT iki DOT fi> <201604241810 DOT u3OIA17t003694 AT envy DOT delorie DOT com> <571D24D5 DOT 4030105 AT gmx DOT de>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> I inspected how these particular functions are handled in cygwin and glibc and
> no one of both libraries check for NULL pointer argument at all.  If we do check
> for NULL pointer only because BORLAND compiler behaved in a similar manner,
> then I think that that is a nostalgical reason nowadays.  Keeping BORLAND
> compatibility should not be the motivation IMHO.  If it is really BORLAND
> compatibility I would seriously suggest to remove the NULL pointer check from
> all functions where the standard does not impose them.  But please note that
> this is only my opinion and that I have no real preference how this issue is
> resolved.

I think we need to do *something* with NULL because NULL is a valid
pointer for us, else we'd return some random value depending on what's
at that spot in memory.  Whether that "something" is to abort or
return zero is an old decision and I see no reason to fix it decades
later ;-)

A conforming program won't care because it won't ever pass NULL in the
first place.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019