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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,17e99293e94a7e6f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-01 09:05:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.nacamar.de!news.belwue.de!newsfeed.arcor-online.net!news.arcor.de!not-for-mail From: als@usenet.thangorodrim.de (Alexander Schreiber) Newsgroups: comp.lang.ada Subject: Re: Another ammunition References: Organization: Not all that much Reply-To: als@usenet.thangorodrim.de Message-ID: User-Agent: slrn/0.9.6.2 (Linux) Date: Wed, 1 Jan 2003 17:58:21 +0100 NNTP-Posting-Date: 01 Jan 2003 18:05:14 MET NNTP-Posting-Host: 145.254.189.139 X-Trace: DXC=:YZF30QU5b\OXiUWIo>?aR^P X-Complaints-To: abuse@arcor-online.net Xref: archiver1.google.com comp.lang.ada:32435 Date: 2003-01-01T18:05:14+01:00 List-Id: AG wrote: >> Jean-Pierre Rosen wrote: > >> -ansi -Wall -pedantic -Wtraditional -Wpointer-arith -Wshadow >> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual >> -Waggregate-return -Wmissing-declarations -Wnested-externs -Winline >> -Werror -W > >> Forces you to fix the simple bugs to even get your code to compile >> (leaving you to be more creative in creating tricky logic bugs). > >That's an interesting example. All those switches needed >to force you to "fix the simple bugs"? "simple bugs" == stuff the compiler can find, like trying to write into constants, type mismatches (returning ints but expecting floats), tyops (like a forgotten ";") and the like. Still leaves you free to add buffer overruns, off-by-one errors and so on to your hearts content ;-) >How many people >would you think would bother with all the switches? >And not make a mistake of omitting one? Very few. I've seen enough projects that simply dump stdout and stderr of the compiler into /dev/null during the compile stage - probably to keep the user installing this software from seeing gcc complain about the ugly C he is fed. The long list of compiler switches above came from a programming assignment I once did - I tried to force gcc into the most anal retentive mode possible to avoid leaving stupid and simple coding errors in the project. It helped. >Even more importantly, how do you know *you* haven't >missed one or two? Sure, there are manuals (or are there? >or are the manuals complete and up to date? etc etc) but >even then, setting up all those switches is surely subject >to human error. Isn't it better to just have all of that built >right into the language which compiler is required to enforce? I'm not trying to argue that you should drop Ada and use C instead - there are more than enough misguided zealots of this kind already around. IMHO, the digital world would most likely be a slightly safer place if more software were written in Ada instead of C (and some obnoxious software wouldn't be written at all - good riddance). For me, Ada is an interesting and powerful language - but I still need to find the time to do more than write the canonical "Hello world" in Ada. Regards, Alex. -- "Opportunity is missed by most people because it is dressed in overalls and looks like work." -- Thomas A. Edison