gcc/testsuite/g++.dg/special/initpri3.C
raw| 1 | // Verify __has_attribute(init_priority) is false on targets that |
| 2 | // don't support init priorities, and is treated as an unrecognized |
| 3 | // attribute in that case. |
| 4 | |
| 5 | #if !__has_attribute(init_priority) |
| 6 | #error unsupported // { dg-error "" "" { target { ! init_priority } } } |
| 7 | #endif |
| 8 | |
| 9 | struct A { A(); } a __attribute__((init_priority(500))); |
| 10 | // { dg-warning "attribute ignored" "" { target { ! init_priority } } .-1 } |