delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/22/06:25:33

From: "Anthony.Appleyard" <MCLSSAA2 AT fs2 DOT mt DOT umist DOT ac DOT uk>
Organization: Materials Science Centre
To: DJGPP AT delorie DOT com
Date: Mon, 22 Dec 1997 11:24:10 GMT
Subject: how to make switch(){ } compile as lookup table always?
Reply-to: Anthony DOT Appleyard AT umist DOT ac DOT uk
Message-ID: <4B0C721CA8@fs2.mt.umist.ac.uk>

Please reply to me in person, as I had to unsubscribe from djgpp due to email
intray overload: I will be away from my email over Xmas and New Year.

I have djgpp v2. A program contains a switch(c){  } statement which is obeyed
very many times. c can be from 0 to 511. How can I make djgpp compile the
switch() always as a lookup table of labels and not as a lot of time-wasting
tests and jumps even if the resulting lookup table would be very gappy? I
can't find anything about this in DJGPP\INFO\ or in the FAQ.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019