@nhgrif In this case it might be better, but I use macros out of habit. The thing is that in C doesn't have constants in the sense they exist in other languages. A
const
qualified variable is not a compile time constant, but rather an unmutable variable, and can not be used in an
integer constant expression, for instance as the lvalue of a variable initialization, the size of a (non-VLA) array etc. The only options in this case are macros and enum elements, which should probably be preferred. I'll edit my answer. —
jacwah 4 mins ago