Re:Let’s stop copying C (2016)
by Someone on Wednesday January 23, 2019 @01:26PM
(#18981001)
Dead code elimination would require all code paths to be compilable by the compiler being run.
That need not be the case, and typically isn’t. If you do
#if USE_FOO
#include <foo.h>
#endif
the foo.h header only need to be present on platforms where USE_FOO is defined, and need only be compilable on those platforms (it might use nonstandard compiler extensions, for example containing assembly instructions)
That need not be the case, and typically isn’t. If you do
the foo.h header only need to be present on platforms where USE_FOO is defined, and need only be compilable on those platforms (it might use nonstandard compiler extensions, for example containing assembly instructions)