X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: =?ISO-8859-1?Q?Hans-Bernhard_Br=F6ker?= Newsgroups: comp.os.msdos.djgpp Subject: Re: _CRT0_FLAG_NULLOK Date: Tue, 30 Jul 2013 22:36:59 +0200 Lines: 14 Message-ID: References: <21e77579-1a40-4442-8111-fc976fba78fc AT googlegroups DOT com> <3df2f50f-9543-47a7-8e40-a9be82ce5018 AT googlegroups DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.dfncis.de qVp1/mkKwTgCVEZ/hrMYuAs+l+FpiJL9kCpB5I2BRcVJMPYYC5ApPwCxzK Cancel-Lock: sha1:Pwz6imR0Nash8MaNhGSW35BFmPo= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 In-Reply-To: <3df2f50f-9543-47a7-8e40-a9be82ce5018@googlegroups.com> Bytes: 1825 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 30.07.2013 22:15, Georg Potthast wrote: > I still feel it would be a better "user experience" if atoi() would > not crash. As far as I understand the specification does not require > atoi() to crash if a NULL pointer is passed. The specification contains no requirements at all for that case. Which means that absolutely everything you might observe automatically fits the specification. In other words, you're observing undefined behaviour. And whenever that happens, that's a bug in your program, period. So please do yourself a favour and stop worrying about what might have been nice, or what might happen on other platforms. That's all missing the point.