comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: expression function bug or think?
Date: Fri, 17 Jun 2011 14:09:22 +0300
Date: 2011-06-17T14:09:22+03:00	[thread overview]
Message-ID: <960qv2Fmi8U1@mid.individual.net> (raw)
In-Reply-To: <26c8352c-3f50-4209-a8f2-5ebec7bb2344@n10g2000vby.googlegroups.com>

Martin wrote:
> On Jun 17, 11:33 am, Simon Wright <si...@pushface.org> wrote:
>> Martin <martin.do...@btopenworld.com> writes:
>>> On Jun 16, 9:41 pm, Simon Wright <si...@pushface.org> wrote:
>>> [snip]
>>>> package functions is
>>>>    function functions__fib (n : natural) return natural;
>>> Thanks for this - this confirms something I'd been told wasn't the
>>> case - when compiling GNAT, non-standard identifiers _are_ created and
>>> allowed (in this case a name with a double underscore)!
>> I think this only happens when GNAT recreates the processed source to
>> show you what it did.
> 
> Ahhh! Thanks...wonder what the internal reference looks like...or is
> there one at all and it just creates these names when this option is
> selected? If I had a 28 hour day, I might find out!

I'm not sure what your question really is, but if it is about the way 
GNAT generates link names for Ada entities, this is explained in the 
GNAT User's Guide. Quote (from the version for GCC 4.3.0):

"25.2 The External Symbol Naming Scheme of GNAT

In order to interpret the output from GNAT, when using tools that are 
originally intended for use with other languages, it is useful to 
understand the conventions used to generate link names from the Ada 
entity names. All link names are in all lowercase letters. With the 
exception of library procedure names, the mechanism used is simply to 
use the full expanded Ada name with dots replaced by double underscores. 
For example, suppose we have the following package spec:

package QRS is
    MN : Integer;
end QRS;

The variable MN has a full expanded Ada name of QRS.MN, so the 
corresponding link name is qrs__mn."

The name "functions__fib" in the recreated source, above, follows this rule.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .



  reply	other threads:[~2011-06-17 11:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 11:00 expression function bug or think? georg bauhaus
2011-06-16 11:27 ` AdaMagica
2011-06-16 15:56 ` Adam Beneschan
2011-06-17  3:56   ` Yannick Duchêne (Hibou57)
2011-06-16 16:16 ` Anh Vo
2011-06-16 18:56 ` Bill Findlay
2011-06-16 19:18   ` Simon Wright
2011-06-16 20:03     ` Georg Bauhaus
2011-06-16 20:03     ` Bill Findlay
2011-06-16 20:31 ` Florian Weimer
2011-06-16 20:41   ` Simon Wright
2011-06-16 21:14     ` Georg Bauhaus
2011-06-16 23:14     ` Bill Findlay
2011-06-17  9:34     ` Martin
2011-06-17 10:33       ` Simon Wright
2011-06-17 10:39         ` Martin
2011-06-17 11:09           ` Niklas Holsti [this message]
2011-06-16 21:04   ` Georg Bauhaus
2011-06-17  8:55   ` Georg Bauhaus
2011-06-17  9:10     ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox