gcc/testsuite/g++.dg/cpp/embed-1.C
raw| 1 | // { dg-do compile } |
| 2 | // { dg-options "-pedantic-errors -Wall -W" } |
| 3 | |
| 4 | #if __has_embed (__FILE__ limit (1)) != 1 |
| 5 | #error "__has_embed failed" |
| 6 | #endif |
| 7 | |
| 8 | int a = |
| 9 | #embed __FILE__ limit (1) // { dg-error "'#embed' before C\\\+\\\+26 is a GCC extension" "" { target c++23_down } } |
| 10 | ; |
| 11 | int b = |
| 12 | (__extension__ |
| 13 | #embed __FILE__ limit (1) // { dg-error "'#embed' before C\\\+\\\+26 is a GCC extension" "" { target c++23_down } } |
| 14 | ); |