Re: [BUG] -Wuninitialized: initialize variable with itself

2022-11-14 Thread NightStrike via Gcc
On Mon, Nov 14, 2022, 10:49 David Brown wrote: > > > On 14/11/2022 16:10, NightStrike wrote: > > > > > > On Mon, Nov 14, 2022, 04:42 David Brown via Gcc > > > > Warnings are not perfect - there is always the risk of false > positives > > and false negatives. And different people will ha

Re: [BUG] -Wuninitialized: initialize variable with itself

2022-11-14 Thread David Brown via Gcc
On 14/11/2022 16:10, NightStrike wrote: On Mon, Nov 14, 2022, 04:42 David Brown via Gcc Warnings are not perfect - there is always the risk of false positives and false negatives.  And different people will have different ideas about what code is perfectly reasonable, and wha

Re: [BUG] -Wuninitialized: initialize variable with itself

2022-11-14 Thread NightStrike via Gcc
On Mon, Nov 14, 2022, 04:42 David Brown via Gcc wrote: > On 13/11/2022 19:43, Alejandro Colomar via Gcc wrote: > > Hi Andrew! > > > > On 11/13/22 19:41, Andrew Pinski wrote: > >> On Sun, Nov 13, 2022 at 10:40 AM Andrew Pinski > wrote: > >>> > >>> On Sun, Nov 13, 2022 at 10:36 AM Alejandro Coloma

Re: [BUG] -Wuninitialized: initialize variable with itself

2022-11-14 Thread Alejandro Colomar via Gcc
Hi David, On 11/14/22 10:41, David Brown wrote: On 13/11/2022 19:43, Alejandro Colomar via Gcc wrote: Hi Andrew! On 11/13/22 19:41, Andrew Pinski wrote: On Sun, Nov 13, 2022 at 10:40 AM Andrew Pinski wrote: On Sun, Nov 13, 2022 at 10:36 AM Alejandro Colomar via Gcc wrote: Hi, While dis

Re: [BUG] -Wuninitialized: initialize variable with itself

2022-11-14 Thread David Brown via Gcc
On 13/11/2022 19:43, Alejandro Colomar via Gcc wrote: Hi Andrew! On 11/13/22 19:41, Andrew Pinski wrote: On Sun, Nov 13, 2022 at 10:40 AM Andrew Pinski wrote: On Sun, Nov 13, 2022 at 10:36 AM Alejandro Colomar via Gcc wrote: Hi, While discussing some idea for a new feature, I tested the

Re: [BUG] -Wuninitialized: initialize variable with itself

2022-11-13 Thread Andrew Pinski via Gcc
On Sun, Nov 13, 2022 at 10:41 AM Andrew Pinski wrote: > > On Sun, Nov 13, 2022 at 10:40 AM Andrew Pinski wrote: > > > > On Sun, Nov 13, 2022 at 10:36 AM Alejandro Colomar via Gcc > > wrote: > > > > > > Hi, > > > > > > While discussing some idea for a new feature, I tested the following > > > ex

Re: [BUG] -Wuninitialized: initialize variable with itself

2022-11-13 Thread Alejandro Colomar via Gcc
Hi Andrew! On 11/13/22 19:41, Andrew Pinski wrote: On Sun, Nov 13, 2022 at 10:40 AM Andrew Pinski wrote: On Sun, Nov 13, 2022 at 10:36 AM Alejandro Colomar via Gcc wrote: Hi, While discussing some idea for a new feature, I tested the following example program: int main(void)

Re: [BUG] -Wuninitialized: initialize variable with itself

2022-11-13 Thread Andrew Pinski via Gcc
On Sun, Nov 13, 2022 at 10:40 AM Andrew Pinski wrote: > > On Sun, Nov 13, 2022 at 10:36 AM Alejandro Colomar via Gcc > wrote: > > > > Hi, > > > > While discussing some idea for a new feature, I tested the following example > > program: > > > > > > int main(void) > > { > > int i

Re: [BUG] -Wuninitialized: initialize variable with itself

2022-11-13 Thread Andrew Pinski via Gcc
On Sun, Nov 13, 2022 at 10:36 AM Alejandro Colomar via Gcc wrote: > > Hi, > > While discussing some idea for a new feature, I tested the following example > program: > > > int main(void) > { > int i = i; > return i; > } This is NOT a bug but a documented way of ha