public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11721] New: error on specialization as friend class
@ 2003-07-30 1:38 igodard at pacbell dot net
2003-07-30 1:39 ` [Bug c++/11721] " igodard at pacbell dot net
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: igodard at pacbell dot net @ 2003-07-30 1: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=11721
Summary: error on specialization as friend class
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
The idea is to have a template class have a local (enclosed) class that the enclosing class is a friend of. This works fine. Now specialize the template, and you get an error on the friend declaration for the enclosing specialization. However, you *can* declare member function specializations as friends in this case - its only when the whole class is the friend that the compiler complains.
I don't *think* this error is required by the standard (but I am not a language lawyer), but even if it is required the error message should be more informative than simply telling the programmer that he has done exactly what he is trying to do.
Ivan
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/11721] error on specialization as friend class
2003-07-30 1:38 [Bug c++/11721] New: error on specialization as friend class igodard at pacbell dot net
2003-07-30 1:39 ` [Bug c++/11721] " igodard at pacbell dot net
@ 2003-07-30 1:39 ` igodard at pacbell dot net
2003-07-30 2:05 ` pinskia at physics dot uc dot edu
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: igodard at pacbell dot net @ 2003-07-30 1:39 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=11721
------- Additional Comments From igodard at pacbell dot net 2003-07-30 01:39 -------
Created an attachment (id=4517)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4517&action=view)
compiler output (-v -save-temps)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/11721] error on specialization as friend class
2003-07-30 1:38 [Bug c++/11721] New: error on specialization as friend class igodard at pacbell dot net
@ 2003-07-30 1:39 ` igodard at pacbell dot net
2003-07-30 1:39 ` igodard at pacbell dot net
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: igodard at pacbell dot net @ 2003-07-30 1:39 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=11721
------- Additional Comments From igodard at pacbell dot net 2003-07-30 01:39 -------
Created an attachment (id=4518)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4518&action=view)
source code
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/11721] error on specialization as friend class
2003-07-30 1:38 [Bug c++/11721] New: error on specialization as friend class igodard at pacbell dot net
2003-07-30 1:39 ` [Bug c++/11721] " igodard at pacbell dot net
2003-07-30 1:39 ` igodard at pacbell dot net
@ 2003-07-30 2:05 ` pinskia at physics dot uc dot edu
2003-07-30 3:00 ` neroden at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-30 2:05 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=11721
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Keywords| |rejects-valid
Resolution| |FIXED
Target Milestone|3.4 |---
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-30 02:05 -------
I can reproduce this in 3.2.3 but in 3.3, gcc accepts this code so closing as fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/11721] error on specialization as friend class
2003-07-30 1:38 [Bug c++/11721] New: error on specialization as friend class igodard at pacbell dot net
` (2 preceding siblings ...)
2003-07-30 2:05 ` pinskia at physics dot uc dot edu
@ 2003-07-30 3:00 ` neroden at gcc dot gnu dot org
2003-07-30 3:01 ` neroden at gcc dot gnu dot org
2003-07-30 3:02 ` pinskia at physics dot uc dot edu
5 siblings, 0 replies; 7+ messages in thread
From: neroden at gcc dot gnu dot org @ 2003-07-30 3:00 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=11721
neroden at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at physics dot uc
| |dot edu
------- Additional Comments From neroden at gcc dot gnu dot org 2003-07-30 03:00 -------
Please check that this is fixed in mainline *as well as* 3.3 before closing, in future. Just in case.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/11721] error on specialization as friend class
2003-07-30 1:38 [Bug c++/11721] New: error on specialization as friend class igodard at pacbell dot net
` (3 preceding siblings ...)
2003-07-30 3:00 ` neroden at gcc dot gnu dot org
@ 2003-07-30 3:01 ` neroden at gcc dot gnu dot org
2003-07-30 3:02 ` pinskia at physics dot uc dot edu
5 siblings, 0 replies; 7+ messages in thread
From: neroden at gcc dot gnu dot org @ 2003-07-30 3:01 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=11721
------- Additional Comments From neroden at gcc dot gnu dot org 2003-07-30 03:01 -------
Please check that bugs are fixed in mainline *as well as* 3.3 before closing, in future. Just in case.Incidentally, the bug is fixed on mainline.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/11721] error on specialization as friend class
2003-07-30 1:38 [Bug c++/11721] New: error on specialization as friend class igodard at pacbell dot net
` (4 preceding siblings ...)
2003-07-30 3:01 ` neroden at gcc dot gnu dot org
@ 2003-07-30 3:02 ` pinskia at physics dot uc dot edu
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-30 3:02 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=11721
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-30 03:02 -------
I did check the mainline first but I just forgot to write it down here sorry.
So it is also fixed in the mainline (20030729).
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-07-30 3:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-30 1:38 [Bug c++/11721] New: error on specialization as friend class igodard at pacbell dot net
2003-07-30 1:39 ` [Bug c++/11721] " igodard at pacbell dot net
2003-07-30 1:39 ` igodard at pacbell dot net
2003-07-30 2:05 ` pinskia at physics dot uc dot edu
2003-07-30 3:00 ` neroden at gcc dot gnu dot org
2003-07-30 3:01 ` neroden at gcc dot gnu dot org
2003-07-30 3:02 ` pinskia at physics dot uc dot edu
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).