tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Fixing configure failures from newer gcc
On Sun, 19 Oct 2025 at 15:41, Greg A. Woods <woods%planix.ca@localhost> wrote:
>
> At Sun, 19 Oct 2025 15:21:30 -0400, Andrew Cagney <andrew.cagney%gmail.com@localhost> wrote:
> Subject: Re: Fixing configure failures from newer gcc
> >
> > On Sun, 19 Oct 2025 at 14:36, Greg A. Woods <woods%planix.ca@localhost> wrote:
> >
> > > So, I don't believe it is _ever_ worthwhile for pkgsrc to suppress
> > > compiler warnings.
> >
> > And when they are accompanied by -Werror?
>
> Remove and obliterate the errant "-Werror"!
> But that is a separate issue from the "-std=*"/"-Wno-error=*" issue, or
> at least it should be, for now.
>
> > To be specific. GCC compilers were overly zealous when it came to
> > structure initializers. For instance, rejecting:
> > my_struct = {0}; // blame microsoft?
> > Is stripping -Werror, or adding -Wno-struct-initializers, the less
> > evil of the two choices? Complaining upstream is likely to be met
> > with an eye role :-)
>
> Anyone who ships code with "-Werror" is either absent-minded, or isn't
> trusting their own code, or worst of all is expecting downstream users
> to do their dirty work for them. That's independent from whether or not
> their code might trip a warning from some esoteric compiler it hasn't
> been introduced to yet.
Queue Hoare. While true he was referring to runtime checks, modern
compilers have totally blurred that line.
For instance, do we ignore a warning about passing the wrong enum to a
function, when the code is only exposed to the compiler when being
built on NetBSD?
To me, a project shipping with -Werror on by default signals that they
take their code quality seriously.
It's then up to downstream to decide what to do with this - strip
-Werror and ship - or notice that the warning is for a real problem
and file a bug.
Which brings us back to c23 - its more strict checks are flushing out
broken code that have little to do with the c23 standard.
> Build systems like pkgsrc don't need/want "-Werror" any more than they
> need or want dependency maintenance overhead during a one-time build.
Ok. So where did this come from :-)
Home |
Main Index |
Thread Index |
Old Index