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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,edfa88b682578b7,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-24 18:03:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.cs.utexas.edu!geraldo.cc.utexas.edu!not-for-mail From: "Bobby D. Bryant" Newsgroups: comp.lang.ada Subject: Overhead for type conversions? Date: Thu, 24 Jul 2003 19:01:44 -0600 Organization: dis- Message-ID: NNTP-Posting-Host: dial-102-9.ots.utexas.edu Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: geraldo.cc.utexas.edu 1059094950 23290 128.83.176.9 (25 Jul 2003 01:02:30 GMT) X-Complaints-To: abuse@utexas.edu NNTP-Posting-Date: Fri, 25 Jul 2003 01:02:30 +0000 (UTC) User-Agent: Pan/0.14.0 (I'm Being Nibbled to Death by Cats!) Xref: archiver1.google.com comp.lang.ada:40785 Date: 2003-07-24T19:01:44-06:00 List-Id: Given these declarations - type f1 is new float; type f2 is new float; function "*"( left : in f1; right : in f2 ) return f1 is begin return( left * f1( right ) ); end "*"; and given that run-time range checks are enabled, should I expect my compiler to execute range checking code for each f1*f2 multiplication, or will the compiler conclude from the definitions that the two types are always convertible without error regardless of the specific value, and thus not generate any code for a range check? (In practice the compiler is GNAT.) Thanks, -- Bobby Bryant Austin, Texas