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

Craig A. Berry craigberry at nospam.mac.com
Fri Sep 10 12:38:45 EDT 2021


On 9/10/21 9:32 AM, hb wrote:
> On 9/10/21 2:50 PM, Craig A. Berry wrote:
>> Yes, I mixed up where the escalation happens.  It is not the linker but
>> the build utility that turns warnings into errors and stops the build in
>> its tracks unless you take extra steps to get around it.  A recent
>> real-world example:
>>
>> Link /Debug/Trace/Map
>> /Shareable=[---.LIB.AUTO.ENCODE.CN]PL_ENCODE__CN.EXE
>> CN.opt/Option,[---]perlshr_attr.opt/Option
>> %LINK-W-SHRWRNERS, compilation warnings ␍␊      in shareable image file
>> D0:[CRAIG.blead]DBGPERLSHR.EXE;1
>> %MMK-F-ERRUPD, error status %X10648268 occurred when updating target
>> [---.LIB.AUTO.ENCODE.CN]PL_ENCODE__CN.EXE
>> %MMK-F-ERRUPD, error status %X1C14803C occurred when updating target
>> SUBDIRS
>> %MMK-F-ERRUPD, error status %X1C14803C occurred when updating target
>> SUBDIRS
>> Unsuccessful make(cpan/Encode): code=1024 at make_ext.pl line 584.
>> %NONAME-F-NOMSG, Message number 0C14803C
>> %MMK-F-ERRUPD, error status %X0C14803C occurred when updating target DYNEXT
>>
>> You can of course force MMK or MMS or a command procedure to ignore
>> warnings and continue, or you can ignore the status of failed
>> subprocesses in whatever top-level driver is running those things.  But
>> that is not what happens by default.
> 
> Interesting. Did you make DBGPERLSHR.EXE with MMS/MMK? Then you had an
> "unsuccessful make" of DBGPERLSHR.EXE, which triggers the shown
> "Unsuccessful make(cpan/Encode): code=1024 at make_ext.pl line 584."
> perl script message. Which I interpret that at some point in the build
> process MMS/MMK/Linker warnings were ignored. It seems you don't build
> both images with one MMS/MMK/perl script run.

The outer level MMK run that built DBGPERLSHR.EXE had not exited yet
when other things linked against it in subprocesses.  It's actually
surprising that the first linker warning did not kill the build since
both MMS and MMK are documented to exit when they encounter warnings
executing action lines unless /IGNORE=WARNING is specified, which it was
not.  Actually the librarian also threw a warning about compilation
warnings before the linker did.

>> My point was that on VMS compiler warnings stop the build unless you
>> take extra steps to prevent that from happening.  On other platforms,
>> all the warnings are equivalent to informationals with DEC C -- nothing
>> happens unless you review the compiler output or, as Linux is apparently
>> now doing, explicitly escalate the warnings to errors.
> 
> Do you ask for a linker switch (or by default?) to disable image
> production in case of a warning?

No. I didn't know there was such a switch.




More information about the Info-vax mailing list