Correct error message for macro arg \<-INT_MIN>

This commit is contained in:
Rangi
2026-08-22 19:02:23 -04:00
parent e287ee2724
commit 9fa5058add
5 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -542,7 +542,7 @@ static uint32_t readBracketedMacroArgNum() {
}
}
uint32_t n = readNumber<10>(bumpChar(), nullptr);
if (n > INT32_MAX) {
if (n > INT32_MAX && !(negative && n == static_cast<uint32_t>(INT32_MAX) + 1)) {
error("Number in bracketed macro argument is too large");
return 0;
}