#define NUM2TEXT_(n)    #n
#define NUM2TEXT(n) NUM2TEXT_(n)

#define macro(name) \
const char *x = name ## NUM2TEXT(__LINE__)