Clarification: how is type compatibility defined when one/both pointer-to-shared target types are incomplete?

Issue #70 new
Former user created an issue

Originally reported on Google Code with ID 70

Version 1.2 of the UPC specification at 6.4.3p2 states:

The casting or assignment from one pointer-to-shared to another in which either the
type size or block size differs results in a pointer with a zero phase, unless one
of the types is a qualified or unqualified version of shared void*, the generic pointer-to-shared,
in which case the phase is preserved unchanged in the resulting pointer value.

Given that the size of an incomplete type is undefined, how would the above constraint
be interpreted if one/both of the pointer-to-shared target types are incomplete types?

Reported by gary.funck on 2012-07-17 20:40:07

Comments (8)

  1. Former user Account Deleted

    ``` Set default Consensus to "Low". ```

    Reported by `gary.funck` on 2012-08-19 23:26:19 - Labels added: Consensus-Low

  2. Former user Account Deleted

    ``` Change Status to New: Requires review. ```

    Reported by `gary.funck` on 2012-08-19 23:37:41 - Status changed: `New`

  3. Former user Account Deleted

    ``` Proposal:

    Insert the capitalized text:

    "... in which either the type size or block size differs, OR EITHER TYPE IS INCOMPLETE, results in a pointer with a zero phase..."

    This means the phase must be reset whenever casting or assigning a pointer involving an incomplete type (other than shared void *). This seems like the only safe option, since the compiler cannot otherwise ensure the phase field in the resulting pointer value is valid.

    ```

    Reported by `danbonachea` on 2012-09-17 18:35:43 - Status changed: `Accepted`

  4. Former user Account Deleted

    ``` I agree with Dan's assessment that resetting the phase is the only action which makes sense when given a pointer to an incomplete type (other than the generic void* case).

    I think the text proposed is fine, but I don't see the need for its capitalization.

    ```

    Reported by `phhargrove@lbl.gov` on 2012-09-17 19:45:52

  5. Former user Account Deleted

    ``` "I think the text proposed is fine, but I don't see the need for its capitalization."

    Yes, that was just for clarity of presentation of the proposal :-) ```

    Reported by `danbonachea` on 2012-09-17 19:48:10

  6. Former user Account Deleted

    ``` Dan wrote:

    Yes, that was just for clarity of presentation of the proposal :-)

    I misread the proposal as requesting that the text be capitalized in the spec. I get it now. Sorry.

    ```

    Reported by `phhargrove@lbl.gov` on 2012-09-17 19:52:14

  7. Former user Account Deleted

    ``` We have agreement from two implementations that phase should be reset in this case, and I suspect this will have wide agreement, so I'm optimistically proceeding with a formal change proposal. Change announcement mailed to the list 9/17/2012.

    Proposed Change: ------------------------- --- upc-language.tex (revision 119) +++ upc-language.tex (working copy) @@ -336,7 +336,9 @@ {\bf Semantics}

    \np The casting or assignment from one pointer-to-shared - to another in which either the type size or block size differs results in + to another in which either the type size or block size differs, + \xadded[id=DB]{70}{or either type is incomplete,} + results in a pointer with a zero phase, unless one of the types is a qualified or unqualified version of {\tt shared void*}, the {\em generic pointer-to-shared}, in which case the phase is preserved unchanged in the resulting

    ```

    Reported by `danbonachea` on 2012-09-17 21:46:00 - Status changed: `PendingApproval`

  8. Former user Account Deleted
    This PendingApproval issue was ratified at the 10/19/2012 telecon, and merged into the
    working draft in SVN 175.
    

    Reported by danbonachea on 2012-10-22 18:43:14 - Status changed: Ratified

  9. Log in to comment