Re:Why undefined behavior may call a never-called function
by saalweachter on Sunday September 24, 2017 @12:16PM
(#15325273)
That's a vital part of the setup.
You could hypothetically link this compilation unit against another unit which included:
void NeverCalled();
struct A {
A() { NeverCalled(); }
};
A a;
Results in warning: unused function NeverCalled.
In general this is best practice for functions defined and used in a single translation unit.