[Bug libstdc++/105915] [11 Regression] commit 42eff613 should be backported to gcc-11 for bits/fs_path.h consistency
heroxbd at sohu dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 10 12:57:04 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105915
--- Comment #5 from Benda Xu <heroxbd at sohu dot com> ---
(In reply to Jonathan Wakely from comment #4)
> (In reply to Benda Xu from comment #0)
> > 2. https://github.com/gentoo/gentoo/pull/25313
>
> N.B. I'm fixing it like this instead of backporting 42eff613d0, so that pull
> request might want to use the same patch:
>
> commit 60c84707034f025de3c8821cc5d6f27ff59143b0 (HEAD -> gcc-11)
> Author: Jonathan Wakely <jwakely@redhat.com>
> Date: Fri Jun 10 13:01:16 2022 +0100
>
> libstdc++: Partially revert r11-9772-g6f8133689f4397 [PR105915]
>
> The r11-9772-g6f8133689f4397 backport made two changes, but only one was
> needed on the gcc-11 branch. The other should not have been backported,
> and causes errors with clang. This removes the unwanted part.
>
> libstdc++-v3/ChangeLog:
>
> PR libstdc++/105915
> * include/experimental/bits/fs_path.h (path::begin, path::end):
> Remove noexcept from declarations.
>
> diff --git a/libstdc++-v3/include/experimental/bits/fs_path.h
> b/libstdc++-v3/include/experimental/bits/fs_path.h
> index 1cc1b3bf686..a2bc931c696 100644
> --- a/libstdc++-v3/include/experimental/bits/fs_path.h
> +++ b/libstdc++-v3/include/experimental/bits/fs_path.h
> b/libstdc++-v3/include/experimental/bits/fs_path.h
> index 1cc1b3bf686..a2bc931c696 100644
> --- a/libstdc++-v3/include/experimental/bits/fs_path.h
> +++ b/libstdc++-v3/include/experimental/bits/fs_path.h
> @@ -425,8 +425,8 @@ namespace __detail
> class iterator;
> typedef iterator const_iterator;
>
> - iterator begin() const noexcept;
> - iterator end() const noexcept;
> + iterator begin() const;
> + iterator end() const;
>
> /// @cond undocumented
> // Create a basic_string by reading until a null character.
> @@ -425,8 +425,8 @@ namespace __detail
> class iterator;
> typedef iterator const_iterator;
>
> - iterator begin() const noexcept;
> - iterator end() const noexcept;
> + iterator begin() const;
> + iterator end() const;
>
> /// @cond undocumented
> // Create a basic_string by reading until a null character.
Thank you Jonathan! We have confirmed in the same environment that the patch
works great.
More information about the Gcc-bugs
mailing list