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


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

RE: Migrating C++ source from Microsoft Windows NT to SCO Unix


> On Mar 29, 2001, Craig Rodrigues <rodrigc@mediaone.net> wrote:
>
> > On Thu, Mar 29, 2001 at 04:57:57PM +1200, Ross Smith wrote:
> >> Craig Rodrigues wrote:
> >> >
> >> > On Thu, Mar 29, 2001 at 11:19:49AM +1000,
> Timothy_Ko@nag.national.com.au wrote:
> >> > >
> >> > > 2.   NabString.h:594: macro `isalnum' used without args
> >> > >
> >> > >      where we declare as:
> >> > >      virtual const bool NabString::isalnum() const;
> >> >
> >> > isalnum() may be implemented as a macro in ctype.h, so implementing
> >> > it yourself as a function could be a problem.
> >>
> >> In C++ it's required to be a function, and having a class member
> >> function with the same name is legal.
>
> > This is a glibc vs. gcc (C++) issue.
>
> Not really.  It's a libstdc++ issue.  libstdc++-v3's wrapper headers
> #undef C functions that may be #defined as macros in the system
> headers.  So this problem might be fixed in development snapshots.  I
> haven't verified that it does that for isalnum, though.

The libstdc++-v3 stuff is fine.  The original poster was using the v2
library, and it is broken.

The advice to Mr. Ko should be to use the v3 libraries (2.90.8 snapshot).
I don't think the web pages are very clear on how out-of-the-box GCC 2.95.2
isn't anywhere near standards conformant.




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