This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/80601] spurious -Wconversion warning with explicit class template arguments


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-05-03
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I suspect this is another consequence of
https://gcc.gnu.org/gcc-7/porting_to.html#hypothetical-instantiation

Strictly speaking the compiler is correct that the type of sizeof(T) is not
dependent, so for LP64 targets will always need a conversion to a narrower
type.

But the warning does seem unhelpful in this case, as it's almost certain that
any instantiation of the function template will produce a value that does fit
in unsigned.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]