From owner-freebsd-bugs@FreeBSD.ORG Thu Mar 4 15:50:14 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20EA116A4CE for ; Thu, 4 Mar 2004 15:50:14 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 171C243D3F for ; Thu, 4 Mar 2004 15:50:14 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i24NoDbv082489 for ; Thu, 4 Mar 2004 15:50:13 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i24NoDNu082488; Thu, 4 Mar 2004 15:50:13 -0800 (PST) (envelope-from gnats) Resent-Date: Thu, 4 Mar 2004 15:50:13 -0800 (PST) Resent-Message-Id: <200403042350.i24NoDNu082488@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stefan Farfeleder Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C88D16A4CE for ; Thu, 4 Mar 2004 15:48:48 -0800 (PST) Received: from fafoe.narf.at (unknown [212.186.3.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65B9E43D1F for ; Thu, 4 Mar 2004 15:48:47 -0800 (PST) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at (wombat.fafoe.narf.at [192.168.1.42]) by fafoe.narf.at (Postfix) with ESMTP id C930C40EE; Fri, 5 Mar 2004 00:48:41 +0100 (CET) Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 2136F473; Fri, 5 Mar 2004 00:48:41 +0100 (CET) Message-Id: <20040304234841.2136F473@wombat.fafoe.narf.at> Date: Fri, 5 Mar 2004 00:48:41 +0100 (CET) From: Stefan Farfeleder To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: stefan@fafoe.narf.at Subject: bin/63781: [patch] Remove warning from X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Stefan Farfeleder List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2004 23:50:14 -0000 >Number: 63781 >Category: bin >Synopsis: [patch] Remove warning from >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Mar 04 15:50:13 PST 2004 >Closed-Date: >Last-Modified: >Originator: Stefan Farfeleder >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD wombat.fafoe.narf.at 5.2-CURRENT FreeBSD 5.2-CURRENT #16: Tue Mar 2 19:09:53 CET 2004 stefan@wombat.fafoe.narf.at:/usr/home/stefan/freebsd/obj/usr/home/stefan/freebsd/src/sys/WOMBAT i386 >Description: The header includes the obsolete C++ header which causes an annoying warning. >How-To-Repeat: $ cat test.cc #include int main() {} $ g++ test.cc In file included from /usr/include/c++/3.3/backward/iostream.h:31, from /usr/include/c++/3.3/FlexLexer.h:47, from test.cc:1: /usr/include/c++/3.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated. >Fix: --- FlexLexer.h.diff begins here --- Index: src/usr.bin/lex/FlexLexer.h =================================================================== RCS file: /usr/home/ncvs/src/usr.bin/lex/FlexLexer.h,v retrieving revision 1.3 diff -I.svn -u -r1.3 FlexLexer.h --- src/usr.bin/lex/FlexLexer.h 27 Oct 1999 07:56:43 -0000 1.3 +++ src/usr.bin/lex/FlexLexer.h 4 Mar 2004 20:47:33 -0000 @@ -44,7 +44,7 @@ #ifndef __FLEX_LEXER_H // Never included before - need to define base class. #define __FLEX_LEXER_H -#include +#include extern "C++" { @@ -61,14 +61,14 @@ virtual void yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0; virtual struct yy_buffer_state* - yy_create_buffer( istream* s, int size ) = 0; + yy_create_buffer( std::istream* s, int size ) = 0; virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0; - virtual void yyrestart( istream* s ) = 0; + virtual void yyrestart( std::istream* s ) = 0; virtual int yylex() = 0; // Call yylex with new input/output sources. - int yylex( istream* new_in, ostream* new_out = 0 ) + int yylex( std::istream* new_in, std::ostream* new_out = 0 ) { switch_streams( new_in, new_out ); return yylex(); @@ -76,8 +76,8 @@ // Switch to new input/output streams. A nil stream pointer // indicates "keep the current one". - virtual void switch_streams( istream* new_in = 0, - ostream* new_out = 0 ) = 0; + virtual void switch_streams( std::istream* new_in = 0, + std::ostream* new_out = 0 ) = 0; int lineno() const { return yylineno; } @@ -104,17 +104,18 @@ public: // arg_yyin and arg_yyout default to the cin and cout, but we // only make that assignment when initializing in yylex(). - yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 ); + yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 ); virtual ~yyFlexLexer(); void yy_switch_to_buffer( struct yy_buffer_state* new_buffer ); - struct yy_buffer_state* yy_create_buffer( istream* s, int size ); + struct yy_buffer_state* yy_create_buffer( std::istream* s, int size ); void yy_delete_buffer( struct yy_buffer_state* b ); - void yyrestart( istream* s ); + void yyrestart( std::istream* s ); virtual int yylex(); - virtual void switch_streams( istream* new_in, ostream* new_out ); + virtual void switch_streams( std::istream* new_in, + std::ostream* new_out ); protected: virtual int LexerInput( char* buf, int max_size ); @@ -125,7 +126,7 @@ int yyinput(); void yy_load_buffer_state(); - void yy_init_buffer( struct yy_buffer_state* b, istream* s ); + void yy_init_buffer( struct yy_buffer_state* b, std::istream* s ); void yy_flush_buffer( struct yy_buffer_state* b ); int yy_start_stack_ptr; @@ -140,8 +141,8 @@ yy_state_type yy_try_NUL_trans( yy_state_type current_state ); int yy_get_next_buffer(); - istream* yyin; // input source for default LexerInput - ostream* yyout; // output sink for default LexerOutput + std::istream* yyin; // input source for default LexerInput + std::ostream* yyout; // output sink for default LexerOutput struct yy_buffer_state* yy_current_buffer; --- FlexLexer.h.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: