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,f822ae7b0f7433c1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!v45g2000cwv.googlegroups.com!not-for-mail From: "Talulah" Newsgroups: comp.lang.ada Subject: Re: Translating an embedded C algorithm -- OT Date: 18 Jan 2007 00:56:11 -0800 Organization: http://groups.google.com Message-ID: <1169110571.673281.275410@v45g2000cwv.googlegroups.com> References: <1168871816.263502.212100@11g2000cwr.googlegroups.com> <45ace573$1_3@news.bluewin.ch> <68qioe.mes.ln@hunter.axlog.fr> <1168963927.396654.169380@s34g2000cwa.googlegroups.com> NNTP-Posting-Host: 212.248.198.150 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1169110577 7346 127.0.0.1 (18 Jan 2007 08:56:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 18 Jan 2007 08:56:17 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 ukman005.uk.landisgyr.com:3128 (squid/2.5.STABLE10) Complaints-To: groups-abuse@google.com Injection-Info: v45g2000cwv.googlegroups.com; posting-host=212.248.198.150; posting-account=z8Bf2AwAAACTha-0EcZ9lFjw3-dKgDhx Xref: g2news2.google.com comp.lang.ada:8245 Date: 2007-01-18T00:56:11-08:00 List-Id: Cesar Rabak wrote: > Maciej Sobczak escreveu: > > Cesar Rabak wrote: > > > >> Would you believe that: > >> > >> if (a = 1) { > > > >> Is semantically valid C, but because it is very easy to mistake this > >> when the intended was: > >> > >> if (a == 1) { > > > >> That there are tools to look for and signal this!? > > > > No need for separate tools, gcc -Wall issues an informative warning. > > And you do compile with -Wall, right? > > > Not all C code is compiled [only] with gcc... Quite right Cesar! I guess very little EMBEDDED code is compiled with GCC. This is why in our company we have a rule that code must first pass through Lint (which would catch that error) before being peer code reviewed!