public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29503] New: Internal Compiler Error with Friend + Template + Typedef
@ 2006-10-18 16:37 mangeshaj at yahoo dot com
2006-10-18 17:12 ` [Bug c++/29503] " pinskia at gcc dot gnu dot org
2006-10-18 20:25 ` fang at csl dot cornell dot edu
0 siblings, 2 replies; 3+ messages in thread
From: mangeshaj at yahoo dot com @ 2006-10-18 16:37 UTC (permalink / raw)
To: gcc-bugs
#define SSP_X_SMALL_POOL_SIZE 10
template < class ObjT, unsigned int uiInitialSize >
class ObjectFactory
{
public:
virtual ~ObjectFactory();
};
class TD{
public:
typedef ObjectFactory< TD, SSP_X_SMALL_POOL_SIZE > Factory;
public:
friend class TD::Factory;
}
Compiling the file with gcc gives :
New1.cpp:16: Internal compiler error.
New1.cpp:16: Internal compiler error:
New1.cpp:16: Please submit a full bug report.
Any Suggestions or workarounds.
--
Summary: Internal Compiler Error with Friend + Template + Typedef
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mangeshaj at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29503
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/29503] Internal Compiler Error with Friend + Template + Typedef
2006-10-18 16:37 [Bug c++/29503] New: Internal Compiler Error with Friend + Template + Typedef mangeshaj at yahoo dot com
@ 2006-10-18 17:12 ` pinskia at gcc dot gnu dot org
2006-10-18 20:25 ` fang at csl dot cornell dot edu
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-18 17:12 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-10-18 17:12 -------
The ICE is fixed in 4.0.4 for sure:
[pinskia@celery ~]$ ~/gcc-4.0/bin/gcc t.cc
t.cc:16: error: using typedef-name TD::Factory after class
t.cc:13: error: TD::Factory has a previous declaration here
t.cc:18: error: expected unqualified-id at end of input
[pinskia@celery ~]$ ~/gcc-4.1/bin/gcc t.cc
t.cc:16: error: using typedef-name TD::Factory after class
t.cc:13: error: TD::Factory has a previous declaration here
t.cc:18: error: expected unqualified-id at end of input
[pinskia@celery ~]$ ~/gcc-local/bin/gcc t.cc
t.cc:16: error: using typedef-name TD::Factory after class
t.cc:13: error: TD::Factory has a previous declaration here
t.cc:18: error: expected unqualified-id at end of input
You cannot friend a typedef at least not yet, there is a defect report about
that in the C++ standard and another bug filed against GCC for it also but I
cannot find it right now.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29503
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/29503] Internal Compiler Error with Friend + Template + Typedef
2006-10-18 16:37 [Bug c++/29503] New: Internal Compiler Error with Friend + Template + Typedef mangeshaj at yahoo dot com
2006-10-18 17:12 ` [Bug c++/29503] " pinskia at gcc dot gnu dot org
@ 2006-10-18 20:25 ` fang at csl dot cornell dot edu
1 sibling, 0 replies; 3+ messages in thread
From: fang at csl dot cornell dot edu @ 2006-10-18 20:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fang at csl dot cornell dot edu 2006-10-18 20:25 -------
That would be PR 21498.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29503
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-18 20:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-18 16:37 [Bug c++/29503] New: Internal Compiler Error with Friend + Template + Typedef mangeshaj at yahoo dot com
2006-10-18 17:12 ` [Bug c++/29503] " pinskia at gcc dot gnu dot org
2006-10-18 20:25 ` fang at csl dot cornell 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).