Title
Treatment of "pointer to void" for relational comparisons
Status
drwp
Section
7.6.9 [expr.rel]
Submitter
lprv

Created on 2023-03-12.00:00:00 last changed 3 weeks ago

Messages

Date: 2023-11-10.14:27:11

Proposed resolution (approved by CWG 2023-06-16):

Change in 7.6.9 [expr.rel] paragraph 4 and paragraph 5 as follows:

The result of comparing unequal pointers to objects [ Footnote: ... ] is defined in terms of a partial order consistent with the following rules: ...

[Note 1: A relational operator applied to unequal function pointers or to unequal pointers to void yields an unspecified result. A pointer value of type "pointer to cv void" can point to an object (6.8.4 [basic.compound]). -- end note]

Date: 2023-11-15.00:00:00

[Accepted as a DR at the November, 2023 meeting.]

(From editorial issue 6173.)

Subclause 7.6.9 [expr.rel] paragraph 4 and paragraph 5 specify:

The result of comparing unequal pointers to objects [ Footnote: ] is defined in terms of a partial order consistent with the following rules: ...

[Note 1: A relational operator applied to unequal function pointers or to unequal pointers to void yields an unspecified result. -- end note]

Comparing pointers to objects that are stored in a variable of type "pointer to void" should be fine.

History
Date User Action Args
2024-04-05 21:43:46adminsetstatus: dr -> drwp
2023-12-19 10:15:28adminsetstatus: ready -> dr
2023-11-10 14:27:11adminsetmessages: + msg7510
2023-11-10 14:27:11adminsetstatus: tentatively ready -> ready
2023-06-16 16:50:06adminsetstatus: open -> tentatively ready
2023-03-12 00:00:00admincreate