zhuyanlinzyl commented on pull request #4418:
URL: https://github.com/apache/incubator-nuttx/pull/4418#issuecomment-906427619


   hi, @davids5:
   offsetof have a little difference in C++ language 
   https://en.cppreference.com/w/cpp/types/offsetof.
   https://gist.github.com/graphitemaster/494f21190bb2c63c5516
   
   In nuttx, when enable LIBCXXABI config, C++ toolchain generate build break 
which complain `offsetof` is not a constant in 
   static_assert(sizeof(_Unwind_Exception) + 
offsetof(__cxa_dependent_exception, unwindHeader) == 
sizeof(__cxa_dependent_exception)
   
   use built-in offset could be a better way for compile with fixed language 
code.
   
   
https://stackoverflow.com/questions/47219978/why-offsetof-implementations-strangely-differs-on-c-and-c


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to