aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/srcloc11.C
blob: 07281ca0ad0c29f794e5c4ac306a4056e79969e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do compile { target c++20 } }

namespace std {
  struct source_location {
    struct __impl {
      const char *_M_file_name, *_M_function_name;
      int _M_line;
    };
  };
}

auto x = __builtin_source_location ();	// { dg-error "'std::source_location::__impl' does not contain only non-static data members '_M_file_name', '_M_function_name', '_M_line' and '_M_column'" }
// { dg-message "using '__builtin_source_location'" "" { target *-*-* } .-1 }