I seek format_spec function. Context described below.
Is there any compile-time function like that ?
#include <stdio.h>
#define typeof(x) __typeof(x)
int main(){
int x; /* Plain old int variable. */
typeof(x) y=8; /* Same type as x. Plain old int variable. */
//printing
printf(format_spec(typeof(x)), y);
/*I don't want to use:
printf("%d", y);
I want generic way to get format specifier for any type.*/
}