public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/107784] QOI: sizeof( bind_front( Member-Function ) ) too big
Date: Mon, 21 Nov 2022 10:39:54 +0000	[thread overview]
Message-ID: <bug-107784-4-6tAKJn1mLe@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107784-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107784

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-11-21
     Ever confirmed|0                           |1

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jörg Richter from comment #2)
> I think it should only change the size of std::_Bind_front.  This type
> should not be used at any ABI relevant border.  But even if it is, I should
> be possible to just rename the type?

Right. It's an ABI change, but manageable.

The problem is just that we have an empty tuple for the bound args, which would
be solved by this (although ABI-preservation is needed as mentioned):

--- a/libstdc++-v3/include/std/functional
+++ b/libstdc++-v3/include/std/functional
@@ -992,7 +992,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        }

       _Fd _M_fd;
-      std::tuple<_BoundArgs...> _M_bound_args;
+      [[no_unique_address]] std::tuple<_BoundArgs...> _M_bound_args;
     };

   template<typename _Fn, typename... _Args>


But why are you using bind_front if you don't need to bind any args? I'm not
sure this is a very important use case.

  parent reply	other threads:[~2022-11-21 10:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21  8:42 [Bug libstdc++/107784] New: " joerg.richter@pdv-fs.de
2022-11-21  8:48 ` [Bug libstdc++/107784] " pinskia at gcc dot gnu.org
2022-11-21  8:55 ` joerg.richter@pdv-fs.de
2022-11-21 10:39 ` redi at gcc dot gnu.org [this message]
2022-11-21 10:41 ` redi at gcc dot gnu.org
2022-11-21 11:02 ` redi at gcc dot gnu.org
2022-11-21 12:10 ` joerg.richter@pdv-fs.de
2022-11-21 12:23 ` redi at gcc dot gnu.org
2022-11-21 17:32 ` redi at gcc dot gnu.org
2022-11-22 14:08 ` joerg.richter@pdv-fs.de
2022-11-22 16:37 ` redi at gcc dot gnu.org
2023-01-05 11:34 ` redi at gcc dot gnu.org

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=bug-107784-4-6tAKJn1mLe@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).