Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!ll-xn!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.UUCP Newsgroups: comp.lang.c Subject: Re: NULL, zero, and readable code Message-ID: <6090@brl-smoke.ARPA> Date: Thu, 9-Jul-87 02:15:27 EDT Article-I.D.: brl-smok.6090 Posted: Thu Jul 9 02:15:27 1987 Date-Received: Sat, 11-Jul-87 16:36:13 EDT References: <8170@brl-adm.ARPA> <13222@topaz.rutgers.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <13222@topaz.rutgers.edu> ron@topaz.rutgers.edu (Ron Natalie) writes: >What does ANSI C say about -0 on ones complement machines? It's not specifically addressed as a -0 issue. However, enough rules for the abstract machine arithmetic are provided to resolve practically any question concerning -0 in various contexts. Note that on reasonable 1's complement architectures, one does not get a -0 as the result of a series of arithmetic operations unless one of the original operands were -0, which in C would have to be written as a bitlike entity (e.g. ~0 or 0xFFFF). The C source expression "-0" (without the quotes) means 0, not -0.