Difference in __cxa_demangle between gcc 3.3 and 4.0
Yoav Gonen
yoavg@humaneyes.com
Thu Nov 17 19:25:00 GMT 2005
Hi,
I'm not sure this is the right place to ask, but here goes.
I'm compiling the following program:
#include <iostream>
#include <cxxabi.h>
int main(int argc, char * const argv[]) {
size_t length;
int status;
char* p = abi::__cxa_demangle("d", 0, &length, &status);
if (p) free(p);
return 0;
}
I'm checking the values of status and p before freeing it.
On gcc 3.3, status = 0 and p = "double".
On gcc 4.0, status = -2 and p = NULL.
Is this a bug?
BTW, I'm using Xcode 2.1 on a Mac OS X 10.4.
Thanks,
Yoav
More information about the Gcc-help
mailing list