Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / udlit-extended-id-3.C
blobe3d92857b3b6fc9b589bb66a3c1ca0d1012519aa
1 // { dg-do compile { target c++11 } }
2 #include <cstddef>
3 using namespace std;
5 // Check that we do not look for poisoned identifier when it is a suffix.
6 int _ħ;
7 #pragma GCC poison _ħ
8 const char * operator ""_ħ (const char *, size_t); // { dg-bogus "poisoned" }
9 bool operator ""_ħ (unsigned long long x); // { dg-bogus "poisoned" }
10 bool b = 1_ħ; // { dg-bogus "poisoned" }
11 const char *x = "hbar"_ħ; // { dg-bogus "poisoned" }
13 /* Ideally, we should not warn here either, but this is not implemented yet.  This
14    syntax has been deprecated for C++23.  */
15 #pragma GCC poison _ħ2
16 const char * operator "" _ħ2 (const char *, size_t); // { dg-bogus "poisoned" "" { xfail *-*-*} }
17 // { dg-warning "space" "" { target c++23 } .-1 }
18 const char *x2 = "hbar2"_ħ2; // { dg-bogus "poisoned" }