Make improvements to cosmocc toolchain

This commit is contained in:
Justine Tunney 2023-06-10 15:50:01 -07:00
parent 8ff48201ca
commit 2676ec55de
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
8 changed files with 205 additions and 117 deletions

View file

@ -23,11 +23,18 @@ void __assert_fail(const char *, const char *, int) _Hide relegated;
({ \
if (__builtin_expect(!(x), 0)) { \
__assert_fail(s, __FILE__, __LINE__); \
notpossible; \
__builtin_trap(); \
} \
(void)0; \
})
#else
#define _npassert(x) \
({ \
if (__builtin_expect(!(x), 0)) { \
__builtin_trap(); \
} \
(void)0; \
})
#define _unassert(x) \
({ \
if (__builtin_expect(!(x), 0)) { \
@ -35,13 +42,6 @@ void __assert_fail(const char *, const char *, int) _Hide relegated;
} \
(void)0; \
})
#define _npassert(x) \
({ \
if (__builtin_expect(!(x), 0)) { \
notpossible; \
} \
(void)0; \
})
#endif
COSMOPOLITAN_C_END_