diff options
-rw-r--r-- | include/stddef.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/stddef.h b/include/stddef.h index 696af02..e33cfed 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -72,7 +72,10 @@ #define offsetof(type, member) \ ((size_t)((char*)&(((type*)NULL)->member) - (char*)NULL)) /* TODO The behaviour of this is undefined, and a builtin function - * shall be used when available. That would also improve diagnostics. */ + * shall be used when available. That would also improve diagnostics. + * If compilers that support ({ }), NULL could be replaced with a + * temporary variable, this would only remove the undefined behaviour, + * but any serious compiler should support the current implementation. */ |