public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99700] New: gcc takes an uninitialized variable as a constant expression
@ 2021-03-21 18:22 hewillk at gmail dot com
  2021-04-15  0:14 ` [Bug c++/99700] uninitialized variable accepted as a constant expression in C++ 20 msebor at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: hewillk at gmail dot com @ 2021-03-21 18:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99700
           Summary: gcc takes an uninitialized variable as a constant
                    expression
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/93qM1b

====

struct A {
  constexpr A() { c[0] = 0; }
  char c[2];
};

constexpr A a;

====

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

end of thread, other threads:[~2022-05-11 17:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-21 18:22 [Bug c++/99700] New: gcc takes an uninitialized variable as a constant expression hewillk at gmail dot com
2021-04-15  0:14 ` [Bug c++/99700] uninitialized variable accepted as a constant expression in C++ 20 msebor at gcc dot gnu.org
2021-04-15  0:15 ` [Bug c++/99700] [10/11 Regression] " msebor at gcc dot gnu.org
2021-04-15 16:55 ` ppalka at gcc dot gnu.org
2021-04-16 13:25 ` cvs-commit at gcc dot gnu.org
2021-04-16 13:27 ` [Bug c++/99700] [10 " ppalka at gcc dot gnu.org
2022-05-11 17:07 ` ppalka 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).