Bug 59670
Summary: | '%option c++' produces warnings about deprecated headers | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Enrico Scholz <rh-bugzilla> | ||||||
Component: | flex | Assignee: | Than Ngo <than> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 7.3 | CC: | bero | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i386 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2002-03-12 13:23:08 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Enrico Scholz
2002-02-11 19:18:00 UTC
Created attachment 45303 [details]
Patch against flex-2.5.4a-19
I disagree with the need for the FLEX_STD macro. We should not encourage the creation of non-standards compliant code, and any anywhere near current gcc can handle std::istream/<iostream> even if it's not enforced. I've changed the code to use the correct constructs unconditionally. (2.5.4a-20) Since in FlexLexer.h the suggested - #include <iostream.h> + #include <iostream> was omitted, it is still in 2.5.4a-20: | $ echo '#include <FlexLexer.h>' >test.cc | $ g++ test.cc | In file included from /usr/include/g++-v3/backward/iostream.h:31, | from /usr/include/FlexLexer.h:47, | from test.cc:1: | /usr/include/g++-v3/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 <X> header for the <X.h> header for C++ | includes, or <sstream> instead of the deprecated header <strstream.h>. To | disable this warning use -Wno-deprecated. Right, overlooked that one. Fixed in -21. Still bugs in 2.5.4a-21... In FlexLexer.h all of the 'ostream' were not replaced by 'std::ostream'; only the 'istream' were fixed: | $ grep ostream /usr/include/FlexLexer.h | #include <iostream> | int yylex( std::istream* new_in, ostream* new_out = 0 ) | ostream* new_out = 0 ) = 0; | yyFlexLexer( std::istream* arg_yyin = 0, ostream* arg_yyout = 0 ); | virtual void switch_streams( std::istream* new_in, ostream* new_out ); | ostream* yyout; // output sink for default LexerOutput ~~~~~~~ should be std::ostream; above similarly Created attachment 47140 [details]
Corrected flex-2.5.4a-gcc31.patch
It's fixed in 2.5.4a-22. If we are speaking about the same 2.5.4a-22 | * Tue Feb 26 2002 Than Ngo <than> 2.5.4a-22 | - rebuild in new enviroment then the bad 'ostream' is still alive... oh, i have overlooked, it's definitively fixed in 2.5.4a-23 ;-) |