Since typeof
is determined in a later phase of compilation, way after preprocessing, this is impossible.
Also typeof
does not expand to a type identifier; it does not work at the textual/code level, but at the semantic level instead. It's a keyword the compiler interprets and uses to determine the type for its internal data structures.
Only thing you can do is to add the type to the macro:
#define TYPED_VARIABLE(type, identifier) type identifier ## _ ## type
However, as a wise man recently said: "Using Hungarian notation is brainless and is a huge error, so don't do it!" I fully agree.