comp.lang.ada
 help / color / mirror / Atom feed
From: wojtek@power.com.pl (Wojtek Narczynski)
Subject: Re: Repost: Nobody interested to judge which compiler is right?!
Date: 30 Jan 2003 10:52:14 -0800
Date: 2003-01-30T18:52:14+00:00	[thread overview]
Message-ID: <5ad0dd8a.0301301052.251bf0e3@posting.google.com> (raw)
In-Reply-To: mailman.15.1043910058.30820.comp.lang.ada@ada.eu.org

> This is from a note of Tucker Taft on Team Ada March 1999.
> I have no longer the exact English wording, I retranslate from 
> (...)

I found it:

http://www.acm.org/archives/wa.cgi?A2=ind9903&L=team-ada&F=&S=&P=10682

I even think I understand it. The purpose of an index_constraint on an
unconstrained access to array type is to introduce a runtime range
check, that's all. Unfortunately...

-- This slightly modified code raises Constraint_Error as expected. 

    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 );

    -- Ada 95 version, no GNAT version
    -- Create a string too long
    LS : aliased String := 2 * Len_String'Length * "*";
   		    
    -- Raises Constraint_Error
    LSA : Len_String_Access := LS'access;

Now that I know that GNAT is not compliant, do you think I should
report it?

Thanks & Regards,
Wojtek



  reply	other threads:[~2003-01-30 18:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-30  6:53 Repost: Nobody interested to judge which compiler is right?! Grein, Christoph
2003-01-30 18:52 ` Wojtek Narczynski [this message]
2003-01-30 20:19   ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
2003-01-31  6:25 Grein, Christoph
2003-01-29 23:00 Wojtek Narczynski
2003-01-30  0:13 ` tmoran
replies disabled

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