Closed ArthurPV closed 2 months ago
This type of code produced bad generation code:
#include <assert.h> int main() { assert(0 && "error"); }
generate that:
[[noreturn]] extern void __assert_fail(const char* __assertion, const char* __file, unsigned int __line, const char* __function); [[noreturn]] extern void __assert(const char* __assertion, const char* __file, int __line); int main(); int main() { (0 && "error") ? ((void)0) : __assert_fail("0 && "error"", "assert.h", 53, __func__); }
and now what's generated after the fix:
[[noreturn]] extern void __assert_fail(const char* __assertion, const char* __file, unsigned int __line, const char* __function); [[noreturn]] extern void __assert(const char* __assertion, const char* __file, int __line); int main(); int main() { (0 && "error") ? ((void)0) : __assert_fail("0 && \"error\"", "assert.h", 53, __func__); }
This type of code produced bad generation code:
generate that:
and now what's generated after the fix: