And if constant cases exist and are prevalent, you can use the __builtin_constant_p function, which returns true if the compiler knows the argument is a constant, and false otherwise.