[Info-vax] [OT?] Should compiler warnings be treated as errors ?
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Thu Sep 9 16:12:21 EDT 2021
On 2021-09-09 17:52:22 +0000, Simon Clubley said:
> What do you think ? Should compiler warnings be treated as errors ?
/WARN=( ENABLE=( NOC99, OBSOLESCENT, DEFUNCT, QUESTCODE, ...), DISABLE=(...))
Adding VERBOSE and OVERFLOW can be useful.
#pragma environment save and restore around #pragma message disable
cases where compilations errors are expected and cannot otherwise be
eliminated. Preferably with explanatory doc.
I typically don't bother upgrading warnings and such to errors or fatal
(which is ~possible on OpenVMS), choosing to not transfer code that
doesn't compile cleanly with the above switches into production.
Moving to these diagnostic, and removing home-grown memory management
schemes and some other steps, has resolved a number of subtle errors in
large and complex systems.
So too has been fully-integrated logging and debugging support within
large and complex apps, rather than treating all that as an
afterthought. This being as important as the compiler switches.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list