From owner-freebsd-current Sat Feb 8 13:15: 3 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7464B37B401 for ; Sat, 8 Feb 2003 13:15:01 -0800 (PST) Received: from habanero.hesketh.net (habanero.hesketh.net [66.45.6.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3733E43F75 for ; Sat, 8 Feb 2003 13:15:00 -0800 (PST) (envelope-from brent@mutt.rcfile.org) Received: from mutt.rcfile.org (rdu57-229-060.nc.rr.com [66.57.229.60]) by habanero.hesketh.net (8.12.6/8.12.6) with ESMTP id h18LEsfx030689; Sat, 8 Feb 2003 16:14:55 -0500 X-Received-From: brent@mutt.rcfile.org X-Delivered-To: freebsd-current@FreeBSD.ORG X-Spam-Filter: check_local@habanero.hesketh.net by digitalanswers.org Received: from mutt.rcfile.org (localhost [127.0.0.1]) by mutt.rcfile.org (8.12.6/8.12.6) with ESMTP id h18LF4XD015196; Sat, 8 Feb 2003 16:15:04 -0500 (EST) (envelope-from brent@mutt.rcfile.org) Received: (from brent@localhost) by mutt.rcfile.org (8.12.6/8.12.6/Submit) id h18LF3XF015195; Sat, 8 Feb 2003 16:15:03 -0500 (EST) Date: Sat, 8 Feb 2003 16:15:03 -0500 From: Brent Verner To: Matthew Emmerton Cc: freebsd-current@FreeBSD.ORG Subject: Re: gcc-3.2.1 and c++ headers Message-ID: <20030208211503.GA15069@rcfile.org> References: <20030208181736.GA14066@rcfile.org> <002001c2cfb4$93443960$1200a8c0@gsicomp.on.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002001c2cfb4$93443960$1200a8c0@gsicomp.on.ca> X-muttrc: $Id: .muttrc,v 1.10 2003/02/08 08:35:24 brent Exp $ X-uname: FreeBSD 4.7-STABLE #32: Tue Feb 4 11:04:18 EST 2003 root@mutt.rcfile.org:/usr/obj/usr/src/sys/MUTTS User-Agent: Mutt/1.5.3i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [2003-02-08 15:56] Matthew Emmerton said: | Your working example below compiles without error using gcc 2.95.x (FreeBSD | 4.x) and gcc 3.2.x (FreeBSD 5.x), which is expected since it's compliant | C++. (See Stroustrup's The C++ Programming Language, section 9.2.2, which | indicates that the proper way to include C++ standard library headers such | as iostream, string, etc. is using angle brackets and no dot-h.) You compiled it on a -current (gcc-3.2.1) system? It does will not compile on mine, current as of 6 Feb. I noticed the problem with -current from 2 Feb, so I can't comment on anything before that date. brent@scratch$ cat test.cc #include int main(){ return 1; } void xxx (ostream& os) { os << ' '; os << "out\n"; } brent@scratch$ g++ test.cc -o test /var/tmp//ccuRnfCI.o: In function `xxx(ostream&)': /var/tmp//ccuRnfCI.o(.text+0x27): undefined reference to `ostream::operator<<(char)' /var/tmp//ccuRnfCI.o(.text+0x3a): undefined reference to `ostream::operator<<(char const*)' brent@scratch$ uname -a FreeBSD scratch.rcfile.org 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Thu Feb 6 13:39:46 EST 2003 root@scratch.rcfile.org:/jail/.usr.obj/jail/.cvsup/src/sys/SCRATCH i386 brent@scratch$ g++ -v Using built-in specs. Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 3.2.1 [FreeBSD] 20021119 (release) | Be glad that the gcc maintainers have finally updated their C++ compiler to | be more standards-compliant. agreed :-) | I'd suggest feeding back patches to the jdk maintainer. the jdk code uses the header, and will not compile on my system w/o some tweaks. cheers. brent -- "Develop your talent, man, and leave the world something. Records are really gifts from people. To think that an artist would love you enough to share his music with anyone is a beautiful thing." -- Duane Allman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message