From owner-freebsd-current@FreeBSD.ORG Sun Jun 29 11:41:41 2003 Return-Path: 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 A9DA937B401 for ; Sun, 29 Jun 2003 11:41:41 -0700 (PDT) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1288744015 for ; Sun, 29 Jun 2003 11:41:41 -0700 (PDT) (envelope-from leimy2k@mac.com) Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id h5TIfdh0003031; Sun, 29 Jun 2003 11:41:39 -0700 (PDT) Received: from mac.com (adsl-33-225-56.jan.bellsouth.net [67.33.225.56]) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 2.0) with ESMTP id h5TIfaNl009112; Sun, 29 Jun 2003 11:41:37 -0700 (PDT) In-Reply-To: <013601c33e6a$eb312d70$0200000a@io> References: <013601c33e6a$eb312d70$0200000a@io> Mime-Version: 1.0 (Apple Message framework v578) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <4F7B10CF-AA61-11D7-92F6-0003937E39E0@mac.com> Content-Transfer-Encoding: 7bit From: David Leimbach Date: Sun, 29 Jun 2003 13:41:35 -0500 To: Allan Bowhill X-Mailer: Apple Mail (2.578) cc: fbsd-current Subject: Re: errors under g++ 3.2.2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2003 18:41:41 -0000 On Sunday, June 29, 2003, at 1:19PM, Allan Bowhill wrote: > I recently updated one of my machines to -current to adapt some code to > build under the new version of gcc (3.2.2). However, file IO using > > gives error messages about implicit typenames being deprecated, and I > can't > for the life of me figure out what to do my code to make the compiler > happy. > Has anyone encountered this? > > Below is a small example illustrating the problem. The source below > should > compile fine on a previous version of g++, as in -stable. However, it > will > not compile on -current using g++ 3.3.2. Does anyone know what to do > to the > simple source below to get it to compile happily under -current? > > (yes, I have checked gnu gcc's mailing list and FAQ/docs. I can't find > an > adequate explanation for it. I suspect it has something to do with > stricter > conformance to the finalized C++ standard, but since I am still a > novice any > explanation by gcc developers would probably have slipped by me) > Your code below is fine... there is something wrong with the C++ headers used in the FreeBSD tree. I haven't seen this on other platforms. I don't think that those with commit access generally do a lot with C++ [possibly a bad assumption, but I have a hard time believing the problem would have lived so long if this weren't the case] Dave > --------- > > #include > > int main() > { > std::ofstream afile("test.txt"); > afile << "some data"; > } > > ---------- > >> gcc -v > Using built-in specs. > Configured with: FreeBSD/i386 system compiler > Thread model: posix > gcc version 3.2.2 [FreeBSD] 20030205 (release) > > --------- > >> g++ test.cc > In file included from test.cc:1: > /usr/include/g++/fstream:304: warning: `typename > std::basic_filebuf<_CharT, > _Traits>::int_type' is implicitly a typename > /usr/include/g++/fstream:304: warning: implicit typename is deprecated, > please > see the documentation for details > /usr/include/g++/fstream:309: warning: `typename > std::basic_filebuf<_CharT, > _Traits>::int_type' is implicitly a typename > /usr/include/g++/fstream:309: warning: implicit typename is deprecated, > please > see the documentation for details > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org"