public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeffrey A Law <law@hurl.cygnus.com>
To: Zack Weinberg <zack@rabi.columbia.edu>
Cc: egcs@egcs.cygnus.com
Subject: Re: added: tests for uninit variable warnings
Date: Thu, 11 Mar 1999 16:42:00 -0000	[thread overview]
Message-ID: <4108.921199337@hurl.cygnus.com> (raw)
In-Reply-To: Your message of Thu, 11 Mar 1999 19:10:49 MST.            < 199903120010.TAA03507@blastula.phys.columbia.edu >

  In message < 199903120010.TAA03507@blastula.phys.columbia.edu >you write:
  > uninit-4.c is bizarre: the warning goes away if you remove the '1'
  > case, or if you replace 'struct operation' by an int, or even if you
  > make 'struct operation' smaller!  Also, if you take out the default
  > case _and_ the '1' case, the warning goes away, but it shouldn't (what
  > if cpp_lex returns 3?)
Not weird at all.  Changing the numberof cases or density of the switch may
cause the compiler to emit it as a series of cascaded if/else statements which
the compiler is better able to analyze.

Structures also present some interesting problems to the uninitialized
variable analysis.  It's quite a bit more difficult for the compiler to
determine that an entire structure has been initialized as opposed to a simple
integer or floating point variable.


  > The tests are marked XFAIL - all systems.  I'm interested to know if
  > they pass on anyone's machine.
They probably will pass on some machines because of differences in switch
table density threshholds (at least uninit-4)

jeff

WARNING: multiple messages have this Message-ID
From: Jeffrey A Law <law@hurl.cygnus.com>
To: Zack Weinberg <zack@rabi.columbia.edu>
Cc: egcs@egcs.cygnus.com
Subject: Re: added: tests for uninit variable warnings
Date: Wed, 31 Mar 1999 23:46:00 -0000	[thread overview]
Message-ID: <4108.921199337@hurl.cygnus.com> (raw)
Message-ID: <19990331234600.FV6LKmBc3Ik584IpCcz9RyZI1W6wHnSFeN1D1ujvMJg@z> (raw)
In-Reply-To: <199903120010.TAA03507@blastula.phys.columbia.edu>

  In message < 199903120010.TAA03507@blastula.phys.columbia.edu >you write:
  > uninit-4.c is bizarre: the warning goes away if you remove the '1'
  > case, or if you replace 'struct operation' by an int, or even if you
  > make 'struct operation' smaller!  Also, if you take out the default
  > case _and_ the '1' case, the warning goes away, but it shouldn't (what
  > if cpp_lex returns 3?)
Not weird at all.  Changing the numberof cases or density of the switch may
cause the compiler to emit it as a series of cascaded if/else statements which
the compiler is better able to analyze.

Structures also present some interesting problems to the uninitialized
variable analysis.  It's quite a bit more difficult for the compiler to
determine that an entire structure has been initialized as opposed to a simple
integer or floating point variable.


  > The tests are marked XFAIL - all systems.  I'm interested to know if
  > they pass on anyone's machine.
They probably will pass on some machines because of differences in switch
table density threshholds (at least uninit-4)

jeff

  parent reply	other threads:[~1999-03-11 16:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-11 16:11 Zack Weinberg
     [not found] ` < 199903120010.TAA03507@blastula.phys.columbia.edu >
1999-03-11 16:42   ` Jeffrey A Law [this message]
1999-03-31 23:46     ` Jeffrey A Law
1999-03-31 23:46 ` Zack Weinberg

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=4108.921199337@hurl.cygnus.com \
    --to=law@hurl.cygnus.com \
    --cc=egcs@egcs.cygnus.com \
    --cc=zack@rabi.columbia.edu \
    /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).