"(m++)++" is not valid Java syntax, even when it's not part of a loop. The ++ operator must always operate on an assignable variable (or what people sometimes call an "lvalue"). "m++" is not an assignable variable, which means you cannot write a statement like "m++ = 5". "m++" by itself is fine, but this evaluates to an integer value--and you cannot use ++ on a raw integer value (i.e. you can't write "2++").
To achieve what you seem to be trying to do, use something like this instead: