$subject, a test case (both a simple one and the full-blown one that triggered it in the user case) exists in https://github.com/mstorsjo/c99-to-c89/commit/enum-cast.
$subject, a test case (both a simple one and the full-blown one that triggered it in the user case) exists in mstorsjo@enum-cast.