From owner-freebsd-current Sat Feb 8 12:56:55 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 C9AC737B401 for ; Sat, 8 Feb 2003 12:56:53 -0800 (PST) Received: from tomts23-srv.bellnexxia.net (tomts23.bellnexxia.net [209.226.175.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id B200343F93 for ; Sat, 8 Feb 2003 12:56:52 -0800 (PST) (envelope-from matt@gsicomp.on.ca) Received: from gabby.gsicomp.on.ca ([65.95.176.5]) by tomts23-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20030208205651.FHQW20375.tomts23-srv.bellnexxia.net@gabby.gsicomp.on.ca>; Sat, 8 Feb 2003 15:56:51 -0500 Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by gabby.gsicomp.on.ca (8.12.6/8.12.6) with SMTP id h18KrkjC094541; Sat, 8 Feb 2003 15:53:46 -0500 (EST) (envelope-from matt@gsicomp.on.ca) Message-ID: <002001c2cfb4$93443960$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: "Brent Verner" , References: <20030208181736.GA14066@rcfile.org> Subject: Re: gcc-3.2.1 and c++ headers Date: Sat, 8 Feb 2003 15:56:38 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 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 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.) Be glad that the gcc maintainers have finally updated their C++ compiler to be more standards-compliant. I'd suggest feeding back patches to the jdk maintainer. -- Matt Emmerton ----- Original Message ----- From: "Brent Verner" To: Sent: Saturday, February 08, 2003 1:17 PM Subject: gcc-3.2.1 and c++ headers > In trying to compile the most recent native jdk-1.4.1, I noticed > that compiling with the header didn't work. > > // ** won't link ** > #include > > // ** works ** > // #include > > // ** works ** > // #include > // using namespace std; > > int main(){ > return 1; > } > void xxx (ostream& os) { > os << ' '; > os << "out\n"; > } > > This code will compile on 4.7-stable (gcc-2.95), and on > debian/linux (gcc-3.2.2) with a #warning. > > I am aware that the <$HEADER.h> includes are deprecated, but is > there any intent to allow the deprecated headers to work with > the system compiler (gcc-3.2.1), or should any affected apps > be considered broken (on 5.0-current)? > > thanks. > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message