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=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9c0aeffddd5a8549,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-17 13:01:19 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!swiss.ans.net!newsgate.watson.ibm.com!watnews.watson.ibm.com!news.manassas.ibm.com!pdennis From: pdennis@vnet.ibm.com (Phil Dennis) Newsgroups: comp.lang.ada Subject: Need help with DEC Ada Date: Tue, 17 Jan 1995 21:01:19 GMT Organization: McDonnell Douglas Corporation Message-ID: <19950117.160119.606@vnet.ibm.com> Reply-To: pdennis@vnet.ibm.com (Phil Dennis) NNTP-Posting-Host: wmavm7.gburg.ibm.com Date: 1995-01-17T21:01:19+00:00 List-Id: I'm sure that I just missed some chunk of documentation, but...... I'm running DEC Ada version 3.2 on a DEC Alpha on the OSF/1 operating system. I'm trying to figure out why I'm getting a warning on a CONSTRAINT_ERROR on the array declaration, and subsequent access type declaration. I've included the compiler output below. While I'm at it, I also had to change line 5 of the source code so that the upper bound of the range was integer_32'last, rather than (2**31) - 1. That is because the latter expression also generated a warning about a CONSTRAINT_ERROR. I have compiled the same code on an IBM RISC/6000 using OC Systems Legacy Ada, as well as their new PowerAda with no problem (save the warning about pragma COMPONENT_ALIGNMENT). silly Source Listing 17-Jan-1995 15:51:51 DEC Ada V3.2-5-276S Page 1 01 17-Jan-1995 15:51:42 silly.ada 1 package silly is 2 3 pragma component_alignment(storage_unit); 4 type integer_32 is range -(2**31) .. (2**31) - 1; 5 subtype natural_32 is integer_32 range 0 .. in teger_32'last; --(2**31)-1; 6 subtype bit is boolean; 7 type raw_memory_t is array(natural_32) of bit; .......1 Info: (1) CONSTRAINT_ERROR will be raised here [LRM 11 1(5)] 8 pragma pack(raw_memory_t); 9 type raw_memory_ptr_t is access raw_memory_t; .......1 Info: (1) CONSTRAINT_ERROR will be raised here [LRM 11 1(5)] 10 end silly; Info: Package specification silly added to library /bu 2_libs/common/@coml1 Replaces older version compiled Tue Jan 17 15:51:4 4 1995 PORTABILITY SUMMARY pragma COMPONENT_ALIGNMENT* 3 pragma PACK 8 where * indicates an implementation-defined feature silly Source Listing 17-Jan-1995 15:51:51 DEC Ada V3.2-5-276S Page 2 01 17-Jan-1995 15:51:42 silly.ada VERSION DEC Ada V3.2-5 without the Professional Development Option OPTIONS IN EFFECT -A'$ADALIB' -C1 -e30 -g1 -i1 -O4 -Q0 -V'./silly.l' ENVIRONMENT VARIABLES IN EFFECT ADALIB="@/bu2_libs/common/@coml1" ADAERRFLAGS="isw " (assumed by default) ADALISFLAGS="ipsvw" (assumed by default) silly Source Listing 17-Jan-1995 15:51:51 DEC Ada V3.2-5-276S Page 3 01 17-Jan-1995 15:51:42 silly.ada COMPILER INTERNAL TIMING Phase CPU Elapsed Page I/O seconds seconds faults count Initialization 0.05 0.06 0 0 Parser 0.02 0.01 0 0 Static Semantics 0.00 0.01 0 0 Generic Expansion 0.00 0.00 0 0 Ada Back End 0.00 0.01 0 0 Code Generation-Ada 0.00 0.00 0 0 Smart Recompilation 0.00 0.00 0 0 List Generation 0.00 0.00 0 0 Compilation Library 0.03 0.01 0 0 Writing Units to Library 0.02 0.04 0 0 Analysis Data Collection 0.00 0.00 0 0 Compiler totals 0.18 0.23 0 0 COMPILATION STATISTICS CPU time: 0.18 seconds Elapsed time: 0.23 seconds Pagefaults: 0 I/O Count: 0 Source lines: 10 3333 lines per CPU minute. Compilation complete ************************************************************* *Thanks to the Interstate Highway System, it is now possible* *to travel across the country from coast to coast without * *seeing anything. --Charles Kuralt * * * *ALL STANDARD DISCLAIMERS APPLY, Next time, * *PDENNIS@VNET.IBM.COM A.K.A. PHIL DENNIS take the train! * *************************************************************