Re: [PATCH] declare std::array members attribute const [PR101831]

2022-02-02 Thread Jonathan Wakely via Gcc-patches
On Wed, 2 Feb 2022 at 00:23, Martin Sebor wrote: > > On 2/1/22 17:15, Jonathan Wakely wrote: > > On Wed, 2 Feb 2022 at 00:13, Martin Sebor wrote: > >> > >> On 2/1/22 12:48, Jonathan Wakely wrote: > >>> On Tue, 1 Feb 2022 at 18:54, Martin Sebor via Libstdc++ > >>> wrote: > > Passing an

Re: [PATCH] declare std::array members attribute const [PR101831]

2022-02-01 Thread Martin Sebor via Gcc-patches
On 2/1/22 17:15, Jonathan Wakely wrote: On Wed, 2 Feb 2022 at 00:13, Martin Sebor wrote: On 2/1/22 12:48, Jonathan Wakely wrote: On Tue, 1 Feb 2022 at 18:54, Martin Sebor via Libstdc++ wrote: Passing an uninitialized object to a function that takes its argument by const reference is

Re: [PATCH] declare std::array members attribute const [PR101831]

2022-02-01 Thread Jonathan Wakely via Gcc-patches
On Wed, 2 Feb 2022 at 00:13, Martin Sebor wrote: > > On 2/1/22 12:48, Jonathan Wakely wrote: > > On Tue, 1 Feb 2022 at 18:54, Martin Sebor via Libstdc++ > > wrote: > >> > >> Passing an uninitialized object to a function that takes its argument > >> by const reference is diagnosed by

Re: [PATCH] declare std::array members attribute const [PR101831]

2022-02-01 Thread Martin Sebor via Gcc-patches
On 2/1/22 12:48, Jonathan Wakely wrote: On Tue, 1 Feb 2022 at 18:54, Martin Sebor via Libstdc++ wrote: Passing an uninitialized object to a function that takes its argument by const reference is diagnosed by -Wmaybe-uninitialized because most such functions read the argument. The exceptions

Re: [PATCH] declare std::array members attribute const [PR101831]

2022-02-01 Thread Jonathan Wakely via Gcc-patches
On Tue, 1 Feb 2022 at 18:54, Martin Sebor via Libstdc++ wrote: > > Passing an uninitialized object to a function that takes its argument > by const reference is diagnosed by -Wmaybe-uninitialized because most > such functions read the argument. The exceptions are functions that > don't access