This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Missing "var is used uninitialized" warning?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 17 Sep 2011 21:35:05 +0100
- Subject: Re: Missing "var is used uninitialized" warning?
- References: <4E7503F3.5060800@gjlay.de>
On 17 September 2011 21:32, Georg-Johann Lay wrote:
> Hi, compiled with -Wall -Wextra the wollowing lines don't complain about a
> being used uninitialized. ?Tried with 4.5 and 4.6. ?Am I missing something?
>
> int func (void)
> {
> ? ?int a = a;
>
> ? ?return a;
> }
Yes, you're missing -Winit-self