Article View: comp.std.c++
Article #2867Re: Undefined versus unspecified
From: Matt Austern
Date: Wed, 06 Dec 1995 16:03
Date: Wed, 06 Dec 1995 16:03
29 lines
2232 bytes
2232 bytes
In article <4a2nvl$nq@natasha.rmii.com> jcoffin@rmii.com (Jerry Coffin) writes: > Not really. Consider a real example of unspecified behavior: > > a = b + c + d; > > Now, it is unspecified whether the multiplication will be evaluated > before or after the division. Under some circumstances, you may even be > able to detect a diference. (e.g. depending on the magnitudes involved, > floating point accuracy can be affected.) But this is an example where the standard gives a set of possible behaviors; the behavior is unspecified, but is constrained to belong to that set. What concerns me is the case where the behavior is "unspecified" and the standard imposes no constraints at all. In that case, it might as well just call the behavior "undefined"; I don't think the two terms mean anything very different in that case. The main difference seems to be one of connotation and emphasis, rather than any specific requirement on implementations. -- Matt Austern He showed his lower teeth. "We matt@physics.berkeley.edu all have flaws," he said, "and http://dogbert.lbl.gov/~matt mine is being wicked." [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<MATT.95Dec6011347@cyclops5.berkeley.edu>Path:
arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamageReferences:
<MATT.95Nov30185128@cyclops5.berkeley.edu> <ACE4F57196681C2631@corf.demon.co.uk> <49uf3e$hpr@gabi.gabi-soft.fr> <4a2nvl$nq@natasha.rmii.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage From: matt@cyclops5.berkeley.edu (Matt Austern) Newsgroups: comp.std.c++ Subject: Re: Undefined versus unspecified Date: 6 Dec 1995 16:03:40 GMT Organization: University of California at Berkeley (computational neuroscience) Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <MATT.95Dec6011347@cyclops5.berkeley.edu> References: <MATT.95Nov30185128@cyclops5.berkeley.edu> <ACE4F57196681C2631@corf.demon.co.uk> <49uf3e$hpr@gabi.gabi-soft.fr> <4a2nvl$nq@natasha.rmii.com> Reply-To: matt@physics.berkeley.edu NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text X-Nntp-Posting-Host: cyclops5.berkeley.edu In-Reply-To: jcoffin@rmii.com's message of 06 Dec 1995 01:54:40 GMT Content-Length: 1179 X-Lines: 25 Originator: clamage@taumet