Extracting type of variable within a macro

In reply to jms8:
Try changing your macro to

`define DO_STUFF(arg) \
var type(arg) arg``_new; \

See the 1800-2012 LRM section 6.23 Type operator.