https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42328
Paolo Carlini changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Known to work|
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
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.
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42328
Richard Smith changed:
What|Removed |Added
CC||richard-gccbugzilla@metafoo
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
--- 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
--- 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();
--- 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
--- 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
--- 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
12 matches
Mail list logo