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 X-Google-Thread: 103376,5bef5e9c5bedc675 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-02 10:14:50 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!chcgil2-snh1.gtei.net!news.bbnplanet.com!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: "Luke A. Guest" Newsgroups: comp.lang.ada Subject: Re: [No_Elaboration_Code] GNAT still generating rep_to_pos, why? Date: Fri, 02 Jan 2004 18:14:48 +0000 Message-ID: References: NNTP-Posting-Host: abyss2.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.demon.co.uk 1073067288 1498 62.49.62.197 (2 Jan 2004 18:14:48 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Fri, 2 Jan 2004 18:14:48 +0000 (UTC) User-Agent: Pan/0.14.0 (I'm Being Nibbled to Death by Cats!) Xref: archiver1.google.com comp.lang.ada:4044 Date: 2004-01-02T18:14:48+00:00 List-Id: On Fri, 02 Jan 2004 12:51:56 -0500, Stephen Leake wrote: > "Luke A. Guest" writes: > >> So, my question is this; is this a bug in the compiler or am I missing >> something? > > Try "pragma No_Run_Time" in your gnat.ads file. It says "don't > generate _anything_ not directly required by my code", in effect. > >> I'm currently using GCC-3.3.2 with the FSF GNAT package. > > "pragma No_Run_Time" may not be supported by this version. Look in the > gnat rm for similar pragmas; I think there is one to suppress the enum > stuff. > > Note that No_Run_Time is not documented. I have this in my gnat.adc (not gnat.ads) file: pragma No_Run_Time; pragma Restrictions(No_Exceptions); This is in the GNAT RM from the GCC site: "pragma No_Run_Time Syntax: pragma No_Run_Time; This is a configuration pragma that makes sure the user code does not use nor need anything from the GNAT run time. This is mostly useful in context where code certification is required. Please consult the GNAT Pro High-Integrity Edition User's Guide for additional information." >> I can remove the redundant code by using the following GCC options >> "-ffunction-sections -fdata-sections" and linker option "--gc-sections" >> but this is a workaround rather than a solution. > > Well, GNAT is not normally used to build kernels, and kernels are > _not_ like typical user programs. So I would not be surprised to need > some extra compiler/linker options. I'd call that a "solution", if > there is not a GNAT pragma that does what you need. Although a kernel is not a *normal* program, Ada was designed to be used in the embedded sector with or without an OS, so there must be a solution as somebody must've needed to do what I'm wanting to do at some point. Thanks, Luke.