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,7001494ace46eea7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-19 02:26:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!b9dc2.pppool.DE!not-for-mail From: Dmitry A.Kazakov Newsgroups: comp.lang.ada Subject: Re: Overriding discriminants perplexes GNAT 3.14p Date: Thu, 19 Sep 2002 23:34:18 +0200 Message-ID: References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: b9dc2.pppool.de (213.7.157.194) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1032427615 4664856 213.7.157.194 (16 [77047]) User-Agent: KNode/0.4 Xref: archiver1.google.com comp.lang.ada:29155 Date: 2002-09-19T23:34:18+02:00 List-Id: Stephen Leake wrote: > Dmitry A.Kazakov writes: > >> People rightly criticize MS VC++, but the situation with Ada >> compilers isn't much better. > > Yes it is (in my experience). I've found bugs in _every_ compiler I've > ever used. At least with GNAT I have a chance of getting them fixed! First of all there are bugs and bugs. GNAT is at least ten years old, so I would expect that one could not catch it on such primitive things. What you are talking about is merely a quality of support, which is a very important but yet another thing. Moreover, from what Robert Dewar said before his departure, it looks like excellent and thus expensive support actually harms quality. ACT intentionally limits the number of GNAT users by those with very deep pockets and applications which do not require all stregths of Ada. Should GNAT Pro be affordable for small and medium sized projects, then Ada would be applied much more wider with so terrifying ACT consequence of an increasing support demand. > And they are in more and more obscure corners of the language as time > goes on and more testing is done. MS VC++ bugs are in the core of the > language, and they have no problem with not being standard-compliant, > and they introduce new bugs with every release. > >> I judge from my experience with GNAT and Object Ada. > > GNAT is better than Object Ada I wouldn't say that. From my sad experience [I was forced to create a small validation site] Object Ada compiles many examples which perplexe GNAT. It also makes a better code. The major problem with Object Ada is that it sometimes hangs and sometimes joyfully generates nonsense, especially when it tries to optimize return statements with controlled types. >> It is a permanent battle of finding work-arounds for countless > > Hmm. I have a record of all the bugs I've submitted. Total is 24, over > 3 years. And that includes some Emacs Ada-mode bugs. Hardly "countless"! > >> compiler bugs. Is there any good Ada compilers since DEC gone? > > DEC was good. GNAT is better! And yes, I _did_ find bugs in the DEC > Ada compiler. Lucky one (:-)). For five years GNAT was unable to compile my program in Ada 83 written for DEC Ada. [I must admit, I slightly overused generics there] Yes *now* GNAT is better than DEC Ada that time. Though there is nothing comparable with LSE and DEC debugger. But what if mismanagement and "new economy" didn't kill DEC? > Compilers are _extremely_ complicated systems. It is _not_ possible to > ensure they have no bugs. > > Please report your bug to report@gnat.com, following the instructions > in the GNAT BUG box. Or let me know, and I'll do it. It is better if you do that, because you are working with 3.15. Here is a pair of "gems" from my collection: 1. The requeue statement is abortable, while it should not be: package Objects is protected Object is entry Point1; entry Point2; end Object; end Objects; ------------ package body Objects is protected body Object is entry Point1 when True is begin requeue Point2; end Point1; entry Point2 when False is begin null; end Point2; end Object; end Objects; ------------ with Ada.Text_IO; use Ada.Text_IO; with Objects; procedure Test is begin select delay 2.0; then abort Objects.Object.Point1; end select; Put_Line ("Never be here, because Point1 isn't abortable"); end Test; ------------- 2. Circular requeue hangs at run-time under Linux: package Objects is protected Object1 is entry Point1; entry Point2; end Object1; protected Object2 is entry Point1; end Object2; end Objects; ------------ package body Objects is protected body Object1 is entry Point1 when True is begin requeue Object2.Point1; end Point1; entry Point2 when True is begin null; end Point2; end Object1; protected body Object2 is entry Point1 when True is begin requeue Object1.Point2; end Point1; end Object2; end Objects; ------------ with Ada.Text_IO; use Ada.Text_IO; with Objects; procedure Test is begin Objects.Object1.Point1; Put_Line ("That's OK"); end Test; -- Regards, Dmitry Kazakov www.dmitry-kazakov.de