From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11246 invoked by alias); 10 Nov 2003 12:17:55 -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 11238 invoked from network); 10 Nov 2003 12:17:54 -0000 Received: from unknown (HELO smtp.inode.at) (62.99.194.4) by sources.redhat.com with SMTP; 10 Nov 2003 12:17:54 -0000 Received: from mail.ssi-schaefer-peem.com ([62.99.238.66]:4689 helo=e1.peemdomain.at) by smtp.inode.at with smtp (Exim 4.10) id 1AJAzP-0007QW-00 for gcc-help@gcc.gnu.org; Mon, 10 Nov 2003 13:17:51 +0100 Received: from peemnt3.peemdomain.at ([10.1.10.10]) by e1.peemdomain.at (SAVSMTP 3.1.2.35) with SMTP id M2003111013171814200 for ; Mon, 10 Nov 2003 13:17:18 +0100 Received: from laptop-svetlik ([172.16.100.161]) by peemnt3.peemdomain.at with Microsoft SMTPSVC(5.0.2195.6713); Mon, 10 Nov 2003 13:17:52 +0100 Content-Type: text/plain; charset="us-ascii" From: Michael Svetlik Organization: SSI-Schaefer-PEEM To: gcc-help@gcc.gnu.org Subject: Where should g++ find a 'max' macro or function ? Date: Mon, 10 Nov 2003 12:17:00 -0000 User-Agent: KMail/1.4.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200311101316.34775.m.svetlik@ssi-schaefer-peem.com> X-OriginalArrivalTime: 10 Nov 2003 12:17:52.0484 (UTC) FILETIME=[A9EBF240:01C3A784] X-SW-Source: 2003-11/txt/msg00128.txt.bz2 Hi, folks. I'm sure, somewhere in a mailing list archive around the globe is the answer - I'm too blockheaded to find it. The problem: a little file /* -------------------------------------------------------- */ int maxxx (int a, int b) { return max(a,b); } /* -------------------------------------------------------- */ is pushed into g++ for compilation : >> g++ -o max.o -c max.c and produces : max.c: In function `int maxxx(int, int)': max.c:4: `max' undeclared (first use this function) max.c:4: (Each undeclared identifier (bla blaaa ....) g++ is >>Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs Configured with: /home/michl/sources/gnu/gcc-3.2.3/configure --enable-languages=c,c++ Thread model: posix gcc version 3.2.3 The output of >> g++ -E max.c is # 1 "max.c" # 1 "" # 1 "" # 1 "max.c" int maxxx (int a, int b) { return max(a,b); } Strange, g++-2.95.3 is capable of translating it correctly, but doesn't produce the 'built-in' stuff with '-E'. I've checked Stroustrup, as well as the archive here, without success. Anyone there, who has an idea ? TIA Michael