After doing a quick test I get the same error.

Code:
typedef short TYPEVAR;

TYPEVAR test()
{
return 1;
}



However defining TYPEVAR as an int gives no error.



Code:
typedef int TYPEVAR;

TYPEVAR test()
{
return 1;
}


So I would suggest that the problem lies in the compiler.