From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200008060231.WAA22602@mal-ach.watson.ibm.com> To: Takashi Oe cc: linuxppc-dev@lists.linuxppc.org Subject: Re: a GCC question In-Reply-To: Message from Takashi Oe of "Sat, 05 Aug 2000 21:15:28 CDT." Date: Sat, 05 Aug 2000 22:31:57 -0400 From: David Edelsohn Sender: owner-linuxppc-dev@lists.linuxppc.org List-Id: I would guess that for smaller numbers of cases, GCC is deciding that it is more efficient to use a series of "if" statements for a decision tree instead of a switch statement. You can explicitly code it as such, e.g., if (bi->dispDeviceDepth == 32) ... else if (bi-dispDeviceDepth == 16) ... else if ... else abort(); (BTW you do not provide a default case for some illegal value in your switch statement.) David ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/