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

* [Bug c++/60860] Friend function declaration incorrectly hides function in outer namespace
  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 ` dibeas at ieee dot org
  2014-12-14 15:35 ` ville.voutilainen at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: dibeas at ieee dot org @ 2014-04-16 13:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from David Rodriguez Ibeas <dibeas at ieee dot org> ---
Created this as a new bug as I cannot say for sure whether this is the same
issue as 53012, but they maybe related.

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


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

* [Bug c++/60860] Friend function declaration incorrectly hides function in outer namespace
  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
  1 sibling, 0 replies; 3+ messages in thread
From: ville.voutilainen at gmail dot com @ 2014-12-14 15:35 UTC (permalink / raw)
  To: gcc-bugs

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

Ville Voutilainen <ville.voutilainen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|visibility                  |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-12-14
                 CC|                            |ville.voutilainen at gmail dot com
     Ever confirmed|0                           |1
      Known to fail|                            |4.8.2, 4.9.1, 5.0

--- Comment #2 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Clang accepts the code.


^ 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).