delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f |
Date: | Thu, 21 Apr 2016 01:11:42 -0400 |
Message-Id: | <201604210511.u3L5BgNK025010@envy.delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | djgpp-workers AT delorie DOT com |
In-reply-to: | <57184BDE.5050901@iki.fi> (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> | |
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 |
> - DJGPP NULL dereferencing pointer do not cause crash in all > environments. Workaround could be to manually crash program if such > operation is tried like 'if (ptr==NULL) { abort(); }' (or > raise(SIGSEGV);) In Borland C, a NULL pointer pointed to a zero-length string, because the first byte of every segment was a NUL byte. We're copying that behavior somewhat. I could be convinced about aborting instead, but only long ago when it was a new thing :-) As for the standard, it says that NULL shall not be passed, so in a conforming program that code never happens anyway.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |