[committed] libstdc++: Fix test that uses C++17 variable template in C++14

2022-11-10 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This test fails if run with -std=gnu++14 because it should be using is_convertible instead of is_convertible_v. libstdc++-v3/ChangeLog: * testsuite/experimental/propagate_const/observers/107525.cc: Use type trait instead of C++17 va

[committed] libstdc++: Add missing definition for in C++14 mode

2022-11-10 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- We support in C++14 as an extension, but that means that constexpr static data members are not implicitly inline. Add an out-of-class definition for C++14 mode. This fixes a FAIL when -std=gnu++14 is used: FAIL: 20_util/from_chars/1.cc (test for ex

[committed] libstdc++: Fix tests with non-const operator==

2022-11-10 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- These tests fail in strict -std=c++20 mode but their equality ops don't need to be non-const, it looks like an accident. This fixes two FAILs with -std=c++20: FAIL: 20_util/tuple/swap.cc (test for excess errors) FAIL: 26_numerics/valarray/87641.cc (

[PATCH] c++: Implement C++23 P2589R1 - - static operator[]

2022-11-10 Thread Jakub Jelinek via Gcc-patches
Hi! As stage1 is very close, here is a patch that implements the static operator[] paper. One thing that doesn't work properly is the same problem as I've filed yesterday for static operator() - PR107624 - that side-effects of the postfix-expression on which the call or subscript operator are appl

[PATCH] c++: Implement CWG 2654 - Un-deprecation of compound volatile assignments

2022-11-10 Thread Jakub Jelinek via Gcc-patches
Hi! Again, because stage1 close is near, posting the following patch to implement CWG 2654. Ok for trunk if it passes bootstrap/regtest and is voted into C++23 and C++20 as a DR? 2022-11-11 Jakub Jelinek * typeck.cc (cp_build_modify_expr): Implement CWG 2654 - Un-deprecation

Re: [PATCH v2] match.pd: rewrite select to branchless expression

2022-11-10 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 11 Nov 2022 at 07:58, Michael Collison wrote: > > This patches transforms ((x & 0x1) == 0) ? y : z y -into > (-(typeof(y))(x & 0x1) & z) y, where op is a '^' or a '|'. It also > transforms (cond (and (x , 0x1) != 0), (z op y), y ) into (-(and (x , > 0x1)) & z ) op y. > > Matching this pa

<    1   2