Bug 83018

Summary: The <cctype> header is wrong and doesn't work
Product: [Retired] Red Hat Linux Reporter: Jack Lloyd <lloyd>
Component: libstdc++Assignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-30 11:46:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jack Lloyd 2003-01-29 16:42:28 UTC
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 11:46:24 UTC
That's expected. GCC 3.0 was the first one to honour std namespace.