Re: [committed] libstdc++: Disable over-zealous warnings about std::string copies [PR103332]

2021-12-10 Thread Jonathan Wakely via Gcc-patches
On Fri, 10 Dec 2021 at 17:17, Jakub Jelinek wrote: > > On Fri, Dec 10, 2021 at 10:11:04AM -0700, Martin Sebor via Gcc-patches wrote: > > On 12/10/21 9:41 AM, Jakub Jelinek wrote: > > > On Fri, Dec 10, 2021 at 09:35:50AM -0700, Martin Sebor via Gcc-patches > > > wrote: > > > > The above was just a

Re: [committed] libstdc++: Disable over-zealous warnings about std::string copies [PR103332]

2021-12-10 Thread Jonathan Wakely via Gcc-patches
On Fri, 10 Dec 2021 at 16:35, Martin Sebor wrote: > > On 12/10/21 3:12 AM, Jonathan Wakely wrote: > > On Fri, 10 Dec 2021 at 01:50, Martin Sebor via Libstdc++ > > wrote: > >> > >> On 12/9/21 5:38 PM, Martin Sebor wrote: > >>> On 12/9/21 4:24 PM, Jonathan Wakely via Gcc-patches wrote: >

Re: [committed] libstdc++: Disable over-zealous warnings about std::string copies [PR103332]

2021-12-10 Thread Jakub Jelinek via Gcc-patches
On Fri, Dec 10, 2021 at 10:11:04AM -0700, Martin Sebor via Gcc-patches wrote: > On 12/10/21 9:41 AM, Jakub Jelinek wrote: > > On Fri, Dec 10, 2021 at 09:35:50AM -0700, Martin Sebor via Gcc-patches > > wrote: > > > The above was just a quick proof of concept experiment. You're > > > of course

Re: [committed] libstdc++: Disable over-zealous warnings about std::string copies [PR103332]

2021-12-10 Thread Martin Sebor via Gcc-patches
On 12/10/21 9:41 AM, Jakub Jelinek wrote: On Fri, Dec 10, 2021 at 09:35:50AM -0700, Martin Sebor via Gcc-patches wrote: The above was just a quick proof of concept experiment. You're of course right that the final solution can't be so crude(*). But if the required functions are always_inline

Re: [committed] libstdc++: Disable over-zealous warnings about std::string copies [PR103332]

2021-12-10 Thread Jakub Jelinek via Gcc-patches
On Fri, Dec 10, 2021 at 09:35:50AM -0700, Martin Sebor via Gcc-patches wrote: > The above was just a quick proof of concept experiment. You're > of course right that the final solution can't be so crude(*). > But if the required functions are always_inline (I think member > functions defined in

Re: [committed] libstdc++: Disable over-zealous warnings about std::string copies [PR103332]

2021-12-10 Thread Martin Sebor via Gcc-patches
On 12/10/21 3:12 AM, Jonathan Wakely wrote: On Fri, 10 Dec 2021 at 01:50, Martin Sebor via Libstdc++ wrote: On 12/9/21 5:38 PM, Martin Sebor wrote: On 12/9/21 4:24 PM, Jonathan Wakely via Gcc-patches wrote: These warnings are triggered by perfectly valid code using std::string. They're

Re: [committed] libstdc++: Disable over-zealous warnings about std::string copies [PR103332]

2021-12-10 Thread Jonathan Wakely via Gcc-patches
On Fri, 10 Dec 2021 at 01:50, Martin Sebor via Libstdc++ wrote: > > On 12/9/21 5:38 PM, Martin Sebor wrote: > > On 12/9/21 4:24 PM, Jonathan Wakely via Gcc-patches wrote: > >> These warnings are triggered by perfectly valid code using std::string. > >> They're particularly bad when

Re: [committed] libstdc++: Disable over-zealous warnings about std::string copies [PR103332]

2021-12-10 Thread Jonathan Wakely via Gcc-patches
On Fri, 10 Dec 2021 at 00:39, Martin Sebor via Libstdc++ wrote: > > On 12/9/21 4:24 PM, Jonathan Wakely via Gcc-patches wrote: > > These warnings are triggered by perfectly valid code using std::string. > > They're particularly bad when --enable-fully-dynamic-string is used, > > because even

Re: [committed] libstdc++: Disable over-zealous warnings about std::string copies [PR103332]

2021-12-09 Thread Martin Sebor via Gcc-patches
On 12/9/21 5:38 PM, Martin Sebor wrote: On 12/9/21 4:24 PM, Jonathan Wakely via Gcc-patches wrote: These warnings are triggered by perfectly valid code using std::string. They're particularly bad when --enable-fully-dynamic-string is used, because even std::string().begin() will give a warning.

Re: [committed] libstdc++: Disable over-zealous warnings about std::string copies [PR103332]

2021-12-09 Thread Martin Sebor via Gcc-patches
On 12/9/21 4:24 PM, Jonathan Wakely via Gcc-patches wrote: These warnings are triggered by perfectly valid code using std::string. They're particularly bad when --enable-fully-dynamic-string is used, because even std::string().begin() will give a warning. Use pragmas to stop the troublesome