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 X-Received: by 10.237.59.166 with SMTP id r35mr466810qte.5.1476288474576; Wed, 12 Oct 2016 09:07:54 -0700 (PDT) X-Received: by 10.157.34.41 with SMTP id o38mr273731ota.6.1476288474534; Wed, 12 Oct 2016 09:07:54 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!g45no248950qte.1!news-out.google.com!203ni885itk.0!nntp.google.com!o19no376698ito.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 12 Oct 2016 09:07:54 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.218.37.33; posting-account=W2gdXQoAAADxIuhBWhPFjUps3wUp4RhQ NNTP-Posting-Host: 76.218.37.33 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Precondition on protected entry From: Stephen Leake Injection-Date: Wed, 12 Oct 2016 16:07:54 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:32076 Date: 2016-10-12T09:07:54-07:00 List-Id: On Tuesday, October 11, 2016 at 3:29:47 PM UTC-5, Simon Wright wrote: > I have this (Ravenscar, STM32F4) code: > I modified it slightly to compile with Windows GNAT GPL 2016: with Ada.Interrupts.Names; with System; package Timer_Handler is protected Timer_Handler with Interrupt_Priority => System.Interrupt_Priority'Last is entry Wait with Pre => Running; procedure Start_Waiting (For_Interval : Duration) with Pre => For_Interval <= 0.010_000 and not Running; function Running return Boolean; private procedure Handler with Attach_Handler => Ada.Interrupts.Names.SIGFPE; Triggered : Boolean := False; Is_Running : Boolean := False; end Timer_Handler; end Timer_Handler; package body Timer_Handler is protected body Timer_Handler is entry Wait when Standard.True is begin null; end Wait; procedure Start_Waiting (For_Interval : Duration) is begin null; end Start_Waiting; function Running return Boolean is begin return Is_Running; end Running; procedure Handler is begin null; end Handler; end Timer_Handler; end Timer_Handler; gnatmake timer_handler.adb no errors. So this looks like a problem with the cross target only?