The definition of CFG_region uses a clever expression involving defined(CFG_*). But defined can only be used in the pre-processor, and the only way to push the info to the compiler is with #if. So need to rewrite as a chain of #if statements assigning a numeric value based on the first match.