This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
We could go further and remove the ABI difference in regex_compiler when using _GLIBCXX_DEBUG, as in the attached patch. The trick is that for the char specialization we have padding bytes between _M_is_non_matching (a bool) and _M_cache (a std::bitset), so we can reuse one of those padding bytes for the _M_is_ready flag. For the non-char specializations the _Dummy struct takes up one byte, so we could reuse that for the _M_is_ready flag. To be safe we should probably check that alignof(std::bitset<8> > 2) so we know there really is a padding byte that can be re-used, and place the _M_is_ready flag afterwards if there is no padding.
Attachment:
regex_compiler.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |