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,c6a240359af1a030 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 19 Jun 2007 22:15:04 -0500 Date: Tue, 19 Jun 2007 22:19:53 -0400 From: Jeffrey Creem User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Porting problems from Solaris to Redhat Linux using GNAT 5.01a on both. References: <1182243419.220052.230150@c77g2000hse.googlegroups.com> <5dppd7F34po94U1@mid.individual.net> <1182250537.808196.165460@n60g2000hse.googlegroups.com> In-Reply-To: <1182250537.808196.165460@n60g2000hse.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.147.74.171 X-Trace: sv3-75U0yvj5W8yRxRnpdosDMARVsZ0sQA51eg0aq3DAGU0flIUs/vw1z0x+Yict8OnwWXpKgqqx3D74hUi!u27UV9yp8twzA0RACgXeRZ65VKldXwSKzgKGmi5+T+mIhsivPBAaqHdWFoIyrfDcswYGVSRUr+X0!SF0rh8+Gcf0Q0npO1nNtow== 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.34 Xref: g2news1.google.com comp.lang.ada:16249 Date: 2007-06-19T22:19:53-04:00 List-Id: petter_fryklund@hotmail.com wrote: > On 19 Juni, 12:27, "Alex R. Mosteo" wrote: >> petter_frykl...@hotmail.com wrote: >>> First we got circularity detected in elaboration for a rather complex >>> generic structure. This does not happen in Solaris. A pragma Suppress >>> (Elaboration_Check) allowed us to build. But elaboration never >>> completes. We suspect that a PROGRAM_ERROR has been raise, but see no >>> trace of it. Last entry of call stack is an instantiation of generic >>> package that needed pragma Suppress to build. >>> Task Display does not work, always empty. >>> Any suggestions? >> Have you tried the -gnatE switch? Elaboration checks by gnat default to a >> static, more restricted mechanism than required. It helped me in the past, >> although nowadays I prefer to make my programs buildable without this >> switch. > > Thanks for the swift response. > > Yes, it did not help at all. But perhaps the combination of pragma > Suppress and -gnatE? Unfortunatly this is a big application depending > on a large infrastructure set using complex generics. I don't > understand why it differs between Solaris and Linux, but perhaps same > release level is just an illusion. > /Petter > I know you eventually indicated you used the correct compiler version and things worked but suppressing elaboration checks or general pragma suppresses being required to make something work is a very good indication that you have broken code that even if it appears to elaborate is probably not doing what you expect it to be doing. The combination of this followed by the "pragma pack seemed to work on one platform" argument sounds like a pretty broken software process. While it may be true that any sufficiently large project ends up with non-ideal and or non-portable code in places, there seems to be a lot going on here that is just begging for trouble. From the LRM: 13.2 Pragma Pack If a type is packed, then the implementation should try to minimize storage allocated to objects of the type, possibly at the expense of speed of accessing components, subject to reasonable complexity in addressing calculations. (7) The recommended level of support for pragma Pack is: (8) * For a packed record type, the components should be packed as tightly as possible subject to the Sizes of the component subtypes, and subject to any record_representation_clause that applies to the type; the implementation may, but need not, reorder components or cross aligned word boundaries to improve the packing. A component whose Size is greater than the word size may be allocated an integral number of words. (9) * For a packed array type, if the component subtype's Size is less than or equal to the word size, and Component_Size is not specified for the type, Component_Size should be less than or equal to the Size of the component subtype, rounded up to the nearest factor of the word size.