From 42885678813836540
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,d93488bb970aa444
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-06-19 15:35:01 PST
Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: "Greg Brewer" <nospam.greg@brewer.net>
Newsgroups: comp.std.c++
Subject: Re: How to test for NaNs and infinites?
Date: Tue, 19 Jun 2001 22:34:29 GMT
Organization: Houston Area League of PC Users
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <9go7h8$26jn$1@news.hal-pc.org>
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> <9g8a84$1uah$1@news.hal-pc.org> <3B28B104.807ED9AC@acm.org> <9gdpcm$267r$1@news.hal-pc.org> <flbsnlzpf6.fsf@jambon.cmla.ens-cachan.fr> <9gnjf5$1q76$1@news.hal-pc.org> <fld78073zj.fsf@jambon.cmla.ens-cachan.fr> <3B2F9717.D5017BD6@bear.com>
X-Trace: mail2news.demon.co.uk 992990075 mail2news:12053 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: Tue, 19 Jun 2001 19:00:56 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
Lines: 28
Xref: archiver1.google.com comp.std.c++:6209

"Matvei Brodski" <mbrodski@bear.com> wrote in message
news:3B2F9717.D5017BD6@bear.com...
> We have duly noted *where* the perceived error is.
> Could you tell us *what* is that error?

The error is where I assumed that the int was 2 bytes.  This is a situation
that occurred a few years ago.  A contractor -- despite instructions to use
only shorts and longs -- used ints and compiled with a 16 bit compiler.  Two
years later when the code was recompiled with a 32 bit compiler, it compiled
fine.  There was nothing illegal in the code.  It just crashed.  It crashed
because the structure layout no longer matched the data layout in the binary
file we read from.  If he had used shorts as instructed then the move to 32
bit code would have gone a lot smoother.  The one thing that was of recent
concern was the possibility that a 64 bit version of the compiler would
implement longs as 8 bytes.

The short of it is that it is an error to assume a length for an int.  It is
not illegal!

Greg


---
[ 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                ]



