Thread View: gnu.g++.bug
1 messages
1 total messages
Started by David Binderman 3841
Thu, 21 Jan 1993 23:24
Section 10.10C of the ARM & GNU G++ 2.3.3
Author: David Binderman 3841
Date: Thu, 21 Jan 1993 23:24
Date: Thu, 21 Jan 1993 23:24
46 lines
1669 bytes
1669 bytes
Hello there, I have GNU G++ 2.2.2 and GNU G++ 2.3.3 on a Sun 4 SPARC. I have tried out both compilers with the code from Section 10.10C of the ARM page 233 2.2.2 produced the following BW:f() MW:g() BMW::h() BW:f() 2.3.3 produced the following W::f() W::g() BMW::h() BW:f() It seems that 2.2.2 is correct, but 2.3.3 is not. The following memory layout seems to be used by both 2.3.3 and 2.2.2 BMW::BMW() sizeof 28 0xf7fff858 0xf7fff86c 0xf7fff85c 0x3 0xf7fff860 0xf7fff86c 0xf7fff864 0x2 0xf7fff868 0x4 0xf7fff86c 0x1 0xf7fff870 0x40b0 I note with interest only one vtbl pointer. The ARM suggests, but does not require, that there are three vtbl pointers in a BMW class. I checked with cfront 3.0 and another C++ compiler, and they both agreed that there can be three vtbl pointers in a BMW. While I accept and recognise that different implementation strategies of language features are permitted, it is not clear to me that two missing vtbl pointers is a feature or a bug. I would appreciate your opinion. Regards David C Binderman Dept US/ESI, Bau 60, SEL-Alcatel AG, Lorenz Strasse 10, D-7000 Stuttgart 40, Germany dcb@us-es.sel.de Tel: +49 711 821 3841
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads