Bug 55778 - flex isn't gcc-3 compatible
flex isn't gcc-3 compatible
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: flex (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-06 10:47 EST by Han-Wen Nienhuys
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-11-06 10:47:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Han-Wen Nienhuys 2001-11-06 10:47:29 EST
Description of Problem:

Output of the C++ version of Flex is not compatible with G++ 3.

Version-Release number of selected component (if applicable):

flex-2.5.4a-15

How Reproducible:

Create a C++ lexer. The output will contain:

  #ifdef __cplusplus

  #include <stdlib.h>
  class istream;

this causes barfage for g++-3

In file included from /usr/include/FlexLexer.h:47,
                 from out/lexer.cc:240:
/usr/include/g++-v3/backward/iostream.h:36: using directive `istream' 
   introduced ambiguous type `istream'
lexer.ll: In member function `virtual int My_lily_lexer::yylex()':
lexer.ll:497: cannot convert `std::istream*' to `istream*' in assignment
lexer.ll: In member function `void yyFlexLexer::yy_load_buffer_state()':
lexer.ll:1020: cannot convert `istream*' to `std::istream*' in assignment
lexer.ll: In member function `void 
   yyFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)':
lexer.ll:1070: cannot convert `std::istream*' to `istream*' in assignment


the fix is to replace 

  class istream;

with

  #include <iostream.h>
Comment 1 Ngo Than 2001-11-06 11:39:46 EST
It's fixe in flex-2.5.4a-17. You willl find it in next rawhide release.

Note You need to log in before you can comment on or make changes to this bug.