public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5387: g++ fails to catch use of private type in template
@ 2002-07-17 7:26 lerdsuwa
0 siblings, 0 replies; 5+ messages in thread
From: lerdsuwa @ 2002-07-17 7:26 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jason, lerdsuwa
Synopsis: g++ fails to catch use of private type in template
State-Changed-From-To: analyzed->closed
State-Changed-By: lerdsuwa
State-Changed-When: Wed Jul 17 07:26:43 2002
State-Changed-Why:
Fixed in the main trunk (future GCC 3.3).
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5387
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/5387: g++ fails to catch use of private type in template
@ 2002-05-26 10:16 lerdsuwa
0 siblings, 0 replies; 5+ messages in thread
From: lerdsuwa @ 2002-05-26 10:16 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jason, lerdsuwa, nobody
Synopsis: g++ fails to catch use of private type in template
Responsible-Changed-From-To: unassigned->lerdsuwa
Responsible-Changed-By: lerdsuwa
Responsible-Changed-When: Sun May 26 10:05:55 2002
Responsible-Changed-Why:
Patch submitted.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5387
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/5387: g++ fails to catch use of private type in template
@ 2002-05-26 8:36 lerdsuwa
0 siblings, 0 replies; 5+ messages in thread
From: lerdsuwa @ 2002-05-26 8:36 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jason, nobody
Synopsis: g++ fails to catch use of private type in template
State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Sun May 26 08:25:00 2002
State-Changed-Why:
Confirmed. Only B::i is enforced, B::X is not.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5387
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/5387: g++ fails to catch use of private type in template
@ 2002-01-15 5:36 Andrew Pinski
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Pinski @ 2002-01-15 5:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/5387; it has been noted by GNATS.
From: Andrew Pinski <pinskia@physics.uc.edu>
To: Jason Merrill <jason@prospero.cambridge.redhat.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/5387: g++ fails to catch use of private type in template
Date: Tue, 15 Jan 2002 08:32:09 -0500
All of the gcc compliers I tried fails and produces a message of (gcc
version 3.1 20020114 (experimental), gcc version 3.0.4 20011213
(prerelease))
cccTestTempletePrivate.cc: In method `int A<T>::f () [with T = B]':
cccTestTempletePrivate.cc:14: instantiated from here
cccTestTempletePrivate.cc:8: `int B::i' is private
cccTestTempletePrivate.cc:3: within this context
or of(gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) :
cccTestTempletePrivate.cc: In method `int A<B>::f<B>()':
cccTestTempletePrivate.cc:14: instantiated from here
cccTestTempletePrivate.cc:3: member `i' is a private member of class `B'
so even the redhat compiler (gcc version 2.96 20000731 (Red Hat Linux
7.1 2.96-85)) complains with
cccTestTempletePrivate.cc: In method `int A<T>::f () [with T = B]':
cccTestTempletePrivate.cc:14: instantiated from here
cccTestTempletePrivate.cc:8: `int B::i' is private
cccTestTempletePrivate.cc:3: within this context
So please close this report since this was never a problem.
Thanks,
Andrew Pinski
On Tuesday, January 15, 2002, at 08:13 , Jason Merrill wrote:
>
>> Number: 5387
>> Category: c++
>> Synopsis: g++ fails to catch use of private type in template
>> Confidential: no
>> Severity: non-critical
>> Priority: low
>> Responsible: unassigned
>> State: open
>> Class: accepts-illegal
>> Submitter-Id: net
>> Arrival-Date: Tue Jan 15 05:16:01 PST 2002
>> Closed-Date:
>> Last-Modified:
>> Originator: Jason Merrill
>> Release: unknown-1.0
>> Organization:
> redhat
>> Environment:
> System: Linux prospero.cambridge.redhat.com 2.4.13-0.5 #1 Sat Nov 3
> 15:08:02 EST 2001 i686 unknown
> Architecture: i686
>
>
>> Description:
> In the testcase below, g++ fails to diagnose the use of B::X in
> the definition
> of A<B>::x.
>
>> How-To-Repeat:
>
> template <class T> struct A {
> typename T::X x;
> int f() { return T::i; }
> };
>
> class B {
> typedef int X;
> static int i;
> };
>
> int main()
> {
> A<B> ab;
> ab.f();
> }
>
>> Fix:
>
>> Release-Note:
>> Audit-Trail:
>> Unformatted:
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* c++/5387: g++ fails to catch use of private type in template
@ 2002-01-15 5:16 Jason Merrill
0 siblings, 0 replies; 5+ messages in thread
From: Jason Merrill @ 2002-01-15 5:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 5387
>Category: c++
>Synopsis: g++ fails to catch use of private type in template
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Tue Jan 15 05:16:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Jason Merrill
>Release: unknown-1.0
>Organization:
redhat
>Environment:
System: Linux prospero.cambridge.redhat.com 2.4.13-0.5 #1 Sat Nov 3 15:08:02 EST 2001 i686 unknown
Architecture: i686
>Description:
In the testcase below, g++ fails to diagnose the use of B::X in the definition
of A<B>::x.
>How-To-Repeat:
template <class T> struct A {
typename T::X x;
int f() { return T::i; }
};
class B {
typedef int X;
static int i;
};
int main()
{
A<B> ab;
ab.f();
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-07-17 14:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-17 7:26 c++/5387: g++ fails to catch use of private type in template lerdsuwa
-- strict thread matches above, loose matches on Subject: below --
2002-05-26 10:16 lerdsuwa
2002-05-26 8:36 lerdsuwa
2002-01-15 5:36 Andrew Pinski
2002-01-15 5:16 Jason Merrill
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).