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
oh, didn't know about this. it sounds better. > > This way we have a documentation in a single place for the macro, > and compilation fails if it is not implemented for the toolchain. yes, i was thinking about this. i'm glad you suggested it because a signle source of documentation in rte_common.h would be better than having to maintain redundant copies.