Re: On -Wmaybe-uninitialized

2025-01-30 Thread Dmitry Antipov
On 1/30/25 4:29 PM, David Malcolm wrote: Arguably the state-merging code could be smarter here; I haven't investigated the details, but have filed it as PR analyzer/118702 here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118702 Thanks. You might be also interesting in https://gcc.gnu.org/

Re: On -Wmaybe-uninitialized

2025-01-30 Thread David Malcolm via Gcc
On Thu, 2025-01-30 at 09:03 +, Jonathan Wakely via Gcc wrote: > On Thu, 30 Jan 2025, 09:00 Dmitry Antipov, > wrote: > > > With (probably) -Wmaybe-uninitialized and/or -Wextra, shouldn't the > > compiler emit > > warning about possibly uninitialized 'y' passed to 'ddd()' in the > > example > >

Re: On -Wmaybe-uninitialized

2025-01-30 Thread Richard Biener via Gcc
On Thu, Jan 30, 2025 at 10:59 AM Jakub Jelinek wrote: > > On Thu, Jan 30, 2025 at 10:48:43AM +0100, Richard Biener via Gcc wrote: > > On Thu, Jan 30, 2025 at 10:01 AM Dmitry Antipov wrote: > > > > > > With (probably) -Wmaybe-uninitialized and/or -Wextra, shouldn't the > > > compiler emit > > > w

Re: On -Wmaybe-uninitialized

2025-01-30 Thread Jakub Jelinek via Gcc
On Thu, Jan 30, 2025 at 10:48:43AM +0100, Richard Biener via Gcc wrote: > On Thu, Jan 30, 2025 at 10:01 AM Dmitry Antipov wrote: > > > > With (probably) -Wmaybe-uninitialized and/or -Wextra, shouldn't the > > compiler emit > > warning about possibly uninitialized 'y' passed to 'ddd()' in the exam

Re: On -Wmaybe-uninitialized

2025-01-30 Thread Richard Biener via Gcc
On Thu, Jan 30, 2025 at 10:01 AM Dmitry Antipov wrote: > > With (probably) -Wmaybe-uninitialized and/or -Wextra, shouldn't the compiler > emit > warning about possibly uninitialized 'y' passed to 'ddd()' in the example > below? > > struct T { >int a; >int b; > }; > > extern int bbb (stru

Re: On -Wmaybe-uninitialized

2025-01-30 Thread Jonathan Wakely via Gcc
On Thu, 30 Jan 2025, 09:00 Dmitry Antipov, wrote: > With (probably) -Wmaybe-uninitialized and/or -Wextra, shouldn't the > compiler emit > warning about possibly uninitialized 'y' passed to 'ddd()' in the example > below? > Warnings are always going to be somewhat unreliable. You need a proper st