public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104823] New: [12 Regression] narrowing conversion inside non-dependent decltype operand silently accepted ever since r12-6075
@ 2022-03-07 15:45 ppalka at gcc dot gnu.org
  2022-03-07 16:11 ` [Bug c++/104823] " mpolacek at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-03-07 15:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104823
           Summary: [12 Regression] narrowing conversion inside
                    non-dependent decltype operand silently accepted ever
                    since r12-6075
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

struct S { S(int); };

int id(int v);
double id(double v);

template<class> auto f(double v) -> decltype(S{id(v)});


GCC 11 correctly issues a narrowing conversion warning for this testcase ever
since r11-434:

<stdin>:6:50: warning: narrowing conversion of ‘id(v)’ from ‘double’ to ‘int’
[-Wnarrowing]

But in GCC 12 the warning is gone.

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

end of thread, other threads:[~2022-03-09 13:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07 15:45 [Bug c++/104823] New: [12 Regression] narrowing conversion inside non-dependent decltype operand silently accepted ever since r12-6075 ppalka at gcc dot gnu.org
2022-03-07 16:11 ` [Bug c++/104823] " mpolacek at gcc dot gnu.org
2022-03-07 16:12 ` mpolacek at gcc dot gnu.org
2022-03-07 16:34 ` ppalka at gcc dot gnu.org
2022-03-07 17:36 ` ppalka at gcc dot gnu.org
2022-03-08 14:57 ` marxin at gcc dot gnu.org
2022-03-09 13:44 ` cvs-commit at gcc dot gnu.org
2022-03-09 13:58 ` 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).