comp.lang.ada
 help / color / mirror / Atom feed
* Rational Compiler Problem ??
@ 1994-09-23 15:08 Andrew R. McConnell
  1994-09-23 16:33 ` Kent Mitchell
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew R. McConnell @ 1994-09-23 15:08 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1994-09-26 12:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-09-23 15:08 Rational Compiler Problem ?? Andrew R. McConnell
1994-09-23 16:33 ` Kent Mitchell
1994-09-24 21:19 ` Bob Duff
1994-09-26 12:50 ` Alan D Zimmerman, Loral RSA

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