toupper() callers should avoid putting a side-effect expression there, but
in practice it sometimes happen, so making the macro safer can't hurt.
This uses a GCC statement expression, but this port only uses GCC
anyway.
C++11 is now required, so there's no point in checking for pre-C++11
versions of GCC anymore. Note that Clang defines __GNUC__ too, but
always reports itself as GCC-4.2.1-compatible (and, in practice, the
earliest C++11-compatible versions of Clang will also be have most
GCC 4.8 features).
With __printf__, MinGW prefers the portable old ms-style printf, and
warns if formats like %lld and %hhd are used.
In practice, if __USE_MINGW_ANSI_STDIO is not defined, it defaults to 1
on C++11, and these formats are supported. Using __gnu_printf__
suppresses bad format warnings.
bits/os_defines.h has #define NOMINMAX 1, which conflicts with the
non-value #define NOMINXMAX in scummsys.h.
In file included from ../scummvm/common/lua/lua.h:12,
from ../scummvm/common/lua/ltable.cpp:27:
../scummvm/common/scummsys.h:111: warning: "NOMINMAX" redefined
111 | #define NOMINMAX
|
In file included from C:/msys64/mingw64/include/c++/10.2.0/x86_64-w64-
mingw32/bits/c++config.h:518,
from C:/msys64/mingw64/include/c++/10.2.0/cmath:41,
from C:/msys64/mingw64/include/c++/10.2.0/math.h:36,
from ../scummvm/common/lua/ltable.cpp:21:
C:/msys64/mingw64/include/c++/10.2.0/x86_64-w64-mingw32/bits/
os_defines.h:45: note: this is the location of the previous definition
45 | #define NOMINMAX 1
|
Amends commit 88f685217b1c8e7ab2c7a588677ad4744480b4a3.
This improves the output of static assertions in all compilers,
and prevents problems in MSVC 2015 where the mechanism for
triggering a compilation error in C++98 mode may cause errors when
that compiler builds in release mode.
Fixes Trac#10154.
This fixes compilation of sword25's pluto with Visual Studio. The issue
has been revealed with commit 34169a81. The other data types are
defined in scummsys.h, thus only the missing int64 and uint64 defines
are set.
Apparently their tools do not include __has_feature clang extension.
I've submitted the bugreport to them but in the meantime let's have this
define in the system.