This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Spaces in macro expansion in a #include?
- From: "xuinkrbin." <gcc dot 20 dot xuinkrbin at spamgourmet dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 31 Mar 2014 09:53:55 -0700 (PDT)
- Subject: Spaces in macro expansion in a #include?
- Authentication-results: sourceware.org; auth=none
Given a macro:
#define A(x) #x
#define B 1
#define C 2
#define D B C
If I have the following:
#include A(D)
GCC seems to expand the macro to:
"12"
and search for a file named "12" instead of "1 2".
If I have just:
D
GCC seems to expand the macro to:
1 2
This behavior seems inconsistent. Is it documented anywhere? Searching as I
might turns up no information.
--
View this message in context: http://gcc.1065356.n5.nabble.com/Spaces-in-macro-expansion-in-a-include-tp1022862.html
Sent from the gcc - Help mailing list archive at Nabble.com.