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.

Reply via email to