This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34365] New: Diagnostic mistakenly characterizes function as being overloaded
- From: "gcc-bugzilla at contacts dot eelis dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Dec 2007 20:33:54 -0000
- Subject: [Bug c++/34365] New: Diagnostic mistakenly characterizes function as being overloaded
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When asked to compile the following code:
template <typename> void f();
void g() { f<int>; }
G++ opines:
"error: statement cannot resolve address of overloaded function"
However, f is not overloaded. (The standard says: "When two or more different
declarations are specified for a single name in the same scope, that name is
said to be overloaded.")
PS. As for the validity of the code: while I personally really wouldn't know
whether it is valid, I should for completeness at least mention that it is
accepted by Comeau.
--
Summary: Diagnostic mistakenly characterizes function as being
overloaded
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at contacts dot eelis dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34365