comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com
Subject: Re: Conversion of Access Types Question
Date: 1999/01/15
Date: 1999-01-15T00:00:00+00:00	[thread overview]
Message-ID: <77ma9b$6ep$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 77l492$b5s@hobbes.crc.com

In article <77l492$b5s@hobbes.crc.com>,
  "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> wrote:

> Compiling your code with gnat results in the following
> message:
>
>  t.adb:23:14: target type must be general access type
>  t.adb:23:14: add "all" to type "A_T2" defined at line 14
>
> Making the change the compiler directs solves the>
> problem.
>
>   i.e., change line 14 to read:
>     type A_T2 is access all T2;

This is a very common misunderstanding in Ada 95, which is
why we recently added the second message, since it is
almost certain to be the right fix. Some Ada 95 programmers
simply make a rule of using "ALL" for all access types.
On almost all compilers, this will have no effect on
generated code, it will just change illegal programs into
(sensible) legal ones.

By the way, we are always striving to make the error
messages in GNAT more helpful. If you find a case where
you feel the error messages could be more helpful, by
all means send mail to report@gnat.com. We have made many
improvements based on such suggestions, and indeed many of
the useful suggestions come from students using the public
version, since they know best what is confusing.

Expert users tend to be less likely to send in such
messages because (a) they know what the error is anyway and
(b) they have very low expectations for good error messages
as a result of using other compilers, particularly for
example, typical C compilers :-)

Robert Dewar
Ada Core Technologies

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




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

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-14  0:00 Conversion of Access Types Question Paul S. Heidmann
1999-01-14  0:00 ` David C. Hoos, Sr.
1999-01-14  0:00   ` Paul S. Heidmann
1999-01-14  0:00     ` David C. Hoos, Sr.
1999-01-14  0:00     ` Tucker Taft
1999-01-15  0:00   ` dewar [this message]
1999-01-20  0:00     ` Robert A Duff
1999-01-20  0:00       ` Matthew Heaney
1999-01-20  0:00         ` Tucker Taft
1999-01-21  0:00         ` robert_dewar
1999-01-27  0:00         ` Nick Roberts
1999-01-28  0:00           ` robert_dewar
1999-01-21  0:00       ` robert_dewar
1999-01-21  0:00         ` Tom Moran
replies disabled

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