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-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!news.addix.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!post.news-service.com!news1.surfino.com!not-for-mail Message-Id: <2826628.d8srykTIx7@linux1.krischik.com> From: Martin Krischik Subject: Re: [OT] Re: Teaching new tricks to an old dog (C++ -->Ada) Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Followup-To: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Reply-To: martin@krischik.com Date: Sat, 05 Mar 2005 17:42:00 +0100 References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> Organization: None User-Agent: KNode/0.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@surfino.com NNTP-Posting-Host: 83.169.175.19 (83.169.175.19) NNTP-Posting-Date: Sat, 05 Mar 2005 18:00:12 +0100 X-Trace: bccfa4229e59cf60c0ab629704 Xref: g2news1.google.com comp.lang.ada:8654 comp.lang.c++:44178 comp.realtime:939 comp.software-eng:4470 Date: 2005-03-05T17:42:00+01:00 List-Id: He Peter, Peterath Larsen wrote: > Out of curiosiy, could you give some few examples where Ada catches faults > not found by a C++ compiler. I assume - of course - code written in modern > C++: no casts, functions instead of macroes, a limited use of pointers and > so on. Well that's easy: unsigned int X = -1; char Y [10]; Y [10] = "X"; Or bit more subtle: unsigned int X Day_Of_Month = 32; Now, here as examples all bugs are easy to spot and the compiler might even show a warning. But now imagine the same with say 200 lines of code in between - or declaration in one file and assignment in another - and prehaps a function call instead of an constant expression - and you find yourself having fun with a debugger. Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com