public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7397: GCC doesn't compile the correct code
@ 2002-07-24 12:56 comer
  0 siblings, 0 replies; 2+ messages in thread
From: comer @ 2002-07-24 12:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7397
>Category:       c++
>Synopsis:       GCC doesn't compile the correct code
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 24 12:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Shandar
>Release:        2.95.3-5 (cygwin special)
>Organization:
>Environment:
Windows 2000
>Description:
ns_tmp.cpp: In function `void F<int>(int)':
ns_tmp.cpp:15:   instantiated from here
ns_tmp.cpp:10: `AF' undeclared (first use this function)
ns_tmp.cpp:10: (Each undeclared identifier is reported only once
ns_tmp.cpp:10: for each function it appears in.)
>How-To-Repeat:
namespace A
{
	template<class T> void AF(T x) { }
};

template<class T> void F(T x)
{
	using namespace A;

	AF(x);
}

int main(void)
{
	F(3);
	return 0;
}
>Fix:
namespace A
{
	template<class T> void AF(T x) { }
};

template<class T> void F(T x)
{
	using namespace A;

	A::AF(x);
}

int main(void)
{
	F(3);
	return 0;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="ns_tmp.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="ns_tmp.cpp"

bmFtZXNwYWNlIEENCnsNCgl0ZW1wbGF0ZTxjbGFzcyBUPiB2b2lkIEFGKFQgeCkgeyB9DQp9Ow0K
DQp0ZW1wbGF0ZTxjbGFzcyBUPiB2b2lkIEYoVCB4KQ0Kew0KCXVzaW5nIG5hbWVzcGFjZSBBOw0K
DQoJQUYoeCk7DQp9DQoNCmludCBtYWluKHZvaWQpDQp7DQoJRigzKTsNCglyZXR1cm4gMDsNCn0N
Cg0KLyoNCmdjYyB2ZXJzaW9uIDIuOTUuMy01IChjeWd3aW4gc3BlY2lhbCkNCg0KZ2NjIG5zX3Rt
cC5jcHANCg0KbnNfdG1wLmNwcDogSW4gZnVuY3Rpb24gYHZvaWQgRjxpbnQ+KGludCknOg0KbnNf
dG1wLmNwcDoxNTogICBpbnN0YW50aWF0ZWQgZnJvbSBoZXJlDQpuc190bXAuY3BwOjEwOiBgQUYn
IHVuZGVjbGFyZWQgKGZpcnN0IHVzZSB0aGlzIGZ1bmN0aW9uKQ0KbnNfdG1wLmNwcDoxMDogKEVh
Y2ggdW5kZWNsYXJlZCBpZGVudGlmaWVyIGlzIHJlcG9ydGVkIG9ubHkgb25jZQ0KbnNfdG1wLmNw
cDoxMDogZm9yIGVhY2ggZnVuY3Rpb24gaXQgYXBwZWFycyBpbi4pDQoqLw==


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

* Re: c++/7397: GCC doesn't compile the correct code
@ 2002-07-25  4:45 paolo
  0 siblings, 0 replies; 2+ messages in thread
From: paolo @ 2002-07-25  4:45 UTC (permalink / raw)
  To: comer, gcc-bugs, gcc-prs, nobody, paolo

Synopsis: GCC doesn't compile the correct code

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Thu Jul 25 04:45:56 2002
Responsible-Changed-Why:
    Triaged.
State-Changed-From-To: open->closed
State-Changed-By: paolo
State-Changed-When: Thu Jul 25 04:45:56 2002
State-Changed-Why:
    Both 3.0.4 and 3.1 have no problem with the testcase.
    The 2.95.x series is not really maintained anymore.

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


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

end of thread, other threads:[~2002-07-25 11:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-24 12:56 c++/7397: GCC doesn't compile the correct code comer
2002-07-25  4:45 paolo

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