Path: utzoo!mnetor!uunet!husc6!purdue!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: "the integer constant zero" Message-ID: <10976@mimsy.UUCP> Date: 8 Apr 88 16:30:57 GMT References: <570@mtxinu.UUCP> <10747@mimsy.UUCP> <7507@brl-smoke.ARPA> <1032@mcgill-vision.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 32 >In article <10754@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >>[...] the integer constant `0' in a pointer context [...]. What is >>`the integer constant 0'? In article <1032@mcgill-vision.UUCP> mouse@mcgill-vision.UUCP (der Mouse) writes: >"the integer constant zero" is not necessarily the same as "an integer >constant expression zero". My copy (or rather, Fred's copy, which I borrowed) of the draft standard is Elsewhere at the moment, but what was `clear' to me (constant 0 => expression that evaluates as a constant and to 0) was apparently `clear' to X3J11 as well, because that was what the draft said. Now, however, there seems to be some sentiment to rephrase it. Among other problems, int *p; p = 1 ? (void *)0 : (void *)0; is not quite legal, even though p = 1 ? 0 : 0; is! This sort of nasty fiddly detail is what makes getting standards right so hard. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris