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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5ca3d5098e21bb51 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn13feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: What are the limitations imposed by GNAT without runtime? Reply-To: anon@anon.org (anon) References: <1191947316.791605.8420@50g2000hsm.googlegroups.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: <3fROi.657455$p47.348852@bgtnsc04-news.ops.worldnet.att.net> Date: Tue, 09 Oct 2007 20:10:39 GMT NNTP-Posting-Host: 12.64.158.35 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1191960639 12.64.158.35 (Tue, 09 Oct 2007 20:10:39 GMT) NNTP-Posting-Date: Tue, 09 Oct 2007 20:10:39 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:2389 Date: 2007-10-09T20:10:39+00:00 List-Id: -- The "Non Ada standard" aka the "GNAT obsolete" pragma statement -- ( chapter 14.1 from the GNAT_RM.xxx ) pragma No_Run_Time ; -- removes a number of RTL packages at link time but it also direct -- the compiler that these packages are no longer available. Such as -- "Ada.Text_IO" as well as some attributes/constructs such as -- "Image". So, when you use such attributes/constructs or RTL -- packages you will receive a compiler error, because you will have -- to build these in your RTL or a replacement routine. -- -- As I suggest before look at those project, because they have had -- some of the same problems that you will run into and you can use -- their code to see how they solve the problem. -- -- -- Before begin this great task you need to know the complete features -- of Ada, the compiler and its limitations, the computer system, the -- processor assembly language as well as the hardware that is -- installed. Also, with GCC 4.x Adacore altered the GNAT compiler for -- its Ada 2005 specification by adding some componts that can cause -- problems in creating Stand-Alone code such as a Kernel. -- procedure Kernel is type Wah is ( One, Two ) ; -- ------------------------------------------------ -- -- Simple function replaces the Image attribute for -- -- Wah type -- -- ------------------------------------------------ -- function Image_Wah ( V : Wah ) return String is begin -- Image_Wah if V = One then return "One" ; else return "Two" ; end if ; end Image_Wah ; S : String := Image_Wah ( Wah'First ) ; begin null ; end Kernel ; In <1191947316.791605.8420@50g2000hsm.googlegroups.com>, Lucretia writes: >Hi, > >I have just tested this again and it seems to work. Basically, >configure gnat with --target=i386-elf, build, it stops failing cos >there is no runtime. You can install and it gives you a gnat1 compiler >in libexec/gcc/i386-elf/4.2.2/ and gnatbind in bin/. > >You have to copy the basic system.ads file from the source archive to >lib/gcc/i386-elf/4.2.2/adainclude/. > >This then allows you can use i386-elf-gcc -c to compile source files. >You can also use i386-elf-ld to link provided you supply a linker >script and you'll also need some startup code. > >So, as a test I put the following code through the compiler just to >see if it compiled: > >pragma No_Run_Time; -- This isn't in the manual, and I vaguely >remember something about it being removed, no errors/warnings though. > >procedure Kernel is > > type Wah is (One, Two); > > S : String := Wah'Image(Wah'First); > >begin > null; >end Kernel; > >gives the following error: > >kernel.adb:7:20: construct not allowed in configurable run-time mode > >What does this mean? > >So, apart from tasking and exceptions, what other language constructs >cannot be used in this mode? > >Thanks, >Luke. > >P.S: I'll try not to be sarcastic ;D >