3 ms·
That's not true for all code bases. Two common examples: It's very common for inline functions in headers to be written for inlining and constant propagation f
by stinkbeetle 8mo ago
That's not true for all code bases. Two common examples:
It's very common for inline functions in headers to be written for inlining and constant propagation from arguments result in dead code and better generated code. There is even __builtin_constant_p() to help with such things (e.g., you can use it to have a fast folded inline variant if an argument is constant, or call big out of line library code if variable).
There are also configuration systems that end up with config options in headers that code tests with if (CONFIG_BLAH) {...} that can evaluate to zero in valid builds.