Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Whose code should we break? ( was Re: 64 bit C ) Message-ID: <15268@smoke.brl.mil> Date: 20 Feb 91 22:47:15 GMT References: <11285@pasteur.Berkeley.EDU> <1991Feb20.050525.6515@kithrup.COM> <5768:Feb2020:29:0091@kramden.acf.nyu.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 18 In article <5768:Feb2020:29:0091@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >I find it strange that the standard insisted that some integral type be >big enough for a pointer. That rule is entirely useless without a way to >figure out what the integral type is. No, but it does mean that strictly conforming programs should not make assumptions here. If you want to print a pointer value as an integer rather than using %p, I suggest casting it to long (or unsigned long). %p is better, if you can assume that you have a conforming implementation. For generic pointer arithmetic, char* is better than any integral type. >Why did ANSI restrict the >implementor without giving the programmer anything in return? Many people wanted such a guarantee. I agree that it isn't all that useful in practice.