Re: isalnum not declared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Nikolai Nezlobin" <nezlobin@xxxxxxxxxxx> writes:

> Eljay,
> 
> 'isalnum' is not my function, it is the part of namespace std and the GNU
> project, right?

isalnum is not necessarily part of the GNU project. GCC expects the
    standard C library to be provided by the target platform. cygwin,
    mingw (both windows platforms), MacOS X, [free|net|open]bsd, aix,
    solaris, hpux, and many others provide C libraries which have
    nothing to do with the GNU project, and are not under the control
    of GCC, or any GNU people.

Only on linux and hurd are functions such as isalnum part of a GNU
    project (and in those cases, they are part of the glibc project,
    not the GCC project). 

> Compiler says that isalnum is not declared in the following line in cctype:
> 
> namespace std
> {
>   using ::isalnum;
>   ...
> }
> 
> I think this is very embarrassing.

'embarrassing' ? It is unfortunate that you have encountered a
    problem, and more unfortunate still that no-one has yet solved your
    problem, but I can't see anything 'embarrassing' about it - it
    isn't as if somebody was caught lying about uranium sales or some
    such. 

> Doesn't cctype refer to all the
> necessary files, including the one that defines isalnum?

?

#include<cctype>

int main()
  {
    return std::isalnum('[');
  }

compiles and runs correctly with g++ 2.95.3, 3.2.2, 3.3.3, and 3.4
    on i686-freebsd5.2 and i386-slackware-linux .

If you were using any other linux distro, I would guess you had not
    installed the [g]libc-devel package, since most other linux
    distros do not include headers in the ordinary glibc package. But
    looking at a slackware 9.0 box (where I cannot reproduce the problem
    you report) I see that the package glibc-2.3.1-i386-3 contains the
    standard C header files.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux