This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/63811] r217322 breaks bootstrap


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

--- Comment #2 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
The libstdc++'s own manual says that __unused is a bad identifier, because it's
reserved by BSD:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/source_code_style.html#coding_style.bad_identifiers

So renaming it to anything else makes bootstrap work again:

Index: include/bits/stl_deque.h
===================================================================
--- include/bits/stl_deque.h    (revision 217342)
+++ include/bits/stl_deque.h    (working copy)
@@ -642,7 +642,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
     // Create a copy of the current allocator.
     _Tp_alloc_type __alloc{_M_get_Tp_allocator()};
     // Put that copy in a moved-from state.
-    _Tp_alloc_type __unused __attribute((__unused__)) {std::move(__alloc)};
+    _Tp_alloc_type __unused1 __attribute((__unused__)) {std::move(__alloc)};
     // Create an empty map that allocates using the moved-from allocator.
     _Deque_base __empty{__alloc};
     // Now safe to modify current allocator and perform non-throwing swaps.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]