2 // { dg-do compile { target c++11 } }
4 #define LSHIFT (sizeof(unsigned int) * __CHAR_BIT__)
7 struct SpuriouslyWarns1 {
8 static constexpr unsigned int v = lshift < LSHIFT ? 1U << lshift : 0;
11 static_assert(SpuriouslyWarns1<LSHIFT>::v == 0, "Impossible occurred");
14 struct SpuriouslyWarns2 {
15 static constexpr bool okay = lshift < LSHIFT;
16 static constexpr unsigned int v = okay ? 1U << lshift : 0;
19 static_assert(SpuriouslyWarns2<LSHIFT>::v == 0, "Impossible occurred");