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!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!border2.nntp.ams1.giganews.com!nntp.giganews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer03.fr7!futter-mich.highwinds-media.com!news.highwinds-media.com!fx02.fr7.POSTED!not-for-mail Subject: Re: Hint to Ada newbies Newsgroups: comp.lang.ada References: From: Per Sandberg User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@usenet.se NNTP-Posting-Date: Thu, 09 Feb 2017 06:06:27 UTC Organization: usenet.se Date: Thu, 9 Feb 2017 07:06:26 +0100 X-Received-Body-CRC: 289203216 X-Received-Bytes: 2615 X-Original-Bytes: 2541 Xref: news.eternal-september.org comp.lang.ada:33279 Date: 2017-02-09T07:06:26+01:00 List-Id: Som more hints on switches: This is a snippet of my usual project file during development. It will force me to keep a consistent layout and catch a lot of errors during compile and tests. my.gpr: ------------------------------------ project My is for Source_Dirs use ("src"); for Object_Dir use ".obj"; for Main use ("main.adb"); package Builder is for Default_Switches("Ada") use ("-k", "-j0"); for Global_Configuration_Pragmas use project'Project_Dir & "my.gpp"; -- Initialize data to bad values. end Builder; package Compiler is for Switches ("ada") use ("-gnatyybcfhiklnprtu", "-gnatyN256", "-gnaty3", -- Check layout. "-gnatVa", -- Turn on all validity checking options "-gnatwa", -- Turn most info/Warning "-gnatwe", -- Treat all warnings as errors "-gnata", -- Enable Assertions. "-gnateE", -- Generate extra information in exception messages "-gnatQ"); -- Don't quit, write ali/tree file even if compile errors end Compiler; package Binder is for Switches ("ada") use ("-E"); -- Store callstack in exceptions. end Binder; end Test_My; ------------------------------------ my.gpp ---------------------------------- pragma Initialize_Scalars; -------------------------------- /P Den 2017-02-09 kl. 05:17, skrev reinkor: > Just sharing experience: > > I tried gnat compiler option "-gnatwa" and revealed a lot of weakness in my Ada project. It also helped to improve the structure of the code which I have worked on and modified over time. > > Just a hint to newbies :-) > > https://gcc.gnu.org/onlinedocs/gnat_ugn/Warning-Message-Control.html > > reinert >