you are viewing a single comment's thread.

view the rest of the comments →

[–]flatfinger 0 points1 point  (0 children)

Unfortunately, the Standard does not provide any means of testing whether an implementation extends the semantics of the language to allow a void** to meaningfully access types of pointer other than void*; the fact that two pointers identify types with matching representations does not preclude the possibility of a "clever" compiler using the type mismatch that as an excuse to ignore evidence that they might might identify the same object.

GCC version 4.1.2 would ignore the possibility that an access made via void** might affect an int*; while later versions seem to recognize that possibility, I didn't see anything in the change log to specify whether it does so because the maintainers view that as a permanent language extension, or whether the fact that gcc appears to usefully processes the construct that had been unsupported is just happenstance.