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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Simple loop with a strange output Date: Fri, 24 May 2013 08:21:59 +0100 Organization: A noiseless patient Spider Message-ID: References: <7cd707ce-ebc5-4df1-9ec3-4f99ce87a07d@googlegroups.com> <96af9cd4-3368-4866-a38e-2514a0a7a54d@googlegroups.com> <9d131b52-1fe8-4fcb-bb99-c034cefadeee@googlegroups.com> <17520a7b-5d05-43d1-bee6-90127a1365f0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="720834a9e3ef3094259fa78805e56e66"; logging-data="16712"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FGa7Eg6JHqR9WRXrjKKrg/2VyrCAxx1o=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:GufoIBoBzTX1fJJftrz0E6ep1kI= sha1:3XCnMg6aZpdDU9fGBCTWs8IpLiE= X-Original-Bytes: 3092 Xref: number.nntp.dca.giganews.com comp.lang.ada:181737 Date: 2013-05-24T08:21:59+01:00 List-Id: "Randy Brukardt" writes: > "Simon Wright" wrote in message > news:lyppwh8x9y.fsf@pushface.org... >> Luca Cappelletti writes: >> >>> do you know why the overflow checking is off by default? >> >> The explanation is here: >> http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Controlling-Run_002dTime-Checks.html#index-g_t_0040option_007b_002dgnato_007d-_0028_0040command_007bgcc_007d_0029-595 >> >> or here, if that link got broken: http://goo.gl/ffIjp > > That's the official line, but I think if you asked most people at > AdaCore today, they'd tell you that it was a mistake. > > But mistakes like this one aren't really fixable, because of all of > the existing code that would be at risk of breaking if they changed > the default. (That code would technically be wrong, but I doubt that > would be much consolation if it meant that the train refused to stop.) > > This sort of thing is going to happen in any compiler that's been > around a while. There are certainly defaults in Janus/Ada that I > wouldn't make the default today, but breaking existing projects isn't > really an option, so such changes hardly ever are made. And most of us would agree that it was a mistake, too. All my projects (free, and the ones I used to be paid for) use -gnato by default. They don't use -fstack-check, because it wasn't reliable when I was working out the project settings (and I could have really used it when I needed a 500K stack to process some XML!). I seriously doubt that any project where there was a possibility of a train failing to stop would do something as risky as changing the compiler without a thorough risk analysis. I wasn't allowed to, and there were no trains involved (just point-defence missiles!)