[Bug libstdc++/99413] internal library headers are not header-unit ready
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99413 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|--- |11.0 Status|NEW |RESOLVED --- Comment #4 from Jonathan Wakely --- Fixed for gcc-11.
[Bug libstdc++/99413] internal library headers are not header-unit ready
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99413 --- Comment #3 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:47cca0288d06bd851e5801d13bbee7d9374b685d commit r11-7604-g47cca0288d06bd851e5801d13bbee7d9374b685d Author: Jonathan Wakely Date: Wed Mar 10 15:27:41 2021 + libstdc++: Fix headers that can't be used as header units [PR 99413] This adds missing includes to internal library headers which get included from more than one other header, so that they can be compiled as a stand-alone header unit. For existing use cases these includes are no-ops because they're already done by the header that includes these files. For compiling them as a header unit, this ensures that they include what they use. libstdc++-v3/ChangeLog: PR libstdc++/99413 * include/bits/align.h: Include debug/assertions.h. * include/bits/codecvt.h: Include bits/c++config.h. * include/bits/enable_special_members.h: Likewise. * include/bits/erase_if.h: Likewise. * include/bits/functional_hash.h: Include . * include/bits/invoke.h: Include bits/move.h. * include/bits/ostream_insert.h: Include bits/exception_defines.h. * include/bits/parse_numbers.h: Include . * include/bits/predefined_ops.h: Include bits/c++config.h. * include/bits/range_access.h: Include bits/stl_iterator.h. * include/bits/stl_bvector.h: Do not include bits/stl_vector.h. * include/bits/stl_iterator.h: Include bits/stl_iterator_base_types.h. * include/bits/stl_uninitialized.h: Include bits/stl_algobase.h. * include/bits/uniform_int_dist.h: Include bits/concept_check.h. * include/bits/unique_lock.h: Include bits/std_mutex.h. * include/debug/assertions.h: Include bits/c++config.h.
[Bug libstdc++/99413] internal library headers are not header-unit ready
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99413 --- Comment #2 from Nathan Sidwell --- Correct. We're only picking headers that are either (a) user-facing or (b) included from more than one place. Specifically we're partitioning the include graph into a set of multi-reached sub-graphs. And we're maintaining a bad-list, which are the case reported here. Hope that helps.
[Bug libstdc++/99413] internal library headers are not header-unit ready
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99413 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2021-03-05 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely --- There are *many* such problems e.g. /home/jwakely/gcc/11/include/c++/11.0.1/bits/stl_set.h:92:52: error: 'less' in namespace 'std' does not name a template type 92 | template, |^~~~ But in most cases the header is only included from exactly one place (in this case, from ). Will they not be selected to be header units by your selection criteria, and so can be ignored (at least for now)? None of the bits/foo.tcc files are ever intended to be included from anywhere except at the end of the corresponding bits/foo.h header. Do those ones need to be fixed? Again, they are included in exactly one place (explicitly by design here, rather than just how the library is arranged).