Replace Type

void function() {
  int tmp;
        tmp = ...
        puts((char *)tmp);
}

void function() {
        char *tmp;
        tmp = ...
        puts(tmp);
}

Motivation

Integer types and floating point types (on processors with a Floating Point Unit) are about the only types natively supported by a common processor. Operations with all other high-level types (enums, typedefs, structs, and unions) are translated into operations with these native types. Pointers are translated to memory addresses, which are also indistinguishable from regular integers in most architectures. This refactoring allows to recover the original high level types by propagating the type information across the code.

Mechanism