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: Thu, 30 May 2019 14:15:48 -0700 Organization: None to speak of Lines: 18 Message-ID: References: <87sgt339na.fsf@bsb.me.uk> <80470a36-78de-417f-bc75-a7966c87b31e@googlegroups.com> <9cbcea67-85a8-4de3-ac01-04922ba5fc74@googlegroups.com> <7cff3be5-0432-4a90-92ed-50c74cc1eb6b@googlegroups.com> <87y32oj208.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="12abe26c90a56a4d813a45bedf6a8101"; logging-data="22916"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/w+f9Aji377Syk5GFrVxU6" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:39NNRebArTc75biCZS9f/OnsCBU= sha1:N0sb2iJz+eh3eRch8ZU4cYbxAgQ= Xref: csiph.com comp.lang.c:144157 Bart writes: [...] > It seems reasonable. That u8+u8 produces a signed result is > counter-intuitive and surprising. (My table was produced by turning > results of assorted calculations into floats, but that can't pick up > u8+i8->i32. I know see I should have used generics.) > > What I had always assumed (wrongly) was that mixed sign arithmetic was > done as unsigned, irrespective of widths: [...] You could have saved yourself a lot of time and trouble if you had just read the relevant part of the C standard. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */