gcc/testsuite/g++.dg/lookup/builtin2.C
raw| 1 | /* { dg-do compile } */ |
| 2 | |
| 3 | /* PR c++/21087 */ |
| 4 | |
| 5 | /* We used to overload the template function with the built-in |
| 6 | declaration, instead of replacing it as we should, and then barf at |
| 7 | the using decl because of a test that none of the overload set |
| 8 | members were anticipated built-ins. */ |
| 9 | |
| 10 | extern "C" signed int toupper(signed int __c) throw(); |
| 11 | namespace std |
| 12 | { |
| 13 | template< typename a > a toupper(a,int){} |
| 14 | using ::toupper; |
| 15 | } |
| 16 | |
| 17 | void f () { |
| 18 | std::toupper((signed int)'a'); |
| 19 | } |