Implementation of trivial integer casts in enum defines supporting typedefs.