Re: [analyzer PATCH] Restore bootstrap with g++ 4.8.

2024-06-14 Thread Jonathan Wakely
On 14/06/24 11:42 +0100, Jonathan Wakely wrote: On 14/06/24 11:37 +0100, Jonathan Wakely wrote: On 14/06/24 11:26 +0100, Jonathan Wakely wrote: On 14/06/24 10:36 +0100, Jonathan Wakely wrote: On 07/06/24 19:40 +0100, Roger Sayle wrote: This patch restores bootstrap when using g++ 4.8 as a ho

Re: [analyzer PATCH] Restore bootstrap with g++ 4.8.

2024-06-14 Thread Jonathan Wakely
On 14/06/24 11:37 +0100, Jonathan Wakely wrote: On 14/06/24 11:26 +0100, Jonathan Wakely wrote: On 14/06/24 10:36 +0100, Jonathan Wakely wrote: On 07/06/24 19:40 +0100, Roger Sayle wrote: This patch restores bootstrap when using g++ 4.8 as a host compiler. Returning a std::unique_ptr requires

Re: [analyzer PATCH] Restore bootstrap with g++ 4.8.

2024-06-14 Thread Jonathan Wakely
On 14/06/24 11:26 +0100, Jonathan Wakely wrote: On 14/06/24 10:36 +0100, Jonathan Wakely wrote: On 07/06/24 19:40 +0100, Roger Sayle wrote: This patch restores bootstrap when using g++ 4.8 as a host compiler. Returning a std::unique_ptr requires a std::move on C++ compilers (pre-C++17) that do

Re: [analyzer PATCH] Restore bootstrap with g++ 4.8.

2024-06-14 Thread Jonathan Wakely
On 14/06/24 10:36 +0100, Jonathan Wakely wrote: On 07/06/24 19:40 +0100, Roger Sayle wrote: This patch restores bootstrap when using g++ 4.8 as a host compiler. Returning a std::unique_ptr requires a std::move on C++ compilers (pre-C++17) that don't guarantee copy elision/return value optimizat

Re: [analyzer PATCH] Restore bootstrap with g++ 4.8.

2024-06-14 Thread Jonathan Wakely
On 07/06/24 19:40 +0100, Roger Sayle wrote: This patch restores bootstrap when using g++ 4.8 as a host compiler. Returning a std::unique_ptr requires a std::move on C++ compilers (pre-C++17) that don't guarantee copy elision/return value optimization. It doesn't though. The C++17 guaranteed c

Re: [analyzer PATCH] Restore bootstrap with g++ 4.8.

2024-06-07 Thread David Malcolm
On Fri, 2024-06-07 at 19:40 +0100, Roger Sayle wrote: > > This patch restores bootstrap when using g++ 4.8 as a host compiler. > Returning a std::unique_ptr requires a std::move on C++ compilers > (pre-C++17) that don't guarantee copy elision/return value > optimization. > > Bootstrapped on x86_6

[analyzer PATCH] Restore bootstrap with g++ 4.8.

2024-06-07 Thread Roger Sayle
This patch restores bootstrap when using g++ 4.8 as a host compiler. Returning a std::unique_ptr requires a std::move on C++ compilers (pre-C++17) that don't guarantee copy elision/return value optimization. Bootstrapped on x86_64-pc-linux-gnu using both gcc 4.8.5 (system) and gcc 10.2.1 (using "