From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a9b0810d3106d9b8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!a11g2000pro.googlegroups.com!not-for-mail From: KK6GM Newsgroups: comp.lang.ada Subject: Re: Fun with C Date: Sun, 17 Apr 2011 09:15:55 -0700 (PDT) Organization: http://groups.google.com Message-ID: <37428a21-61b4-4cdf-9897-7b84252f8fce@a11g2000pro.googlegroups.com> References: <27cf3992-4132-4483-9110-adc7a089cd4a@e8g2000vbz.googlegroups.com> <54108d8d-4e7c-4901-bd5e-819d27720d48@a11g2000pro.googlegroups.com> <4daa8fc6$0$7652$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: 71.137.110.174 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1303056955 18606 127.0.0.1 (17 Apr 2011 16:15:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 17 Apr 2011 16:15:55 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a11g2000pro.googlegroups.com; posting-host=71.137.110.174; posting-account=qZVz2QoAAAAN9WxYp-9jYb7jORc4Zqwt User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19806 Date: 2011-04-17T09:15:55-07:00 List-Id: On Apr 16, 11:59=A0pm, Georg Bauhaus wrote: > On 4/17/11 8:26 AM, KK6GM wrote: > > > Wow and wow. =A0I've been writing C all my adult life and I didn't > > realize this could or would happen. =A0I would have said that the > > unsigned would be promoted to signed. > > > I'm going to include this example in my push to use Ada in our next > > project. > > Be careful that there are no C savvy people around. > You are demonstrating a lack of understanding of C basics! > ("Stupid!") > That lack is not (in their view, and it's their view that counts) > a good start for asking for a different language. > > Had you read section 2.7 of K&R (or A.6), you'd have expected > the result you got: arithmetic operators will convert their > arguments following the rules of the C language definition. Yes, I understand how the "stupid" argument works in the C community. I'm going to ask some other programmers tomorrow and see how many of them get this right. I'm guessing our situation will be similar to the situation at the OP's workplace, where presumably competent programmers still got clobbered by this language-legal insanity.