Article View: gnu.g++.bug
Article #1059friend nested classes
From: Marc Girod
Date: Tue, 13 Oct 1992 14:29
Date: Tue, 13 Oct 1992 14:29
61 lines
2710 bytes
2710 bytes
Hi there!
Last June (Date: 12 Jun 92 17:38:55 GMT) in comp.lang.c++, in article
<88384@bu.edu>, model@bass.bu.edu (Mitchell Model) proposed a syntax
to make a nested class a friend:
> class Collection
> {
> // . . .
>
> class iterator;
> friend iterator;
> class iterator
> {
> // . . .
> }
> };
However, when I tried it with g++ (2.2.2):
------------------------------------------------------------
// nested.C
class outer {
public:
class inner;
friend inner;
class inner {};
};
main() {}
------------------------------------------------------------
I got a core dump....
------------------------------------------------------------
/usr/local/bin/make -k
g++ -g -w -H -v -DSYSV -c nested.C -o nested.o
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/specs
gcc version 2.2.2
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/cpp -lang-c++ -v -DSYSV -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix -g -w -H nested.C /usr/tmp/cca04589.i
GNU CPP version 2.2.2 (sparc)
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/cc1plus /usr/tmp/cca04589.i -quiet -dumpbase nested.cc -g -w -version -o /usr/tmp/cca04589.s
GNU C++ version 2.2.2 (sparc) compiled by GNU C version 2.2.2.
cp-decl.c:2678: failed assertion `*ptr == NULL_TREE || *ptr == newval'
/usr/local/bin/gcc: Internal compiler error: program cc1plus got fatal signal 6
make: *** [nested.o] Error 1
make: Target `all' not remade because of errors.
Compilation exited abnormally with code 1 at Tue Oct 13 16:20:48
------------------------------------------------------------
Is this problem already registered? solved?
Cheers!
--
+-----------------------------------------------------------------------------+
| Marc Girod - Nokia Telecommunications Phone: +358-0-511 7703 |
| TL4E - P.O. Box 12 Fax: +358-0-511 7432 |
| SF-02611 Espoo 61 - Finland Internet: marc.girod@ntc.nokia.com |
| X.400: C=FI, A=Elisa, P=Nokia Telecom, UNIT=TRS, SUR=Girod, GIV=Marc |
+-----------------------------------------------------------------------------+
Technical Details
Message-ID:
<GIROD.92Oct13162921@node_262d6.tele.nokia.fi>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tele.nokia.fi!girodShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tele.nokia.fi!girod From: girod@tele.nokia.fi (Marc Girod) Subject: friend nested classes Message-ID: <GIROD.92Oct13162921@node_262d6.tele.nokia.fi> Sender: gnulists@ai.mit.edu Reply-To: marc.girod@ntc.nokia.com Organization: kpd Distribution: gnu Date: Tue, 13 Oct 1992 14:29:21 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 62