comp.lang.ada
 help / color / mirror / Atom feed
From: mcconnel@source.asset.com (Andrew R. McConnell)
Subject: Rational Compiler Problem ??
Date: 23 Sep 1994 11:08:38 -0400
Date: 1994-09-23T11:08:38-04:00	[thread overview]
Message-ID: <35ur1m$9n3@source.asset.com> (raw)

Hi folks. Is there _anything_ wrong or non-portable with this code?

-------------------
with Text_IO;

procedure Bug_Test is

    type Text_Field ( The_Text_Size : Positive := 1 ) is
      record
        The_Text : String ( 1 .. The_Text_Size ) := ( others => ' ' ) ;
      end record ;

Size : Positive := 5 ;
My_Text_Field : Text_Field(Size);

begin
  Text_IO.Put_Line("Hello");
end Bug_Test;
--------------------


It compiles, links, and runs cleanly in my IBM/AIX environment as well
as in the DEC Ada environment.  However, when compiled on the
HP/Rational platform, warning messages(not errors) are generated:

 104:    type Text_Field ( The_Text_Size : Positive := 1 ) is
 105:      record
A ---------^
A:warning: RM Appendix F: storage needed for component exceeds implementation li
mit
 106:        The_Text             : String ( 1 .. The_Text_Size ) := 
A ----------------------------------^
A:warning: RM Appendix F: unconstrained record component size exceeds limit
 107:                                              ( others => ' ' ) ;



Is this a problem with the Rational compiler?  This code _will_ link,
but the executable fails miserably.  I don't have access to the
documentation as to known bugs, etc.

Also, is there any such thing as an "acceptable" warning from an Ada
compiler?  (I hope not - how else can I make fun of C-philes? ;-) )
-- 
Andrew McConnell             "Ford!" he said, "there's an infinite number of
Voice: (304) 594-9819      monkeys outside who want to talk to us about this 
FAX:   (304) 594-3951      script for 'Hamlet' they've worked out."
mcconnel@source.asset.com                                    -- Arthur Dent



             reply	other threads:[~1994-09-23 15:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-09-23 15:08 Andrew R. McConnell [this message]
1994-09-23 16:33 ` Rational Compiler Problem ?? Kent Mitchell
1994-09-24 21:19 ` Bob Duff
1994-09-26 12:50 ` Alan D Zimmerman, Loral RSA
replies disabled

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