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-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!oleane.net!oleane!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Barrier re-evaluation issue with GNAT 4.3.2 Date: Sat, 10 Oct 2009 00:41:38 -0500 Organization: Jacob Sparre Andersen Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1255153398 13012 69.95.181.76 (10 Oct 2009 05:43:18 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 10 Oct 2009 05:43:18 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Response Xref: g2news2.google.com comp.lang.ada:8646 Date: 2009-10-10T00:41:38-05:00 List-Id: "Jeffrey R. Carter" wrote in message news:h9rco8$u58$1@news.tornevall.net... > Robert A Duff wrote: >> >> Pragma Detect_Blocking will cause GNAT to raise Program_Error. >> If you want to write portable code, you should use this >> pragma. > > I thought there would be a way to make GNAT be an Ada compiler, but a > quick look at the secret documentation didn't find it. GNAT does some weird things, but this isn't one of them. Pragma Detect_Blocking is standard Ada 2005 (added for the Ravenscar profile). It should be the default, but it isn't because various real-time people who ought to know better don't want to pay the miniscule cost of the check. [I think the check should be the default with the possibility of check suppression -- which hardly ever would be used. But some people think possible deadlocks are a better outcome. Bah!] Because of that, almost all Ada compilers will behave as GNAT does in this case. If you want portable Ada code (at runtime), you need to include the pragma -- for *all* compilers, not just GNAT. (If you are doing pure Ada 95, you are out of luck, unfortunately.) Randy.