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,a88e582de42cdc9b X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!s12g2000prg.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Bug in Ada (SuSe 10.2) ? Date: Fri, 22 Feb 2008 08:43:30 -0800 (PST) Organization: http://groups.google.com Message-ID: <3d581048-23bb-44f2-915c-02386b5c3b40@s12g2000prg.googlegroups.com> References: <48277611-402f-4622-be05-6edddf6dd56a@o10g2000hsf.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1203698611 32433 127.0.0.1 (22 Feb 2008 16:43:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 22 Feb 2008 16:43:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s12g2000prg.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19977 Date: 2008-02-22T08:43:30-08:00 List-Id: On Feb 20, 4:55 pm, tmo...@acm.org wrote: > > > The simple explanation is that GNAT, by default, is not an Ada compiler. > > will not be an Ada compiler until they finally get the Last Bug out, > > Technically it's an Ada compiler if and only if it passes the > validation tests, and the default Gnat therefore isn't an Ada compiler, > and shouldn't be advertised as one. If it its bugs were sufficiently > obscure they are not detected by the validation tests, then it would be an > Ada compiler. Unfortunately, I don't think "not detected by validation tests" implies "obscure". I have seen *many* cases where someone allegedly writes a library or tool in Ada and makes the source publicly available, but it turns out the program really isn't written in Ada at all, because it contains constructs that the Ada standard prohibits, but were not caught because of GNAT bugs that let them slip through. So then code that the authors claim is Ada, but really isn't, gets posted on the Internet, and then someone else tries to compile it with a different vendor's compiler and that compiler properly rejects it. I don't know what happens after that, or how many users may have tried downloading quasi-Ada code, tried to compile it with some compiler, run into problems, and given up. But a bug that affects real code like this, particularly real code that is intended for many users to use, probably shouldn't be considered "obscure". > More importantly, how many times have we seen postings here from people > new to Ada saying "I heard about Ada, this supposedly highly safe > language, but it doesn't even catch an overflow, though the manual claims > it does."? vs How many times have people new to Ada posted messages > asking about some obscure compiler bug they've stumbled across. OK, this claim has been made (or implied) several times now---an implication that the -gnato issue causes a lot more complaints than supposedly obscure compiler bugs. After thinking about this, I'm not convinced that this is true. Not that I have the time to do a study. But it seems to me that there have been several threads in recent months where someone couldn't figure out why their program didn't work and it the answer seemed to be that it should have worked but the compiler muffed it. (The compiler isn't always GNAT, and sometimes it's not identified.) If I had to guess, I'd say this has come up once every couple months at least, in recent months. I don't recall questions about integer overflow coming up significantly more than that. But I could have just missed them. This just my vague impression and isn't based on a methodical study. After this discussion, I'm convinced that GNAT got the -gnato default wrong (although maybe it's right for certain target processors) and I can see the practical problems it causes. (I'm less convinced about stack checking.) But it still seems a bit pointless, and/or overly pedantic, to claim that this makes GNAT "not an Ada compiler" when those flags aren't used. Of course, it was probably pointless for me to even argue about that in the first place. But what would Usenet be without pointless arguments? -- Adam