C++: fix ordering of missing std #include suggestion (PR c++/81514)
gcc/cp/ChangeLog: PR c++/81514 * name-lookup.c (maybe_suggest_missing_header): Convert return type from void to bool; return true iff a suggestion was offered. (suggest_alternative_in_explicit_scope): Move call to maybe_suggest_missing_header to before use of best_match, and return true if the former offers a suggestion. gcc/testsuite/ChangeLog: PR c++/81514 * g++.dg/lookup/empty.h: New file. * g++.dg/lookup/missing-std-include-2.C: Replace include of stdio.h with empty.h and a declaration of a "std::sprintf" not based on a built-in. From-SVN: r251186
Showing
gcc/testsuite/g++.dg/lookup/empty.h
0 → 100644
Please
register
or
sign in
to comment