Hide Forgot
+++ This bug was initially created as a clone of Bug #722942 +++ Same behaviour seen in RHEL 5 as is seen in RHEL 6 in cloned BZ Description of problem: The problem is that readline shouldn't be defining isxdigit as a macro ever. That is wrong in C++ because it is a template function. If you look at ctype.h you see the correct declaration which is excluded from C++ with: #if !defined __NO_CTYPE && !defined __cplusplus <snip> # define isxdigit(c) __isctype((c), _ISxdigit) This is a bug in readline. Version-Release number of selected component (if applicable): CURRENTRELEASE How reproducible: 100% Steps to Reproduce: $ cat test.C #include <string> #include <readline/readline.h> #include <iostream> using namespace std; int main() { cout<<"Hi There "<<isxdigit(19)<<endl; return 0; } $ g++ test.C Actual results: In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ios:47, from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ostream:44, from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iostream:44, from test.C:3: /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/localefwd.h:90:35: error: macro "isxdigit" passed 2 arguments, but takes just 1 In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/basic_ios.h:44, from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ios:50, from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ostream:44, from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iostream:44, from test.C:3: /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/locale_facets.h:4609:45: error: macro "isxdigit" passed 2 arguments, but takes just 1 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/localefwd.h:90: error: 'std::isxdigit' declared as an 'inline' variable /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/localefwd.h:90: error: template declaration of 'bool std::isxdigit' /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/locale_facets.h:4609: error: invalid function declaration Expected results: No garbage. Additional info: A simple fix in readline would be to add !defined __cplusplus to the declaration in chardefs.h 75 #if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) 76 # define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) 77 #endif so that line 75 ends up being: 75 #if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) && !defined (__cplusplus) 76 # define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) 77 #endif
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.