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.8 required=5.0 tests=BAYES_00,PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,478ee4201c470ff5,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-29 15:00:05 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: wojtek@power.com.pl (Wojtek Narczynski) Newsgroups: comp.lang.ada Subject: Repost: Nobody interested to judge which compiler is right?! Date: 29 Jan 2003 15:00:04 -0800 Organization: http://groups.google.com/ Message-ID: <5ad0dd8a.0301291500.24fd2661@posting.google.com> NNTP-Posting-Host: 212.160.20.107 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1043881205 12195 127.0.0.1 (29 Jan 2003 23:00:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 29 Jan 2003 23:00:05 GMT Xref: archiver1.google.com comp.lang.ada:33584 Date: 2003-01-29T23:00:05+00:00 List-Id: Hello, Please excuse me the disruption, but I believe this problem is interesting. The code below compiles with GNAT, but not with Aonix. Could you people try with other compilers? Something tells me that if the code is correct, then an Ada compiler (practically) must support fat pointers. That's the interesting part. The RM sections IMHO relevant: 3.10.2 27/1 "if D is untagged, then the type of the view shall be D, and A's designated subtype shall (...) statically match the nominal subtype of the view or (...)" 4.9.1 2 " A subtype statically matches another subtype of the same type if they have statically matching constraints." Regards, Wojtek Narczynski with Ada.Strings.Fixed; use Ada.Strings.Fixed; with Ada.Text_IO; use Ada.Text_IO; procedure Tiny is -- Is this code valid ?! type String_Access is access all String; subtype Len_Positive is Positive range 1 .. 20; subtype Len_String is String ( Len_Positive ); subtype Len_String_Access is String_Access( Len_Positive ); LS : aliased Len_String := Len_String'Length * "*"; -- \/ This compiles with GNAT, but not with Aonix LSA : Len_String_Access := LS'access; begin -- \/ This compiles with GNAT, but not with Aonix Put_Line( LSA.all ); end Tiny;