Make SECTION size overflow non-fatal

Fixes #538
This commit is contained in:
ISSOtm
2021-05-03 12:09:12 +02:00
committed by Eldred Habert
parent 60b85298a9
commit 75f1bcde31
4 changed files with 90 additions and 34 deletions

View File

@@ -18,6 +18,7 @@
#ifdef __GNUC__ // GCC or compatible
#define format_(archetype, str_index, first_arg) \
__attribute__ ((format (archetype, str_index, first_arg)))
#define attr_(...) __attribute__ ((__VA_ARGS__))
// In release builds, define "unreachable" as such, but trap in debug builds
#ifdef NDEBUG
#define unreachable_ __builtin_unreachable
@@ -27,6 +28,7 @@
#else
// Unsupported, but no need to throw a fit
#define format_(archetype, str_index, first_arg)
#define attr_(...)
// This seems to generate similar code to __builtin_unreachable, despite different semantics
// Note that executing this is undefined behavior (declared _Noreturn, but does return)
static inline _Noreturn unreachable_(void) {}