Skip to content

Commit d2232e6

Browse files
committed
[libc++] Initialize all member variables of __state in <regex>
This is to prevent a GCC warning ( #65132). It looks like `__at_first` is always assigned before it's used, but all other member variables of this struct are initialized in the constructor, so there is no reason not to initialize `__at_first` as well. Differential Revision: https://reviews.llvm.org/D159249
1 parent be60192 commit d2232e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/regex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,7 @@ struct __state
14591459
_LIBCPP_INLINE_VISIBILITY
14601460
__state()
14611461
: __do_(0), __first_(nullptr), __current_(nullptr), __last_(nullptr),
1462-
__node_(nullptr), __flags_() {}
1462+
__node_(nullptr), __flags_(), __at_first_(false) {}
14631463
};
14641464

14651465
// __node

0 commit comments

Comments
 (0)