public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60860] New: Friend function declaration incorrectly hides function in outer namespace
@ 2014-04-16 13:38 dibeas at ieee dot org
  2014-04-16 13:43 ` [Bug c++/60860] " dibeas at ieee dot org
  2014-12-14 15:35 ` ville.voutilainen at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: dibeas at ieee dot org @ 2014-04-16 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60860
           Summary: Friend function declaration incorrectly hides function
                    in outer namespace
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dibeas at ieee dot org

The following valid code fails to compile:

void f( int );
namespace N {
    struct A
    {
       friend void f(int);
       friend void f(double);
    };
    void g() {
        f(0);
    }
}

The problem goes away if any of the two friend declarations is commented out.


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

end of thread, other threads:[~2014-12-14 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16 13:38 [Bug c++/60860] New: Friend function declaration incorrectly hides function in outer namespace dibeas at ieee dot org
2014-04-16 13:43 ` [Bug c++/60860] " dibeas at ieee dot org
2014-12-14 15:35 ` ville.voutilainen at gmail 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).