public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Daniel Krügler" <daniel.kruegler@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [committed] libstdc++: Support printing volatile pointers (P1147R1)
Date: Tue, 5 Oct 2021 11:28:03 +0200	[thread overview]
Message-ID: <CAGNvRgDx=8hDGdYegDdyL6YQ640Yiq=6Y9cXveK=j-THK=6cFg@mail.gmail.com> (raw)
In-Reply-To: <YVwO/8GxaXEVx4rO@redhat.com>

Am Di., 5. Okt. 2021 um 10:55 Uhr schrieb Jonathan Wakely via
Libstdc++ <libstdc++@gcc.gnu.org>:
>
> To avoid needing to export a new symbol from the library (for now) the
> new member function uses __attribute__((always_inline)).
>
> libstdc++-v3/ChangeLog:
>
>         * include/std/ostream (operator<<(const volatile void*)):
>         Add new overload, as per P1147R1.
>         * testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc:
>         New test.
>
> Tested powerpc64le-linux. Committed to trunk.

I think the test is insufficient, because it will succeed on every
library implementation regardless of the new feature. Without the new
feature it will select the unexpected operator<<(bool) overload and
just print "1".

- Daniel

  reply	other threads:[~2021-10-05  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05  8:38 Jonathan Wakely
2021-10-05  9:28 ` Daniel Krügler [this message]
2021-10-05 15:07   ` Jonathan Wakely

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='CAGNvRgDx=8hDGdYegDdyL6YQ640Yiq=6Y9cXveK=j-THK=6cFg@mail.gmail.com' \
    --to=daniel.kruegler@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@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).