From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19485 invoked by alias); 30 Aug 2004 08:24:53 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 19358 invoked from network); 30 Aug 2004 08:24:51 -0000 Received: from unknown (HELO chandgate.mahindrabt.com) (202.75.195.52) by sourceware.org with SMTP; 30 Aug 2004 08:24:51 -0000 Received: from interscan (imss1.chand.mahindrabt.com [10.3.0.65]) by chandgate.mahindrabt.com (8.12.10/8.12.10) with ESMTP id i7U8WgJ5011659 for ; Mon, 30 Aug 2004 14:02:42 +0530 Received: from intranet.chand.mahindrabt.com ([10.3.0.2]) by interscan with InterScan Messaging Security Suite; Mon, 30 Aug 2004 14:00:01 +0530 Received: from british-s9m83vo ([10.3.0.150])by intranet.chand.mahindrabt.com (8.12.10/8.12.10) with ESMTP id i7U8V4Hd019229for ; Mon, 30 Aug 2004 14:01:05 +0530 Received: from dscp05598 ([172.24.3.148]) by british-s9m83vo with InterScan Messaging Security Suite; Mon, 30 Aug 2004 14:00:38 +0530 Message-ID: <00a801c48e6c$9911a8a0$940318ac@mahindrabt.com> From: To: Subject: Spam: Can macros be expanded only during the start of a program? Date: Mon, 30 Aug 2004 08:40:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-imss-version: 2.5 X-imss-result: Commercial_LeastConfident X-imss-scores: Clean:0.58192 C:21 M:3 S:5 R:5 X-imss-settings: Baseline:3 C:3 M:3 S:3 R:3 (0.5000 1.5000) X-SW-Source: 2004-08/txt/msg00268.txt.bz2 Hi everybody, I am trying out a rather complex build of an open source package containing some hundreds of '.c' and '.h' modules. I am getting stuck up at one point. The portion of the code that is failing goes something like this (in pseudocode language) .......Statement.......... .......Statement.......... MACRO EXPANSION .......Statement.......... .......Statement.......... The macro is mapped to a function and the expansion occurs in between some set of statements. The make is failing at this line with the error: MACRO EXPANSION Invalid statement I am looking into the problem. However I just wanted to know one thing (a newbie question you could say), just as in between a set of statements you cant declare a new variable by saying "int x" or something is it also the case that macros can only be expanded only at the declaration-of-variables stage? Thanks in advance. SNODX