Article View: comp.std.c++
Article #2805Re: Undefined versus unspecified
From: Sean A Corfield
Date: Fri, 01 Dec 1995 19:47
Date: Fri, 01 Dec 1995 19:47
34 lines
1782 bytes
1782 bytes
In article <MATT.95Nov30185128@cyclops5.berkeley.edu>,
matt@cyclops5.berkeley.edu (Matt Austern) wrote:
|> Section 1.3 of the draft standard says that undefined behavior is
|> "Behavior, such as might arise upon use of an erroneous program
^^^^^^^^^
|> construct of or erroneous data, for which the standard imposes no
^^^^^^^^^
|> requirements." It also says that unspecified behavior is "Behavior,
|> for a correct program construct and correct data, that depends on the
^^^^^^^ ^^^^^^^
|> implementation. The implementation is not required to document which
|> behavior occurs. [Note: usually, the range of possible behaviors is
|> delineated by the standard.]"
|>
|> Now, as I read these definitions it seems to me that they're the same,
I've highlighted the important difference. Unspecified means it'll work
fine but we're not telling you how; undefined means it might do anything
(including not work at all).
Sean A. Corfield
Object Consultancy Services
C++ - Beyond the ARM - http://uptown.turnpike.net/~scorf/cplusext.html
---
[ 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:
<ACE4F57196681C2631@corf.demon.co.uk>Path:
arc1-ca.pugleaf.net!info.ucla.edu!agate!agate!MattReferences:
<MATT.95Nov30185128@cyclops5.berkeley.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!info.ucla.edu!agate!agate!Matt From: Sean A Corfield <sean@corf.demon.co.uk> Newsgroups: comp.std.c++ Subject: Re: Undefined versus unspecified Date: 01 Dec 1995 19:47:06 GMT Organization: OCS Approved: Matt@Austern Message-ID: <ACE4F57196681C2631@corf.demon.co.uk> References: <MATT.95Nov30185128@cyclops5.berkeley.edu> NNTP-Posting-Host: austern.hip.berkeley.edu