SWIG does properly parse constant expression involving the % symbol (modulus operator), but it fails if the constant expression occurs between square brackets (constant length array size). So ...
int i = 12 % 6; works just fine
int array[ 12 % 6 ]; generates a parser error.
Attached interface file demonstrates the problem.