[Bug c++/34365] New: Diagnostic mistakenly characterizes function as being overloaded
gcc-bugzilla at contacts dot eelis dot net
gcc-bugzilla@gcc.gnu.org
Thu Dec 6 20:34:00 GMT 2007
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
More information about the Gcc-bugs
mailing list