This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
"warning: preprocessor directive not recognised within macro arg"(fwd)
- To: gcc at gcc dot gnu dot org
- Subject: "warning: preprocessor directive not recognised within macro arg"(fwd)
- From: Mo McKinlay <mmckinlay at labs dot interopen dot org>
- Date: Thu, 16 Mar 2000 01:09:58 +0000 (GMT)
Hi folks,
I've been compiling the Open Look libraries for Linux (xview-3.2p1), and
ran up against the above warning followed by "unmatched #ifdef" errors.
I can fix the sources, no problem, but I was wondering if there was any
plans to support preprocessor directives within macro expansions? For
example:
#define xstrncpy(a, b, n) strcpy(a, b)
void myfunc(char *a) {
xstrcpy(a,
#ifdef SOME_OPTION
some_function(),
#else
"Some text",
#endif
n);
With gcc 2.95.2, compilation would fail with:
bug.c:8: warning: preprocessor directive not recognised within macro arg
bug.c:8: warning: preprocessor directive not recognised within macro arg
bug.c:8: unbalanced #endif
Just to clarify, I know the sources can be fixed easily, I was merely
wondering if there are any plans to make this work without requiring
source changes. I've not tried development snapshots, so I have no idea
about the state of this "feature" in newer releases :-)
Many thanks.
--
Mo McKinlay T: +44 (0) 709 22 55 05 x1
Chief Software Architect F: +44 (0) 709 22 55 05 x3
inter/open E: mmckinlay@labs.interopen.org
A division of Bekon Marketing Limited W: http://www.interopen.org