4 ms·
https://en.wikipedia.org/wiki/Offsetof https://en.wikipedia.org/wiki/Offsetof repeats what is said the SO link and might be helpful? The occurrence of the UB is
by potiuper 8y ago
https://en.wikipedia.org/wiki/Offsetof https://en.wikipedia.org/wiki/Offsetof repeats what is said the SO link and might be helpful? The occurrence of the UB is not dependent on the parameters that sgl_baseof is called with. The UB may occur solely based on the compiler and standard library implementation. If the UB does occur based on those two and offsetof is not redefined somewhere, then the UB occurs anywhere offsetof is used.