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-Thread: 103376,f798c20ee494262a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!nntp.giganews.com.MISMATCH!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 11 Feb 2005 17:49:45 -0600 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: setting 'Size and unchecked conversion safe here? References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Fri, 11 Feb 2005 17:49:45 -0600 NNTP-Posting-Host: 67.161.24.234 X-Trace: sv3-jmioeD3Z3OZ+St4U6LlS2GrSiTkmBApan5h9IPhYDJ/EWotXpJh4T5FeayZrTvNtFu7/FVCFw4Tb9//!iC9cQETQz4QNCS5BdcsYv5cq/h4e90g2u14oR/hHf4u8PYV9YCIBwBO42edUEQ== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.23 Xref: g2news1.google.com comp.lang.ada:8262 Date: 2005-02-11T17:49:45-06:00 List-Id: > What I'm not sure about is whether the unused 32 > bits are harmless or not (by definition). Thanks. An Unchecked_Conversion of dissimilar sizes is clearly unsafe, simply because it's implementation defined how, or if, it works. But your problem appears to be the warning on for My_Access_To_Subprogram_Type'Size use 64; ARM 13.3(42-43) recommends that a compiler should support this. Presumably you don't care how the compiler places the 32 useful bits in the 64 bit slot, so long as you get out what you put in. So another compiler might do it differently, but your program would still work correctly. So presumably the Gnat warning should be taken in the spirit of "I notice you did this weird thing - are you sure you really meant to?"