If you wrote
a = 7 INTMAX_MIN;
you would expect to get a syntax error, because on the face of it that would be an illegal expression. And it will, because it expands to
a = 7 (-9223372036854775807LL);
which does indeed give you a syntax error. But without the parentheses it would expand to:
a = 7 -9223372036854775807LL;
which doesn’t give you an error, despite being obviously not what you intended.
More generally, all of these defines give expansions for things that look like identifiers. In an arithmetic expression, an identifier is a “primary expression”, but -9223372036854775807LL is not. However, a parenthesized expression is a “primary expression”.
And that’s the real reason. So that the macro expands what looks like a primary expression to something that is a primary expression. You will never be surprised by what happens. In programming, surprise is usually bad.
Usually it doesn’t matter, but the people who wrote the defines don’t want them to usually work. They want them to always work.
The trailing LL marks this integer literal as of type long long
, which is typically (and in this case is) 64 bits. Without the LL suffix, the literal could be interpreted as int, long int, or long long int, whichever is the first to support 64-bit values. Nailing down the type can be as important as nailing down the value.