public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99795] New: -Wnarrowing/-Woverflow false-negative in constant expression in undeduced context
@ 2021-03-26 16:53 nok.raven at gmail dot com
  2021-03-26 17:44 ` [Bug c++/99795] " mpolacek at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: nok.raven at gmail dot com @ 2021-03-26 16:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99795
           Summary: -Wnarrowing/-Woverflow false-negative in constant
                    expression in undeduced context
           Product: gcc
           Version: 11.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
                CC: jason at redhat dot com, mpolacek at gcc dot gnu.org
  Target Milestone: ---

template <char N> struct X {};
template <class T> X<sizeof(T)> foo();
int x = sizeof(foo<char[512]>());

template <typename T>
struct bar { typedef X<sizeof(T)> t; };
bar<char[512]> y;


GCC 4.6-6 had an -Woverflow warning here; since GCC 7 -Wconversion warning was
emitted instead, but since bug 99331 is fixed there is no warning at all.

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

end of thread, other threads:[~2024-03-11  2:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26 16:53 [Bug c++/99795] New: -Wnarrowing/-Woverflow false-negative in constant expression in undeduced context nok.raven at gmail dot com
2021-03-26 17:44 ` [Bug c++/99795] " mpolacek at gcc dot gnu.org
2021-03-26 17:45 ` [Bug c++/99795] [8/9/10/11 Regression] " mpolacek at gcc dot gnu.org
2021-04-05 21:57 ` jason at gcc dot gnu.org
2021-04-07 17:10 ` jason at gcc dot gnu.org
2021-04-07 17:10 ` jason at gcc dot gnu.org
2021-04-08 13:14 ` rguenth at gcc dot gnu.org
2021-05-14  9:54 ` [Bug c++/99795] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:20 ` rguenth at gcc dot gnu.org
2022-05-27  9:44 ` [Bug c++/99795] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:44 ` jakub at gcc dot gnu.org
2023-07-07 10:39 ` [Bug c++/99795] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-03-11  2:54 ` [Bug c++/99795] [11/12 " law 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).