Title
Qualified pointer pointing to unqualified object
Status
tentatively ready
Section
9.2.9.2 [dcl.type.cv]
Submitter
Brian Bi

Created on 2026-06-19.00:00:00 last changed 5 days ago

Messages

Date: 2026-06-26.22:53:47

Proposed resolution (approved by CWG 2026-06-26):

Change 9.2.9.2 [dcl.type.cv] paragraph 3 as follows:

[Note: A pointer or reference to a cv-qualified type need not actually point or refer to a cv-qualified object, but it is treated as if it does; a const-qualified access path cannot be used to modify an object even if the object referenced is a non-const object and can be modified through some other access path. [Note 4: Cv-qualifiers are supported by the type system so that they cannot be subverted without casting (7.6.1.11 [expr.const.cast]). —end note]
Date: 2026-06-19.00:00:00

(From submission #926.)

The first half of 9.2.9.2 [dcl.type.cv] paragraph 3 is redundant with 7.3.6 [conv.qual] and 9.5.4 [dcl.init.ref]. The second half is redundant with 7.2.1 [basic.lval] paragraph 10.

History
Date User Action Args
2026-06-26 22:53:47adminsetstatus: open -> tentatively ready
2026-06-22 21:04:01adminsetmessages: + msg8604
2026-06-19 00:00:00admincreate