Re: What does -gnato do?



Stephen Leake wrote:

Which is why standard Ada does not allow such behavior. GNAT without
-gnato is _not_ a standard Ada compiler!

I think you also need -f stack-check. Technically, -gnatE may be required, but if GNAT will link your program without it, it doesn't really matter.

In defense of GNAT, specifying -gnato does add size to the code, and
it runs somewhat slower. Back when GNAT was first introduced, there
were lots of rumors about how slow and bloated Ada is. So AdaCore made
the decision to opt for speed and small size by default, rather than
complete Ada correctness. A lot of us complained about that, but it's
too late to complain about it now.

IIRC, at the time, on at least one popular processor, overflow checks were very slow. That led to the decision. The checks are no longer exceptionally expensive, but the default remains the same.

--
Jeff Carter
"You tiny-brained wipers of other people's bottoms!"
Monty Python & the Holy Grail
18
.



Relevant Pages

  • Re: Extending discriminant types
    ... Because the poster states that he can compiler the code. ... I used Gnat 3.15p using Ada 95 specs. ... type Child is new KBase with null record; ...
    (comp.lang.ada)
  • Re: GNAT GPL 2005 Edition is now available
    ... I oppose Debian moving to any Ada compiler which generates ... code that has serious license restrictions. ... Why should GNAT be any different? ... Will there be *any* compilers available for Ada 2005 suitable ...
    (comp.lang.ada)
  • Re: Are there noticable differences in Ada acceptance by country?
    ... Besides Gnat, any Ada compiler is expensive, really expensive, ... multitasking, don't talk about long-term maintenance, safety, less ... Sometimes I think that a lot of beginners browse the index of any Ada ...
    (comp.lang.ada)
  • Re: How do I go about creating a minimal GNAT runtime?
    ... Well Ada has a set of rules, ... Adacore to see if the GNAT PRO series contain those libraries. ... As for the 64k RTL, ...
    (comp.lang.ada)
  • Re: ada compiler?
    ... Not a simple command line answer which is vendor and/or version ... how many beginners first downloads a GNAT version that requires: ... Most beginners that are learning Ada just use: ... always use the standard Ada language concepts first. ...
    (comp.lang.ada)