Created on 2025-10-01.00:00:00 last changed 2 days ago
Proposed resolution (approved by CWG 2025-10-10):
Change in 7.6.1.10 [expr.reinterpret.cast] paragraph 6 as follows:
A function pointer can be explicitly converted to a function pointer of a different type. The function pointer value is unchanged by the conversion. [Note 4: The effect of calling a function through a pointer to a function type (9.3.4.6 [dcl.fct]) that is notthe same ascall-compatible with the type used in the definition of the function is undefined (7.6.1.3 [expr.call]). —end note]Except that converting a prvalue of type “pointer to T1” to the type “pointer to T2” (where T1 and T2 are function types) and back to its original type yields the original pointer value, the result of such a pointer conversion is unspecified.
Subclause 7.6.1.10 [expr.reinterpret.cast] paragraph 6 does not, but should, make casts to call-compatible function types predictably valid.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-10-10 20:14:18 | admin | set | messages: + msg8141 |
2025-10-10 20:14:18 | admin | set | status: open -> tentatively ready |
2025-10-01 00:00:00 | admin | create |