From a3d7a98b8ea211ac0e766d328f9e595c70a887ba Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 13 Oct 2015 02:21:52 +0200 Subject: add todo about undefined behaviour of offsetof MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/stddef.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/stddef.h b/include/stddef.h index 871a618..bb239f8 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -71,6 +71,8 @@ */ #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. */ -- cgit v1.2.3-70-g09d2