the current implementation of the offsetof macro
depends on special code in SDCCast.c
which causes problems for certain pointer casts.
(see offsetof-bug.c testcase in the patch)
this patch implements offsetof with a compiler
builtin __builtin_offsetof to avoid this problem,
and to avoid such special twisting of the ast.
__builtin_offsetof implementation
Patch applied in svn revision #5888.
Borut
The regression test offsetof-bug.c was not added due to the bug #3034400: cannot use generic pointer to initialize <null>. This bug remains open until #3034400 is added and the offsetof-bug.c regression test is added.
Borut