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,fb264cdd67c2f20f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada Subject: Re: A smaller self contained test case. Was: Compiler Bug or what I'm doing wrong? References: <05lkrrojfd.fsf@hod.lan.m-e-leypold.de> <1cfjjgsg6wwv4.44snml2yzt42$.dlg@40tude.net> <7sr71erb6j.fsf@hod.lan.m-e-leypold.de> From: M E Leypold Date: 24 Jun 2006 15:53:32 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Some cool user agent (SCUG) NNTP-Posting-Host: 88.72.218.241 X-Trace: news.arcor-ip.de 1151156852 88.72.218.241 (24 Jun 2006 15:47:32 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!62.53.226.182.MISMATCH!takemy.news.telefonica.de!telefonica.de!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news2.google.com comp.lang.ada:4979 Date: 2006-06-24T15:53:32+02:00 List-Id: "Dmitry A. Kazakov" writes: > BTW, I wouldn't use discriminants with defaults, I'm perhaps misuing dicriminants anyway in that application. But they need to have defaults, since the disriminated records are fields in another record. Like type All_We_Know ( Internal_Data_Available : Boolean := True ) is record case Internal_Data_Available is when True => Secret_Data : ... ; ... end record; type ... is record Things_Known : All_We_Konw; ... end record; (Ok, stupid example, but you get ist: Data not to be given to an external data processing application can be supressed by the discriminant). > and in any case, would use > Input for them. I tried to do that, but that didn't fix the problem. I also wouldn't expect that: According to Barnes Input most probably uses Read. > 1. You have the discriminant stored anyway (that was the choice about > having the defaults), so you cannot use one stored value of the > discriminant for all 400 fields, even if they had it same. Oops. That I don't understand. > 2. Read means that you have one extra initialize / finalize pair. Input > does not: I don't care. Input is slow anyway and doesn't happen so often :-). > > declare > X : Foo renames Foo'Input (S); -- Initializes only once > begin > > [...] > > The hypothesis that the wrong finalizers are being run could be tested > > of course (by using a custom controlled type), but I haven't done it > > yet (fixing my application or getting a new Gnat as obviously > > priority). > > My experience with GNAT tells me: slowly, don't hurry. You never know which > new bug it could have. (:-() One reason why I stayed with 3.15p up to now. But now I've a record with discriminants whose fields are records with discrimants and so on, around 170 fields all in all and I dread the task of writing input and out procedures for them. Maybe I dread Gnatgcc less. I don't know yet. Regards -- Markus