[Info-vax] [OT?] Should compiler warnings be treated as errors ?

chris chris-nospam at tridac.net
Fri Sep 10 12:19:46 EDT 2021


On 09/09/21 18:52, Simon Clubley wrote:
> Interesting article in The Register:
>
> https://www.theregister.com/2021/09/08/compromise_linux_kernel_compiler_warnings/
>
> Linus has modified the Linux build procedures to turn compiler warnings
> into errors. I strongly agree with him and it's the same flag I use on
> my own code.
>
> However, some other people do not agree with him. Given how important
> the Linux kernel has become, I am surprised by that. There would be
> some initial cleanup pain, but IMHO, it's a flag that should have
> been enabled long ago and you never know if that cleanup will find
> some issues in the existing code.
>
> What do you think ? Should compiler warnings be treated as errors ?
>
> Simon.
>

Always here. No code leaves this shop with warnings or other issues. A
warning is often saying the compiler cannot understand what your are
saying, so even if it means adding code, has to be done. I find that
most open source code compiles clean these days, so there's no excuse.

Lookup the Misra standards for embedded software development. A lot
of common sense there...

Chris



More information about the Info-vax mailing list