This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/34365] New: Diagnostic mistakenly characterizes function as being overloaded


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]