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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,75b74a06c7b14eed X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-16 18:35:19 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!swiss.ans.net!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: dewar@cs.nyu.edu (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Conformance problem in VAX Ada? Date: 16 Dec 1994 08:49:00 -0500 Organization: Courant Institute of Mathematical Sciences Message-ID: <3cs5sc$mar@gnat.cs.nyu.edu> References: <00988B51.1523CFA0.69@gtewd.mtv.gtegsc.com> <3chsku$1abb@watnews1.watson.ibm.com> NNTP-Posting-Host: gnat.cs.nyu.edu Date: 1994-12-16T08:49:00-05:00 List-Id: I certainly agree that this is a compiler problem (failure to diagnose different default expressions as conformance problem). Here is the GNAT output: 1. with Text_IO; 2. procedure Test is 3. 4. procedure Error (I : in Integer := Integer'First); 5. 6. procedure Error (I : in Integer := Integer'Last) is | >>> not fully conformant with declaration at line 4 >>> default expression for "I" does not match 7. begin 8. Text_IO.Put_Line (Integer'Image (I)); 9. end Error; 10. 11. begin 12. Error; 13. end Test; THe checking of default expressions is tricky, because they don't have to be identical (for instance X.A can match A, and things get worse in 9X where "+(a,b) can match a+b. On the other hand 3 does not match 1+2, so if your compiler folds 1+2 to 3 (which you can expect given that 1+2 is static), it had better make sure this does not happen at a point that will result in false conformance. Still this particular case seems pretty straightforward, and would suggest that the compiler(s) involved are taking some shortcuts on conformance analysis.