mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Use musttail attribute to guarantee tail recursion (#1849)
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "helpers.hpp"
|
||||
#include "itertools.hpp"
|
||||
#include "linkdefs.hpp"
|
||||
#include "platform.hpp" // MUSTTAIL
|
||||
#include "verbosity.hpp"
|
||||
|
||||
#include "link/main.hpp"
|
||||
@@ -203,7 +204,7 @@ static std::optional<size_t> getPlacement(Section const §ion, MemoryLocation
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return getPlacement(section, location); // Tail recursion
|
||||
MUSTTAIL return getPlacement(section, location);
|
||||
}
|
||||
|
||||
static std::string getSectionDescription(Section const §ion) {
|
||||
|
||||
Reference in New Issue
Block a user