From -5571625749113199451
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,d93488bb970aa444
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-06-20 10:23:38 PST
From: MikeAlpha@NoSpam_csi.com (Martin Aupperle)
Newsgroups: comp.std.c++
Subject: Re: How to test for NaNs and infinites?
Date: Wed, 20 Jun 2001 17:14:37 GMT
Organization: Nikoma Mediaworks GmbH
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <3b3097a6.200675926@news.nikoma.de>
References: <3B176D2F.70C3E7F7@meteo.fr> <usrihtkqfjd9qfj2bgtbp6pj530asi567k@4ax.com> <b172eb2f.0106071330.5f984936@posting.google.com> <9fql8h$pfg$1@news.hal-pc.org> <3B21100E.5B25F7AA@acm.org> <9frdlp$14bc$1@news.hal-pc.org> <fl3d9ail4o.fsf@sel.cmla.ens-cachan.fr> <9g2em7$1pkk$1@news.hal-pc.org> <fl7kyi5769.fsf@jambon.cmla.ens-cachan.fr> <9g7q93$1lu1$1@news.hal-pc.org> <3B278187.9E196C80@acm.org>
X-Trace: mail2news.demon.co.uk 993057285 mail2news:22314 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
NNTP-Posting-Date: Wed, 20 Jun 2001 14:27:49 +0000 (UTC)
X-Newsreader: Forte Free Agent 1.21/32.243
Lines: 49
Path: archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!freenix!feed.ac-versailles.fr!proxad.net!fr.clara.net!heighliner.fr.clara.net!diablo.netcom.net.uk!netcom.net.uk!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
Xref: archiver1.google.com comp.std.c++:6217

On Wed, 13 Jun 2001 15:19:20 GMT, Pete Becker <petebecker@acm.org>
wrote:

>>From the C++ language definition:
>
>	1.3.12 undefined behavior
>
>	behavior, such as might arise upon use of an erroneous program
>construct
>	or erroneous data, for which this International Standard imposes no
>	requirements. ... [Note: permissible undefined behavior ranges from
>	ignoring the situation completely with unpredictable results, to
>behaving
>	during translation or program execution in a documented manner
>characteristic
>	of the environment (with or without the issuance of a diagnostic
>message), to
>	terminating a translation or execution (with the issuance of a
>diagnostic
>	message).
>
>Of course, the Standard can't say that something is "illegal"; all it
>can say is that it cannot be used in a conforming program. And that's
>precisely what the above definition says. Code that produces undefined
>behavior does not conform to the language definition. Or, in the usual
>colloquialism, it's illegal.
>
In some of my earlier projects it was not uncommon to make direkt
screen output by writing ints into some memory locations. The ints had
a char that was the character and another that ws the attribute
(color, etc. ) Of course we used unions. Sounds familiar? 

Im am disappointed to learn that those programs were all illegal, and
not valid C++. 

Martin

------------------------------------------------
Martin Aupperle 
MikeAlpha@NoSpam_csi.com
(remove NoSpam_)
------------------------------------------------

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]



