|
Yes it is illegal to redefine a function in C++.
I don't know why GNU doesn't complain, perhaps their
definition is in some other header file that is not
being pulled in by the header files that are included
by defalloc.h. Or perhaps their definition is in an
out-of-line function in their library. In any case
a library vendor should not be trying to redefine
it and the SGI version of defalloc.h (see below) has
removed this. Incidentally, the name defalloc.h is
wrong, it should be <memory> according to the C++
standard. The DEC C++ STL headers all have the correct names.
Why are they trying to use (the very old and out-of-date)
HP STL implementation when DEC C++ distributes a more current
version with the compiler? Why don't they at least
switch to the SGI implementation (The inventor of the
STL changed jobs from HP to SGI a few years back and
his group now distributes the STL). You can get
more info on where to download the SGI version if
you send email to [email protected]. Unfortunately they
haven't updated the header files names, though ):
|