Issue 162: Portably getting the value of the bounds of a sequence (c_mapping-rtf) Source: (, ) Nature: Uncategorized Severity: Medium Summary: Summary: Section 14.11: It"s not clear how a portable application could know value of bound of sequence. It"s specified in PIDL but is not represented in generated C header Resolution: add sentence Revised Text: Add sentence to start the 3rd paragraph on p,1-14 June 99 spec The _maximum member for a bounded sequence should be set to the length of the bound when the sequence is allocated. Thereafter accessing the _maximum will return the value of the bound. Resetting the value of _maximum for a bounded sequence can result in unpredictable behavior. Actions taken: October 10, 1996: received issue October 5, 2000: closed issue Discussion: It not clear what a C language mapping could do to provide this information. The C++ language mapping simply states that maximum() for a bounded sequence will always return the bound, but they can make that happen via the class. The C language could do likewise, accessing the _maximum parameter will return the sequence bound but, that would only be true if the application had not at some point changed the bound. End of Annotations:===== Issue 162: Portably getting the value of the bounds of a sequence Summary: Section 14.11: It"s not clear how a portable application could know value of bound of sequence. It"s specified in PIDL but is not represented in generated C header Discussion - It not clear what a C language mapping could do to provide this information. The C++ language mapping simply states that maximum() for a bounded sequence will always return the bound, but they can make that happen via the class. The C language could do likewise, accessing the _maximum parameter will return the sequence bound but, that would only be true if the application had not at some point changed the bound. In the C mapping I see no way to prevent it. I propose we address the issue by adding a sentence to the paragraph that addresses setting _length and _maximum errors to state: "The _maximum member for a bounded sequence should be set to the length of the bound when the sequence is allocated. Thereafter accessing the _maximum will return the value of the bound. Resetting the value of _maximum for a bounded sequence is an error that can result in unpredictable behavior."