On 21 September 2013 20:33, <wempwer@xxxxxxxxx> wrote: > > But compiler also knows the operand values even if they are not > constant? These values must be known to produce the multiplication > result. No, in general the processor produces the result of multiplying two variables, not the compiler. > Is this warning produced only when two operands are constant > and optimization is turned on because this is just the way gcc does it > and the warnings could also be produced for non-const operands if a > compiler worked in a different way? Yes, Marc and I have both said that, please read our replies more carefully.