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-Language: ENGLISH,ASCII X-Google-Thread: 103376,17e99293e94a7e6f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-31 08:44:03 PST Message-ID: <3E11C888.1060102@cogeco.ca> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Another ammunition References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 31 Dec 2002 11:40:40 -0500 NNTP-Posting-Host: 198.96.47.195 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1041352841 198.96.47.195 (Tue, 31 Dec 2002 11:40:41 EST) NNTP-Posting-Date: Tue, 31 Dec 2002 11:40:41 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:32410 Date: 2002-12-31T11:40:40-05:00 List-Id: Jean-Pierre Rosen wrote: > "Eric G. Miller" a �crit dans le message news: IpfQ9.4953 >>>It took a week to understand what was happenning. Would not have passed the >>>first compilation in Ada. FWIW... >> >>You're right, but I'm sure gcc could have immediately diagnosed the >>problem had you turned up the warnings ("conflicting types for...", "previous >>declaration of ..."). > > Warnings were on, he just overlooked them.... > That's what makes a huge difference between a warning which is up to the good will of the compiler (and the programmer paying > attention to it), and a *required* compile time error! > > (count that as another moral of the story). Things may be different now, but I once had a long email discussion with one of the folks about whether a missing return "type" should be a warning or not (it should actually be an error). At the time, you had to specify a compile option to make a declaration like: foo() { ... } return a warning. It should be something like: int foo () { ... } if it does indeed return int. Well, he didn't like the idea of the warning being on by default, and so people continue to get burned by this very problem. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg