[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/28417] New: std::string no longer allows accepting nullptr_t s
From: |
euloanty at live dot com |
Subject: |
[Bug gold/28417] New: std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++. |
Date: |
Tue, 05 Oct 2021 03:50:53 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28417
Bug ID: 28417
Summary: std::string no longer allows accepting nullptr_t since
it is undefined behavior after yesterday's change on
libstdc++.
Product: binutils
Version: 2.38 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: euloanty at live dot com
CC: ian at airs dot com
Target Milestone: ---
../../../../binutils-gdb/gold/options.h: In constructor
'gold::Search_directory::Search_directory()':
../../../../binutils-gdb/gold/options.h:614:7: error: use of deleted function
'std::__cxx11::basic_string<_CharT, _Traits,
_Alloc>::basic_string(std::nullptr_t) [with _CharT = char; _Traits =
std::char_traits<char>; _Alloc = std::allocator<char>; std::nullptr_t =
std::nullptr_t]'
614 | : name_(NULL), put_in_sysroot_(false), is_in_sysroot_(false)
| ^~~~~~~~~~~
libtool: link: x86_64-w64-mingw32-gcc -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Wstack-usage=262144
-I../../../../binutils-gdb/binutils/../zlib -g -O2 -Wl,--stack -Wl,12582912 -o
.libs/bfdtest2.exe bfdtest2.o ../bfd/.libs/libbfd.a
-L/home/cqwrteur/myhome/gcc_build/glibc231_win_canadian/binutils-gdb/zlib -lz
../libiberty/libiberty.a
In file included from
/home/cqwrteur/cross/x86_64-w64-mingw32/x86_64-w64-mingw32/include/c++/12.0.0/string:53,
from ../../../../binutils-gdb/gold/expression.cc:25:
std::string str(nullptr); was considered undefined behavior, Now it is
forbidden by ISO C++ standard since C++23. libstdc++ has updated this behavior.
https://github.com/gcc-mirror/gcc/commit/cf876562c592193732f869e9f96034a42d0fad89#diff-ba6ba5a2bddd4d1cf66ef3699e6111d9c6aa1cf0192c97e6d59a048b4a851b91
See Jonathan Wakely's words
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gold/28417] New: std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++.,
euloanty at live dot com <=
- [Bug gold/28417] std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++., euloanty at live dot com, 2021/10/04
- [Bug gold/28417] std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++., euloanty at live dot com, 2021/10/04
- [Bug gold/28417] std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++., euloanty at live dot com, 2021/10/04
- [Bug gold/28417] std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++., euloanty at live dot com, 2021/10/05
- [Bug gold/28417] std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++., jwakely.gcc at gmail dot com, 2021/10/05
- [Bug gold/28417] std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++., mliska at suse dot cz, 2021/10/06
- [Bug gold/28417] std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++., mliska at suse dot cz, 2021/10/14
- [Bug gold/28417] std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++., jwakely.gcc at gmail dot com, 2021/10/14
- [Bug gold/28417] std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++., amodra at gmail dot com, 2021/10/14
- [Bug gold/28417] std::string no longer allows accepting nullptr_t since it is undefined behavior after yesterday's change on libstdc++., jwakely.gcc at gmail dot com, 2021/10/14