blueMSX-libretro icon indicating copy to clipboard operation
blueMSX-libretro copied to clipboard

Explicitly set C and C++ standard versions

Open pstef opened this issue 10 months ago • 0 comments

Them being unset leads to newer compilers assuming newer standards than the code actually is. This has the unfortunate side effect that some diagnostics that have been warnings (and ignored thanks to -w) are now promoted to errors, which prevents successful compilation.

A bad decision had been taken to directly operate on CFLAGS and CXXFLAGS within the makefiles. This breaks the expectation that one can set custom CFLAGS and CXXFLAGS as a paramter to make invocation and see the libretro core compiled with the requested flags together with the ones needed (including the prominent -fPIC and -D__LIBRETRO__ parameters). I'm not fixing that here.

Arguably, the fix here is to replace all the types from pointer to a specific RomMapper to pointer to void, and cast that to the specific RomMapper within the function's body, but there are hundreds of instances of this problem, so I'm not doing this here either.

Admittedly, my choice as to the version standards is arbitrary and I'm not particularly attached to it. Anything that works for me would be great to have.

pstef avatar Mar 29 '24 17:03 pstef