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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2ebe0c5644ec0bd2 X-Google-Attributes: gid103376,public From: Niklas Holsti Subject: Re: Compiler bug (Semantics of pargma inline) Date: 1999/03/24 Message-ID: <36F94DBB.E7CAAB1@icon.fi>#1/1 X-Deja-AN: 458600653 Content-Transfer-Encoding: 7bit References: Content-Type: text/plain; charset=us-ascii X-Trace: read2.inet.fi 922306546 194.252.1.88 (Wed, 24 Mar 1999 22:15:46 EET DST) Organization: Space Systems Finland Ltd MIME-Version: 1.0 NNTP-Posting-Date: Wed, 24 Mar 1999 22:15:46 EET DST Newsgroups: comp.lang.ada Date: 1999-03-24T00:00:00+00:00 List-Id: Per & Marianne sandberg wrote: [snip] > function Until_Next return Duration; > pragma Inline (Until_Next); [snip] > select [snip] > or > when Is_Pending => > delay (Until_Next); > Text_Io.Put_Line ("Gaah!"); > end select; [snip] > What appends is when pragma inline is used on the "Until_Next" > function the function is called even if > the guard "Is_Pending" evaluates to false and i considder this a bug > regardles of inline or not. According to LRM 9.7.1(15), defining the dynamic semantics of the Selective Accept, "For an open delay_alternative, the delay_expression is also evaluated." This implies, IMHO, that for a closed delay_alternative, the delay_expression should not be evaluated. Since Is_Pending returns False, the alternative is closed, and Until_Next should not be called. So I tend to agree with you. Niklas Holsti Working at but not speaking for Space Systems Finland Ltd.