| 1 |
// PR c++/80351 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
// { dg-options "-Wunused-variable" } |
| 4 |
#include <initializer_list> |
| 5 |
|
| 6 |
constexpr auto int_1 = 1; // { dg-bogus "defined but not used" } |
| 7 |
constexpr auto int_2 = 2; // { dg-bogus "defined but not used" } |
| 8 |
|
| 9 |
constexpr auto il_int_1 = {3, 3}; // { dg-bogus "defined but not used" "Triggered by PR80351" } |
| 10 |
constexpr auto il_int_2 = {4, 4}; // { dg-bogus "defined but not used" "Not triggered by PR80351" } |
| 11 |
|
| 12 |
constexpr auto il_uint_1 = {5u, 5u}; // { dg-bogus "defined but not used" "Triggered by PR80351" } |
| 13 |
constexpr auto il_uint_2 = {6u, 6u}; // { dg-bogus "defined but not used" "Not triggered by PR80351" } |
| 14 |
|
| 15 |
constexpr auto uint_1 = 7u; // { dg-bogus "defined but not used" } |
| 16 |
constexpr auto uint_2 = 8u; // { dg-bogus "defined but not used" } |