Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

This dungeon is owned and operated by Frobozz Magic Co., Ltd.


computers / comp.os.vms / [OT?] Should compiler warnings be treated as errors ?

SubjectAuthor
* [OT?] Should compiler warnings be treated as errors ?Simon Clubley
+* Re: [OT?] Should compiler warnings be treated as errors ?Chris Townley
|`- Re: [OT?] Should compiler warnings be treated as errors ?dthi...@gmail.com
+- Re: [OT?] Should compiler warnings be treated as errors ?Arne Vajhøj
+- Re: [OT?] Should compiler warnings be treated as errors ?Stephen Hoffman
+* Re: [OT?] Should compiler warnings be treated as errors ?Craig A. Berry
|+* Re: [OT?] Should compiler warnings be treated as errors ?John Reagan
||`* Re: [OT?] Should compiler warnings be treated as errors ?hb
|| `* Re: [OT?] Should compiler warnings be treated as errors ?Craig A. Berry
||  `* Re: [OT?] Should compiler warnings be treated as errors ?hb
||   `* Re: [OT?] Should compiler warnings be treated as errors ?Craig A. Berry
||    `* Re: [OT?] Should compiler warnings be treated as errors ?Simon Clubley
||     `* Re: [OT?] Should compiler warnings be treated as errors ?hb
||      `* Re: [OT?] Should compiler warnings be treated as errors ?Simon Clubley
||       `- Re: [OT?] Should compiler warnings be treated as errors ?hb
|`* Re: [OT?] Should compiler warnings be treated as errors ?Simon Clubley
| +* Re: [OT?] Should compiler warnings be treated as errors ?Craig A. Berry
| |+- Re: [OT?] Should compiler warnings be treated as errors ?plugh
| |`* Re: [OT?] Should compiler warnings be treated as errors ?Simon Clubley
| | `* Re: [OT?] Should compiler warnings be treated as errors ?John Reagan
| |  `* Re: [OT?] Should compiler warnings be treated as errors ?Simon Clubley
| |   +* Re: [OT?] Should compiler warnings be treated as errors ?Simon Clubley
| |   |+* Re: [OT?] Should compiler warnings be treated as errors ?Arne Vajhøj
| |   ||`- Re: [OT?] Should compiler warnings be treated as errors ?John Reagan
| |   |+* Re: [OT?] Should compiler warnings be treated as errors ?Robert A. Brooks
| |   ||`* Re: [OT?] Should compiler warnings be treated as errors ?Simon Clubley
| |   || `- Re: [OT?] Should compiler warnings be treated as errors ?John Reagan
| |   |+- Re: [OT?] Should compiler warnings be treated as errors ?plugh
| |   |`* Re: [OT?] Should compiler warnings be treated as errors ?John Reagan
| |   | `- Re: [OT?] Should compiler warnings be treated as errors ?Dave Froble
| |   +- Re: [OT?] Should compiler warnings be treated as errors ?Arne Vajhøj
| |   `* Re: [OT?] Should compiler warnings be treated as errors ?John Reagan
| |    `- Re: [OT?] Should compiler warnings be treated as errors ?Simon Clubley
| `- Re: [OT?] Should compiler warnings be treated as errors ?plugh
+- Re: [OT?] Should compiler warnings be treated as errors ?chris
`* Re: [OT?] Should compiler warnings be treated as errors ?Bob Gezelter
 `- Re: [OT?] Should compiler warnings be treated as errors ?Simon Clubley

Pages:12
[OT?] Should compiler warnings be treated as errors ?

<shdhkm$met$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16801&group=comp.os.vms#16801

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: [OT?] Should compiler warnings be treated as errors ?
Date: Thu, 9 Sep 2021 17:52:22 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <shdhkm$met$2@dont-email.me>
Injection-Date: Thu, 9 Sep 2021 17:52:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="9ddcb4fe9dd6d1a66d32d5e632c470bb";
logging-data="23005"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189vjyVgVyvfkOmxfC6q4DqrXCKJxZlz8w="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:8nB5G87zmRnCsO8we4bTJpY0WU0=
 by: Simon Clubley - Thu, 9 Sep 2021 17:52 UTC

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.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: [OT?] Should compiler warnings be treated as errors ?

<shdi65$b1$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16802&group=comp.os.vms#16802

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: new...@cct-net.co.uk (Chris Townley)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Thu, 9 Sep 2021 19:01:39 +0100
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <shdi65$b1$1@dont-email.me>
References: <shdhkm$met$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 9 Sep 2021 18:01:41 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="b0cb3a3224088937180c376b5cd5744a";
logging-data="353"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19yJfzuaIXLpjMUcxpPpCd5c1SXz10K9MQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.1.0
Cancel-Lock: sha1:T8qB/89Kpkn9Gk/oQE9rygehnXo=
In-Reply-To: <shdhkm$met$2@dont-email.me>
Content-Language: en-GB
 by: Chris Townley - Thu, 9 Sep 2021 18:01 UTC

On 09/09/2021 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.
>

A lot depends on the environment/architecture.

Compiling on VMS in the system I inherited, there were numerous warnings
that could not be suppressed. I did spend a _lot_ of time removing
others - no code I wrote had direct warnings.

Likewise in various other environments.

Otherwise in principle I would agree with you

--
Chris

Re: [OT?] Should compiler warnings be treated as errors ?

<shdjg1$1h9o$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16803&group=comp.os.vms#16803

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!LeVffQP25j5GAigzc2gaQA.user.46.165.242.75.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Thu, 9 Sep 2021 14:23:58 -0400
Organization: Aioe.org NNTP Server
Message-ID: <shdjg1$1h9o$1@gioia.aioe.org>
References: <shdhkm$met$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="50488"; posting-host="LeVffQP25j5GAigzc2gaQA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Arne Vajhøj - Thu, 9 Sep 2021 18:23 UTC

On 9/9/2021 1:52 PM, 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 ?

A team should have a "warnings not acceptable" policy.

A team should also have sufficient discipline so that the policy
is enough and -Werror is not needed.

Arne

Re: [OT?] Should compiler warnings be treated as errors ?

<shdpr5$qo5$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16806&group=comp.os.vms#16806

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: seaoh...@hoffmanlabs.invalid (Stephen Hoffman)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Thu, 9 Sep 2021 16:12:21 -0400
Organization: HoffmanLabs LLC
Lines: 28
Message-ID: <shdpr5$qo5$1@dont-email.me>
References: <shdhkm$met$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="1b0b040ee099d9ccec67e544aec58db3";
logging-data="27397"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187PKev2fmUpdjW7eNNPM1gFP9ls76S0bc="
User-Agent: Unison/2.2
Cancel-Lock: sha1:7DAYekNK2P8EbTkIpYbg3R+dVl4=
 by: Stephen Hoffman - Thu, 9 Sep 2021 20:12 UTC

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

Re: [OT?] Should compiler warnings be treated as errors ?

<she8ul$m6e$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16811&group=comp.os.vms#16811

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: craigbe...@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Thu, 9 Sep 2021 19:30:11 -0500
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <she8ul$m6e$1@dont-email.me>
References: <shdhkm$met$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 10 Sep 2021 00:30:13 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="12fd0f5f731fcbd3072dc6444bb62048";
logging-data="22734"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kt5KMrajkHwfQUssJOxgKUGEDujf9E+A="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
Cancel-Lock: sha1:VKxR1jPXNGAZY0KmxA9GFOcUW2I=
In-Reply-To: <shdhkm$met$2@dont-email.me>
Content-Language: en-US
 by: Craig A. Berry - Fri, 10 Sep 2021 00:30 UTC

On 9/9/21 12:52 PM, 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.

> What do you think ? Should compiler warnings be treated as errors ?

Which warnings with which versions of which compilers? gcc and clang
have different warnings available and different default warnings (though
they do emulate each other to some extent). Presumably some Linux
distros have to be able to build with other compilers, possibly from IBM
or Intel. The default warnings enabled with each version of each
compiler change, usually adding new ones, but sometimes removing
warnings that were felt to create more noise than light.

So, in general, yes, getting people to pay attention to warnings and fix
things is a good idea. But that's not a particularly simple matter for
something that is expected to be portable and compiled against various
version of numerous compilers.

I still routinely see warnings with the ancient DEC/CPQ/HP/HPE/VSI C
compiler for code that produces no warnings with current gcc and clang.
And of course compiler warnings get escalated to linker errors on VMS,
so what Linux is considering now has effectively already been the case
on VMS for a few decades.

Re: [OT?] Should compiler warnings be treated as errors ?

<5d40056a-6840-41cb-9905-0dad0816959an@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16815&group=comp.os.vms#16815

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:1658:: with SMTP id c24mr5731020qko.354.1631240239679;
Thu, 09 Sep 2021 19:17:19 -0700 (PDT)
X-Received: by 2002:a05:6214:12eb:: with SMTP id w11mr6343213qvv.10.1631240239464;
Thu, 09 Sep 2021 19:17:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Thu, 9 Sep 2021 19:17:19 -0700 (PDT)
In-Reply-To: <she8ul$m6e$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=73.60.222.222; posting-account=M3IgSwoAAADJd6EnOmsrCCfB6_OyTOkv
NNTP-Posting-Host: 73.60.222.222
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5d40056a-6840-41cb-9905-0dad0816959an@googlegroups.com>
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
From: xyzzy1...@gmail.com (John Reagan)
Injection-Date: Fri, 10 Sep 2021 02:17:19 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 11
 by: John Reagan - Fri, 10 Sep 2021 02:17 UTC

On Thursday, September 9, 2021 at 8:30:16 PM UTC-4, Craig A. Berry wrote:

>
> I still routinely see warnings with the ancient DEC/CPQ/HP/HPE/VSI C
> compiler for code that produces no warnings with current gcc and clang.
> And of course compiler warnings get escalated to linker errors on VMS,
> so what Linux is considering now has effectively already been the case
> on VMS for a few decades.

Linker warnings.

And you can clear that with SET IMAGE /SUCCESS

Re: [OT?] Should compiler warnings be treated as errors ?

<shf8g6$1f7e$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16818&group=comp.os.vms#16818

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!+xDCkuefnDBICpClzhz40g.user.46.165.242.91.POSTED!not-for-mail
From: end...@inter.net (hb)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Fri, 10 Sep 2021 11:28:37 +0200
Organization: Aioe.org NNTP Server
Message-ID: <shf8g6$1f7e$1@gioia.aioe.org>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me>
<5d40056a-6840-41cb-9905-0dad0816959an@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="48366"; posting-host="+xDCkuefnDBICpClzhz40g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: hb - Fri, 10 Sep 2021 09:28 UTC

On 9/10/21 4:17 AM, John Reagan wrote:
> On Thursday, September 9, 2021 at 8:30:16 PM UTC-4, Craig A. Berry wrote:
>
>>
>> I still routinely see warnings with the ancient DEC/CPQ/HP/HPE/VSI C
>> compiler for code that produces no warnings with current gcc and clang.
>> And of course compiler warnings get escalated to linker errors on VMS,
>> so what Linux is considering now has effectively already been the case
>> on VMS for a few decades.
>
> Linker warnings.
>
> And you can clear that with SET IMAGE /SUCCESS
>

John already answered, but I've seen this so many times, so I'll expand
on that. They get escalated to linker warnings, not errors. The linker
produces an image file. You will not get one if the linker encounters an
error. And the image activator will active the image without printing
any message, no matter if it is a main image or a shareable. Only if you
try to find a symbol in the image file with lib$find_image_symbol you
will get a warning: %LIB-W-EOMWARN. Yes, a %LIB not a %SYSTEM.

And you can restore any cleared warning with SET IMAGE /RESTORE.

Re: [OT?] Should compiler warnings be treated as errors ?

<shfka8$g39$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16822&group=comp.os.vms#16822

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: craigbe...@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Fri, 10 Sep 2021 07:50:14 -0500
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <shfka8$g39$1@dont-email.me>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me>
<5d40056a-6840-41cb-9905-0dad0816959an@googlegroups.com>
<shf8g6$1f7e$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 10 Sep 2021 12:50:16 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="12fd0f5f731fcbd3072dc6444bb62048";
logging-data="16489"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nAJa2uFLscuajRZT2x5SctkgHES2b2sU="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
Cancel-Lock: sha1:WvG8PX1HP5rX7iFfh+RnbRg1RQg=
In-Reply-To: <shf8g6$1f7e$1@gioia.aioe.org>
Content-Language: en-US
 by: Craig A. Berry - Fri, 10 Sep 2021 12:50 UTC

On 9/10/21 4:28 AM, hb wrote:
> On 9/10/21 4:17 AM, John Reagan wrote:
>> On Thursday, September 9, 2021 at 8:30:16 PM UTC-4, Craig A. Berry wrote:
>>
>>>
>>> I still routinely see warnings with the ancient DEC/CPQ/HP/HPE/VSI C
>>> compiler for code that produces no warnings with current gcc and clang.
>>> And of course compiler warnings get escalated to linker errors on VMS,
>>> so what Linux is considering now has effectively already been the case
>>> on VMS for a few decades.
>>
>> Linker warnings.
>>
>> And you can clear that with SET IMAGE /SUCCESS
>>
>
> John already answered, but I've seen this so many times, so I'll expand
> on that. They get escalated to linker warnings, not errors. The linker
> produces an image file. You will not get one if the linker encounters an
> error. And the image activator will active the image without printing
> any message, no matter if it is a main image or a shareable. Only if you
> try to find a symbol in the image file with lib$find_image_symbol you
> will get a warning: %LIB-W-EOMWARN. Yes, a %LIB not a %SYSTEM.

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.

> And you can restore any cleared warning with SET IMAGE /RESTORE.

Of course there are ways to put your head in the sand if you want to,
for example cc/nowarn, and there are certainly development scenarios
where temporarily ignoring a warning and moving on is the right thing to
do.

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.

Re: [OT?] Should compiler warnings be treated as errors ?

<shfqar$liq$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16825&group=comp.os.vms#16825

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!+xDCkuefnDBICpClzhz40g.user.46.165.242.91.POSTED!not-for-mail
From: end...@inter.net (hb)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Fri, 10 Sep 2021 16:32:59 +0200
Organization: Aioe.org NNTP Server
Message-ID: <shfqar$liq$1@gioia.aioe.org>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me>
<5d40056a-6840-41cb-9905-0dad0816959an@googlegroups.com>
<shf8g6$1f7e$1@gioia.aioe.org> <shfka8$g39$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="22106"; posting-host="+xDCkuefnDBICpClzhz40g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: hb - Fri, 10 Sep 2021 14:32 UTC

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.
> ...
> 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?

Re: [OT?] Should compiler warnings be treated as errors ?

<shg0j2$103$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16832&group=comp.os.vms#16832

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!jazQyxryRFiI4FEZ51SAvA.user.46.165.242.75.POSTED!not-for-mail
From: chris-no...@tridac.net (chris)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Fri, 10 Sep 2021 17:19:46 +0100
Organization: Aioe.org NNTP Server
Message-ID: <shg0j2$103$1@gioia.aioe.org>
References: <shdhkm$met$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="1027"; posting-host="jazQyxryRFiI4FEZ51SAvA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; SunOS sun4u; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
X-Notice: Filtered by postfilter v. 0.9.2
 by: chris - Fri, 10 Sep 2021 16:19 UTC

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

Re: [OT?] Should compiler warnings be treated as errors ?

<shg1mn$uo$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16833&group=comp.os.vms#16833

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: craigbe...@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Fri, 10 Sep 2021 11:38:45 -0500
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <shg1mn$uo$1@dont-email.me>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me>
<5d40056a-6840-41cb-9905-0dad0816959an@googlegroups.com>
<shf8g6$1f7e$1@gioia.aioe.org> <shfka8$g39$1@dont-email.me>
<shfqar$liq$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 10 Sep 2021 16:38:47 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="12fd0f5f731fcbd3072dc6444bb62048";
logging-data="984"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1oHzSo5L+oJ8vazs+Wb3MK+8cPyqQNWA="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
Cancel-Lock: sha1:+SyIhK6bLSTHii5sr00Nou907aE=
In-Reply-To: <shfqar$liq$1@gioia.aioe.org>
Content-Language: en-US
 by: Craig A. Berry - Fri, 10 Sep 2021 16:38 UTC

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.

Re: [OT?] Should compiler warnings be treated as errors ?

<shg50k$vv6$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16834&group=comp.os.vms#16834

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Fri, 10 Sep 2021 17:35:16 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <shg50k$vv6$1@dont-email.me>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me>
Injection-Date: Fri, 10 Sep 2021 17:35:16 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="0e643d9ca501c543586c05976132e8a2";
logging-data="32742"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/u3i3WNZv/wCBtd04sGfv6hhCl7XIIUJE="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:OpcptXrVu5LY1P8Tp7FQujmSgt8=
 by: Simon Clubley - Fri, 10 Sep 2021 17:35 UTC

On 2021-09-09, Craig A. Berry <craigberry@nospam.mac.com> wrote:
>
> Which warnings with which versions of which compilers? gcc and clang
> have different warnings available and different default warnings (though
> they do emulate each other to some extent). Presumably some Linux
> distros have to be able to build with other compilers, possibly from IBM
> or Intel. The default warnings enabled with each version of each
> compiler change, usually adding new ones, but sometimes removing
> warnings that were felt to create more noise than light.
>
> So, in general, yes, getting people to pay attention to warnings and fix
> things is a good idea. But that's not a particularly simple matter for
> something that is expected to be portable and compiled against various
> version of numerous compilers.
>

Of course, the other way of looking at that is that one compiler might
be picking up potential problems in your code that another compiler missed.

> I still routinely see warnings with the ancient DEC/CPQ/HP/HPE/VSI C
> compiler for code that produces no warnings with current gcc and clang.

Interesting. Are they "genuine" warnings or nonsense type warnings ?

Thanks to everyone for their responses. Given the general positive
response here, it makes me wonder why there's such pushback against
this change among some of the Linux developers.

I know some are taking the short-term (and short-sighted IMO) view
about the cleanup work required, but those warnings are being issued
by the compiler for a reason.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: [OT?] Should compiler warnings be treated as errors ?

<shg5br$vv6$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16835&group=comp.os.vms#16835

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Fri, 10 Sep 2021 17:41:15 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <shg5br$vv6$2@dont-email.me>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me> <5d40056a-6840-41cb-9905-0dad0816959an@googlegroups.com> <shf8g6$1f7e$1@gioia.aioe.org> <shfka8$g39$1@dont-email.me> <shfqar$liq$1@gioia.aioe.org> <shg1mn$uo$1@dont-email.me>
Injection-Date: Fri, 10 Sep 2021 17:41:15 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="0e643d9ca501c543586c05976132e8a2";
logging-data="32742"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eOtIfs+p+nylpaJRug/VHO3utEOlCLHc="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:SAj+vS5eKM8NqUv+7o4XWU9ykpw=
 by: Simon Clubley - Fri, 10 Sep 2021 17:41 UTC

On 2021-09-10, Craig A. Berry <craigberry@nospam.mac.com> wrote:
> On 9/10/21 9:32 AM, hb wrote:
>>
>> 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.
>

I've just had a look in the online help and I can't find it either.

It could be useful so I would be interested in knowing what that
qualifier is. (I am assuming that it would cause LINK to exit with
an error-level status that could be detected within a build procedure.)

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: [OT?] Should compiler warnings be treated as errors ?

<shgaph$s7n$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16836&group=comp.os.vms#16836

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: craigbe...@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Fri, 10 Sep 2021 14:13:51 -0500
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <shgaph$s7n$1@dont-email.me>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me>
<shg50k$vv6$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 10 Sep 2021 19:13:53 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="12fd0f5f731fcbd3072dc6444bb62048";
logging-data="28919"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DObj0PCz9OdQSPSfVF9/+Hn3mzzMHt7Y="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
Cancel-Lock: sha1:e11K0SHQ+AzHGPe0yoWf5d9EKoI=
In-Reply-To: <shg50k$vv6$1@dont-email.me>
Content-Language: en-US
 by: Craig A. Berry - Fri, 10 Sep 2021 19:13 UTC

On 9/10/21 12:35 PM, Simon Clubley wrote:
> On 2021-09-09, Craig A. Berry <craigberry@nospam.mac.com> wrote:

>> I still routinely see warnings with the ancient DEC/CPQ/HP/HPE/VSI C
>> compiler for code that produces no warnings with current gcc and clang.
>
> Interesting. Are they "genuine" warnings or nonsense type warnings ?

Here's one from last week:

CC/DECC /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj
/NOANSI_ALIAS/float=ieee/ieee=denorm/NAMES=(SHORTENED)/Define=(_USE_STD_STAT=1,"VERSION=""3.16""","XS_VERSION=""3.16""")/Include=([--])/List/Debug/NoOpt
BASE64.c /OBJECT=BASE64.obj

unsigned char uc = index_64[NATIVE_TO_ASCII(*str++)];
.............................................^
%CC-W-UNDEFVARMOD, In the initializer for uc, the expression
"(((sizeof(*str++)==1)||((U64)((*str++)|0))==((U8)(*str++))))" modifies
the variable "str" more than once without an intervening sequence point.
This behavior is undefined.
at line number 360 in file D0:[CRAIG.blead.cpan.MIME-Base64]BASE64.c;1

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.

This was the fix:

<https://github.com/Perl/perl5/commit/231a6d1601b9d335d75c74dc9995dda5e7201103>

Re: [OT?] Should compiler warnings be treated as errors ?

<shgfk1$1eb1$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16838&group=comp.os.vms#16838

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!+xDCkuefnDBICpClzhz40g.user.46.165.242.91.POSTED!not-for-mail
From: end...@inter.net (hb)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Fri, 10 Sep 2021 22:36:17 +0200
Organization: Aioe.org NNTP Server
Message-ID: <shgfk1$1eb1$1@gioia.aioe.org>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me>
<5d40056a-6840-41cb-9905-0dad0816959an@googlegroups.com>
<shf8g6$1f7e$1@gioia.aioe.org> <shfka8$g39$1@dont-email.me>
<shfqar$liq$1@gioia.aioe.org> <shg1mn$uo$1@dont-email.me>
<shg5br$vv6$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="47457"; posting-host="+xDCkuefnDBICpClzhz40g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: hb - Fri, 10 Sep 2021 20:36 UTC

On 9/10/21 7:41 PM, Simon Clubley wrote:
> On 2021-09-10, Craig A. Berry <craigberry@nospam.mac.com> wrote:
>> On 9/10/21 9:32 AM, hb wrote:
>>>
>>> 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.
>>
>
> I've just had a look in the online help and I can't find it either.
>
> It could be useful so I would be interested in knowing what that
> qualifier is. (I am assuming that it would cause LINK to exit with
> an error-level status that could be detected within a build procedure.)
>
> Simon.
>

Maybe I didn't make it clear. It would have been better if I had asked,
do you want/need such a qualifier? If implemented, the DCL status code
will/should be an error code, something like ERRORISUE, "completed with
errors".

Re: [OT?] Should compiler warnings be treated as errors ?

<87664401-9ab4-4c9b-bb5c-b5aaa2957140n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16839&group=comp.os.vms#16839

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ad4:4ab1:: with SMTP id i17mr10664911qvx.11.1631311517677;
Fri, 10 Sep 2021 15:05:17 -0700 (PDT)
X-Received: by 2002:ac8:6ec9:: with SMTP id f9mr10056350qtv.2.1631311517426;
Fri, 10 Sep 2021 15:05:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 10 Sep 2021 15:05:17 -0700 (PDT)
In-Reply-To: <shdi65$b1$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=184.59.100.14; posting-account=kZBiTgoAAADmAc60TO9Jm9WVg1drxCZ1
NNTP-Posting-Host: 184.59.100.14
References: <shdhkm$met$2@dont-email.me> <shdi65$b1$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <87664401-9ab4-4c9b-bb5c-b5aaa2957140n@googlegroups.com>
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
From: dthitt...@gmail.com (dthi...@gmail.com)
Injection-Date: Fri, 10 Sep 2021 22:05:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 33
 by: dthi...@gmail.com - Fri, 10 Sep 2021 22:05 UTC

> >
> > What do you think ? Should compiler warnings be treated as errors ?
> >

I was assigned to a Fortran-and-C based VMS project a few years ago, with 1..5 million LOC. One day, while analyzing the system for better ways to build and repackage the software, I noticed that all the compiles were done with /NOWARN. The original developers had added /NOWARN to their compilation scripts so that they (quote) "didn't have to see all the nasty warning messages". This had been going on, believe it or not, for 30 years!

When we enabled warnings, we generated 56K warnings in the first full compilation run, many of them quite severe, such as COMMON block variable misalignment, and Jump into the middle of a loop (skipping the loop initialization). This explained some of the "erratic" behavior that had been reported over the years, and that we had never successfully reproduced or diagnosed, as the problems were data-dependent, and we were not allowed to look at customer data or debug on the customer systems.

After 6 months spent by the coders doing remedial warning correction, we found that the customers no longer experienced these "erratic" data-dependent behaviors after installing the remediated software releases.

So yes, I would totally agree that warnings should generally be treated as errors. If the compiler makers see fit to warn you that you are probably making a mistake in your code, then you probably are, and should take another look.

Fortunately, many of the DEC/Compaq/HP/VSI compilers can turn individual compiler warnings on and off during the run with compiler directives or command line qualifiers, so that you can mask out the truly innocent warnings.

David

Re: [OT?] Should compiler warnings be treated as errors ?

<2268e86f-0f93-47c8-af24-c7ade448e426n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16840&group=comp.os.vms#16840

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:1035:: with SMTP id a21mr9843319qkk.422.1631312640273;
Fri, 10 Sep 2021 15:24:00 -0700 (PDT)
X-Received: by 2002:ac8:4558:: with SMTP id z24mr10245079qtn.338.1631312640102;
Fri, 10 Sep 2021 15:24:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 10 Sep 2021 15:23:59 -0700 (PDT)
In-Reply-To: <shg50k$vv6$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=66.210.249.130; posting-account=uNeudQoAAACm0ETOCzPNrvtq-73lRbuD
NNTP-Posting-Host: 66.210.249.130
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me> <shg50k$vv6$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2268e86f-0f93-47c8-af24-c7ade448e426n@googlegroups.com>
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
From: jchim...@gmail.com (plugh)
Injection-Date: Fri, 10 Sep 2021 22:24:00 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 41
 by: plugh - Fri, 10 Sep 2021 22:23 UTC

On Friday, September 10, 2021 at 10:35:19 AM UTC-7, Simon Clubley wrote:
> On 2021-09-09, Craig A. Berry <craig...@nospam.mac.com> wrote:
> >
> > Which warnings with which versions of which compilers? gcc and clang
> > have different warnings available and different default warnings (though
> > they do emulate each other to some extent). Presumably some Linux
> > distros have to be able to build with other compilers, possibly from IBM
> > or Intel. The default warnings enabled with each version of each
> > compiler change, usually adding new ones, but sometimes removing
> > warnings that were felt to create more noise than light.
> >
> > So, in general, yes, getting people to pay attention to warnings and fix
> > things is a good idea. But that's not a particularly simple matter for
> > something that is expected to be portable and compiled against various
> > version of numerous compilers.
> >
> Of course, the other way of looking at that is that one compiler might
> be picking up potential problems in your code that another compiler missed.
> > I still routinely see warnings with the ancient DEC/CPQ/HP/HPE/VSI C
> > compiler for code that produces no warnings with current gcc and clang.
> Interesting. Are they "genuine" warnings or nonsense type warnings ?
>
> Thanks to everyone for their responses. Given the general positive
> response here, it makes me wonder why there's such pushback against
> this change among some of the Linux developers.
>
> I know some are taking the short-term (and short-sighted IMO) view
> about the cleanup work required, but those warnings are being issued
> by the compiler for a reason.
> Simon.
>
> --
> Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
> Walking destinations on a map are further away than they appear.
Compromise on WERROR

TL;DR
> Elver proposed a compromise. "The appropriate usecase for -Werror is therefore compile-test focused builds (often done by developers or CI systems).

https://www.theregister.com/2021/09/08/compromise_linux_kernel_compiler_warnings/

There are never enough volunteers for "... the cleanup work required..."

Re: [OT?] Should compiler warnings be treated as errors ?

<c79e82ae-868d-4eb6-96c5-13e0783cf4d0n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16841&group=comp.os.vms#16841

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a37:e301:: with SMTP id y1mr9622087qki.475.1631312831614;
Fri, 10 Sep 2021 15:27:11 -0700 (PDT)
X-Received: by 2002:ac8:47d7:: with SMTP id d23mr10719589qtr.73.1631312831459;
Fri, 10 Sep 2021 15:27:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 10 Sep 2021 15:27:11 -0700 (PDT)
In-Reply-To: <shgaph$s7n$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=66.210.249.130; posting-account=uNeudQoAAACm0ETOCzPNrvtq-73lRbuD
NNTP-Posting-Host: 66.210.249.130
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me>
<shg50k$vv6$1@dont-email.me> <shgaph$s7n$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c79e82ae-868d-4eb6-96c5-13e0783cf4d0n@googlegroups.com>
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
From: jchim...@gmail.com (plugh)
Injection-Date: Fri, 10 Sep 2021 22:27:11 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 27
 by: plugh - Fri, 10 Sep 2021 22:27 UTC

On Friday, September 10, 2021 at 12:13:55 PM UTC-7, Craig A. Berry wrote:
> On 9/10/21 12:35 PM, Simon Clubley wrote:
> > On 2021-09-09, Craig A. Berry <craig...@nospam.mac.com> wrote:
>
>
> >> I still routinely see warnings with the ancient DEC/CPQ/HP/HPE/VSI C
> >> compiler for code that produces no warnings with current gcc and clang.
> >
> > Interesting. Are they "genuine" warnings or nonsense type warnings ?
> Here's one from last week:
>
> CC/DECC /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj
> /NOANSI_ALIAS/float=ieee/ieee=denorm/NAMES=(SHORTENED)/Define=(_USE_STD_STAT=1,"VERSION=""3.16""","XS_VERSION=""3.16""")/Include=([--])/List/Debug/NoOpt
> BASE64.c /OBJECT=BASE64.obj
>
> unsigned char uc = index_64[NATIVE_TO_ASCII(*str++)];
> ............................................^
> %CC-W-UNDEFVARMOD, In the initializer for uc, the expression
> "(((sizeof(*str++)==1)||((U64)((*str++)|0))==((U8)(*str++))))" modifies
> the variable "str" more than once without an intervening sequence point.
> This behavior is undefined.
> at line number 360 in file D0:[CRAIG.blead.cpan.MIME-Base64]BASE64.c;1
>
> .
..
..
..
Which is like 2 VAX instructions and 3 addressing modes?

Re: [OT?] Should compiler warnings be treated as errors ?

<64f9ac80-3811-44c1-8e3f-760929cc8304n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16851&group=comp.os.vms#16851

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:6a0c:: with SMTP id t12mr4839374qtr.159.1631442469116;
Sun, 12 Sep 2021 03:27:49 -0700 (PDT)
X-Received: by 2002:ac8:7d0d:: with SMTP id g13mr4939403qtb.367.1631442468913;
Sun, 12 Sep 2021 03:27:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Sun, 12 Sep 2021 03:27:48 -0700 (PDT)
In-Reply-To: <shdhkm$met$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=100.2.113.217; posting-account=r2_qcwoAAACbIdit5Eka3ivGvrYZz7UQ
NNTP-Posting-Host: 100.2.113.217
References: <shdhkm$met$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <64f9ac80-3811-44c1-8e3f-760929cc8304n@googlegroups.com>
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
From: gezel...@rlgsc.com (Bob Gezelter)
Injection-Date: Sun, 12 Sep 2021 10:27:49 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 34
 by: Bob Gezelter - Sun, 12 Sep 2021 10:27 UTC

On Thursday, September 9, 2021 at 1:52:25 PM UTC-4, 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.
>
> --
> Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
> Walking destinations on a map are further away than they appear.
Simon,

I generally also treat "warnings" as errors for the purpose of whether code is "clean".

Long, long ago, I discovered that almost all warnings were easily correctable and were often indicative of a problematic code segments.

An example was FORTRAN's implicit define "feature". One of the earliest FORTRAN compilers I encountered (maybe WATFIV), had a warning for variables that were rarely used, perhaps once. The most likely cause was a keyboarding error.

As reported it is far easier to fix a compiler warning than to debug an error.
I have compiled code with significant numbers of warnings. One never knows whether the warning is an issue, or a minor quirk. Worse, if one has large numbers of warnings, it becomes difficult to separate the real issues from the noise.

- Bob Gezelter, http://www.rlgsc.com

Re: [OT?] Should compiler warnings be treated as errors ?

<shktrs$ql7$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16853&group=comp.os.vms#16853

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Sun, 12 Sep 2021 13:03:57 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <shktrs$ql7$1@dont-email.me>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me> <shg50k$vv6$1@dont-email.me> <shgaph$s7n$1@dont-email.me>
Injection-Date: Sun, 12 Sep 2021 13:03:57 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="b035088f4c01ced362e272a3cb2eeed2";
logging-data="27303"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18VN25i2WGkZOcURbgXti6yXkUS1Nz/uhw="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:8ag9/b1PI8daG6WLkoT0XpZiKE8=
 by: Simon Clubley - Sun, 12 Sep 2021 13:03 UTC

On 2021-09-10, Craig A. Berry <craigberry@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@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: [OT?] Should compiler warnings be treated as errors ?

<shku4u$ql7$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16854&group=comp.os.vms#16854

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Sun, 12 Sep 2021 13:08:46 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <shku4u$ql7$2@dont-email.me>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me> <5d40056a-6840-41cb-9905-0dad0816959an@googlegroups.com> <shf8g6$1f7e$1@gioia.aioe.org> <shfka8$g39$1@dont-email.me> <shfqar$liq$1@gioia.aioe.org> <shg1mn$uo$1@dont-email.me> <shg5br$vv6$2@dont-email.me> <shgfk1$1eb1$1@gioia.aioe.org>
Injection-Date: Sun, 12 Sep 2021 13:08:46 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="b035088f4c01ced362e272a3cb2eeed2";
logging-data="27303"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18omQmJIv2x1O526nA3SoYii9gxMnYAeRk="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:YoZaNhzhc4kapqxmoAT+ndNmvUo=
 by: Simon Clubley - Sun, 12 Sep 2021 13:08 UTC

On 2021-09-10, hb <end.of@inter.net> wrote:
> On 9/10/21 7:41 PM, Simon Clubley wrote:
>> On 2021-09-10, Craig A. Berry <craigberry@nospam.mac.com> wrote:
>>> On 9/10/21 9:32 AM, hb wrote:
>>>>
>>>> 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.
>>>
>>
>> I've just had a look in the online help and I can't find it either.
>>
>> It could be useful so I would be interested in knowing what that
>> qualifier is. (I am assuming that it would cause LINK to exit with
>> an error-level status that could be detected within a build procedure.)
>>
>
> Maybe I didn't make it clear. It would have been better if I had asked,
> do you want/need such a qualifier? If implemented, the DCL status code
> will/should be an error code, something like ERRORISUE, "completed with
> errors".

I see. Yes, that would be something very useful to have, but it must
_not_ complete, in the form of actually generating an executable (even
with an error status), as that would defeat much of the benefit.

The reason for that is that it would satisfy the current dependency for
whatever make tool you are using, so make would move onto the next
target instead of retrying the failed target when you ran make again.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: [OT?] Should compiler warnings be treated as errors ?

<shkukd$ql7$3@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16855&group=comp.os.vms#16855

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Sun, 12 Sep 2021 13:17:02 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <shkukd$ql7$3@dont-email.me>
References: <shdhkm$met$2@dont-email.me> <64f9ac80-3811-44c1-8e3f-760929cc8304n@googlegroups.com>
Injection-Date: Sun, 12 Sep 2021 13:17:02 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="b035088f4c01ced362e272a3cb2eeed2";
logging-data="27303"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6hTAzI6dYJWI2VRwGORZ3+tEZgbZXXTU="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:pOzADkDOJ886TQNgt19N9UV0yMU=
 by: Simon Clubley - Sun, 12 Sep 2021 13:17 UTC

On 2021-09-12, Bob Gezelter <gezelter@rlgsc.com> wrote:
>
> As reported it is far easier to fix a compiler warning than to debug an error.
>

Which is exactly the mindset in languages such as Ada, only they are
errors, not warnings, most of the time in Ada. :-) It is a mindset
I agree with.

Those who comment (or complain) about the Rust compiler being fussy
have clearly never written any code in Ada... :-)

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: [OT?] Should compiler warnings be treated as errors ?

<shn82k$elf$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16871&group=comp.os.vms#16871

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!33NhO3y74IQ+6O0LvvrDZg.user.46.165.242.91.POSTED!not-for-mail
From: end...@inter.net (hb)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Mon, 13 Sep 2021 12:10:28 +0200
Organization: Aioe.org NNTP Server
Message-ID: <shn82k$elf$1@gioia.aioe.org>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me>
<5d40056a-6840-41cb-9905-0dad0816959an@googlegroups.com>
<shf8g6$1f7e$1@gioia.aioe.org> <shfka8$g39$1@dont-email.me>
<shfqar$liq$1@gioia.aioe.org> <shg1mn$uo$1@dont-email.me>
<shg5br$vv6$2@dont-email.me> <shgfk1$1eb1$1@gioia.aioe.org>
<shku4u$ql7$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="15023"; posting-host="33NhO3y74IQ+6O0LvvrDZg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: hb - Mon, 13 Sep 2021 10:10 UTC

On 9/12/21 3:08 PM, Simon Clubley wrote:
> On 2021-09-10, hb <end.of@inter.net> wrote:
>> On 9/10/21 7:41 PM, Simon Clubley wrote:
>>> On 2021-09-10, Craig A. Berry <craigberry@nospam.mac.com> wrote:
>>>> On 9/10/21 9:32 AM, hb wrote:
>>>>>
>>>>> 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.
>>>>
>>>
>>> I've just had a look in the online help and I can't find it either.
>>>
>>> It could be useful so I would be interested in knowing what that
>>> qualifier is. (I am assuming that it would cause LINK to exit with
>>> an error-level status that could be detected within a build procedure.)
>>>
>>
>> Maybe I didn't make it clear. It would have been better if I had asked,
>> do you want/need such a qualifier? If implemented, the DCL status code
>> will/should be an error code, something like ERRORISUE, "completed with
>> errors".
>
> I see. Yes, that would be something very useful to have, but it must
> _not_ complete, in the form of actually generating an executable (even
> with an error status), as that would defeat much of the benefit.
>
> The reason for that is that it would satisfy the current dependency for
> whatever make tool you are using, so make would move onto the next
> target instead of retrying the failed target when you ran make again.
>
> Simon.
>
As said before, if the linker encounters an error it will not generate
an image file. So *IF* this is implemented and a warning is promoted to
an error, you will not get an image file. As usual, the linker tries to
continue linking and producing a map file, if requested, to help
resolving the warning/error.

Re: [OT?] Should compiler warnings be treated as errors ?

<4440ba3c-77e5-4168-a364-2e5b3a5b4cdcn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16881&group=comp.os.vms#16881

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:7391:: with SMTP id t17mr188976qtp.0.1631546968152;
Mon, 13 Sep 2021 08:29:28 -0700 (PDT)
X-Received: by 2002:ae9:e502:: with SMTP id w2mr184493qkf.200.1631546967936;
Mon, 13 Sep 2021 08:29:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Mon, 13 Sep 2021 08:29:27 -0700 (PDT)
In-Reply-To: <shktrs$ql7$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=73.60.222.222; posting-account=M3IgSwoAAADJd6EnOmsrCCfB6_OyTOkv
NNTP-Posting-Host: 73.60.222.222
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me>
<shg50k$vv6$1@dont-email.me> <shgaph$s7n$1@dont-email.me> <shktrs$ql7$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4440ba3c-77e5-4168-a364-2e5b3a5b4cdcn@googlegroups.com>
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
From: xyzzy1...@gmail.com (John Reagan)
Injection-Date: Mon, 13 Sep 2021 15:29:28 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 14
 by: John Reagan - Mon, 13 Sep 2021 15:29 UTC

On Sunday, September 12, 2021 at 9:04:00 AM UTC-4, Simon Clubley wrote:
>
> 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.

Compiler(S) plural?

Are you asking could we take OpenVMS C source code and run it through the clang
compiler in "C mode"? That probably won't work in general as the code often uses
features not in clang (#pragma linkage, /STANDARD=VAXC, etc.). There might
be some C code that doesn't rely on such things that could be compiled with
"clang-in-C-mode" but I haven't thought that far into the future.

Re: [OT?] Should compiler warnings be treated as errors ?

<sho36t$lhh$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16886&group=comp.os.vms#16886

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: [OT?] Should compiler warnings be treated as errors ?
Date: Mon, 13 Sep 2021 17:53:33 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <sho36t$lhh$1@dont-email.me>
References: <shdhkm$met$2@dont-email.me> <she8ul$m6e$1@dont-email.me> <shg50k$vv6$1@dont-email.me> <shgaph$s7n$1@dont-email.me> <shktrs$ql7$1@dont-email.me> <4440ba3c-77e5-4168-a364-2e5b3a5b4cdcn@googlegroups.com>
Injection-Date: Mon, 13 Sep 2021 17:53:33 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e79b37fbbc8e3d4c514019b0f4a2a7f4";
logging-data="22065"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/UbKP5/L6md12DP/OZ4KAFuOa4F13UFJE="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:5NkEdxCcc2Z5keVWIh4baDUGnU0=
 by: Simon Clubley - Mon, 13 Sep 2021 17:53 UTC

On 2021-09-13, John Reagan <xyzzy1959@gmail.com> wrote:
> On Sunday, September 12, 2021 at 9:04:00 AM UTC-4, Simon Clubley wrote:
>>
>> 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.
>
> Compiler(S) plural?
>

Yes, although I should have expanded on the explicit reference to DEC C.
Don't you have Fortran code within the VMS code base ?

I did think of Pascal as well but I don't think there's a production-ready
Pascal frontend for LLVM, although Free Pascal appears to be doing some
initial work with LLVM.

> Are you asking could we take OpenVMS C source code and run it through the clang
> compiler in "C mode"? That probably won't work in general as the code often uses
> features not in clang (#pragma linkage, /STANDARD=VAXC, etc.). There might
> be some C code that doesn't rely on such things that could be compiled with
> "clang-in-C-mode" but I haven't thought that far into the future.
>

Yes, that's what I was thinking of, and the same for any Fortran code
as well as any Pascal code _if_ there turned out to be a version of
Pascal for LLVM after all that supports the VMS Pascal syntax.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor