let gcc warn when printf params types don't match format

this moves the printf macro definition to the end of the header file,
otherwise the gcc __attribute__'s name ends up being 'tfp_format',
which is invalid.