delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/07/30/16:45:06

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: =?ISO-8859-1?Q?Hans-Bernhard_Br=F6ker?= <HBBroeker AT t-online DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: _CRT0_FLAG_NULLOK
Date: Tue, 30 Jul 2013 22:36:59 +0200
Lines: 14
Message-ID: <b5qmetF852fU1@mid.dfncis.de>
References: <21e77579-1a40-4442-8111-fc976fba78fc AT googlegroups DOT com> <b5o37qFldl9U1 AT mid DOT dfncis DOT de> <f24e8cd3-83ca-4386-a319-a9adb4d74c68 AT googlegroups DOT com> <3df2f50f-9543-47a7-8e40-a9be82ce5018 AT googlegroups DOT com>
Mime-Version: 1.0
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

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.

- Raw text -


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