Bug 56078 - Uses non-standard C++ code
Summary: Uses non-standard C++ code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: dejagnu
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-12 16:45 UTC by Bernhard Rosenkraenzer
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-11-12 16:56:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Bernhard Rosenkraenzer 2001-11-12 16:45:44 UTC
Description of Problem:
Dejagnu doesn't compile with gcc 3.1 because of its usage of 
non-standards compliant C++ code

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

How Reproducible:
100%

Steps to Reproduce:
1. rpm --rebuild dejagnu-1.4.1-3.src.rpm

Actual Results:
c++ -DPACKAGE=\"dejagnu\" -DVERSION=\"1.4.1\"  -I. -I.      -I../.. -g -c 
unit.cc
In file included from /usr/include/g++-v3/backward/strstream:51,
                 from ../../dejagnu.h:70,
                 from unit.cc:4:
/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.
In file included from unit.cc:4:
../../dejagnu.h: In function `char* testout(int)':
../../dejagnu.h:115: ISO C++ forbids declaration of `ostrstream' with no 
type
../../dejagnu.h:115: parse error before `(' token
../../dejagnu.h:116: `oss' undeclared (first use this function)
../../dejagnu.h:116: (Each undeclared identifier is reported only once 
for each
   function it appears in.)
../../dejagnu.h:116: `ios' undeclared (first use this function)
../../dejagnu.h:116: parse error before `::' token
../../dejagnu.h:117: `ends' undeclared (first use this function)
[...]

Expected Results:
package rebuilds

Additional Information:
STL classes are (enforced) in namespace std these days.
Adding "using namespace std;" will probably be a sufficient fix (and 
won't break older compilers, unless they're old enough to not support 
namespaces at all)

Comment 1 Jakub Jelinek 2001-11-12 16:55:56 UTC
Yeah, I know about it. Should be fixed in dejagnu-1.4.2, which I was waiting
for (but now I see it has been released already).


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