07/07/2021 22:23, Tyler Retzlaff: > On Thu, Jun 24, 2021 at 06:29:20PM +0200, Thomas Monjalon wrote: > > 24/06/2021 18:02, Tyler Retzlaff: > > > On Thu, Jun 24, 2021 at 08:54:49AM +0200, Thomas Monjalon wrote: > > > > 23/06/2021 20:26, Tyler Retzlaff: > > > > > // lib/eal/gcc/rte_toolchain_common.h > > > > > #define __rte_noreturn __attribute__((noreturn)) > > > > > > > > We should keep a macro in rte_common.h which triggers an explicit error > > > > > > i think that's relatively trivial to do. rte_common.h could after > > > toolchain specific include do a simple test. > > > > > > #ifndef __rte_no_return > > > #error no __rte_no_return defined for toolchain > > > #endif > > > > No I was thinking of: > > > > /** Doxygen comment for the attribute below */ > > #define __rte_no_return RTE_ATTR_NOT_SUPPORTED > > when you suggested this i thought it was something already established. > i see now that's not the case. would you mind elaborating a little with > a complete example of the toolchain specific override and the generic > include? i'd just like to understand completely what you were > proposing so i can try it out.
Sorry I don't have time currently to elaborate, and not sure how to implement it. I may look at it next week if that's the way we want to go. > > This way we have a documentation in a single place for the macro, > > and compilation fails if it is not implemented for the toolchain.