Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!paris.Berkeley.EDU!mcgrath From: mcgrath@paris.Berkeley.EDU (Roland McGrath) Newsgroups: comp.std.c++ Subject: Re: "packed" objects (Oops! Forgot something!) Message-ID: Date: 2 Aug 90 06:14:43 GMT References: <56159@microsoft.UUCP> <56165@microsoft.UUCP> <6785@netxcom.DHL.COM> <6786@netxcom.DHL.COM> Sender: news@pasteur.Berkeley.EDU Organization: Hackers Anonymous International, Ltd., Inc. (Applications welcome) Lines: 30 In-reply-to: meissner@osf.org's message of 1 Aug 90 23:13:16 GMT In article meissner@osf.org (Michael Meissner) writes: Hmm, don't you care about compatibility with things like system calls? I imagine the grief people would get if the stat structure got rearranged because some OS jock added a byte field at the end of the structure? Yes, extern "C" can be used, but it just means that there are even more things to worry about getting right. If you don't declare the `stat' function inside `extern "C"', it won't necessarily work right anyway. Using: extern "C" { #include } seems entirely reasonable to me. Also, it would seem to me that reordering things across class boundaries is a really bad idea -- then subclassing and virtual functions would have no chance of working. If it is not feasible to reorder members across class boundaries and still do subclassing and virtual functions right then noone will try to do it in their implementation. That doesn't mean the standard should prevent people from trying if they want to. -- Roland McGrath Free Software Foundation, Inc. roland@ai.mit.edu, uunet!ai.mit.edu!roland