public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58032] New: Bogus error: declared using local type ..., is used but never defined
@ 2013-07-30 20:17 ppluzhnikov at google dot com
  2013-07-30 22:55 ` [Bug c++/58032] " paolo.carlini at oracle dot com
  0 siblings, 1 reply; 2+ messages in thread
From: ppluzhnikov at google dot com @ 2013-07-30 20:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58032

            Bug ID: 58032
           Summary: Bogus error: declared using local type ..., is used
                    but never defined
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppluzhnikov at google dot com

Google ref: b/9771363

Test:

template <typename T>
struct ResultCallback {
  virtual void Run(T) = 0;
};

template <typename T>
struct FunctionResultCallback: public ResultCallback<T> {
  void Run(T a) { }
};

template <typename T>
ResultCallback<T>*
NewCallback(void (*function)(T))
{
  return new FunctionResultCallback<T>;
}

int main(int argc, char** argv) {
  struct Bar {
    static void Do(Bar*) { }
  };
  NewCallback(&Bar::Do)->Run(0);
}


Using
g++ (GCC) 4.9.0 20130730 (experimental)

pp.ii:3:16: error: 'void ResultCallback<T>::Run(T) [with T = main(int,
char**)::Bar*]', declared using local type 'main(int, char**)::Bar', is used
but never defined [-fpermissive]
   virtual void Run(T) = 0;
                ^

Broken since at least 4.7


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/58032] Bogus error: declared using local type ..., is used but never defined
  2013-07-30 20:17 [Bug c++/58032] New: Bogus error: declared using local type ..., is used but never defined ppluzhnikov at google dot com
@ 2013-07-30 22:55 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-07-30 22:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58032

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
AFAICS this never worked. It's a dup of PR51048.

*** This bug has been marked as a duplicate of bug 51048 ***


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-30 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-30 20:17 [Bug c++/58032] New: Bogus error: declared using local type ..., is used but never defined ppluzhnikov at google dot com
2013-07-30 22:55 ` [Bug c++/58032] " paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).