warning: pasting would not give a valid preprocessing token

Alex Feldman al.feldman@sangoma.com
Tue Aug 21 06:25:00 GMT 2001


Hello,

I compiling the follow program on Red-Hat Linux 7.0 with gcc 2.96.

#define macro_test(x)	tmp.##x++
typedef struct {
	int test;
} test_t;
int main()
{
	test_t tmp;
	tmp.test = 0;
	macro_test(test);
}

when I compiled this program with gcc I received the following warning:

	test.c:11:18: warning: pasting would not give a valid preprocessing token

What's wrong with this macro and what this warning means?

Thank you.

Alex



More information about the Gcc-bugs mailing list