Bug 83018 - The <cctype> header is wrong and doesn't work
The <cctype> header is wrong and doesn't work
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: libstdc++ (Show other bugs)
7.3
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-29 11:42 EST by Jack Lloyd
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: 2003-01-30 06:46:24 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 Jack Lloyd 2003-01-29 11:42:28 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021128

Description of problem:
Essentially, the <cctype> header does not put the things that should be there
(isdigit, toupper, etc) into the std namespace. For an example of how to do this
correctly, look at the cctype header included in GCC 3.2.


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

How reproducible:
Always

Steps to Reproduce:
1. Attempt to compile this code:
-----START CODE-----
#include <cctype>

int main()
   {
   char c = 'x';
   if(std::isdigit(c))
      return 0;
   else
      return 1;
   }
-----END CODE-----

2. It won't compile with GCC 2.96, but will with 3.0.4, 3.1, 3.2, and any other
ISO C++ compilant compiler/library.


Actual Results:  Won't compile because of the header problem.

Expected Results:  Should compile.


Additional info:

Check the GCC 3.2 cctype header for what should be a drop-in replacement.
Comment 1 Jakub Jelinek 2003-01-30 06:46:24 EST
That's expected. GCC 3.0 was the first one to honour std namespace.

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