Bug 110408 - SRPMS: deprecated construct is used in source – probably just a typo
SRPMS: deprecated construct is used in source – probably just a typo
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: oprofile (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: William Cohen
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2003-11-19 04:37 EST by Sysoltsev Slawa
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-11-19 11:27:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sysoltsev Slawa 2003-11-19 04:37:00 EST
Description of problem:
trying ‘make check’ in oprofile source root I’ve got a message from my 

Making check in libregex
make[1]: Entering directory 
source='op_regex.cpp' object='op_regex.o' libtool=no \
depfile='.deps/op_regex.Po' tmpdepfile='.deps/op_regex.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
icpc -DHAVE_CONFIG_H -I. -I. -I..  -I ../libutil++  -W -fno-common -g -
O2 -c -o op_regex.o `test -f 'op_regex.cpp' || echo './'`op_regex.cpp
icpc: Command line remark: option '-W' not supported
icpc: Command line remark: option '-MP' not supported
op_regex.cpp(26): error: overloaded function "bad_regex::bad_regex" 
cannot be defined in the current scope
  bad_regex::bad_regex(string const & pattern)

op_regex.cpp(27): error: expected a "{"

op_regex.cpp(286): warning #175: subscript out of range
                                throw bad_regex("invalid input file: " +

op_regex.cpp(294): warning #175: subscript out of range
                                                + '"' + line + '"');

op_regex.cpp(305): warning #175: subscript out of range
                                throw bad_regex("invalid input file: " +

compilation aborted for op_regex.cpp (code 2)

There is a typo in sources I believe: bad_regex:: bad_regex is declared 
in global namespace in op_regex.h but defined in unnamed namespace 
in op_regex.cpp. It’s definition should be moved out of the unnamed 
namespace (as regular_expression_replace members are defined 
outside of this namespace later in the file).
Here is the patch for this move:
--- libregex/op_regex.cpp.orig  2003-11-19 11:57:03.000000000 +0300
+++ libregex/op_regex.cpp       2003-11-19 12:23:42.000000000 +0300
@@ -21,14 +21,13 @@

 using namespace std;

-namespace {
 bad_regex::bad_regex(string const & pattern)

+namespace {

 string op_regerror(int err, regex_t const & regexp)

By using standart/accustomed language constructs oprofile would get 
more portability between platforms/compiler so please consider applying 
this patch despite there is no error emitted with current version of g++ 

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

How reproducible:

Steps to Reproduce:
1. Get Intel compiler (better 8.0) anywhere
2. do 'rpm -bc' using any compiler
3. try 'make check' in source root using Intel compiler: make check 
Actual results:
Compile-time error

Expected results:
no compile-time errors

Additional info:
Comment 1 William Cohen 2003-11-19 11:08:53 EST
What should be done is check the problem is still in the latest
development versions of oprofile available on
http://oprofile.sourceforge.net/ and submit a patch for it upstream.
Comment 2 Sysoltsev Slawa 2003-11-20 03:11:35 EST
Reported upstream http://sourceforge.net/tracker/index.php?
The resolution is to be changed to "reported upstream" as well.

By the way, not deprecating the sources only gcc can compile (actually 
due to bug I believe) you stimulate the uniqueness (and therefore some 
kind of monopoly) of g++, restricting the use of another compiler; this is 
action NOT in spite of OPEN development environment for that Linux is 
so loved - this is my is personal opinion.

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