From owner-freebsd-questions Fri Oct 25 00:38:02 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA00644 for questions-outgoing; Fri, 25 Oct 1996 00:38:02 -0700 (PDT) Received: from freenet.hamilton.on.ca (main.freenet.hamilton.on.ca [199.212.94.65]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id AAA00639 for ; Fri, 25 Oct 1996 00:38:00 -0700 (PDT) Received: from james.freenet.hamilton.on.ca (james.freenet.hamilton.on.ca [199.212.94.66]) by freenet.hamilton.on.ca (8.7.5/8.7.3) with ESMTP id DAA10467 for ; Fri, 25 Oct 1996 03:38:10 -0400 (EDT) Received: from localhost (ac199@localhost) by james.freenet.hamilton.on.ca (8.7.5/8.7.3) with SMTP id DAA17468 for ; Fri, 25 Oct 1996 03:39:59 -0400 (EDT) X-Authentication-Warning: james.freenet.hamilton.on.ca: ac199 owned process doing -bs Date: Fri, 25 Oct 1996 03:39:59 -0400 (EDT) From: Tim Vanderhoek To: questions@freebsd.org Subject: PreProcessor concatenation question/bug Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk -- #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 '. 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