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

Craig Rodrigues rodrigc@attbi.com
Thu Jan 23 04:48:00 GMT 2003


On Wed, Jan 22, 2003 at 04:47:43PM -0800, Matt Austern wrote:
> >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?
> 
> Looks pretty clear.  You're picking up a version of <ctype.h> that's
> appropriate for C, instead of one that's appropriate for C++.  The C
> version of <ctype.h> declares a whole bunch of macros, and the
> C++ version shouldn't.  In a C++ compilation you should either get
> a completely different header, or else a header that's conditionalized
> on #ifdef __cplusplus.  Somehow the machinery to do that broke.


I think the machinery is broken.  This did not happen with checkouts from
a few days ago.  I just did a fresh checkout and bootstrap of the
mainline, and the same problem exists there too.

It looks like quite a few changes to libstdc++-v3 occurred in the past few
days, so I'm suspecting the problem might be there somewhere, but I'm
not sure....





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



More information about the Gcc mailing list