On 08/07/25 08:44 +0000, Žarko Asen wrote:
Hi I would like to report a critical issue with G++ 14.2.0, namely
assigning from a variable declared in the same line as assignment is
perfectly legal and compiles with G++; namely

const uint32_t x1 = x1 + 1; // Is legal even though, there is no x declared
previously

This mailing list is for automated mail from our Bugzilla database,
not for reporting bugs directly by email.

Please see https://gcc.gnu.org/bugs/ for how to report bugs.

But anyway, did you try -Wuninitialized ?

The code is well-formed, meaning the compiler has to compile it, but
it's undefined if executed at runtime. So we give a warning.



  • Bug in G++ 14.2.0 Žarko Asen via Gcc-bugs
    • Re: Bug in G++ 14.2.0 Jonathan Wakely via Gcc-bugs

Reply via email to