[Bug c++/126868] -ftrivial-auto-var-init=uninitialized should be incompatible with -std=c++26 (or at least warn about it)

"pinskia at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126868

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #7 from Drea Pinski <pinskia at gcc dot gnu.org> ---
>this is a *non-conforming* extension

-ffast-math and -fallow-store-data-races are also non-conforming extensions but
we don't warn when they are used. -fallow-store-data-races is nonconforming to
the C++11 memory model and can break some C++11+ code too. And can introduce
some race conditions that were not there before so it has just as much as a
security impact as -ftrivial-auto-var-init=uninitialized would have.
Since we already don't warn for -fallow-store-data-races there is no reason why
we should not warn about -ftrivial-auto-var-init=uninitialized.

Maybe some stronger wording in the manual would help but then again nobody
reads the documentation anyways.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.