Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!batcomputer!itsgw!steinmetz!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.lang.c Subject: Re: On Portability Message-ID: <311@auspex.UUCP> Date: 26 Oct 88 20:23:44 GMT References: <4700026@m.cs.uiuc.edu> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 19 >Someone posted that we're dealing with two different definitions of >portability here. Yes, one could, in theory, expect that all >compilers will comply with some standard, either the _de facto_ one >presented in K&R, or the dpANS. The fact remains that some do *not*, >and there are a few easily identified areas where a *number* of >compilers have trouble. Let's hope here will be ANSI C test suites when the standard comes out, so that in the future compilers that have trouble on these things will be caught and, hopefully, fixed.... > - It is unwise to depend on integer+pointer and its friends >working correctly. K&R is clear on this, if you read carefully; >several compiler writers have not been so careful. Do you mean "interger+pointer" as opposed to "pointer+integer"? Addition is generally commutative, and if a compiler can't handle "pointer+integer", it is unwise to purchase that compiler; "pointer+integer" is a quite widespread construct in C code.