Article View: comp.lang.modula2
Article #4571Re: C++ vs. Modula2
From: Piet van Oostrum
Date: Mon, 16 Jan 1989 08:54
Date: Mon, 16 Jan 1989 08:54
38 lines
1806 bytes
1806 bytes
In article <INFO-M2%89011219330825@UCF1VM>, alk@UX writes: `As was recently observed in the info-pascal mailing list, optimization -> `conditional compilation. Consider: ` . ` : ` CONST ` . ` : ` OpSys = VMS; ` . ` : ` IF OpSys = VMS THEN ` DoVMSStuff ` ELSE ` DoOtherOSStuff; ` . ` : ` `All but the most inanely STUPID of compilers will completely eliminate the `unreachable code. This only helps for statements, not for declarations. ` `>Allocation of space for records (particularily alignment) is unclear in Modula. `>Operating system calls frequently return pointers to records with some `>operating system defined layout. Mapping these on Modula records is, due to `>alignment, compiler dependent. This is also true for C. I had a problem recently on our HCX/UX system where the compiler insists on aligning a lot, and where this gave problems in one of the COFF format structs, that have a long word not aligned on a four-byte boundary. I could get along with hacking a short in front of it and reading/writing the second to last fields. -- Piet van Oostrum, Dept of Computer Science, University of Utrecht Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!hp4nl!ruuinf!piet)
Technical Details
Message-ID:
<981@ruuinf.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!hp4nl!ruuinf!pietReferences:
<INFO-M2%89011219330825@UCF1VM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!hp4nl!ruuinf!piet From: piet@ruuinf (Piet van Oostrum) Newsgroups: comp.lang.modula2 Subject: Re: C++ vs. Modula2 Message-ID: <981@ruuinf.UUCP> Date: 16 Jan 89 08:54:26 GMT References: <INFO-M2%89011219330825@UCF1VM> Sender: piet@ruuinf.UUCP Reply-To: piet@ruuinf (Piet van Oostrum) Organization: Dept of Computer Science, University of Utrecht, Holland Lines: 38 In-reply-to: alk@UX.ACSS.UMN.EDU