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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:aed:2a87:: with SMTP id t7mr7044359qtd.384.1578754865323; Sat, 11 Jan 2020 07:01:05 -0800 (PST) X-Received: by 2002:a9d:53cb:: with SMTP id i11mr7156224oth.158.1578754865048; Sat, 11 Jan 2020 07:01:05 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!g89no10235963qtd.0!news-out.google.com!w29ni731qtc.0!nntp.google.com!g89no10235955qtd.0!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 11 Jan 2020 07:01:04 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=70.109.61.2; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 70.109.61.2 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Importance of GNAT.Source_Info From: Jere Injection-Date: Sat, 11 Jan 2020 15:01:05 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:57821 Date: 2020-01-11T07:01:04-08:00 List-Id: On Tuesday, January 7, 2020 at 1:12:42 AM UTC-5, Niklas Holsti wrote: > On 2020-01-07 4:29, Optikos wrote: > > On Monday, January 6, 2020 at 4:03:56 PM UTC-6, Jere wrote: > >> I'm working on a baremetal RTS and while looking at > >> https://wiki.osdev.org/Ada_Bare_bones, one of the files > >> it suggests is part of the minimum set of RTS files is > >> g-souinf.ads which contains the package GNAT.Source_Info. > >> > >> Does anyone know what part of the compiler requires this? > >> So far I haven't had GNAT barf at me for not having it > >> while compiling the files I do have, but I don't want to > >> leave it out if it is indeed necessary for something. I > >> didn't see any info on why it is necessary. It's definitely > >> useful in that it gives a lot of compile time values, but > >> not sure why it would be a "required" file. I'm assuming > >> something will break without it, but don't know what. > >> > >> Sorry that this isn't a pure "Ada" question and is more > >> focused on GNAT specifically, but thought one of yall > >> might know why. > GNAT might use GNAT.Source_Info in code generated to raise exceptions > with strings. However, as all subprograms in GNAT.Source_Info are marked > "Intrinsic", it seems that GNAT could as well generate that "intrinsic" > code without calling GNAT.Source_Info. So I don't really know. > Yeah, that makes sense. TY