coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nstrftime.c fails to build due to memset overflow


From: Pádraig Brady
Subject: Re: nstrftime.c fails to build due to memset overflow
Date: Fri, 19 May 2023 08:13:43 +0100
User-agent: Mozilla Thunderbird

On 18/05/2023 22:27, Paul Eggert wrote:
Let's revert the "avoid incorrect -Wmaybe-uninitialized warnings" patch.

--enable-gcc-warnings is designed for the default gcc -O2, and we
shouldn't dumb down our source code for lesser platforms like "gcc -O0",
or clang, or whatever.

OK I'll revert.
I didn't think it was too invasive,
but I see your general point about needlessly initializing.

`gcc -O0` or  `gcc -Og` is a very common requirement though
to allow effective debugging with gdb etc.
So we should to do something to make this easier.
Reconfiguring with --enable-gcc-warnings=no is neither efficient or obvious.
It's fine for us who know the build intimately, that we can:
`make CFLAGS='-O0 -ggdb3' WERROR_CFLAGS=`
though that's not obvious to most not familiar with the build,
and also has the disadvantage of distracting warnings being shown.
Perhaps we can create a debug target or something
to make this more discoverable for folks.

We'll also still have the issue with -O3 or -Ofast etc.,
but I suppose they're less likely to be set in dev builds
and so WERROR_CFLAGS= would be implicit for "dist" builds.

cheers,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]