[Bug preprocessor/16903] __LINE__ is not implemented in preprocessor
joerg dot richter at pdv-fs dot de
gcc-bugzilla@gcc.gnu.org
Fri Aug 6 19:32:00 GMT 2004
------- Additional Comments From joerg dot richter at pdv-fs dot de 2004-08-06 19:32 -------
This is required behavior.
Perhaps you want something like this:
#define CONCAT_( a, b ) a ## b
#define CONCAT( a, b ) CONCAT_( a, b )
#define xxxprintf(fmt,...) \
{ static char BANK30 CONCAT( fmt_, __LINE__ )[] = fmt; \
printf(copy_format( CONCAT( fmt_, __LINE__ ) ), ##__VA_ARGS__); }
Arguments to ## are not expanded. You have to expand them yourself (with one
indirection) and concat them later. Note: The same is true for #
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16903
More information about the Gcc-bugs
mailing list