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,9a4a0b8e5206a866 X-Google-Attributes: gid103376,public From: dewar@gnat.com Subject: Re: Conversion of Access Types Question Date: 1999/01/15 Message-ID: <77ma9b$6ep$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 432731741 References: <369DFFFC.A160D47C@neta.com> <77l492$b5s@hobbes.crc.com> X-Http-Proxy: 1.0 x3.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Fri Jan 15 02:48:14 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-01-15T00:00:00+00:00 List-Id: In article <77l492$b5s@hobbes.crc.com>, "David C. Hoos, Sr." 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