Skip to content

Commit

Permalink
[libcxx][ios] initialize __fill_val_ in _FillHelper
Browse files Browse the repository at this point in the history
(cherry picked from commit 6c2bb185d91552032b1140d7c08b43ecf114e066)
  • Loading branch information
daltenty committed Sep 27, 2024
1 parent 1a9569c commit ecb50a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libcxx/include/ios
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,10 @@ template <class _Traits>
// Attribute 'packed' is used to keep the layout compatible with the previous
// definition of the '__fill_' and '_set_' pair in basic_ios on AIX & z/OS.
struct _LIBCPP_PACKED _FillHelper {
_LIBCPP_HIDE_FROM_ABI void __init() { __set_ = false; }
_LIBCPP_HIDE_FROM_ABI void __init() {
__set_ = false;
__fill_val_ = _Traits::eof();
}
_LIBCPP_HIDE_FROM_ABI _FillHelper& operator=(typename _Traits::int_type __x) {
__set_ = true;
__fill_val_ = __x;
Expand Down

0 comments on commit ecb50a9

Please sign in to comment.