This is the mail archive of the gcc-bugs@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]

[Bug c++/11078] [ABI] ICE in write_type with typeof and templates


------- Additional Comments From giovannibajo at libero dot it  2004-08-10 00:49 -------
Subject: Re:  [ABI] ICE in write_type with typeof and templates

gdr at integrable-solutions dot net wrote:

>> buy us anything. Plus, I don't think we want to say that the
>> following declarations are declaring two different functions:
>>
>> void foo(typeof(int*));
>> void foo(int*);
>>
>> or these:
>>
>> void bar(typeof(typeof(char*) [4]) blah);
>> void bar(char *blah[4]);
>
> As I said before, the problem is inexistent for ordinary functions
> because we don't care about the retun type of those.
> The issue is with function templates, and there we do care.
> So I don't believe in arguments based on ordinary functions to strip
> out typeof.

I am not speaking of return types (only) here. I am speaking of the mangling of
typeof(<type>), wherever it appears in a mangled part of a function signature.
Anyway, in case I am missing something, the same argument can be brought for
template functions. I suggest we mangle each element in the following couple
(or better -- each instantiation with the same set of arguments) with the same
name:

template <int> void foo(typeof(int*));
template <int> void foo(int*);

template <class T> void foo(typeof(typeof(T*)[4]) blah);
template <class T> void foo(T *blah[4]);

My conclusion is the same as before:

>> In other words, we can easily strip typeof(type) while mangling, and
>> encoding typeof(expr) as Y <expression> E.

Giovanni Bajo




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11078


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