From owner-freebsd-questions Sat Sep 1 14:30: 7 2001 Delivered-To: freebsd-questions@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id DEB5F37B401 for ; Sat, 1 Sep 2001 14:30:02 -0700 (PDT) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id OAA91393 for ; Sat, 1 Sep 2001 14:29:00 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.3/8.11.3) id f81LT0M54076 for freebsd-questions@freebsd.org; Sat, 1 Sep 2001 14:29:00 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200109012129.f81LT0M54076@arch20m.dellroad.org> Subject: gcc -D flag To: freebsd-questions@freebsd.org Date: Sat, 1 Sep 2001 14:29:00 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Can someone tell me what I'm missing here? $ cat > foo.c int main(int ac, char **av) { return 0; } #if FOO == BAR #error #endif $ cc -o foo -Wall -DFOO=BAR foo.c foo.c:3: #error $ cc -o foo -Wall foo.c foo.c:3: #error $ cc -o foo -Wall -DFOO=NOTBAR foo.c foo.c:3: #error Seems like #if FOO == BAR is being evalutated as true no matter what. This is with FreeBSD 4.3-REL, gcc 2.95.3. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message