public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Georg-Johann Lay <avr@gjlay.de>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Missing "var is used uninitialized" warning?
Date: Sat, 17 Sep 2011 20:43:00 -0000	[thread overview]
Message-ID: <4E750621.3060505@gjlay.de> (raw)
In-Reply-To: <CAH6eHdRLhkHcC_NwS=kgJbC3JQyJ5MgVtV+74r+91fqcViPGyQ@mail.gmail.com>

Jonathan Wakely schrieb:
> 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

Thanks.

Confusing... extra option for that?

The message with -Wuninitialized -Winit-self is
warning: 'a' is used uninitialized in this function [-Wuninitialized]

Is there a special reason why this is not part of Wall or Wextra?

  reply	other threads:[~2011-09-17 20:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-17 20:33 Georg-Johann Lay
2011-09-17 20:35 ` Jonathan Wakely
2011-09-17 20:43   ` Georg-Johann Lay [this message]
2011-09-17 20:48     ` Jonathan Wakely
2011-09-18 14:38       ` Georg-Johann Lay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E750621.3060505@gjlay.de \
    --to=avr@gjlay.de \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).