Hi,
I have a big switch () {..}:
unsigned i;
....
switch(i) {
case 0: ...break;
case 1: ...break;
...
case 63: ...break;
}
64 cases, no default, no holes. I thought, GCC creates a jumptable, but it does not.
Which criteria must be met ?
Is there a way to force it ?
I'm using -O3 with LTO.
I have a big switch () {..}:
unsigned i;
....
switch(i) {
case 0: ...break;
case 1: ...break;
...
case 63: ...break;
}
64 cases, no default, no holes. I thought, GCC creates a jumptable, but it does not.
Which criteria must be met ?
Is there a way to force it ?
I'm using -O3 with LTO.
Last edited: