[Bug c++/11078] [ABI] ICE in write_type with typeof and templates
boris at kolpackov dot net
gcc-bugzilla@gcc.gnu.org
Tue Aug 3 21:28:00 GMT 2004
------- Additional Comments From boris at kolpackov dot net 2004-08-03 21:27 -------
Subject: Re: [ABI] ICE in write_type with typeof and templates
ian at wasabisystems dot com <gcc-bugzilla@gcc.gnu.org> writes:
> In fact, in general the compiler can resolve typeof.
> In what cases will it not be able to?
The only thing I can think of is code like this:
struct
{
} a;
static void
fa (typeof (a)&)
{
}
struct
{
} b;
static void
fb (typeof (b)&)
{
}
void
f ()
{
fa (a);
fb (b);
}
It compiles with g++ 3.4.1. nm shows the following:
0000000c T f()
00000000 t fa(._0&)
00000006 t fb(._1&)
00000000 B a
00000001 B b
Which suggest that gcc assigns internal names even to anonymous
types. So I think it's true that any typeof-expression can be
reduced to a type-name.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11078
More information about the Gcc-bugs
mailing list