comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: What's wrong with this?
Date: 1997/05/16
Date: 1997-05-16T00:00:00+00:00	[thread overview]
Message-ID: <dewar.863816747@merv> (raw)
In-Reply-To: Pine.LNX.3.95.970516102645.7251A-100000@vf700f.msfc.nasa.gov


Anders says

<<when compiled ( gcc -c filename ), generates the following error:

'pragma "Export" requires separate spec and must come before body'.

The example is directly out of the GNAT Documents INTRO Rev 1.98, from
the section 'Building a Program where the Main Program is not in Ada'.  I
have now seen various examples with 'pragma Export' used this way, the
implication is that this should work.>>


Nope, the example is wrong (and does not appear in the current GNAT 
documentation). The message is exactly right. Pragma Export cannot be
applied to a frozen entity, but a body freezes everything. So you
MUSt have a separate spec, and the pragma EXPORT must come before thhe
body -- typically it is associated with the spec (which makes sense, it
is certainly part of the interface!)





  reply	other threads:[~1997-05-16  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-16  0:00 What's wrong with this? Anders Eliasson
1997-05-16  0:00 ` Robert Dewar [this message]
1997-05-19  0:00   ` root
replies disabled

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