Date: Fri, 25 Oct 1996 03:39:59 -0400 (EDT) From: Tim Vanderhoek <hoek@freenet.hamilton.on.ca> To: questions@freebsd.org Subject: PreProcessor concatenation question/bug Message-ID: <Pine.GSO.3.95.961025032713.16913A-100000@james.freenet.hamilton.on.ca>
next in thread | raw e-mail | index | archive | help
-- #define a(x,y) x ## y #define m partone #define n parttwo a(m,n) -- will result in -- # 1 "x.c" mn -- when run through `cc -E <file>'. What I want it to produce is, of course, not `mn', but `partoneparttwo'. How can I make it do this? (this is cpp 2.7.2.1 on 2.2-961006-SNAP) As it is right now, what seems to happen is that `m' and `n' don't get expanded in the 2nd pass because they are no longer separated by a space. However, I have read the section of the GNU info manual on macro expansion and concatanation and it sounds very somewhat like this is a bug in cpp. Thanks rendered in advance. -- Outnumbered? Maybe. Outspoken? Never! tIM...HOEk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.95.961025032713.16913A-100000>