TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date: Tue, 5 Dec 2000 20:09:55 -0500
Reply-To: Michael Feldman <[log in to unmask]>
From: Michael Feldman <[log in to unmask]>
Content-Transfer-Encoding: 7bit
In-Reply-To: <[log in to unmask]> from "Stephen Leake" at Dec 05, 2000 05:06:12 PM
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Parts/Attachments: text/plain (41 lines)
Hi -

[said Stephe]
> Michael Feldman <[log in to unmask]> writes:
> > [said John]
> > >
> > > >Quiz: who knows what the GNAT extensions are? I know at least
> one.:-)
> -gnatX enables 'with type foo;'.

YES! You win the "little-known GNAT factoids" award of the week.:-)

BTW, I discovered it by accident about a year ago in playing with jgnat.
I have a tool one of my students wrote that nicely hyperlinks a set of
package interfaces. (I know, there's one in GNAT now but I did not
know that.:-)) The tool runs off an little AYACC parser. When I ran
the jgnat AWT binding through this tool, the parser complained about
'with type', of course, and that really got me going.

"Hello, what's this? A syntactic extension in an Ada compiler?"

Well, yes. But -gnatX is off by default, so unless you consciously
run the non-validatable version, you get "true" Ada 95. But this
is, IMHO, an interesting camel starting to sneak into the tent.
> Interestingly, -gnatX does not seem to be documented in the "secret
> gnat documentation" ; the gnat user guide. So maybe we've finally
> found a true instance of "secret gnat documentation" :)

Hmmm. I think that feature came in with 3.12; I found both 'with type'
and -gnatX in the 3.12 features file. -gnatX does display in the (ever-
longer) list  of flags you get by typing (e.g.) 'gnatmake'.

If it's still not in there in the 3.13 doc, someone should send in
a bug report. I'll do it if I have some time to check the 3.13 doc.

Mike Feldman