449. Library Issue 306 Goes Too Far

Section: 21.2 [support.types] Status: CD1 Submitter: Pete Becker Opened: 2004-01-15 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [support.types].

View all issues with CD1 status.

Discussion:

Original text:

The macro offsetof accepts a restricted set of type arguments in this International Standard. type shall be a POD structure or a POD union (clause 9). The result of applying the offsetof macro to a field that is a static data member or a function member is undefined."

Revised text:

"If type is not a POD structure or a POD union the results are undefined."

Looks to me like the revised text should have replaced only the second sentence. It doesn't make sense standing alone.

Proposed resolution:

Change 18.1, paragraph 5, to:

The macro offsetof accepts a restricted set of type arguments in this International Standard. If type is not a POD structure or a POD union the results are undefined. The result of applying the offsetof macro to a field that is a static data member or a function member is undefined."