This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: result type of an operation betweem signed and unsigned, c++
- From: Marco Manfredini <mldb at gmx dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 25 Apr 2007 14:31:42 +0200
- Subject: Re: result type of an operation betweem signed and unsigned, c++
- References: <C2539068.2127F%eljay@adobe.com>
On Tuesday 24 April 2007 17:46, John Love-Jensen wrote:
> Note: the name generated in the typeinfo varies by compiler. Could,
> technically (but that would be silly) vary from run-to-run of the binary.
> Some may use single characters. Others more human-friendly names. Others
> could use UUID.
Since this list is gcc specific:
#include <cxxabi.h>
#include <typeinfo>
const char *demangle(const std::type_info &f)
{
static char *buf=0;
static size_t l=0;
int st;
buf=::abi::__cxa_demangle(f.name(), buf, &l, &st);
return (st==0)?buf:"(error)";
}