If _GLIBCXX_THROW_OR_ABORT expands to just __builtin_abort() then the
bool variable used in the filesystem_error constructor is unused. Mark
it as maybe_unused to there's no warning for -fno-exceptions builds.
libstdc++-v3/ChangeLog:
* src/c++17/fs_dir.cc (fs::recursive_directory_iterator::pop):
Add [[maybe_unused]] attribute.
* src/filesystem/dir.cc (fs::recursive_directory_iterator::pop):
Likewise.
void
fs::recursive_directory_iterator::pop()
{
- const bool dereferenceable = _M_dirs != nullptr;
+ [[maybe_unused]] const bool dereferenceable = _M_dirs != nullptr;
error_code ec;
pop(ec);
if (ec)
void
fs::recursive_directory_iterator::pop()
{
- const bool dereferenceable = _M_dirs != nullptr;
+ [[maybe_unused]] const bool dereferenceable = _M_dirs != nullptr;
error_code ec;
pop(ec);
if (ec)