Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!petergo From: petergo@microsoft.UUCP (Peter GOLDE) Newsgroups: comp.lang.c++ Subject: Re: Byte padding question Message-ID: <57251@microsoft.UUCP> Date: 7 Sep 90 17:11:22 GMT References: Reply-To: petergo@microsoft.UUCP (Peter GOLDE) Distribution: comp Organization: Microsoft Corp., Redmond WA Lines: 15 In article keving@r4.uk.ac.man.cs (Kevin Glynn) writes: > When building a class hierarchy in C++ we found that some >extraneous char's were being inserted into the C structure produced by >the AT&T front end. After writing a fairly large test program it was >found that these bytes were only being generated (at least in our >tests) when an empty class (methods only, no member variables) was the Off the top of my head, I'd guess that cfront was trying to conform with section 5.3.2 of the language standard: "The size of any class or class object is larger than zero." Obviously there would be ways to conform with this that do not waste space in derived classes, but I don't believe cfront does them. --Peter Golde I speak for myself only -- not Microsoft.