git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit aaba172c02129fc07b5e363dfa4969b361042f27
parent 5b37d3c402009739959d8ba7bb75da59834e1c54
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Tue, 11 Apr 2023 12:23:50 +0300

This might hint GCC 9 and make it suck less

Diffstat:
MCore/save_state.h4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Core/save_state.h b/Core/save_state.h @@ -15,11 +15,13 @@ #define GB_SECTION(name, ...) _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wpedantic\"") alignas(8) char _align_##name[0]; __VA_ARGS__ _Pragma("GCC diagnostic pop") #endif #else -#define GB_SECTION(name, ...) union __attribute__ ((aligned (8))) {uint8_t name##_section_start; struct {__VA_ARGS__};}; uint8_t name##_section_end[0]; +#define GB_SECTION(name, ...) union __attribute__ ((aligned (8))) {uint8_t name##_section_start[0]; struct {__VA_ARGS__};}; uint8_t name##_section_end[0]; +#ifdef GB_INTERNAL #define GB_SECTION_OFFSET(name) (offsetof(GB_gameboy_t, name##_section_start)) #define GB_SECTION_SIZE(name) (offsetof(GB_gameboy_t, name##_section_end) - offsetof(GB_gameboy_t, name##_section_start)) #define GB_GET_SECTION(gb, name) ((void*)&((gb)->name##_section_start)) #endif +#endif #if __clang_major__ >= 8 || __GNUC__ >= 13 #define GB_ENUM(type, ...) enum : type __VA_ARGS__

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.