From: John Smith <yoursurrogategod@gmail.com>
Subject: Re: Hint to Ada newbies
Date: Thu, 9 Feb 2017 09:40:58 -0800 (PST)
Date: 2017-02-09T09:40:58-08:00 [thread overview]
Message-ID: <f8e5b733-9305-41df-9ac4-a102a8474b25@googlegroups.com> (raw)
In-Reply-To: <DFTmA.290841$8w1.131571@fx02.fr7>
Thanks, this is super useful.
On Thursday, February 9, 2017 at 1:06:32 AM UTC-5, Per Sandberg wrote:
> 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
> >
next prev parent reply other threads:[~2017-02-09 17:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 4:17 Hint to Ada newbies reinkor
2017-02-09 6:06 ` Per Sandberg
2017-02-09 8:02 ` Simon Wright
2017-02-09 23:12 ` Robert A Duff
2017-02-10 9:22 ` Dmitry A. Kazakov
2017-02-11 9:16 ` Hadrien Grasland
2017-02-11 9:39 ` Dmitry A. Kazakov
2017-02-10 9:56 ` Simon Wright
2017-02-11 9:25 ` Hadrien Grasland
2017-02-09 9:26 ` reinkor
2017-02-09 17:40 ` John Smith [this message]
2017-02-11 17:40 ` stevenselectronicmail
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox