delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/14/04:10:42

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, 14 Apr 1997 08:51:34 GMT-1
Subject: Re: How is switch implemented?
Reply-to: Anthony DOT Appleyard AT umist DOT ac DOT uk
Message-ID: <F0AF0B21ED@fs2.mt.umist.ac.uk>

  korpela AT albert DOT ssl DOT berkeley DOT edu (Eric J. Korpela) wrote:-
> GCC does optimize [switches] things as a jump table, but not all compilers
> do so. ...

  What happens if a switch(i){...} contains `case 0:' and also `case 0xffff:'?
Does it make a jump table 0x10000 elements long, occupying 0x40000 bytes of
program memory? Or if a jump table would be too big does djgpp use tests and
jumps?

- Raw text -


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