Re: GNAT - filename/unitname question
- From: Simon Wright <simon@xxxxxxxxxxxx>
- Date: Thu, 29 Sep 2005 20:09:58 +0100
Manuel Collado <m.collado@xxxxxxxxxxxxxxxx> writes:
> Consider the following source file:
>
> filename.adb
> ------------
> procedure unitname is
> begin
> ...
> end unitname;
>
> Compiling it gives a warning:
>
> filename.adb:1:11: warning: file name does not match unit name, should
> be "unitname.adb"
>
> And generates the files:
>
> filename.ali
> filename.o
>
>
> The question is: is there a gcc switch or GNAT pragma to force the
> compiler to use the unitname for the object files? To have:
>
> unitname.ali
> unitname.o
>
> instead of filename.* object files.
>
> I've read the GNAT documentation for gcc switches and pragmas, but
> found nothing useful.
You could compile with -gnatwe to treat warnings as errors. This may
be beyond what you are looking for :-)
On the whole,most people find it easier to go with what the compiler
wants (you could try gnatchop; it takes the units in an arbitrary
source file and outputs each unit in the "expected" file).
.
- References:
- GNAT - filename/unitname question
- From: Manuel Collado
- GNAT - filename/unitname question
- Prev by Date: Re: New to Ada, noticing something strange.
- Next by Date: Re: GNAT GPL - Anonymous Access Type
- Previous by thread: Re: GNAT - filename/unitname question
- Next by thread: New to Ada, noticing something strange.
- Index(es):
Relevant Pages
|