gcc/testsuite/g++.dg/cpp1z/attr-lambda1.C
raw| 1 | // PR c++/89640 |
| 2 | // { dg-options "-Wno-attributes" } |
| 3 | // { dg-do compile { target c++17 } } |
| 4 | |
| 5 | void test() { |
| 6 | []() mutable [[gnu::cold]] constexpr {}(); // { dg-error "expected" } |
| 7 | []() constexpr [[gnu::cold]] mutable {}(); // { dg-error "expected" } |
| 8 | []() [[gnu::cold]] mutable constexpr {}(); // { dg-error "expected" } |
| 9 | []() [[gnu::cold]] constexpr mutable {}(); // { dg-error "expected" } |
| 10 | []() mutable constexpr [[gnu::cold]] {}(); |
| 11 | []() constexpr mutable [[gnu::cold]] {}(); |
| 12 | } |