This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11078] [ABI] ICE in write_type with typeof and templates
- From: "boris at kolpackov dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Aug 2004 21:28:00 -0000
- Subject: [Bug c++/11078] [ABI] ICE in write_type with typeof and templates
- References: <20030603112812.11078.jtotland1@chello.no>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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