disable wrong detection of gcc

This commit is contained in:
MITSUNARI Shigeo 2023-07-27 12:19:16 +09:00
parent 1855985e14
commit 66b2768a66

View file

@ -1050,6 +1050,10 @@ class Test {
"nle",
"g",
};
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-truncation" // wrong detection
#endif
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
char buf[32];
snprintf(buf, sizeof(buf), "cmov%s", tbl[i]);
@ -1059,6 +1063,9 @@ class Test {
snprintf(buf, sizeof(buf), "set%s", tbl[i]);
put(buf, REG8|REG8_3|MEM);
}
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
}
void putReg1() const
{