fix aggressive loop optimizations
Previously, aggressive loop optimizations with a new compiler were not possible due to undefined behaviour at end of arrays. A macro "UBFIX" is added to allow ifdefs for fixes which resolve undefined behavior. For example newer GCC versions will detect various bugs in the original game code and will otherwise not compile with -Werror.
This commit is contained in:
@@ -2202,6 +2202,11 @@ static s16 sub_8081BD4(void)
|
||||
return sUnknown_03000E06;
|
||||
}
|
||||
|
||||
#if MODERN
|
||||
// TODO remove this as soon as the code below is understood
|
||||
// add a UBFIX if required (code buggy?)
|
||||
__attribute__((optimize("no-aggressive-loop-optimizations")))
|
||||
#endif
|
||||
static void Blender_CalculatePokeblock(struct BlenderBerry *berries, struct Pokeblock *pokeblock, u8 playersNo, u8 *flavors, u16 maxRPM)
|
||||
{
|
||||
s32 i, j;
|
||||
|
||||
Reference in New Issue
Block a user