Jakub Jelinek <jakub at gcc dot> changed:

           What    |Removed                     |Added
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-09-20
                 CC|                            |jakub at gcc dot,
                   |                            |jason at gcc dot
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot> ---
template<unsigned long long N, int O = (N >> (sizeof(int) * __CHAR_BIT__))>
class A {};
template<unsigned int T> class B : A<T> {};
template<unsigned int T> class C : A<(unsigned long long) T> {};

Perhaps tsubst of TEMPLATE_PARM_INDEX instead of just
return convert_from_reference (unshare_expr (arg));
also convert it to the TEMPLATE_PARM_INDEX's type (if it is integral type only,
or when?)?

Also, is e.g.

template<unsigned short N> class A {};
A<0xffffU> a;
A<0x1ffffU> b;

valid C++11 (0x1ffffU is too large to fit into unsigned short)?  clang++
accepts it in C++98 and rejects with narrowing conversion error in -std=c++11
and later, g++ only warns:
warning: large integer implicitly truncated to unsigned type [-Woverflow]

Reply via email to