Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Abstract Syntax Tree for C programs Date: Fri, 31 May 2019 13:14:05 -0700 Organization: None to speak of Lines: 24 Message-ID: References: <9cbcea67-85a8-4de3-ac01-04922ba5fc74@googlegroups.com> <7cff3be5-0432-4a90-92ed-50c74cc1eb6b@googlegroups.com> <87y32oj208.fsf@bsb.me.uk> <87ftovit58.fsf@bsb.me.uk> <7H8IE.30270$KA4.16962@fx05.iad> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="75605edc6d5df8cff0a246a2f96c1385"; logging-data="4730"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2SS7UigTCtTIhOo/HX8IY" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:d4XLdGoU/LNBaBm2XbwXMjILEbc= sha1:Om0VLvirE2WvgauQOO/eoFRxvQg= Xref: csiph.com comp.lang.c:144232 Richard Damon writes: [...] > When the committee had to decide what to do, they had 3 main choices for > the type of unsigned op signed, make it unsigned, make it signed, leave > it unspecified/implementation dependent. They wrestled with this > decision, and decided that unsigned preserving was the best choice. Many > people disagreed with that choice, but many would have disagreed with > any choice they made, and not making a choice, would have been the > choice that most would have disagreed with. Correction: C's rules (since ANSI C89) are value preserving, not unsigned preserving. For example, adding two unsigned char or unsigned short values yields a (signed) int result (if UCHAR_MAX <= INT_MAX or USHRT_MAX <= INT_MAX, respectively). See the C99 Rationale, section 6.3.1.1. http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */