Date: Sat, 8 Feb 2003 15:56:38 -0500 From: "Matthew Emmerton" <matt@gsicomp.on.ca> To: "Brent Verner" <brent@rcfile.org>, <freebsd-current@FreeBSD.ORG> Subject: Re: gcc-3.2.1 and c++ headers Message-ID: <002001c2cfb4$93443960$1200a8c0@gsicomp.on.ca> References: <20030208181736.GA14066@rcfile.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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" <brent@rcfile.org> To: <freebsd-current@FreeBSD.ORG> 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 <iostream.h> header didn't work. > > // ** won't link ** > #include <iostream.h> > > // ** works ** > // #include <backward/iostream.h> > > // ** works ** > // #include <iostream> > // 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002001c2cfb4$93443960$1200a8c0>