[Bug c++/42328] rejects valid friend

2015-03-28 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42328 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Known to work|

[Bug c++/42328] rejects valid friend

2015-03-28 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42328 --- Comment #11 from paolo at gcc dot gnu.org --- Author: paolo Date: Sat Mar 28 10:28:14 2015 New Revision: 221751 URL: https://gcc.gnu.org/viewcvs?rev=221751&root=gcc&view=rev Log: 2015-03-28 Paolo Carlini PR c++/42328 * g++.dg/tem

[Bug c++/42328] rejects valid friend

2015-03-27 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42328 --- Comment #10 from Paolo Carlini --- Thanks Richard. Then I'm going to add both testcases before closing the bug.

[Bug c++/42328] rejects valid friend

2015-03-27 Thread richard-gccbugzilla at metafoo dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42328 --- Comment #9 from Richard Smith --- Yes, I think this is ill-formed (although the standard is very unclear about this). I think the declaration template friend void freeList::foo(); would declare the member 'foo' of the class template parti

[Bug c++/42328] rejects valid friend

2015-03-27 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42328 Paolo Carlini changed: What|Removed |Added CC|gcc-bugs at gcc dot gnu.org|paolo.carlini at oracle dot com

[Bug c++/42328] rejects valid friend

2014-12-03 Thread richard-gccbugzilla at metafoo dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42328 Richard Smith changed: What|Removed |Added CC||richard-gccbugzilla@metafoo

[Bug c++/42328] rejects valid friend

2014-03-21 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42328 --- Comment #6 from Jonathan Wakely --- Clang accepts the code in comment 0, but GCC 4.9 and icc 13.0.1 still give the same errors as stated here in 2009

[Bug c++/42328] rejects valid friend

2009-12-08 Thread igodard at pacbell dot net
--- Comment #5 from igodard at pacbell dot net 2009-12-08 15:20 --- Both proposals befriend more than the minimum actually needed by program semantics. The former befriends any member of freeList, not just foo; the latter any member of any freeList at all. In addition, the former require

[Bug c++/42328] rejects valid friend

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2009-12-08 09:57 --- What's wrong with class baz : protected freeList { voidfrob() {} friend class freeList; }; or class baz : protected freeList { voidfrob() {} template friend void freeList::foo();

[Bug c++/42328] rejects valid friend

2009-12-07 Thread igodard at pacbell dot net
--- Comment #3 from igodard at pacbell dot net 2009-12-08 02:16 --- I stand corrected about Comeau - I missed the error and only noticed the warning. Regardless, there must be some way to solve this problem: template class freeList { public: void foo(); }; class bar {}; cl

[Bug c++/42328] rejects valid friend

2009-12-07 Thread paolo dot carlini at oracle dot com
--- Comment #2 from paolo dot carlini at oracle dot com 2009-12-07 23:35 --- Likewise SunStudio and Icc reject it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42328

[Bug c++/42328] rejects valid friend

2009-12-07 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2009-12-07 23:13 --- Comeau C++ also rejects this code with the following error message: "ComeauTest.c", line 12: error: declaration is incompatible with nontype " freeList::foo [with T=T, U=baz]" (declared at line 12