|
|
|
|
|
by Blaisorblade0
1829 days ago
|
|
But you can’t compare to the concrete model, because it’s not the status quo. That ship already sailed with C89 and strict aliasing. Ptr2int casts were never legal, and support was inconsistent. For instance, GCC sometimes tracks pointer provenance through integers; this proposed change will make that clearly illegal. |
|
>Ptr2int casts were never legal
Citation on this? The existence of uintptr_t seems to say otherwise.
>That ship already sailed
In principle, I see no reason preventing future versions of the standard from defining previously-undefined behavior. That said, you are probably right in a realpolitik sense.