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-7-bit Path: g2news2.google.com!news2.google.com!goblin3!goblin.stu.neva.ru!news.tu-darmstadt.de!news.belwue.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 19 Apr 2011 22:08:30 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Fun with C 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> <37428a21-61b4-4cdf-9897-7b84252f8fce@a11g2000pro.googlegroups.com> <4dab6906$0$6893$9b4e6d93@newsspool2.arcor-online.net> <57a1fa4b-4730-41a8-be8a-82061ef9dc22@x37g2000prb.googlegroups.com> <4daca6ba$0$6773$9b4e6d93@newsspool3.arcor-online.net> <8dbc6e36-3f53-4a44-8b3e-7dcf5964b6f2@w36g2000vbi.googlegroups.com> <18411d69-7485-4c04-b61c-f4aef55d5579@hg8g2000vbb.googlegroups.com> In-Reply-To: <18411d69-7485-4c04-b61c-f4aef55d5579@hg8g2000vbb.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4dadebbe$0$7667$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 19 Apr 2011 22:08:30 CEST NNTP-Posting-Host: 037f86f8.newsspool1.arcor-online.net X-Trace: DXC=TejVXYolXk@e>@J[H2dG[Enj<2W X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:19878 Date: 2011-04-19T22:08:30+02:00 List-Id: On 4/19/11 9:34 PM, George P. wrote: > We simply follow the styling described here. I don' know of any > checker for LM JSF. MISRA would be too strict for our needs. It is an > imaging device with built-in AI. Shamelessly pasting your original example into the DIY box at Gimpel Software, without triggering anything related to MISRA, it gives: FlexeLint for C/C++ (Unix) Vers. 9.00f, Copyright Gimpel Software 1985-2010 --- Module: diy.c (C) 1 /* Enter your C code here - you can delete this line. */ 2 3 4 #include 5 6 int main() 7 { 8 unsigned n = 128; 9 int i = -2048; 10 int r; 11 _ 12 r = i / n; diy.c 12 Warning 573: Signed-unsigned mix with divide diy.c 12 Info 737: Loss of sign in promotion from int to unsigned int diy.c 12 Info 713: Loss of precision (assignment) (unsigned int to int) 13 14 printf("R = %d\n", r); 15 16 return 0; 17 }