This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

3.3 problem: <ctype.h> and <iostream>


Hi,

I just did a contrib/gcc_update in my CVS tree on the 3.3 branch
and am now encountering a new problem.

If I have the following file:

#include <ctype.h>
#include <iostream>
#include <ios>

int main(int argc, char *argv[])
{
}


Compiling it yields the following error on RedHat Linux 7.2 system:

===================================================================================
In file included from /u0/test/gcc-3.3-cvs/test/include/c++/3.3/ios:48,
                 from /u0/test/gcc-3.3-cvs/test/include/c++/3.3/ostream:45,
                 from /u0/test/gcc-3.3-cvs/test/include/c++/3.3/iostream:45,
                 from a.cc:2:
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:58:34: macro "isspace" pas
sed 2 arguments, but takes just 1
In file included from /u0/test/gcc-3.3-cvs/test/include/c++/3.3/ios:48,
                 from /u0/test/gcc-3.3-cvs/test/include/c++/3.3/ostream:45,
                 from /u0/test/gcc-3.3-cvs/test/include/c++/3.3/iostream:45,
                 from a.cc:2:
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:58: error: `
   std::isspace' declared as an `inline' variable
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:58: error: template
   declaration of `bool std::isspace'
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:62:34: macro "isprint" pas
sed 2 arguments, but takes just 1
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:62: error: `
   std::isprint' declared as an `inline' variable
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:62: error: template
   declaration of `bool std::isprint'
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:66:34: macro "iscntrl" pas
sed 2 arguments, but takes just 1
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:66: error: `
   std::iscntrl' declared as an `inline' variable
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:66: error: template
   declaration of `bool std::iscntrl'
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:70:34: macro "isupper" pas
sed 2 arguments, but takes just 1
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:70: error: `
   std::isupper' declared as an `inline' variable
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:70: error: template
   declaration of `bool std::isupper'
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:74:34: macro "islower" pas
sed 2 arguments, but takes just 1
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:74: error: `
   std::islower' declared as an `inline' variable
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:74: error: template
   declaration of `bool std::islower'
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:78:34: macro "isalpha" pas
sed 2 arguments, but takes just 1
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:78: error: `
   std::isalpha' declared as an `inline' variable
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:78: error: template
   declaration of `bool std::isalpha'
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:82:34: macro "isdigit" pas
sed 2 arguments, but takes just 1
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:82: error: `
   std::isdigit' declared as an `inline' variable
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:82: error: template
   declaration of `bool std::isdigit'
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:86:34: macro "ispunct" pas
sed 2 arguments, but takes just 1
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:86: error: `
   std::ispunct' declared as an `inline' variable
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:86: error: template
   declaration of `bool std::ispunct'
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:90:35: macro "isxdigit" pa
ssed 2 arguments, but takes just 1
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:90: error: `
   std::isxdigit' declared as an `inline' variable
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:90: error: template
   declaration of `bool std::isxdigit'
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:94:34: macro "isalnum" pas
sed 2 arguments, but takes just 1
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:94: error: `
   std::isalnum' declared as an `inline' variable
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:94: error: template
   declaration of `bool std::isalnum'
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:98:34: macro "isgraph" pas
sed 2 arguments, but takes just 1
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:98: error: `
   std::isgraph' declared as an `inline' variable
/u0/test/gcc-3.3-cvs/test/include/c++/3.3/bits/localefwd.h:98: error: template
   declaration of `bool std::isgraph'
===================================================================================


If I change the order of the  includes to:

#include <iostream>
#include <ios>
#include <ctype.h>

Then the error goes away.

What's going on here?


-- 
Craig Rodrigues        
http://home.attbi.com/~rodrigc
rodrigc@attbi.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]