objective-cxcodellvm

Does LLVM do simple arithmetic before compiling?


I often see in code things like 60*60 instead of 3600. Do they both compiler to the same exact thing? I.e., does the precompiler replace 60*60 with 3600 for you?


Solution

  • Yes, constant expressions are evaluated at compile-time.