Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/spellcheck-pr78656.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
2 | 2 |
3 #include <memory> | 3 #include <memory> |
4 | 4 |
5 void* allocate(std::size_t n) | 5 void* allocate(std::size_t n) |
6 { | 6 { |
7 return std::allocate<char>().allocate(n); // { dg-error ".allocate. is not a member of .std." } | 7 return std::allocate<char>().allocate(n); // { dg-error ".allocate. is not a member of .std.; did you mean 'allocator'\\?" } |
8 // { dg-message "suggested alternative: .allocator." "" { target *-*-* } .-1 } | |
9 /* { dg-begin-multiline-output "" } | |
10 return std::allocate<char>().allocate(n); | |
11 ^~~~~~~~ | |
12 { dg-end-multiline-output "" } */ | |
13 /* { dg-begin-multiline-output "" } | 8 /* { dg-begin-multiline-output "" } |
14 return std::allocate<char>().allocate(n); | 9 return std::allocate<char>().allocate(n); |
15 ^~~~~~~~ | 10 ^~~~~~~~ |
16 allocator | 11 allocator |
17 { dg-end-multiline-output "" } */ | 12 { dg-end-multiline-output "" } */ |
20 // { dg-excess-errors "7: " } | 15 // { dg-excess-errors "7: " } |
21 } | 16 } |
22 | 17 |
23 void* test_2(std::size_t n) | 18 void* test_2(std::size_t n) |
24 { | 19 { |
25 return std::alocator<char>().allocate(n); // { dg-error ".alocator. is not a member of .std." } | 20 return std::alocator<char>().allocate(n); // { dg-error ".alocator. is not a member of .std.; did you mean 'allocator'\\?" } |
26 // { dg-message "suggested alternative: .allocator." "" { target *-*-* } .-1 } | |
27 /* { dg-begin-multiline-output "" } | |
28 return std::alocator<char>().allocate(n); | |
29 ^~~~~~~~ | |
30 { dg-end-multiline-output "" } */ | |
31 /* { dg-begin-multiline-output "" } | 21 /* { dg-begin-multiline-output "" } |
32 return std::alocator<char>().allocate(n); | 22 return std::alocator<char>().allocate(n); |
33 ^~~~~~~~ | 23 ^~~~~~~~ |
34 allocator | 24 allocator |
35 { dg-end-multiline-output "" } */ | 25 { dg-end-multiline-output "" } */ |