]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/cpp2a/srcloc5.C
c++: modules and std::source_location::current() def arg [PR100881]
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp2a / srcloc5.C
1 // { dg-do compile { target c++20 } }
2
3 namespace std {
4 typedef int source_location;
5 }
6
7 auto x = __builtin_source_location (); // { dg-error "'std::source_location'\[^\n\r]*is not a class type" }
8 // { dg-error "'__impl' is not a member of 'std::source_location'" "" { target *-*-* } .-1 }
9 // { dg-message "using '__builtin_source_location'" "" { target *-*-* } .-2 }