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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Teaching C/C++ from Ada perspective? Date: Sat, 7 Jul 2018 10:39:26 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <856189aa-fa00-4960-929e-174f352310ad@googlegroups.com> <3701bf07-89a5-4cb0-a704-5aebb589ca79@googlegroups.com> <2f5e4ce0-94e8-4b94-9da7-045ec90a9b22@googlegroups.com> <18554067-1382-4b43-a832-2d27aa5117d7@googlegroups.com> <8dc19505-b68a-403c-a164-f1de1864f3f1@googlegroups.com> <559657f8-bbf4-4a70-9449-f85bc98d6c6b@googlegroups.com> <590d4672-4aef-42a5-823c-57ccd291115a@googlegroups.com> <8de6b5ba-25ab-4d46-b80c-1544f43a9b05@googlegroups.com> <670baa25-a987-45a0-991f-ec3aa2878233@googlegroups.com> NNTP-Posting-Host: 3CrKQyqWAJZHy6zYVP/kUg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 X-Mozilla-News-Host: news://news.aioe.org Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.3 Xref: reader02.eternal-september.org comp.lang.ada:53716 Date: 2018-07-07T10:39:26+02:00 List-Id: On 2018-07-06 22:18, Dan'l Miller wrote: >> But Ada will still beat others here, because for quick runs you can turn >> the optimization off being sure that when you turn it on, then due to >> the separation the optimized code will still work. > > Do you use this rule with GNAT or nonGNAT compilers? Yes, I compile everything with -O0 in GNAT and use -O2 for releases only. > Given GNAT's GIGI/GIMPLE/RTL optimizing backend, might GNAT not respect private-package boundaries when optimizing? Considering expanding generic bodies an "optimization", yes. If there are other things it does with -O2, one should check. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de