Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: absence of max Date: Sat, 10 Dec 2016 13:37:48 -0800 Organization: None to speak of Lines: 20 Message-ID: References: <0e1db67d-0ab8-4971-a319-8aa66a40b873@googlegroups.com> <71c8962e-b06e-44a5-8bda-a79d8cda48e5@googlegroups.com> <71b11aaa-478e-4b1a-9411-e27093a58ab8@googlegroups.com> <87mvgagff0.fsf@bsb.me.uk> <874m2gh2u7.fsf@bsb.me.uk> <9c2f3c5e-e665-4103-bac2-0a43d69efa2f@googlegroups.com> <53bb03c6-64ab-479d-89dc-844f10b8e9e9@googlegroups.com> <2f4f2ac9-1378-4542-a25a-b537d4a52b04@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="d3e5cee4cb06db8dd070f0b5a238435d"; logging-data="28874"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lTjIVZ0DIAWDvBSqlB3F1" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:UQo5IBcNM6mWn21ehIGdEdbyapQ= sha1:5lmeyAz3JkIq5Lv0SCaQi53h5iE= Xref: csiph.com comp.lang.c:98735 Tim Rentsch writes: > Keith Thompson writes: >> [...] Types smaller than int whose range is a subrange >> of int are promoted to int. Types smaller than int whose range >> includes values exceeding INT_MAX are promoted to unsigned int. >> For example, if both unsigned short and short are the same width, >> unsigned short arguments are promoted to unsigned int, not to int. > > I'm not sure what you're trying to say here. It is of > course possible for unsigned short and short to have the > same width, yet have unsigned short promote to int and > not to unsigned int. I meant to write "if unsigned short and int are the same width". -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"