This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/10174: g++ wrongly assumes a namespace of a function based on the namespace of the function's argument
- From: jlawson-gcc at bovine dot net
- To: gcc-gnats at gcc dot gnu dot org
- Date: 21 Mar 2003 00:23:21 -0000
- Subject: c++/10174: g++ wrongly assumes a namespace of a function based on the namespace of the function's argument
- Reply-to: jlawson-gcc at bovine dot net
>Number: 10174
>Category: c++
>Synopsis: g++ wrongly assumes a namespace of a function based on the namespace of the function's argument
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Fri Mar 21 00:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: jlawson-gcc at bovine dot net
>Release: g++ (GCC) 3.2
>Organization:
>Environment:
Linux redhat 7.2, (Red Hat Linux Rawhide g++ 3.2-1)
>Description:
g++ compiles the attached example, even though I don't think the compiler should assume the scope of the bork() function.
g++ does not assume the scope of the function if it does not take an argument that also a member of that namespace.
>How-To-Repeat:
g++ testnamespace.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="testnamespace.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="testnamespace.cpp"
bmFtZXNwYWNlIG1vbyB7CiAgICBzdHJ1Y3QgY293IHsKICAgICAgICBpbnQgYXNkZjsKICAgIH07
CiAgICAKICAgIHZvaWQgYm9yayhtb286OmNvdywgaW50IGkpIHt9Cn0KCnZvaWQgZG9pdCgpCnsK
ICAgIG1vbzo6Y293IHZhcjsKICAgIHZhci5hc2RmID0gMTsKCiAgICBib3JrKHZhciwgMSk7IC8v
IHNob3VsZCByZXF1aXJlIG1vbzo6Ym9yayh2YXIpCn0K