This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11756] ICE's when using typeof in template function parameter type declarations
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Oct 2007 08:58:03 -0000
- Subject: [Bug c++/11756] ICE's when using typeof in template function parameter type declarations
- References: <bug-11756-5473@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from igodard at pacbell dot net 2007-10-04 08:58 -------
My apologies, perhaps I'm misunderstanding the jargon. I took the fix comment
to mean that typeof in the context reported would produce a diagnostic saying
that gcc could not compile the construct, and that this was acceptable because
typeof would be acceptable in a typedef and the typedef'd name could be used
instead of a literal "typeof". Under that understanding, I called it a kludge.
There are any number of contexts in which a type is accepted but a declaration
is not, and especially in macro expansions it may be quite inconvenient to
force the writer to manually declare the type. It tends to expose the internals
of an abstraction when one wants a clean abstract interface that looks and acts
like an expression or primary, and could be implemented as such if typeof were
accepted in all contexts.
If that is not a correct interpretation of "sorry" and "decltype" then I regret
pulling your chain, and would like to know what these do mean if you would take
the time to explain.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11756