public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/8827: operator<< within namespace shadows all operator<<'s in global namespace
@ 2002-12-05 11:46 dhawkins
  0 siblings, 0 replies; 2+ messages in thread
From: dhawkins @ 2002-12-05 11:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8827
>Category:       c++
>Synopsis:       operator<< within namespace shadows all operator<<'s in global namespace
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 05 11:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     dhawkins@cdrgts.com
>Release:        g++-3.2 (GCC) 3.2.1
>Organization:
>Environment:
Debian GNU/Linux Sarge with g++ from Sid (Athlon 800).
>Description:

>How-To-Repeat:
compile the code
>Fix:
I have demonstrated work-arounds, but do not know of any fixes.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="simple.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="simple.cc"

I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8aXRlcmF0b3I+
CiNpbmNsdWRlIDxhbGdvcml0aG0+CgojZGVmaW5lIFJFTU9WRV9PUEVSQVRPUl9GSVgKI2RlZmlu
ZSBBRERfU1REX05BTUVTUEFDRV9GSVgKCm5hbWVzcGFjZSBmb28gewogIGNsYXNzIGJhcgogIHsK
ICBwdWJsaWM6CiAgICBiYXIoKSB7fQogIH07CgogIHRlbXBsYXRlPHR5cGVuYW1lIFQ+CiAgdm9p
ZAogIGR1bXBlcihjb25zdCBUJiBidikgewogICAgc3RkOjpjZXJyIDw8IGJ2IDw8IHN0ZDo6ZW5k
bDsKICB9CgojaWZuZGVmIFJFTU9WRV9PUEVSQVRPUl9GSVgKICBzdGQ6Om9zdHJlYW0gJiBvcGVy
YXRvcjw8KHN0ZDo6b3N0cmVhbSAmb3N0ciwgYmFyJiBteV90ZXN0X2NvbXBvbmVudCkgeyAvKiBl
bXB0eSAqLyB9CiNlbmRpZgoKfSAvLyBuYW1lc3BhY2UgZm9vCgojaWZkZWYgQUREX1NURF9OQU1F
U1BBQ0VfRklYCm5hbWVzcGFjZSBzdGQgewojZW5kaWYgLy8gQUREX1NURF9OQU1FU1BBQ0VfRklY
CgpzdGQ6Om9zdHJlYW0mIApvcGVyYXRvcjw8KHN0ZDo6b3N0cmVhbSAmb3MsIGNvbnN0IHN0ZDo6
dmVjdG9yPGNoYXI+ICZidikKewogIGNvcHkoYnYuYmVnaW4oKSwgYnYuZW5kKCksIHN0ZDo6b3N0
cmVhbV9pdGVyYXRvcjx1bnNpZ25lZCBzaG9ydD4ob3MsICIgIikpOwogIHJldHVybiBvczsKfQoK
I2lmZGVmIEFERF9TVERfTkFNRVNQQUNFX0ZJWAp9IC8vIG5hbWVzcGFjZSBzdGQKI2VuZGlmIC8v
IEFERF9TVERfTkFNRVNQQUNFX0ZJWAoKaW50Cm1haW4oKQp7CiAgZm9vOjpiYXIgdXQ7CgogIHN0
ZDo6dmVjdG9yPGNoYXI+IG15X3ZlY3RvcjsKCiAgbXlfdmVjdG9yLnB1c2hfYmFjayg4KTsKICBt
eV92ZWN0b3IucHVzaF9iYWNrKDE2KTsKICBteV92ZWN0b3IucHVzaF9iYWNrKDMyKTsKICBteV92
ZWN0b3IucHVzaF9iYWNrKDQyKTsKCiAgc3RkOjpjb3V0IDw8IG15X3ZlY3RvciA8PCBzdGQ6OmVu
ZGw7CgogIGZvbzo6ZHVtcGVyKG15X3ZlY3Rvcik7Cn0K


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

* Re: c++/8827: operator<< within namespace shadows all operator<<'s in global namespace
@ 2002-12-05 11:57 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-12-05 11:57 UTC (permalink / raw)
  To: dhawkins, gcc-bugs, gcc-prs, nobody

Synopsis: operator<< within namespace shadows all operator<<'s in global namespace

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Thu Dec  5 11:57:05 2002
State-Changed-Why:
    This is not a bug, but how Koenig lookup works. If there
    is nothing in the present namespace, then we look into
    the namespaces of the arguments of the operator, which
    triggers the message.
    
    There are a number of similar reports in the database.
    
    If you know which operator you want to call, then qualify
    it with the name of the namespace. 
    
    Regards
      Wolfgang

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8827


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

end of thread, other threads:[~2002-12-05 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-05 11:46 c++/8827: operator<< within namespace shadows all operator<<'s in global namespace dhawkins
2002-12-05 11:57 bangerth

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