This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: virtual inheritance: optimization for empty objects


>>>>> "AO" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:

AO> On Mar  4, 1999, Alexander Schiemann <aschiem@count.math.uni-sb.de> wrote:
>> deriving a class B from class A without adding a data-member
>> does not increase the size.
>> But with virtual inheritance egcs-1.1.1 does not take advantage
>> of such a situation.

AO> The latest snapshots will, if you compile with -fnew-abi.

I am very interested, but trying with a small example on 19990314, I get:

sizeof> c++ -o foo -fnew-abi foo.C
foo.C: In function `int main()':
foo.C:36: `cout' undeclared in namespace `std'
foo.C:46: `endl' undeclared in namespace `std'

I used std::cout and std::endl. I works without -fnew-abi.

I guess I need to rebuild the libstdc++, or what exactly should I
rebuild?... Are there instructions?
Best Regards!

Marc

-- 
Marc Girod                Hiomo 5/1          Voice:  +358-9-511 23746
Nokia Telecommunications  P.O. Box 320       Mobile: +358-40-569 7954
NWS/NMS/NMS for Data      00045 NOKIA Group  Fax:    +358-9-511 23580
                          Finland            marc.girod@ntc.nokia.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]