another cpplib bug
Zack Weinberg
zack@rabi.columbia.edu
Sun Sep 27 12:11:00 GMT 1998
The appended file is mis-processed by cpplib: an `@' replaces the
first character of `init' on the line referring to ONCE. If PREFIX is
defined to something other than the empty string, the bug does not
occur.
Please add this to the testsuite. Patch for the bug will follow.
zw
-- cpp-bug-3.c --
#define P(a,b) P1(a,b)
#define P1(a,b) a##b
#define ONCE(x, y) (x ?: x = y())
#define PREFIX
extern int P(PREFIX, init) (void);
int
fun(void)
{
static int memo;
return ONCE(memo, P(PREFIX, init));
}
More information about the Gcc-bugs
mailing list