public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65152] Several friend function definitions break lookup
       [not found] <bug-65152-4@http.gcc.gnu.org/bugzilla/>
@ 2015-02-23 10:30 ` rguenth at gcc dot gnu.org
  2015-02-23 13:02 ` bugger_gcc at interia dot pl
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-23 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So it sounds like the friend declaration injects 'test' into N and thus 'test'
is found but overload resolution fails.  Whether that injection is correct or
not I don't know.  But given you can even define the function there it is
probably what is specified (C++11 11.3/6).

So I think this bug is invalud.


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

* [Bug c++/65152] Several friend function definitions break lookup
       [not found] <bug-65152-4@http.gcc.gnu.org/bugzilla/>
  2015-02-23 10:30 ` [Bug c++/65152] Several friend function definitions break lookup rguenth at gcc dot gnu.org
@ 2015-02-23 13:02 ` bugger_gcc at interia dot pl
  2015-08-22 22:27 ` rogero at howzatt dot demon.co.uk
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: bugger_gcc at interia dot pl @ 2015-02-23 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from bugger_gcc at interia dot pl ---
This is not what is specified, because C++11 7.3.1.2/3 states that such friend
functions can't be found by name lookup unless it's ADL.

Note that the friend 'test' incorrectly hides the global 'test' only if there
are at least 2 friends with that name defined. With only one friend 'test' the
code is compiled correctly.

Also, Clang and ICC compile the code with the expected result.


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

* [Bug c++/65152] Several friend function definitions break lookup
       [not found] <bug-65152-4@http.gcc.gnu.org/bugzilla/>
  2015-02-23 10:30 ` [Bug c++/65152] Several friend function definitions break lookup rguenth at gcc dot gnu.org
  2015-02-23 13:02 ` bugger_gcc at interia dot pl
@ 2015-08-22 22:27 ` rogero at howzatt dot demon.co.uk
  2015-08-22 22:58 ` redi at gcc dot gnu.org
  2021-08-02  3:46 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: rogero at howzatt dot demon.co.uk @ 2015-08-22 22:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Roger Orr <rogero at howzatt dot demon.co.uk> ---
Note that this has been fixed in gcc-trunk (tested 22-Aug-2015)


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

* [Bug c++/65152] Several friend function definitions break lookup
       [not found] <bug-65152-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2015-08-22 22:27 ` rogero at howzatt dot demon.co.uk
@ 2015-08-22 22:58 ` redi at gcc dot gnu.org
  2021-08-02  3:46 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2015-08-22 22:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, fixed by r227044


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

* [Bug c++/65152] Several friend function definitions break lookup
       [not found] <bug-65152-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2015-08-22 22:58 ` redi at gcc dot gnu.org
@ 2021-08-02  3:46 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-02  3:46 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
   Target Milestone|---                         |6.0
         Resolution|---                         |FIXED

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 6+.

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

end of thread, other threads:[~2021-08-02  3:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-65152-4@http.gcc.gnu.org/bugzilla/>
2015-02-23 10:30 ` [Bug c++/65152] Several friend function definitions break lookup rguenth at gcc dot gnu.org
2015-02-23 13:02 ` bugger_gcc at interia dot pl
2015-08-22 22:27 ` rogero at howzatt dot demon.co.uk
2015-08-22 22:58 ` redi at gcc dot gnu.org
2021-08-02  3:46 ` pinskia at gcc dot gnu.org

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