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 gdr at integrable-solutions dot net  2004-08-09 17:11 -------
Subject: Re:  [ABI] ICE in write_type with typeof and templates

"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:

| (In reply to comment #15)
| 
| > The issue of <type> within <expr-primary> is for cases like c<typeof(int*)>. 
| > The current compiler treats that as being identical to c<int*>.  
| 
| Question: do we really need typeof(<type>)? 

At some point, the decltype/auto proposal considered that possibility.
It has the advantage that it provides a convenient way of having an
unnamed typedef and can be used as a simple-type-specifier.
Subsequent refeniment did no longer mention it, but nothing is
definitive. 

| It does not make sense to me. 

It does make sense; see above.

| typeof (type) is always "type", so I cannot see why we should wrap
| it within a typeof. 

It does not bring much when "type" is a simple-typecifier.  But, it
has some value when you consider more elaborated type-specifier.

| If GCC currently accepts this, we could
| easily flag it as an error and reject it. Gaby?

I have no strong opinion but I would lean toward supporting 
typeof(type), unless it is proven to be really useless.

-- Gaby


-- 


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]