I used the method shown below to make the compiler yell at me for a variable type:
template <class T>
struct show_type;
Using it with the desired variable, therefore, compiler errors have an incomplete structure type:
typedef int32_t s32;
s32 a;
show_type<decltype(a)>();
Thus, GCC 5.3.0 generates an error:
Invalid use of incomplete type < struct show_type<int>'
And MSVC 2015:
' show_type<s32>': no suitable default constructor
Now I wonder if there is a way to make the error show the full hierarchy typedef(i.e. s32 -> int32_t -> int), or at least the newest typedefand first original type? I am not against dirty or evil tricks.