public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org>
To: Alexandre Oliva <oliva@adacore.com>
Cc: gcc-patches@gcc.gnu.org, jason@redhat.com,
	joseph@codesourcery.com, ebotcazou@adacore.com
Subject: Re: [PATCH] introduce attribute exalias
Date: Fri, 14 Aug 2020 18:12:57 -0400	[thread overview]
Message-ID: <13ed4563-33bb-f9b5-4b63-0cf0eebf6034@acm.org> (raw)
In-Reply-To: <ork0y1uj25.fsf@livre.home>

On 8/14/20 3:24 PM, Alexandre Oliva wrote:
> On Aug 14, 2020, Nathan Sidwell <nathan@acm.org> wrote:
> 
>> This seems a useful feature.  I don;t think it needs language
>> lawyering -- it's an extension, right?
> 
> Well, yeah, but I think it's usually good for even extensions to be
> sound language-wise.
> 
>> By 'same-linkage', do you mean same linkage as the *symbol* of the
>> thing it is aliasing, or same linkage as the language entity it is
>> aliasing?
>> I suspect you mean the former.
> 
> Yeah, ultimately the symbol declared as exalias gets the same
> object-level linkage and visibility properties as those of the primary
> symbol emitted for the language entity.  Conceptually, the entity
> introduced by the attribute is not even visible or accessible in the
> standard language; it can only be referenced by alias attributes and by
> Ada import declarations, but conceptually, in as much as you conceive of
> it as a separate entity, I suppose it makes some sense to say it gets
> the same linkage as the entity it refers to.

thanks for the discussion.  I should have said, 'exalias' sounds either 
like a used-to-be alias, it is an ex alias, it has ceased to be, gone to 
join the choir invisible.

or it sounds like exa-lias, making me wonder what a 'lia' is, and why I 
want 10^18 of them

>> I'm sure we can bikeshed the name 'exalias' doesn't seem very mnemonic
>> to me.  'symbol_alias' or something?
> 
> I don't like symbol_alias; that this feature names a symbol is not a
> distinguishing feature from the preexisting alias attribute.

right,  I realize this is different to the existing alias.  It's always 
struck me that the existing semantics are not c++ friendly.  Perhaps 
alias is not the right name at all.  You're emitting an alternative 
symbol, for use in interfacing to a foreign language/system.  Perhaps 
'xenoname'?

> 
> 'ex' can be read as both extra, exported, external, and all of these
> sort of make sense, at least for entities that have linkage.
> 
> Even for exclusively internal uses, say to introduce a mnemonic symbol
> for another alias-attributed declaration to refer to, the "ex" prefix,
> that means the opposite of "in", fitting in well with the functionality
> of "ex"posing the symbol through a name that other alias declarations
> can take *in*, *im*port.
> 
> Another possible spelling for this proposed attribute that might be more
> mnemonic is "aka"; unfortunately, that's pretty much a synonym to alias,
> so it might be mistaken as such, rather than as a complementary feature,
> akin to the other end of a power extension cable: whereas alias does the
> job of a plug, *ex*alias provides a socket/*out*let.
> 

nathan


-- 
Nathan Sidwell

  reply	other threads:[~2020-08-14 22:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 20:56 [RFC, WIP] " Alexandre Oliva
2020-08-07 17:38 ` [PATCH] " Alexandre Oliva
2020-08-14 15:39   ` Alexandre Oliva
2020-08-14 16:24     ` Nathan Sidwell
2020-08-14 19:24       ` Alexandre Oliva
2020-08-14 22:12         ` Nathan Sidwell [this message]
2020-08-15  2:43           ` Alexandre Oliva
2020-08-15  9:22             ` Iain Sandoe
2020-08-15 16:39               ` Alexandre Oliva
2020-08-15 18:17                 ` Iain Sandoe
2020-08-25  8:34                   ` Alexandre Oliva
2020-08-25 11:23                     ` Iain Sandoe
2020-08-15 17:26               ` Alexandre Oliva
2020-08-15 21:11             ` Nathan Sidwell
2020-08-25  7:50               ` Alexandre Oliva
2023-07-15  1:08   ` [PATCH v3] Introduce attribute reverse_alias Alexandre Oliva
2023-07-15 21:55     ` Nathan Sidwell
2023-07-18  4:29       ` Alexandre Oliva
2023-07-18 11:37         ` Richard Biener
2023-07-19 23:11           ` [PATCH v4] Introduce attribute sym Alexandre Oliva
2023-07-20 13:09             ` Richard Biener
2023-07-21  9:23               ` Alexandre Oliva
2023-07-22  3:12             ` Fangrui Song
2023-08-16  4:27               ` Alexandre Oliva
     [not found]             ` <orpm2tgrsd.fsf_-_@lxoliva.fsfla.org>
     [not found]               ` <CAH6eHdQ3vT3MjohuE-izto+K=BMRykY3T-UyWa5-=OTDPM-JsQ@mail.gmail.com>
     [not found]                 ` <ory1h9t6nr.fsf@lxoliva.fsfla.org>
2023-09-20  5:59                   ` [PATCH v5] Introduce attribute sym_alias (was: Last call for bikeshedding on attribute sym/exalias/reverse_alias) Alexandre Oliva
2023-11-20 12:54                     ` [PATCH v5] Introduce attribute sym_alias Alexandre Oliva
2023-11-22 12:14                       ` Richard Biener
2023-11-22 19:16                         ` Joseph Myers
2023-11-22 13:13                     ` [PATCH v5] Introduce attribute sym_alias (was: Last call for bikeshedding on attribute sym/exalias/reverse_alias) Jan Hubicka
2023-11-30 12:53                       ` [PATCH v6] Introduce attribute sym_alias Alexandre Oliva
2023-11-30 15:24                         ` Jan Hubicka
2023-12-01 11:25                           ` [PATCH v7] " Alexandre Oliva
2023-12-06  2:10                             ` [PATCH v8] " Alexandre Oliva
2023-12-06 10:06                             ` [PATCH v7] " Jan Hubicka
2023-12-07 20:52                               ` Alexandre Oliva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13ed4563-33bb-f9b5-4b63-0cf0eebf6034@acm.org \
    --to=nathan@acm.org \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=oliva@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).