// { dg-options "-fdiagnostics-show-caret" } #include void* allocate(std::size_t n) { return std::allocate().allocate(n); // { dg-error ".allocate. is not a member of .std.; did you mean 'allocator'\\?" } /* { dg-begin-multiline-output "" } return std::allocate().allocate(n); ^~~~~~~~ allocator { dg-end-multiline-output "" } */ // Various errors follow that we don't care about; suppress them: // { dg-excess-errors "7: " } } void* test_2(std::size_t n) { return std::alocator().allocate(n); // { dg-error ".alocator. is not a member of .std.; did you mean 'allocator'\\?" } /* { dg-begin-multiline-output "" } return std::alocator().allocate(n); ^~~~~~~~ allocator { dg-end-multiline-output "" } */ // Various errors follow that we don't care about; suppress them: // { dg-excess-errors "25: " } }