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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.0OY2Rx8VGebIpiQTpzGpjQ.user.gioia.aioe.org!not-for-mail From: russ lyttle Newsgroups: comp.lang.ada Subject: Re: Gnat Problem - Freezing too soon Date: Thu, 28 Feb 2019 16:31:58 -0500 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: 0OY2Rx8VGebIpiQTpzGpjQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:55724 Date: 2019-02-28T16:31:58-05:00 List-Id: On 2/28/19 4:19 PM, Anh Vo wrote: > On Thursday, February 28, 2019 at 10:34:46 AM UTC-8, russ lyttle wrote: >> Example from the bookAnalysable Real-Time Systems : >> >> 1 package Environment_Monitor.Ch4_Status is --Protected >> 2 protected type Methane_Agent (Ceiling : Priority) >> 3 with Priority => Ceiling >> 4 is new CH4_Safety >> 5 with >> 6 overriding function Check_Safe return Methane_Status; >> 7 overriding procedure Set_Safety (M : Methane_Status); >> 8 private >> 9 Current_Status : Methane_Status := Motor_Unsafe; >> 10 end Methane_Agent; >> 11 end Environment_Monitor.Ch4_Status; >> >> Gnat complains that Methane_Agent is frozen at line 2, and line 3 is >> trying to change an attribute after being frozen. > > I do not have this book. Could you post a minimally compile-able codes if not completed ones. > > Anh Vo > That is the entire environment_monitor-ch4_status.ads code. If line 2 is commented out, everything compiles and runs.