2 ms·
Yes, you're correct [1], and that's why offsetof is a builtin in gcc and clang. Even more insidious is the fact that memcpy of zero bytes from or to null is un
by pcwalton 12y ago
Yes, you're correct [1], and that's why offsetof is a builtin in gcc and clang.
Even more insidious is the fact that memcpy of zero bytes from or to null is undefined behavior.
[1]: http://stackoverflow.com/questions/26906621/does-struct-name-null-b-cause-undefined-behaviour-in-c11 http://stackoverflow.com/questions/26906621/does-struct-name...