Is it time to --enable-warnings?
Hal Murray
halmurray at sonic.net
Wed Feb 12 02:08:07 UTC 2025
> I've certainly seen warnings without that option, so it probably just
> means "enable *more* warnings".
Correct. I fixed that comment too.
> For example, I just submitted an MR to fix a warning for something which
> is perfectly legal, but which broke the build here due to -Werror.
Thanks. Just curious. What OS/Distro found that?
> Turning on -Werror in general is a really bad idea. The "nonportability"
> in question is the huge variation across compilers on what produces
> warnings. There are lots of things which are perfectly legal C code but
> which the compiler may decide to warn about, just in case you *may* have
> done something unintended. There's no way to predict when that happens,
> so turning on -Werror by default is just a recipe for broken builds.
--disable-Werror will turn it off. My expectation is that with a few
fixes like yours we won't have many problems. If that turns out to be
wrong, we can change the default.
About "the huge variation across compilers"...
Is that a real problem? If so, how much of the problem is old old
compilers vs new compilers? How much do we care about it being easy to
port to ancient gear vs finding a rare bug in modern environments?
Should I update the note in NEWS to say something like "Tell is if it
doesn't build on your system?"
--
These are my opinions. I hate spam.
More information about the devel
mailing list