public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/7818] protected members still non-reachable from an unbound friend template member function
[not found] <20020903054601.7818.david.decotigny@irisa.fr>
@ 2003-08-10 12:38 ` lerdsuwa at gcc dot gnu dot org
2003-08-10 14:37 ` lerdsuwa at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-08-10 12:38 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7818
lerdsuwa at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at dealii dot org
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-08-10 12:38 -------
*** Bug 10694 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/7818] protected members still non-reachable from an unbound friend template member function
[not found] <20020903054601.7818.david.decotigny@irisa.fr>
2003-08-10 12:38 ` [Bug c++/7818] protected members still non-reachable from an unbound friend template member function lerdsuwa at gcc dot gnu dot org
@ 2003-08-10 14:37 ` lerdsuwa at gcc dot gnu dot org
2003-08-11 14:53 ` lerdsuwa at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-08-10 14:37 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7818
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-08-10 14:37 -------
I think the testcase is invalid, and the correct one should be:
template <class T> struct Y {
void member() {
X<int> c;
c.prot_data = 2;
}
};
template <class S> class X {
int prot_data;
template <class T> friend void Y<T>::member();
};
template class Y<int>;
Here Y<T>::member is declared before it is referenced
in the friend declaration. This is according to 8.3p1
section of the standard:
... When the declarator-id is qualified, the declaration
shall refer to a previously declared member of the class
or namespace to which the qualifier refers, ...
I'm working on a fix for the valid case above.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/7818] protected members still non-reachable from an unbound friend template member function
[not found] <20020903054601.7818.david.decotigny@irisa.fr>
2003-08-10 12:38 ` [Bug c++/7818] protected members still non-reachable from an unbound friend template member function lerdsuwa at gcc dot gnu dot org
2003-08-10 14:37 ` lerdsuwa at gcc dot gnu dot org
@ 2003-08-11 14:53 ` lerdsuwa at gcc dot gnu dot org
2003-09-08 7:38 ` ebotcazou at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-08-11 14:53 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7818
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-08-11 14:53 -------
Patch submitted:
http://gcc.gnu.org/ml/gcc-patches/2003-08/msg00644.html
The invalid case still compiles because GCC still treats
many friend declarations as dependent name. This will be
fixed later separately. There is no time frame for that yet.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/7818] protected members still non-reachable from an unbound friend template member function
[not found] <20020903054601.7818.david.decotigny@irisa.fr>
` (2 preceding siblings ...)
2003-08-11 14:53 ` lerdsuwa at gcc dot gnu dot org
@ 2003-09-08 7:38 ` ebotcazou at gcc dot gnu dot org
2003-11-22 6:50 ` lerdsuwa at gcc dot gnu dot org
2003-11-22 6:58 ` lerdsuwa at gcc dot gnu dot org
5 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2003-09-08 7:38 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7818
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|sparc-sun-solaris2.7 |
GCC host triplet|sparc-sun-solaris2.7 |
GCC target triplet|sparc-sun-solaris2.7 |
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2003-09-08 07:38 -------
Generic C++ front-end problem.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/7818] protected members still non-reachable from an unbound friend template member function
[not found] <20020903054601.7818.david.decotigny@irisa.fr>
` (3 preceding siblings ...)
2003-09-08 7:38 ` ebotcazou at gcc dot gnu dot org
@ 2003-11-22 6:50 ` lerdsuwa at gcc dot gnu dot org
2003-11-22 6:58 ` lerdsuwa at gcc dot gnu dot org
5 siblings, 0 replies; 6+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-11-22 6:50 UTC (permalink / raw)
To: gcc-bugs
--
Bug 7818 depends on bug 5369, which changed state.
Bug 5369 Summary: template member friend declaration not honored
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5369
What |Old Value |New Value
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7818
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/7818] protected members still non-reachable from an unbound friend template member function
[not found] <20020903054601.7818.david.decotigny@irisa.fr>
` (4 preceding siblings ...)
2003-11-22 6:50 ` lerdsuwa at gcc dot gnu dot org
@ 2003-11-22 6:58 ` lerdsuwa at gcc dot gnu dot org
5 siblings, 0 replies; 6+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-11-22 6:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-11-22 06:58 -------
Upon further review, I think the original testcase and the one
provided by Wolfgang should compile. (Mine forgot an extra
forward declaration of template class X.) This is more consistent
to name injection and Comeau C++ also agrees with me. This behavior
is implemented in the mainline and will appear in future GCC 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7818
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-11-22 6:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20020903054601.7818.david.decotigny@irisa.fr>
2003-08-10 12:38 ` [Bug c++/7818] protected members still non-reachable from an unbound friend template member function lerdsuwa at gcc dot gnu dot org
2003-08-10 14:37 ` lerdsuwa at gcc dot gnu dot org
2003-08-11 14:53 ` lerdsuwa at gcc dot gnu dot org
2003-09-08 7:38 ` ebotcazou at gcc dot gnu dot org
2003-11-22 6:50 ` lerdsuwa at gcc dot gnu dot org
2003-11-22 6:58 ` lerdsuwa at gcc dot gnu dot 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).