C++: Add #pragma to disable MSVC C4309 enum truncation warnings

This commit is contained in:
Katy Coe
2020-08-01 03:35:07 +02:00
parent 0bfc5750ad
commit c6175989cf

View File

@@ -59,6 +59,10 @@ typedef size_t uintptr_t;
if (model.TargetCompiler == CppCompilerType.MSVC)
writeCode("#pragma warning(disable : 4369)");
// Stop MSVC complaining about constant truncation of enum values
if (model.TargetCompiler == CppCompilerType.MSVC)
writeCode("#pragma warning(disable : 4309)");
// C does not support namespaces
writeCode("#if !defined(_GHIDRA_) && !defined(_IDA_)");
writeCode("namespace app {");