This is the mail archive of the gcc-bugs@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]

[Bug libstdc++/60958] Initialization of arrays in tr1/regex ill-formed or with undefined behaviour


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60958

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Hubert Tong from comment #2)
> I am trying to use a code base which used a TR1 regex implementation on
> another platform. Your comment led me to find
> http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.tr1,
> which does indicate that tr1/regex does not work.

It's incomplet and incorrekt. Even with those array initializers fixed that
function tries to call a non-existent std::ctype::isspace() function and does
(__f | __wt) when it should be (__f & __wt), and only works for char not
wchar_t, and probably other issues.

> Is the recommendation
> (short of switching over to C++11) to use the Boost implementation? Is the
> TR1 implementation status of regex in libstdc++ likely to change in the
> future?

The TR1 code in libstdc++ is not going to change, so if Boost is an option then
yes, use that.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]