Since the shift count is implicitly modulo 32, you don't even need the subtraction:
bool isvowel(char c) {
return (1u << (c&31)) & 0x208222;
} bool isvowel(char c) {
return (1u << (c&31)) & 0x208222;
}This is why testing is not a substitute for correctness. Sometimes you get the right answer by accident.
But it's good enough for code golf.