aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp/embed-1.C
blob: a28eb6a39405e1905cd331304494cb3fe1b6f44b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// { dg-do compile }
// { dg-options "-pedantic-errors -Wall -W" }

#if __has_embed (__FILE__ limit (1)) != 1
#error "__has_embed failed"
#endif

int a =
#embed __FILE__ limit (1) // { dg-error "'#embed' before C\\\+\\\+26 is a GCC extension" "" { target c++23_down } }
;
int b =
(__extension__
#embed __FILE__ limit (1) // { dg-error "'#embed' before C\\\+\\\+26 is a GCC extension" "" { target c++23_down } }
);