home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / g / bug / 2308 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.6 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!us-es.SEl.DE!dcb
  2. From: dcb@us-es.SEl.DE (David Binderman 3841)
  3. Newsgroups: gnu.g++.bug
  4. Subject: Section 10.10C of the ARM & GNU G++ 2.3.3
  5. Date: 21 Jan 1993 18:24:45 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 47
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-g++@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <9301211718.AA06537@slsvitt>
  12.  
  13. Hello there,
  14.  
  15. I have GNU G++ 2.2.2 and GNU G++ 2.3.3 on a Sun 4 SPARC. I have tried out
  16. both compilers with the code from Section 10.10C of the ARM page 233
  17.  
  18. 2.2.2 produced the following
  19.  
  20. BW:f()
  21. MW:g()
  22. BMW::h()
  23. BW:f()
  24.  
  25. 2.3.3 produced the following 
  26.  
  27. W::f()
  28. W::g()
  29. BMW::h()
  30. BW:f()
  31.  
  32. It seems that 2.2.2 is correct, but 2.3.3 is not.
  33.  
  34. The following memory layout seems to be used by both 2.3.3 and 2.2.2
  35.  
  36. BMW::BMW()
  37. sizeof 28
  38. 0xf7fff858 0xf7fff86c
  39. 0xf7fff85c 0x3
  40. 0xf7fff860 0xf7fff86c
  41. 0xf7fff864 0x2
  42. 0xf7fff868 0x4
  43. 0xf7fff86c 0x1
  44. 0xf7fff870 0x40b0
  45.  
  46. I note with interest only one vtbl pointer. The ARM suggests, but does
  47. not require, that there are three vtbl pointers in a BMW class. I
  48. checked with cfront 3.0 and another C++ compiler, and they both agreed
  49. that there can be three vtbl pointers in a BMW.
  50.  
  51. While I accept and recognise that different implementation strategies
  52. of language features are permitted, it is not clear to me that two missing
  53. vtbl pointers is a feature or a bug. I would appreciate your opinion.
  54.  
  55. Regards
  56.  
  57. David C Binderman     Dept US/ESI, Bau 60, SEL-Alcatel AG, Lorenz Strasse 10,
  58. D-7000 Stuttgart 40, Germany      dcb@us-es.sel.de   Tel: +49 711 821 3841
  59.  
  60.