public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: iain@sandoe.co.uk
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v3] Fix __builtin_nested_func_ptr_{created,deleted} symbol versions [PR113402]
Date: Thu, 18 Jan 2024 16:05:18 +0100	[thread overview]
Message-ID: <Zak+Lkhiu6h3XZnH@tucnak> (raw)
In-Reply-To: <20240118145923.25112-1-iain@sandoe.co.uk>

On Thu, Jan 18, 2024 at 02:59:23PM +0000, Iain Sandoe wrote:
> --- a/gcc/builtins.cc
> +++ b/gcc/builtins.cc
> @@ -8416,6 +8416,11 @@ expand_builtin (tree exp, rtx target, rtx subtarget, machine_mode mode,
>      case BUILT_IN_ADJUST_DESCRIPTOR:
>        return expand_builtin_adjust_descriptor (exp);
>  
> +    case BUILT_IN_NESTED_PTR_CREATED:
> +    case BUILT_IN_NESTED_PTR_DELETED:

Unsure if it is ok to have the BUILT_IN_ names so different from the actual
functions, if they shouldn't be
BUILT_IN_GCC_NESTED_FUNC_PTR_{CREATED,DELETED} instead.
The missing __ is what happens even with BUILT_IN_CLEAR_CACHE / __clear_cache.

> +      break; /* At present, no expansion, just call the function.  */
> +
> +

Just one empty newline, not 2.

>      case BUILT_IN_FORK:
>      case BUILT_IN_EXECL:
>      case BUILT_IN_EXECV:
> diff --git a/gcc/builtins.def b/gcc/builtins.def
> index 4d97ca0eec9..fd040eb8d80 100644
> --- a/gcc/builtins.def
> +++ b/gcc/builtins.def
> @@ -1084,8 +1084,8 @@ DEF_BUILTIN_STUB (BUILT_IN_ADJUST_TRAMPOLINE, "__builtin_adjust_trampoline")
>  DEF_BUILTIN_STUB (BUILT_IN_INIT_DESCRIPTOR, "__builtin_init_descriptor")
>  DEF_BUILTIN_STUB (BUILT_IN_ADJUST_DESCRIPTOR, "__builtin_adjust_descriptor")
>  DEF_BUILTIN_STUB (BUILT_IN_NONLOCAL_GOTO, "__builtin_nonlocal_goto")
> -DEF_BUILTIN_STUB (BUILT_IN_NESTED_PTR_CREATED, "__builtin_nested_func_ptr_created")
> -DEF_BUILTIN_STUB (BUILT_IN_NESTED_PTR_DELETED, "__builtin_nested_func_ptr_deleted")
> +DEF_EXT_LIB_BUILTIN (BUILT_IN_NESTED_PTR_CREATED, "__gcc_nested_func_ptr_created", BT_FN_VOID_PTR_PTR_PTR, ATTR_NOTHROW_LIST)
> +DEF_EXT_LIB_BUILTIN (BUILT_IN_NESTED_PTR_DELETED, "__gcc_nested_func_ptr_deleted", BT_FN_VOID, ATTR_NOTHROW_LIST)

See above.

Otherwise LGTM.

	Jakub


  reply	other threads:[~2024-01-18 15:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18 14:59 Iain Sandoe
2024-01-18 15:05 ` Jakub Jelinek [this message]
2024-01-28 11:02   ` Iain Sandoe
2024-01-31 12:04     ` [PATCH] libgcc: Avoid warnings on __gcc_nested_func_ptr_created [PR113402] Jakub Jelinek
2024-02-01  8:22       ` Jakub Jelinek
2024-02-01  8:51         ` Richard Biener
2024-02-01 20:00           ` Iain Sandoe

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=Zak+Lkhiu6h3XZnH@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    /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).