1 // { dg-options "-fdiagnostics-show-caret" }
5 void* allocate(std::size_t n)
7 return std::allocate<char>().allocate(n); // { dg-error ".allocate. is not a member of .std." }
8 // { dg-message "suggested alternative: .allocator." "" { target *-*-* } .-1 }
9 /* { dg-begin-multiline-output "" }
10 return std::allocate<char>().allocate(n);
12 { dg-end-multiline-output "" } */
13 /* { dg-begin-multiline-output "" }
14 return std::allocate<char>().allocate(n);
17 { dg-end-multiline-output "" } */
19 // Various errors follow that we don't care about; suppress them:
20 // { dg-excess-errors "7: " }
23 void* test_2(std::size_t n)
25 return std::alocator<char>().allocate(n); // { dg-error ".alocator. is not a member of .std." }
26 // { dg-message "suggested alternative: .allocator." "" { target *-*-* } .-1 }
27 /* { dg-begin-multiline-output "" }
28 return std::alocator<char>().allocate(n);
30 { dg-end-multiline-output "" } */
31 /* { dg-begin-multiline-output "" }
32 return std::alocator<char>().allocate(n);
35 { dg-end-multiline-output "" } */
37 // Various errors follow that we don't care about; suppress them:
38 // { dg-excess-errors "25: " }