| 1 |
// PR c++/65775 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
// { dg-options "-Wignored-qualifiers -Wno-volatile" } |
| 4 |
|
| 5 |
using Qi = int const volatile; |
| 6 |
Qi q1(); // { dg-warning "1: type qualifiers ignored" } |
| 7 |
auto q2() -> Qi; // { dg-warning "1: type qualifiers ignored" } |
| 8 |
|
| 9 |
using Fi = int(); |
| 10 |
Fi f1(); // { dg-error "1: 'f1' declared as function returning a function" } |
| 11 |
auto f2() -> Fi; // { dg-error "1: 'f2' declared as function returning a function" } |
| 12 |
|
| 13 |
using Ai = int[5]; |
| 14 |
Ai a1(); // { dg-error "1: 'a1' declared as function returning an array" } |
| 15 |
auto a2() -> Ai; // { dg-error "1: 'a2' declared as function returning an array" } |