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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,8f985f0cf0aeb05c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-22 02:02:03 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!btnet-peer1!btnet-feed5!btnet!carbon.eu.sun.com!new-usenet.uk.sun.com!not-for-mail From: =?iso-8859-1?Q?Herv=E9?= Bitteur Newsgroups: comp.lang.ada Subject: Re: Specific use of GNAT style checking Date: Tue, 22 May 2001 10:46:00 +0200 Organization: Sun Microsystems Message-ID: <3B0A2748.B446554C@France.Sun.COM> References: <3B09393B.31E12172@France.Sun.COM> NNTP-Posting-Host: vel-dhcp-187-195.france.sun.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: new-usenet.uk.sun.com 990521156 22113 129.157.187.195 (22 May 2001 08:45:56 GMT) X-Complaints-To: usenet@new-usenet.uk.sun.com NNTP-Posting-Date: 22 May 2001 08:45:56 GMT X-Mailer: Mozilla 4.72 [en] (Win98; I) X-Accept-Language: fr-FR,en Xref: archiver1.google.com comp.lang.ada:7692 Date: 2001-05-22T08:45:56+00:00 List-Id: Pascal Obry wrote: > > Herv� Bitteur writes: > > > Hello, > > > > I personally like the compiler (GNAT) ability to check the style > > consistency across a whole bunch of Ada source files. I use flags such > > as -gnatg to check conformance to GNAT style. > > You should not use -gnatg but -gnaty. > > > However, I also reuse other Ada components for which I have no intention > > to modify the code, even at just the layout level. But these components > > may get (re)compiled because of some dependency on my code, for generic > > instantiation for example. > > Just compile the library (before compiling your code) without the -gnaty > switch? > > Pascal. Oops, I meant "-gnaty" instead of "-gnatg", you are right. But interestingly enough, the info file of GNAT 3.13p user guide (File: gnat_ug.info, Node: Switches for gcc) says : `-gnatg' GNAT style checks enabled. So my confusion, when I wrote my message! Now, back to my original question. Jean-Pierre suggested to compile the foreign units beforehand in a separate library. Fine, but this does not work in all cases, for example when such a foreign unit needs to be instantiated with some code of my own : to my knowledge GNAT reparses the foreign generic source at this moment, and I'm back with an avalanche of style warnings. Many thanks to Florian Weimer for pointing to Style_Checks pragma, which allows you to customize the checks at the source level, in conjunction with the compiler switches. I was looking in the user's guide, not in the reference manual. My fault. Bye, -- Herv� -- /\ Herv� BITTEUR \\ \ EMEA IT Architect \ \\ / SUN MICROSYSTEMS FRANCE / \/ / / 13, avenue Morane Saulnier / / \//\ 78142 V�lizy cedex France \//\ / / / / /\ / Email : Herve.Bitteur@France.Sun.COM / \\ \ Office : +33 (0)1.30.67.51.12 \ \\ Fax. : +33 (0)1.30.67.53.06 \/