Re: [PATCH] Fix some 28_regex/ fallout

2014-12-03 Thread Marek Polacek
On Wed, Dec 03, 2014 at 04:03:37PM +, Jonathan Wakely wrote: > On 03/12/14 16:47 +0100, Marek Polacek wrote: > >@@ -417,7 +417,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > typedef typename std::is_same<_CharT, char>::type _UseCache; > > > > static constexpr size_t > >- _S_cache_size

Re: [PATCH] Fix some 28_regex/ fallout

2014-12-03 Thread Jonathan Wakely
On 03/12/14 16:47 +0100, Marek Polacek wrote: @@ -417,7 +417,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename std::is_same<_CharT, char>::type _UseCache; static constexpr size_t - _S_cache_size() { return 1ul << (sizeof(_CharT) * __CHAR_BIT__); } + _S_cache_size() { r

[PATCH] Fix some 28_regex/ fallout

2014-12-03 Thread Marek Polacek
This fixes some testsuite fallout in 28_regex/. The problem was that with -m32 we were triggering UB in a shift. Fixed by multiplying the RHS of the shift-expression by 0 if we are not going to use the cache. Regtested/bootstrapped on ppc64-linux, ok for trunk? 2014-12-03 Marek Polacek