https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121021

--- Comment #5 from Žarko Asen <asenzz at gmail dot com> ---
in my case (C++ 20) -Wunitialized was not enabled by -Wall therefore a
critical bug slip through:

const uint32_t x = x + 1; // where is a novel variable in the local and
global scope

This should have been caught by -Wall and it wasn't. G++14.2.0 C++20 -Wall
-pedantic -Werror

regards,

Zarko Asen

ase...@gmail.com


On Thu, Jul 10, 2025 at 4:24 AM pinskia at gcc dot gnu.org <
gcc-bugzi...@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121021
>
> Andrew Pinski <pinskia at gcc dot gnu.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |RESOLVED
>          Resolution|---                         |INVALID
>            See Also|                            |
> https://gcc.gnu.org/bugzill
>                    |                            |a/show_bug.cgi?id=117009
>
> --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> It is a little more complex than this.
>
> It is enabled by both -Wall and -Wextra.
>
> For all languages it is enabled by -Wextra.
>
> For Fortran and C/C++ (and objc/objc++) it is enabled by -Wall .
>
> The -Wall is a language specific flag which causes confusion really. But
> that
> is recorded as PR 117009.
>
> The LTO issue of -Wall not enabling -Wuninitialize is recorded as PR 90844
> (but
> that is still -Wall really)
>
> --
> You are receiving this mail because:
> You reported the bug.

Reply via email to