public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29438] New: Friendship problem
@ 2006-10-12 12:23 pcarlini at suse dot de
2006-10-12 14:19 ` [Bug c++/29438] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: pcarlini at suse dot de @ 2006-10-12 12:23 UTC (permalink / raw)
To: gcc-bugs
Hi. Today, while working on libstdc++/28277 I encountered this problem, which
currently prevents me from extending the fix to ext/vstring. The below is a
rather small self-contained testcase, which current mainline does not compile
because of ambiguous overloading, whereas compilers based on the EDG front-end
accept it, in strict mode too. Is it a known issue? Thanks.
namespace __gnu_cxx
{
template<typename _CharT, typename _Traits, typename _Alloc>
class __sso_string_base { };
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base
= __sso_string_base>
class __versa_string { };
}
namespace std
{
template<typename _CharT, typename _Traits>
class basic_ostream;
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const __gnu_cxx::__versa_string<_CharT, _Traits,
_Alloc, _Base>&)
{ return __os; }
}
namespace std
{
template<typename _CharT, typename _Traits>
class basic_ostream
{
template<typename _CharT2, typename _Traits2, typename _Alloc,
template <typename, typename, typename> class _Base>
friend basic_ostream<_CharT2, _Traits2>&
operator<<(basic_ostream<_CharT2, _Traits2>&,
const __gnu_cxx::__versa_string<_CharT2, _Traits2,
_Alloc, _Base>&);
};
}
int main()
{
std::basic_ostream<char, int> bo;
__gnu_cxx::__versa_string<char, int, int> vs;
bo << vs;
}
--
Summary: Friendship problem
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pcarlini at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29438
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/29438] [4.0/4.1/4.2 Regression] Friendship problem
2006-10-12 12:23 [Bug c++/29438] New: Friendship problem pcarlini at suse dot de
@ 2006-10-12 14:19 ` pinskia at gcc dot gnu dot org
2006-10-12 14:21 ` pcarlini at suse dot de
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-12 14:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-10-12 14:18 -------
This looks very closely related to PR 29236.
Confirmed, a regression from 2.95.3. I still want to say this is just another
example of PR 29236 but the testcases are semi different. Though the use of
templates with template arugments which are templates themselve make them very
closely related.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |29236
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Known to fail| |3.0.4 4.0.0 4.1.0 4.2.0
| |3.3.3 3.2.3 3.4.0
Known to work| |2.95.3
Last reconfirmed|0000-00-00 00:00:00 |2006-10-12 14:18:54
date| |
Summary|Friendship problem |[4.0/4.1/4.2 Regression]
| |Friendship problem
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29438
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/29438] [4.0/4.1/4.2 Regression] Friendship problem
2006-10-12 12:23 [Bug c++/29438] New: Friendship problem pcarlini at suse dot de
2006-10-12 14:19 ` [Bug c++/29438] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-10-12 14:21 ` pcarlini at suse dot de
2006-10-12 14:24 ` pcarlini at suse dot de
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pcarlini at suse dot de @ 2006-10-12 14:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pcarlini at suse dot de 2006-10-12 14:21 -------
Indeed, I was about to add to the audit trail that the template template
parameter is essential.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29438
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/29438] [4.0/4.1/4.2 Regression] Friendship problem
2006-10-12 12:23 [Bug c++/29438] New: Friendship problem pcarlini at suse dot de
2006-10-12 14:19 ` [Bug c++/29438] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-10-12 14:21 ` pcarlini at suse dot de
@ 2006-10-12 14:24 ` pcarlini at suse dot de
2006-10-15 21:26 ` mmitchel at gcc dot gnu dot org
2006-10-20 7:35 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pcarlini at suse dot de @ 2006-10-12 14:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pcarlini at suse dot de 2006-10-12 14:24 -------
... and I also agree that the issue seems *very* similar to 29236.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29438
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/29438] [4.0/4.1/4.2 Regression] Friendship problem
2006-10-12 12:23 [Bug c++/29438] New: Friendship problem pcarlini at suse dot de
` (2 preceding siblings ...)
2006-10-12 14:24 ` pcarlini at suse dot de
@ 2006-10-15 21:26 ` mmitchel at gcc dot gnu dot org
2006-10-20 7:35 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-15 21:26 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29438
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/29438] [4.0/4.1/4.2 Regression] Friendship problem
2006-10-12 12:23 [Bug c++/29438] New: Friendship problem pcarlini at suse dot de
` (3 preceding siblings ...)
2006-10-15 21:26 ` mmitchel at gcc dot gnu dot org
@ 2006-10-20 7:35 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-20 7:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-10-20 07:34 -------
Yes this is a dup of bug 29236 which has a similar testcase and more discussion
on the actually problem.
*** This bug has been marked as a duplicate of 29236 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29438
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-10-20 7:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-12 12:23 [Bug c++/29438] New: Friendship problem pcarlini at suse dot de
2006-10-12 14:19 ` [Bug c++/29438] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-10-12 14:21 ` pcarlini at suse dot de
2006-10-12 14:24 ` pcarlini at suse dot de
2006-10-15 21:26 ` mmitchel at gcc dot gnu dot org
2006-10-20 7:35 ` pinskia 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).