[PATCH 1/1] include: types: Use __builtin_offsetof when supported

Andreas Schwab schwab at linux-m68k.org
Mon Jul 12 05:59:25 PDT 2021


On Jul 12 2021, Jessica Clarke wrote:

> The original code was stolen for Linux, where __compiler_offsetof is
> (unconditionally, it seems) defined to __builtin_offsetof. Either
> __compiler_offsetof should be defined to __builtin_offsetof or it
> should be deleted, but having both still exist is wrong. Personally I’m
> of the view OpenSBI should just define offsetof to __builtin_offsetof

No, it should use <stddef.h>.

Andreas.

-- 
Andreas Schwab, schwab at linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



More information about the opensbi mailing list