This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66440] New: Diagnostic on "'foo' was not declared in this scope" offers an invalid suggestion
- From: "unmobile at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 06 Jun 2015 06:26:35 +0000
- Subject: [Bug c++/66440] New: Diagnostic on "'foo' was not declared in this scope" offers an invalid suggestion
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66440
Bug ID: 66440
Summary: Diagnostic on "'foo' was not declared in this scope"
offers an invalid suggestion
Product: gcc
Version: 5.1.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: unmobile at gmail dot com
Target Milestone: ---
Created attachment 35706
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35706&action=edit
Test input
When I try to compile the attached source with g++ 5.1.1, I get a suggestion to
use C::f. However, an explicit qualified call to C::f with the given template
and function arguments would be invalid, as shown in the later statement.
Perhaps the compiler should evaluate the candidates before enumerating them for
the user, and either drop them or distinguish that they wouldn't actually
match?