Use of the information contained in this unapproved document is at your own risk
.Last update: 30 March,1998
1003.1c-95 #36 _____________________________________________________________________________ Interpretation Number: XXXX Topic: primitive system data types Relevant Sections: 2.5 Interpretation Request: (Defect Report) ----------------------- Date: Mon, 07 Oct 1996 14:41:09 -0400 From: Dave Butenhof (butenhof@zko.dec.com) 1. Section 2.5, Primitive System Data Types The pthread data types (pthread_t, pthread_attr_t, pthread_cond_t, pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t, pthread_key_t, pthread_once_t) are listed in this section, and in Table 2-1. Unfortunately, while all of these types have been specifically described as "opaque" types (and 2.5 even reminds readers that there are "no defined comparison or assignment operators" for most of the types, oddly omitting some), The second paragraph of this section says clearly "All of the types listed in Table 2-1 shall be arithmetic types". 1a) This is not true, and the working group did not intend to make this a requirement. Either the statement should be changed, for example, to list the specific types that must be arithmetic, or to exclude all of those that needn't be -- or else the non arithmetic types (all the pthread types) should be moved to a separate table. 1b) In addition, the list of types for which there are no defined comparison or assignment operators omits pthread_key_t and pthread_once_t, both of which are also "opaque types", and have no comparison or assignment operators. Interpretation response ----------------------- The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor. Rationale ------------- As noted in the request these types are described elsewhere in the standard as opaque types as an aid to extensibility. Although not part of the normative text, the rationale for POSIX 1003.1c/D10 makes it very clear that these are opaque data types. Furthermore, the text in lines 970-972 that "There are no defined comparison or assignment operators for the types pthread_attr_t, pthread_cond_t, pthread_condattr_t, pthread_mutex_t, and pthread_mutex_attr_t." contradicts the claim on line 963 that these types shall be arithmetic, since all arithmetic types have defined comparison and assignment operators. The interpretations committee recommends to the sponsor that the following changes be made: Proposed changes to 1003.1 (not part of this interpretation). -------------------------- Change 1003.1-1996 ll 963 first sentence from "All of the types listed in Table 2-1 shall be arithmetic types;" To: "All of the types listed in Table 2-1 shall be arithmetic types, except the types pthread_t, pthread_attr_t, pthread_mutex_t, pthread_mutexattr_t, pthread_cond_t, pthread_condattr_t, pthread_key_t, pthread_once_t;" Forwarded to Interpretations group: Oct 20 1996 Proposed interpretation:29 Jan 97 Finalised: Feb 18 1997