I hope I'm using the term "constant folding" here correctly. If not, I apologize. Is there a limit to the amount of mathematical subexpressions that GCC can remove at compile time? Assuming the following: int x = 2 * 3; Presumably with the right compiler options, that will compile as: int x = 6; But if that is more complicated: int x = 2 * 3 * 4 / 6 / 7 + 8 - 9; how far will GCC go before it hits some internal limit where it can no longer do the calculation at compile time?