mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Use loops instead of tail calls and musttail
gcc 15.2.1 20250813 complains "address of automatic variable can escape to `musttail` call" from `-Wmaybe-musttail-local-addr`, and guaranteeing tail-call optimization cross-platform is more trouble than it's worth.
This commit is contained in:
@@ -60,13 +60,4 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
|
||||
// gcc and clang have their own `musttail` attributes for tail recursion
|
||||
#if defined(__clang__) && __has_cpp_attribute(clang::musttail)
|
||||
#define MUSTTAIL [[clang::musttail]]
|
||||
#elif defined(__GNUC__) && __has_cpp_attribute(gnu::musttail)
|
||||
#define MUSTTAIL [[gnu::musttail]]
|
||||
#else
|
||||
#define MUSTTAIL
|
||||
#endif
|
||||
|
||||
#endif // RGBDS_PLATFORM_HPP
|
||||
|
||||
Reference in New Issue
Block a user