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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c211e1c823e32c9c,start X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Using GNAT with SunAda? Date: 1996/03/18 Message-ID: #1/1 X-Deja-AN: 143063709 references: <4iaor8$lnk@s-cwis.unomaha.edu> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-03-18T00:00:00+00:00 List-Id: Sam wrote: gcc -x ada -c myfile.a of course!! I knew this feature, but had forgotten it. Must have been sleeping when I answered it the other day. So, given this capability in the gcc command, all you need to do is to tell GNAT to use the non-standard file names for with statements. This is done by using a file called gnat.adc containing source_file_name pragmas to specify the file names being used. Here is the documentation for the source_file_name pragma: -- pragma Source_File_Name ( -- [UNIT_NAME =>] unit_NAME, -- [BODY_FILE_NAME | SPEC_FILE_NAME] => STRING_LITERAL) -- The source file name pragma allows a program to override the normal -- naming convention. It is a configuration pragma, and so has the usual -- applicability of configuration pragmas (i.e. it applies to either an -- entire partition, or to all units in a compilation, or to a single -- unit, depending on how it is used. The form of the pragma is: -- The given unit name is mapped to the given file name. The identifier -- for the second argument is required, and indicates whether this is -- the file name for the spec or for the body. an example for the above file would be pragma Source_File_Name (My_Unit_Name, Spec_File_Name => "myfile.a");