[Bug c++/107138] [12 regression] std::variant triggers false-positive 'may be used uninitialized' warning

2024-03-14 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107138

Jeffrey A. Law  changed:

   What|Removed |Added

Summary|[12/13/14 regression]   |[12 regression]
   |std::variant triggers   |...> triggers
   |false-positive 'may be used |false-positive 'may be used
   |uninitialized' warning  |uninitialized' warning
 CC||law at gcc dot gnu.org

--- Comment #14 from Jeffrey A. Law  ---
Works with gcc-13 and gcc-14.  Adjusting regression markers.

[Bug c++/107138] [12 regression] std::variant triggers false-positive 'may be used uninitialized' warning

2022-10-03 Thread carsten.andrich at gmx dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107138

--- Comment #2 from carsten.andrich at gmx dot de ---
(In reply to Marek Polacek from comment #1)
> I see the warning even without -fsanitize=undefined.

Yes. Just used -fsanitize=undefined as per the bug writing guidelines.

What I forgot to mention though: The issue only occurs with -O2 or higher. -O1
and -Og compile without the warnings.

[Bug c++/107138] [12 regression] std::variant triggers false-positive 'may be used uninitialized' warning

2022-10-03 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107138

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
I see the warning even without -fsanitize=undefined.