4 ms·
Sorry, still not getting it. If an implementation provides offsetof and it doesn't work, that implementation would go out of fashion in a heart beat. Where is
by sifoobar 8y ago
Sorry, still not getting it.
If an implementation provides offsetof and it doesn't work, that implementation would go out of fashion in a heart beat.
Where is the practical use of this information?
How is this even an argument?
- potiuper 8y agoThe use of the Offsetof macro in a program will cause undefined behavior when compiled with GCC or Clang and they are still "in fashion" as far as I am aware. The practical use of this information is to prevent the occurrence of undefined behavior by knowing not to use offsetof for example with GCC and instead use __builtin_offsetof in the specific case of GCC. The argument appears to be that you are claiming that what sgl_baseof does is not undefined behavior and I am claiming that it is not possible to infer that without specifying the implementation of the offsetof macro.