C++: Disable C4359 for 32-bit scaffolding

This commit is contained in:
Katy Coe
2020-09-09 18:49:58 +02:00
parent 605734a020
commit a548fbb4f6

View File

@@ -63,6 +63,13 @@ typedef size_t uintptr_t;
if (model.TargetCompiler == CppCompilerType.MSVC)
writeCode("#pragma warning(disable : 4309)");
// MSVC will (rightly) throw a compiler warning when compiling for 32-bit architectures
// if the specified alignment of a type is smaller than the size of its largest element.
// We keep the alignments in to make them match Il2CppObject wherever possible, but it is
// safe to ignore them if they are too small, so we just disable the warning
if (model.TargetCompiler == CppCompilerType.MSVC)
writeCode("#pragma warning(disable : 4359)");
// C does not support namespaces
writeCode("#if !defined(_GHIDRA_) && !defined(_IDA_)");
writeCode("namespace app {");