diff --git a/src/Makefile b/src/Makefile index c12855024..8862ef38f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -300,6 +300,11 @@ ifdef X86_64 endif endif +# we just force c17 for now with gcc15 +ifdef GCC150 + CFLAGS+=-std=gnu17 + CPPFLAGS+=-std=gnu17 +endif ifndef NOPNG OPTS+=-DHAVE_PNG diff --git a/src/Makefile.cfg b/src/Makefile.cfg index cba731b9c..e4ba0c1ab 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -12,6 +12,7 @@ # to avoid a false positive with the version detection... SUPPORTED_GCC_VERSIONS:=\ + 151 150 15\ 142 141 140 14\ 132 131 130 13\ 123 122 121 120 12\ @@ -78,6 +79,18 @@ ifeq (,$(filter GCC%,$(.VARIABLES))) endif endif +ifdef GCC151 +GCC150=1 +endif + +ifdef GCC15 +GCC150=1 +endif + +ifdef GCC150 +GCC142=1 +endif + ifdef GCC142 GCC141=1 endif @@ -469,7 +482,6 @@ ifdef GCC81 WFLAGS+=-Wno-error=multistatement-macros endif - #indicate platform and what interface use with ifndef LINUX ifndef FREEBSD diff --git a/src/dehacked.c b/src/dehacked.c index 108e15e02..26a17a326 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -1421,9 +1421,6 @@ static void readhuditem(MYFILE *f, INT32 num) // IMPORTANT! // DO NOT FORGET TO SYNC THIS LIST WITH THE ACTIONNUM ENUM IN INFO.H - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wincompatible-pointer-types" actionpointer_t actionpointers[] = { {{A_Explode}, "A_EXPLODE"}, @@ -1633,7 +1630,6 @@ actionpointer_t actionpointers[] = // This NULL entry must be the last in the list {{NULL}, NULL}, }; -#pragma GCC diagnostic pop static void readframe(MYFILE *f, INT32 num) { diff --git a/src/info.c b/src/info.c index 2a4d61e72..87a3c99c4 100644 --- a/src/info.c +++ b/src/info.c @@ -69,8 +69,6 @@ char sprnames[NUMSPRITES + 1][5] = }; // Doesn't work with g++, needs actionf_p1 (don't modify this comment) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wincompatible-pointer-types" state_t states[NUMSTATES] = { // frame is masked through FF_FRAMEMASK @@ -3412,7 +3410,6 @@ state_t states[NUMSTATES] = {SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK #endif }; -#pragma GCC diagnostic pop mobjinfo_t mobjinfo[NUMMOBJTYPES] = { diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 4d80167f8..55cb87a67 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -877,6 +877,7 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt) { SDLforceUngrabMouse(); } + memset(gamekeydown, 0, NUMKEYS); // TODO this is a scary memset if (MOUSE_MENU) @@ -1916,7 +1917,7 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen) // Some GPU drivers may give us a 16-bit depth buffer since the // default value for SDL_GL_DEPTH_SIZE is 16. SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); - + // request stencil buffer. If there are problems on weaker hw the bit count could be reduced // If only something like 1-bit or 2-bit stencil is available on some gpus then should implement limit for maxportals based on that. // 4 bits would be enough for current limit in maxportals (12)