[Info-vax] [OT?] Should compiler warnings be treated as errors ?
Simon Clubley
clubley at remove_me.eisner.decus.org-Earth.UFP
Sun Sep 12 09:03:57 EDT 2021
On 2021-09-10, Craig A. Berry <craigberry at nospam.mac.com> wrote:
>
> Someone had modified a macro such that its argument was referenced
> twice. But some callers of that macro post-incremented the argument.
> So presumably the argument could get incremented twice. Or not,
> depending on accidents of the implementation. This is in the Perl
> sources and gets thrown against gcc and clang dozens of times a day, as
> well as MSVC, HP-UX, AIX, and z/OS compilers somewhat less often. And
> the VMS compiler whenever I get around to it, which in this case was
> about a month after the change had been pushed, during which time no one
> else discovered a problem with it.
>
Thanks Craig.
It wasn't clear from your original posting if you were complaining
about useless warnings being reported by DEC C or if DEC C was finding
things that other compilers had missed.
It's very clearly the latter and shows why monocultures (once again)
can be bad.
It's a pity that we can't run the Linux source code through the DEC C
compiler and see if it finds something. If it found a vulnerability,
that could be a nice little piece of PR for VSI.
OTOH, going the other way, I wonder if the LLVM compilers (with the
normal LLVM frontends instead of hybrid GEM frontend/LLVM backend)
will find things in the VMS source code that DEC C might have missed.
Simon.
--
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
More information about the Info-vax
mailing list