public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iain@sandoe.co.uk>
To: Alexandre Oliva <oliva@adacore.com>
Cc: Eric Botcazou <ebotcazou@adacore.com>,
	Andrew MacLeod via Gcc-patches <gcc-patches@gcc.gnu.org>,
	Nathan Sidwell <nathan@acm.org>,
	joseph@codesourcery.com
Subject: Re: [PATCH] introduce attribute exalias
Date: Tue, 25 Aug 2020 12:23:33 +0100	[thread overview]
Message-ID: <6CF8C07D-F96C-4C7C-B0D9-43A3A38E53F0@sandoe.co.uk> (raw)
In-Reply-To: <orimd76s5a.fsf@livre.home>

Alexandre Oliva <oliva@adacore.com> wrote:

> On Aug 15, 2020, Iain Sandoe <iain@sandoe.co.uk> wrote:
>
>> Alexandre Oliva <oliva@adacore.com> wrote:
>
>>> I'm pretty sure setting multiple labels at the same address is used
>>> and relied on quite often.
>
>> That’s what’s currently disallowed (the assemblers all support .set).
>
> I understand you mean it's disallowed for global labels.

Yes - or, in fact, linker-visible ones for Darwin because of the issue below.

>  I meant it was often used for local labels.

… including for Darwin targets;
one has to take care with details sometimes, since a local label defines
something that is part of the atom delineated by the next preceding global
(or linker-visible) symbol (or section start if there are none).

When the local label does not really belong to that atom, it can cause
problems (e.g. apparently branching to code that is weak global) so we insert
a non-global (but linker-visible) symbol to allow a new atom to start.

>> Thinking aloud  - not thought through in any detail - I wonder if the
>> facilities of
>> C++20 modules are sufficient?
>
> I'm really not sure what issue you're thinking of solving.

The one where one wanted to import the declaration of a function without
having to include every header needed to declare the types it uses.

Since a header unit should be self-contained and is a compiled artefact.

> The one I'm working on is that of enabling the use of a uniform string
> in Ada import statements (and also in alias("targets")), even when a
> symbolic type that does not mangle uniformly is in use (think int64_t
> mapping to long or long long).  Having per-target source files is quite
> cumbersome in Ada, and there isn't a preprocessor to rely on for
> conditionals and token pasting and whatnot.
>
> I'm afraid I don't see how C++ modules could any offer in this regard.

perhaps not, it was only “thinking aloud”
(since we are agreed it would be nice to have a solution that the compiler
could manipulate/synthesize, rather than requiring source-level changes).

FAOD, the comments above are just continuation of discussion - not any
additional objection to the proposal.

thanks
Iain


  reply	other threads:[~2020-08-25 11:23 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
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 [this message]
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=6CF8C07D-F96C-4C7C-B0D9-43A3A38E53F0@sandoe.co.uk \
    --to=iain@sandoe.co.uk \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=nathan@acm.org \
    --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).