Xref: utzoo comp.arch:5009 comp.lang.c:10455 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!ukma!uflorida!novavax!proxftl!bill From: bill@proxftl.UUCP (T. William Wells) Newsgroups: comp.arch,comp.lang.c Subject: Re: negative addresses Summary: ANSI fixes that Message-ID: <226@proxftl.UUCP> Date: 27 May 88 21:09:26 GMT References: <2393@uvacs.CS.VIRGINIA.EDU> <21541@amdcad.AMD.COM> <4086@gryphon.CTS.COM> Organization: Proximity Technology, Ft. Lauderdale Lines: 31 In article <4086@gryphon.CTS.COM>, sarima@gryphon.CTS.COM (Stan Friesen) writes: ) There *are* cases of code that does make such assumptions. ) They all have the following general form: ) ) func1(p) ) char *p; ) { ) /* stuff */ ) } ) ) ... ) ) func2() ) { ) ... ) func1(0); ) } ) ) In this example the code assumes both the representation *and* the ) size of NULL-pointer. This code is *not* portable even among existing ) compilers. Nor is it even conforming, let alone strictly so. Any code of ) this form only works accidentally and needs to be fixed anyway. ) -- ) Sarima Cardolandion sarima@gryphon.CTS.COM ) aka Stanley Friesen rutgers!marque!gryphon!sarima Actually, if you are using Standard C, declare func1 with a prototype and the problem goes away. Prototypes were invented to (among other things) solve this kind of problem. Perhaps this is what you intended to say?