comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: Compiling with Gnat
Date: 1999/01/20
Date: 1999-01-20T00:00:00+00:00	[thread overview]
Message-ID: <784r4q$3t7@hobbes.crc.com> (raw)
In-Reply-To: yoxww2i3u9l.fsf@dymock.dra.hmg.gb


Roger Hoyle wrote in message ...
>
>I'm compiling a large (0.7 M lines) application on a sparc using
>GNATMAKE 3.10p
>
>The application was originally written on an AIX system so I was expecting
>a few problems. The problem I have at the moment is that one of the
>specification files won't compile - it gives the following error:
>
>use clause not allowed in predefined spec


Frequently, the key to understanding what the compiler is saying is to
carefully note every word of the message.  In this case, I suspect the key
word to be "predefined."

What is the name of the file and the name of the unit in which you're
placing this "use" clause?
Does it have the name of one of the langage- or gnat- predefined units?
>
>The line in the code is :
>
>use Interfaces.C;
>
>and it makes no difference where I put it.

Well, if it's not in a predefined spec it should work just fine.
>
>Is this constraint unique to Gnat, and is it permanent, or is there a
switch
>or equivalent which will allow the use of 'use'.
>
>Are there any workarounds better than putting appropriate references before
>every variable. Would that work?
>
Personally, I avoid the use of the "use" clause like the plague, except in
very small scopes, and then usually only for making infix operators visible.

In Ada95, "use" clauses can be replaced by "use type" clauses for primitive
operation visibility.








  reply	other threads:[~1999-01-20  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-20  0:00 Compiling with Gnat Roger Hoyle
1999-01-20  0:00 ` David C. Hoos, Sr. [this message]
1999-01-21  0:00   ` Roger Hoyle
1999-01-21  0:00     ` rdt
1999-01-21  0:00     ` David C. Hoos, Sr.
1999-01-21  0:00     ` robert_dewar
1999-01-21  0:00 ` dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox