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 X-Google-Thread: 103376,43bab14b56c5ac49,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-17 08:21:01 PST Path: supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!skynet.be!feed2.news.luth.se!luth.se!erix.ericsson.se!newstoo.ericsson.se!not-for-mail From: Frode Tenneboe Newsgroups: comp.lang.ada Subject: GNAT: warning: source alignment.... Date: 17 Jan 2001 16:09:48 GMT Organization: Ericsson Radar AS Message-ID: <979748441.912448@edh3> NNTP-Posting-Host: edh3.edh.ericsson.se Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: tin/1.4.1-19991201 ("Polish") (UNIX) (SunOS/5.8 (sun4u)) Cache-Post-Path: edh3!unknown@alne X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) Xref: supernews.google.com comp.lang.ada:4101 Date: 2001-01-17T16:09:48+00:00 List-Id: In lack of a GNAT specific list, here goes: I get the following warnings from some legacy code when compilled with GNAT 3.12p: eh_uif.adb:112:45: warning: source alignment (1) < alignment of "T_WordRec" (2) eh_uif.adb:113:45: warning: source alignment (1) < alignment of "T_LongRec" (4) eh_uif.adb:119:47: warning: source alignment (1) < alignment of "T_WordRec" (2) eh_uif.adb:120:47: warning: source alignment (1) < alignment of "T_LongRec" (4) eh_uif.adb:163:45: warning: source alignment (1) < alignment of "T_WordRec" (2) eh_uif.adb:164:45: warning: source alignment (1) < alignment of "T_LongRec" (4) eh_uif.adb:238:47: warning: source alignment (1) < alignment of "T_WordRec" (2) eh_uif.adb:239:47: warning: source alignment (1) < alignment of "T_LongRec" (4) The code (som of it) is as follows: type T_WordRec is record w : short_integer; end record; type T_WordPtr is access T_WordRec; function conv16 is new unchecked_conversion(system.address, T_WordPtr); WordId : T_WordPtr; WordId := conv16(UnitId'address); where UnitId is of: type T_UNIT_ITEM is (<>); I interprete the warning that UnitId is aligned at byte boundaries whil T_WordRec (nor T_LongRec) is not. Does it make any sense to use a representation clause on a discrete generic type as above? Why should the source alignment be an issue here? I can only find alignment references to target objects - which part of the RM is this discussed? What can I do to remove these warnings? -Frode -- ^ Frode Tenneb� | email: ft@edh.ericsson.se ^ | Ericsson Radar AS. N-1788 Halden | | | Phone: +47 69 21 41 47 | Frode@IRC | | with Standard.Disclaimer; use Standard.Disclaimer; |