Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!mcsun!hp4nl!orcenl!bengsig From: bengsig@dk.oracle.com (Bjorn Engsig) Newsgroups: comp.lang.c Subject: Re: What kind of code does switch/case make? Message-ID: <1272@dkunix9.dk.oracle.com> Date: 28 Feb 91 11:04:32 GMT References: <1991Feb26.024207.26167@wpi.WPI.EDU> <1991Feb26.025435.16306@wpi.WPI.EDU> Reply-To: bengsig@dk.oracle.com (Bjorn Engsig) Organization: Oracle Denmark Lines: 9 Article <1991Feb26.025435.16306@wpi.WPI.EDU> by fenn@wpi.WPI.EDU (Brian Fennell) says: |What kind of code does switch(fu){ case c1: ... case c2: ... } make? The compiler is free to make whatever code is prefers such as jump table, if-else sequence a combination, etc. as long as it sticks to the semantics of the switch. There is no general answer to your question. -- Bjorn Engsig, ORACLE Corporation, E-mail: bengsig@oracle.com, bengsig@oracle.nl "Stepping in others footsteps, doesn't bring you ahead"