Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #154341

Re: "Why the C Language Will Never Stop You from Making Mistakes" by JeanHeyd Meneide

From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: "Why the C Language Will Never Stop You from Making Mistakes" by JeanHeyd Meneide
Date 2020-09-01 07:33 -0700
Organization A noiseless patient Spider
Message-ID <86ft818t3w.fsf@linuxsc.com> (permalink)
References <rh1du1$q82$1@dont-email.me> <877du33by4.fsf@nosuchdomain.example.com> <alpine.BSF.2.22.395.2008121503080.21003@slashem.me> <FK_YG.141851$5_4.45033@fx40.iad> <rh2u2h$h40$1@solani.org>

Show all headers | View raw


Philipp Klaus Krause <pkk@spth.de> writes:

> Am 13.08.20 um 01:15 schrieb Richard Damon:
>
>> I suspect part of the problem is that the category 'Warning' has a very
>> big span of meaning.
>>
>> Some things are warning because they maybe should have been an error,
>> but was downgraded to just a warning as some extension uses this.
>>
>> Some things are warning because they are very questionable codeing
>> practices.  Things like if (x = y) where they also provide a alternate
>> valid sequence that will silence the warning like if ((x=y))
>>
>> Maybe slightly less onnerous warnings of possible questionable behavior
>> like declaring unused variables.
>>
>> And at the very bottom, stylistic warnings, things like bad indenting.
>>
>>
>> If the category warning was split up so that you could make -Werror only
>> generate an error on the higher levels of these, but still allow the
>> lower levels, you could add new warnings, maybe started at the lower
>> levels and see how well it works.
>
> Warnings, and what to do with them surely can be a problem.
>
> A warning could be anything from a constraint violation (i.e. invalid C
> code) to some coding-style opinion of a compiler developer.
>
> And -Werror only makes it worse.  I remember multiple times the latest
> release of GNU binutils not compiling with latest release of GCC, since
> GCC had introduced some new warnings, and binutils had -Werror in its
> build system (and AFAIR there was no easy way to rip it out of there).

The problem is not -Werror, but options like -Wall or -Wextra.
Besides including some tests of questionable value, what tests
are included and the meaning of some individual tests both change
over time, which implies they change from release to release and
distribution to distribution.  Any stable released code base
should be fixed with respect to what conditions are tested in
client builds, and avoid options like -Wall and -Wextra, at which
point including -Werror is a good choice.

Back to comp.lang.c | Previous | Next | Find similar


Thread

Re: "Why the C Language Will Never Stop You from Making Mistakes" by JeanHeyd Meneide Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-09-01 07:33 -0700

csiph-web