Xref: utzoo comp.os.os9:224 comp.lang.c:13648 Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.os.os9,comp.lang.c Subject: Re: Bugs in OS9/68K C-Compiler ? Message-ID: <338@auspex.UUCP> Date: 28 Oct 88 04:23:02 GMT Article-I.D.: auspex.338 References: <147@fbihh.UUCP> <636@tuvie> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 15 >For the 'return 0 != ptr' problem : I don't know why, but 'return ptr != 0' >works. Apparently the compiler automatically casts integers to pointers >on comparisons but doesn't cast pointers to integers. I don't know what >K&R says to this case. K&R say that both 0 != ptr and ptr != 0 should cause 0 to be cast to the type of the pointer "ptr". It should not cast "ptr" to "int" in *either* case.