On Thu, Jul 22, 2021 at 8:18 AM Richard Biener via Gcc <gcc@gcc.gnu.org> wrote: > > On Wed, Jul 21, 2021 at 2:45 PM Sebastian Huber > <sebastian.hu...@embedded-brains.de> wrote: > > > > Hello, > > > > while testing this patch > > > > https://www.google.com/search?client=firefox-b-e&q=gcc+enable_runtime_checking > > > > I noticed that __gcov_info_to_gcda() uses abort(). This is due to (from > > tsystem.h): > > > > #ifdef ENABLE_RUNTIME_CHECKING > > #define gcc_assert(EXPR) ((void)(!(EXPR) ? abort (), 0 : 0)) > > #else > > /* Include EXPR, so that unused variable warnings do not occur. */ > > #define gcc_assert(EXPR) ((void)(0 && (EXPR))) > > #endif > > > > In tsystem.h there is this if inhibit_libc is defined: > > > > #ifndef abort > > extern void abort (void) __attribute__ ((__noreturn__)); > > #endif > > > > Who is supposed to define abort here optionally? Can this be defined for > > example by a target configuration header like gcc/config/rtems.h? > > I suppose for inhibit_libc we could use __builtin_trap () (but that might > expand to abort() on some targets)
That seems straightforward. Does it address the RTEMS concern? Or, should we suppress ENABLE_RUNTIME_CHECKING when inhibit_libc? Jason