diff options
author | David Malcolm <dmalcolm@redhat.com> | 2017-08-18 18:12:47 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2017-08-18 18:12:47 +0000 |
commit | f661e57ee8fef0b121ec2d79f9e5fea20932c2ae (patch) | |
tree | ecb7f9ac9fda8d6d73edb72948e0924569ec7397 /gcc/tree-nested.h | |
parent | 676c4146f504d5252df1a3fb39bb5c4099bc0791 (diff) | |
download | gcc-f661e57ee8fef0b121ec2d79f9e5fea20932c2ae.zip gcc-f661e57ee8fef0b121ec2d79f9e5fea20932c2ae.tar.gz gcc-f661e57ee8fef0b121ec2d79f9e5fea20932c2ae.tar.bz2 |
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
Diffstat (limited to 'gcc/tree-nested.h')
0 files changed, 0 insertions, 0 deletions