Difference in __cxa_demangle between gcc 3.3 and 4.0

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

 



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




[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