public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95825] New: [7/8/9/10/11 Regression] boost::optional -Wuninitialized
@ 2020-06-22 19:31 nok.raven at gmail dot com
  2020-06-23  6:58 ` [Bug c++/95825] [8/9/10/11 " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: nok.raven at gmail dot com @ 2020-06-22 19:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95825
           Summary: [7/8/9/10/11 Regression] boost::optional
                    -Wuninitialized
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nok.raven at gmail dot com
  Target Milestone: ---

#include <boost/optional.hpp>

boost::optional<char> get()
{
  return {};
}

boost::optional<char> foo()
{
  return get();
}

// g++ -O3 -Wall -Wextra -fsanitize=address

<source>: In function 'boost::optional<char> foo()':
<source>:5:11: warning:
'<anonymous>.boost::optional<char>::<anonymous>.boost::optional_detail::tc_optional_base<char>::m_storage'
is used uninitialized in this function [-Wuninitialized]
    5 |   return {};
      |           ^

https://godbolt.org/z/PD_qan

Most likely related to bug 86465

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-07-07 10:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22 19:31 [Bug c++/95825] New: [7/8/9/10/11 Regression] boost::optional -Wuninitialized nok.raven at gmail dot com
2020-06-23  6:58 ` [Bug c++/95825] [8/9/10/11 " rguenth at gcc dot gnu.org
2020-08-04 16:51 ` [Bug tree-optimization/95825] " mpolacek at gcc dot gnu.org
2020-10-12 12:53 ` rguenth at gcc dot gnu.org
2021-05-14  9:53 ` [Bug tree-optimization/95825] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:17 ` rguenth at gcc dot gnu.org
2022-05-27  9:42 ` [Bug tree-optimization/95825] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:41 ` jakub at gcc dot gnu.org
2022-09-22 13:13 ` [Bug tree-optimization/95825] [10/11/12/13 Regression] boost::optional -Wuninitialized with -fsanitize=address rguenth at gcc dot gnu.org
2023-04-17  8:15 ` daniel.klauer at gin dot de
2023-04-17  8:22 ` daniel.kruegler at googlemail dot com
2023-04-17  8:46 ` daniel.klauer at gin dot de
2023-07-07 10:37 ` [Bug tree-optimization/95825] [11/12/13/14 " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).