public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99331] New: -Wconversion false-positive in immidiate context
@ 2021-03-01 18:43 nok.raven at gmail dot com
  2021-03-01 18:47 ` [Bug c++/99331] [8/9/10/11 Regression] -Wconversion false-positive in immediate context mpolacek at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: nok.raven at gmail dot com @ 2021-03-01 18:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99331
           Summary: -Wconversion false-positive in immidiate 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
  Target Milestone: ---

template <int N> struct X {};
template <class T> X<sizeof(T)> foo();

g++ -Wconversion -Werror src.cpp

<source>:2:22: error: conversion from 'long unsigned int' to 'int' may change
value [-Werror=conversion]
    2 | template <class T> X<sizeof(T)> foo();
      |                      ^~~~~~~~~

https://godbolt.org/z/d16WhG

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

end of thread, other threads:[~2022-03-14 12:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 18:43 [Bug c++/99331] New: -Wconversion false-positive in immidiate context nok.raven at gmail dot com
2021-03-01 18:47 ` [Bug c++/99331] [8/9/10/11 Regression] -Wconversion false-positive in immediate context mpolacek at gcc dot gnu.org
2021-03-01 18:50 ` mpolacek at gcc dot gnu.org
2021-03-01 18:54 ` nok.raven at gmail dot com
2021-03-02 22:06 ` mpolacek at gcc dot gnu.org
2021-03-25 18:58 ` cvs-commit at gcc dot gnu.org
2021-03-25 19:05 ` [Bug c++/99331] [8/9/10 " mpolacek at gcc dot gnu.org
2021-03-26 12:58 ` nok.raven at gmail dot com
2021-03-26 15:19 ` mpolacek at gcc dot gnu.org
2021-04-09 22:44 ` cvs-commit at gcc dot gnu.org
2021-04-09 22:44 ` mpolacek at gcc dot gnu.org
2022-03-14 12:54 ` 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).