Debian Codegraph @

gcc/testsuite/g++.dg/ext/attr-lambda2.C

raw
1 // PR c++/89640
2 // { dg-options "-Wno-attributes" }
3 // { dg-do compile { target c++17 } }
4
5 void test() {
6 []() mutable __attribute__((cold)) constexpr {}(); // { dg-error "expected" }
7 []() constexpr __attribute__((cold)) mutable {}(); // { dg-error "expected" }
8 []() __attribute__((cold)) mutable constexpr {}(); // { dg-error "expected" }
9 []() __attribute__((cold)) constexpr mutable {}(); // { dg-error "expected" }
10 []() mutable constexpr __attribute__((cold)) {}();
11 []() constexpr mutable __attribute__((cold)) {}();
12 }