public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* switch index optimization
@ 1998-01-25 22:34 Richard Henderson
  1998-01-25 23:02 ` Joe Buck
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Henderson @ 1998-01-25 22:34 UTC (permalink / raw)
  To: egcs

The talk on linux-kernel about the bogus non-void function returns
without a value warning you get from

  int foo(int x, int y) {
    switch (x & 3) { 
      case 0: ...; return y;
      case 1: ...; return y;
      case 2: ...; return y;
      case 3: ...; return y;
    }
  }

got me thinking.  The following patch won't actually fix this case,
since this is below the threshold for a tablejump, but it points the
way, and does do some good.  

Or should this go somewhere else like jump?


r~

^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <egcs.199801271819.KAA01586@atrus.synopsys.com>]

end of thread, other threads:[~1998-01-28  1:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-25 22:34 switch index optimization Richard Henderson
1998-01-25 23:02 ` Joe Buck
1998-01-25 23:14   ` Richard Henderson
1998-01-25 23:27     ` Jeffrey A Law
1998-01-27  7:35       ` Lassi A. Tuura
1998-01-27  9:36         ` Jeffrey A Law
1998-01-27 13:09         ` Andi Kleen
1998-01-27  9:59           ` Jeffrey A Law
1998-01-27 10:20             ` Joe Buck
1998-01-27 13:09               ` Jeffrey A Law
     [not found] <egcs.199801271819.KAA01586@atrus.synopsys.com>
1998-01-28  1:10 ` Todd P. Whitesel

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).