[committed] libstdc++: Support printing volatile pointers (P1147R1)
Daniel Krügler
daniel.kruegler@gmail.com
Tue Oct 5 09:28:03 GMT 2021
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
More information about the Gcc-patches
mailing list