From: "Anthony.Appleyard" 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: 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?