Re: [PATCH, gcc 8] C++: hints for missing std:: headers

2017-04-25 Thread Nathan Sidwell
On 04/24/2017 03:53 PM, David Malcolm wrote: If the user forgets to include an STL header, then an attempt to use a class in an explicitly scoped "std::" currently leads to this error: + if (scope == NULL_TREE) +return; + if (TREE_CODE (scope) != NAMESPACE_DECL) +return; + /* We on

[PATCH, gcc 8] C++: hints for missing std:: headers

2017-04-24 Thread David Malcolm
If the user forgets to include an STL header, then an attempt to use a class in an explicitly scoped "std::" currently leads to this error: test.cc:3:8: error: 'string' is not a member of 'std' std::string s ("hello world"); ^~ This patch attempts to make this error a bit more user