$ ls
main.c
$ cat main.c
#define XNAME(n) xn
int main(void)
{
int XNAME(1) = 12;
int XNAME(2) = 15;
return 0;
}
$ gcc -E main.c
# 1 "main.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 31 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "<command-line>" 2
# 1 "main.c"
int main(void)
{
int xn = 12;
int xn = 15;
return 0;
}
$ vim main.c
$ cat main.c
#define XNAME(n) x#n
int main(void)
{
int XNAME(1) = 12;
int XNAME(2) = 15;
return 0;
}
$ gcc -E main.c
# 1 "main.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 31 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "<command-line>" 2
# 1 "main.c"
int main(void)
{
int x "1" = 12;
int x "2" = 15;
return 0;
}
$ vim main.c
$ cat main.c
#define XNAME(n) x##n
int main(void)
{
int XNAME(1) = 12;
int XNAME(2) = 15;
return 0;
}
$ gcc -E main.c
# 1 "main.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 31 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "<command-line>" 2
# 1 "main.c"
int main(void)
{
int x1 = 12;
int x2 = 15;
return 0;
}
$
|