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,b49d3a703a4b4db5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: compiler settings in AdaGIDE Date: Fri, 23 Jul 2010 17:01:45 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <95bd10c9-8747-4f02-b20b-8d4244465949@5g2000yqz.googlegroups.com> <4c49ad26$0$6880$9b4e6d93@newsspool2.arcor-online.net> <4c49b3ca$0$6891$9b4e6d93@newsspool2.arcor-online.net> <15zdr0krml9tr$.qbarnnt3uw4e$.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1279918888 24156 192.74.137.71 (23 Jul 2010 21:01:28 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 23 Jul 2010 21:01:28 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:fFIhlAP1gRj1/TtuptAP54grDGM= Xref: g2news1.google.com comp.lang.ada:12510 Date: 2010-07-23T17:01:45-04:00 List-Id: "Dmitry A. Kazakov" writes: >> Well, not really. If you don't say -gnato, then GNAT is implicitly >> assuming "pragma Suppress(Overflow_Check);". > > Objection. Ada compiler should not assume anything not explicitly > specified. I agree 100%. Overflow checks should be on by default, and you should have to do something explicit to turn them off. But we were talking about standard conformance, which is not quite the same as what compilers "should" do. >... Example: what about assuming > > raise Program_Error; > > at each even source line? Well, so long as there's an option to turn that malfeature off, it's standard conforming. But it's not a good idea, and the users of that compiler (if there are any) will complain loudly. ;-) - Bob P.S. I work for AdaCore, so I should note that my opinion that overflow checks should be turned on by default is my own personal opinion. AdaCore disagrees. The reason is that they are fairly expensive.