Prev: Newbie question: How to use gnat make
Next: Performance of access type : a tiny mistake in the WikiBook ?
From: Randy Brukardt on 10 Oct 2009 01:41 "Jeffrey R. Carter" <spam.jrcarter.not(a)spam.acm.org> wrote in message news:h9rco8$u58$1(a)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.
First
|
Prev
|
Pages: 1 2 3 4 5 6 7 Prev: Newbie question: How to use gnat make Next: Performance of access type : a tiny mistake in the WikiBook ? |