From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3247 invoked by alias); 28 Jul 2005 16:02:20 -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 3170 invoked by uid 22791); 28 Jul 2005 16:02:13 -0000 Received: from ctb-mesg3.saix.net (HELO ctb-mesg3.saix.net) (196.25.240.83) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 28 Jul 2005 16:02:13 +0000 Received: from GLEB (tbnb-165-193-208.telkomadsl.co.za [165.165.193.208]) by ctb-mesg3.saix.net (Postfix) with ESMTP id 8E39E3926 for ; Thu, 28 Jul 2005 18:02:09 +0200 (SAST) From: "Gerrit van Niekerk" To: gcc-help@gcc.gnu.org Date: Thu, 28 Jul 2005 16:02:00 -0000 MIME-Version: 1.0 Subject: Single line conditional compiles Reply-To: gerritvn@gpvno.co.za Message-ID: <42E91D4D.22097.1B3092F9@localhost> Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-SW-Source: 2005-07/txt/msg00314.txt.bz2 How can one implement single line conditional compile macros with GCC? Instead of having: #ifdef OPT1 #endif Having something like: IFOPT1 The following works with BorlandC, but not GCC: #ifdef OPT1 #define IFOPT1 #else #define IFOPT1 /##/ #endif I understand why it does not work - I am looking for a solution, not an explanation :) =============================================== Gerrit van Niekerk GP van Niekerk Ondernemings BK Roosstraat 211, Meyerspark, 0184, South Africa Tel: +27(12)8036501 Fax SA: 0866 413 555 Fax Int'l: +12(06)2034131 Email: gerritvn@gpvno.co.za Web: http://www.gpvno.co.za ===============================================