This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC bug when using typeof


On Mon, Oct 20, 2008 at 9:09 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Mon, Oct 20, 2008 at 7:04 PM, Peng Yu <pengyu.ut@gmail.com> wrote:
>> Hi,
>>
>> I tried to compile the following program, but I got the following
>> error. Is it a bug of GCC? Has it been fixed in a newer version GCC?
>>
>
> It is a bug in GCC but in later versions 4.3.0 and above, we get a
> sorry message:
> t.cc: In instantiation of 'B::Y<__typeof__ ((T1() * T2()))>
> B::operator*(const B::Y<T1>&, const T2&) [with T1 = A::X<int>, T2 =
> int]':
> t.cc:54:   instantiated from here
> t.cc:46: sorry, unimplemented: mangling typeof, use decltype instead
>
> Replacing typeof with __decltype (or decltype in c++0x/g++0x modes)
> works in 4.3.0 and above.

Hi,

Somebody replace __decltype with typeof and try to compile, he got the
following error (with 4.3.0). Do you know why?

main.cc:54: sorry, unimplemented: zero-operand casts cannot be mangled
due to a defect in the C++ ABI
main.cc:54: sorry, unimplemented: zero-operand casts cannot be mangled
due to a defect in the C++ ABI

Thanks,
Peng


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]