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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,243dc2fb696a49cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!teaser.fr!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: 23 Sep 2004 20:09:38 -0400 Organization: Cuivre, Argent, Or Message-ID: References: <1ec946d1.0409222224.6d86e038@posting.google.com> <1ec946d1.0409231030.326ba997@posting.google.com> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1095984594 19179 212.85.156.195 (24 Sep 2004 00:09:54 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Fri, 24 Sep 2004 00:09:54 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:4062 Date: 2004-09-23T20:09:38-04:00 Simon Wright writes: > I find that GNAT's style checking helps me a lot; and it's much easier > to say -gnaty than -gnaty3abcefhiklmprt, which is the standard set > less -gnats (check separate specs). A shame that you can't say -gnatyS > to turn the feature off, as in -gnatw ... I also use GNAT's style checking, but I don't like the default -gnaty (80 columns is too small, for one thing). So I have a standard project file that specifies the options I like: -- Standard settings for all of Stephe's Ada projects. project Standard_Common is for Source_Dirs use (); type GNAT_Version_Type is ("5.02a1", "5.02a", "5.01a", "3.16a1", "3.15p"); GNAT_Version : GNAT_Version_Type := External ("GNAT_VERSION"); type OS_Version_Type is ("Windows_XP", "Windows_98", "Windows_2000", "Lynx_4.0"); OS_Version : OS_Version_Type := External ("OS_VERSION"); package Compiler is System_Case_Style_Checks := "n"; Space_Style_Checks := "t"; Base_Style_Checks := "-gnaty3abefhiklM120pr"; Style_Checks := Base_Style_Checks & System_Case_Style_Checks & Space_Style_Checks; Non_Spacing_Style_Checks := Base_Style_Checks & System_Case_Style_Checks; -- For GNAT 3.15, don't warn about elaboration order (gnatwL, -- off by default in 3.16). -- -- -gnatVa causes some inline procedures to be non-inlineable; -- suppress that warning with -gnatwP. Base_Debug_Switches := -- Switches we always use ("-g", "-O0", "-gnatf", "-gnato", "-gnatwa", "-gnatwL", "-gnatVa", "-gnatwP", "-fstack-check"); Debug_Switches := Base_Debug_Switches & -- Switches we need to suppress sometimes ("-gnata", "-gnatwe"); Release_Switches := ("-g", "-O3", "-gnatn", "-gnatf", "-gnatwa", "-gnatwL"); -- The project file syntax does not let us set a variable in a -- case statement. So we set the Default_Switches attribute to -- contain the version-dependent switches. This is then -- accessible in child project files via 'Default_Switches. case GNAT_Version is when "5.01a" => -- WORKAROUND: GNAT 5.01a optimization bug; -- -fno-strict-aliasing avoids it. However, -- -fno-strict-aliasing is not defined in earlier GNAT -- versions. This switch is only needed for release builds -- (when optimization is enabled), but does not hurt in -- debug/test builds. Specifying it in both avoids splitting -- this file in two. for Default_Switches ("Ada") use ("-fno-strict-aliasing"); when "5.02a1" | "5.02a" | "3.16a1" | "3.15p" => end case; end Compiler; -- In project files, normally use this: -- package Compiler is -- for Default_Switches ("Ada") use Standard_Common.Compiler'Default_Switches ("Ada") & -- Standard_Common.Compiler.Base_Release_Switches & -- Standard_Common.Compiler.Style_Checks; -- end Compiler; package Binder is case OS_Version is when "Windows_98" => when "Windows_2000" | "Lynx_4.0" | "Windows_XP" => for Default_Switches ("Ada") use ("-E"); end case; Debug_Configuration_Pragmas := "Normalize_Scalars"; end Binder; -- In project files, normally use this: -- package Binder is -- for Default_Switches ("Ada") use Standard_Common.Binder'Default_Switches ("Ada"); -- end Binder; end Standard_Common; Hmm. That file is bigger than I remembered :). But it holds everything I've learned about running gnatmake. -- -- Stephe