Article View: gnu.g++.bug
Article #117Re: #pragma interface -- whose bug is it anyway?
From: Mike Stump
Date: Wed, 08 Apr 1992 07:26
Date: Wed, 08 Apr 1992 07:26
41 lines
1605 bytes
1605 bytes
> Date: Mon, 6 Apr 92 18:37:48 EDT
> From: purtill%idacrd@uunet.uu.net (Mark Purtill)
> Message-Id: <9204062237.AA05389@>
This is a bug with libg++, it sounds like. The behavior you site, is
correct. Another possibility, is that you are just using libg++
incorrectly.
> On a Sparcstation 2 (which is not connected to the outside; I'm
> typing this in from a printed transcript, so I might err).
> % gcc -v
> Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.1/specs
> gcc version 2.1
> % more /etc/motd
> SunOS Release 4.1.1 (CARS_2) #3: Thu Aug 15 10:35:49 EDT 1991
> % cat >A.h
> #pragma interface
> struct A {
> A() ;
> };
> inline A::A() {}
> ^D
> % cat > B.C
> #include "A.h"
> struct B {
> A* _copy(A* t);
> };
> A* B::_copy(A* t) {
> A* x = new A();
> return 0 ;
> }
> ^D
> % gcc -c B.C
> And now if you examine B.o with nm, you should find A::A() as
> an undefined global. Removing the "#pragma interface" causes the
> problem to go away.
> Now, "#pragma interface" does not seem to be documented, so
> maybe this is correct behaviour for gcc. If so, then this is a libg++
> bug, which occurs in (at least) int SplayBag s.
Technical Details
Message-ID:
<9204080726.AA01101@cygnus.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!mrsShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!mrs From: mrs@cygnus.com (Mike Stump) Subject: Re: #pragma interface -- whose bug is it anyway? Message-ID: <9204080726.AA01101@cygnus.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Wed, 8 Apr 1992 07:26:42 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 44