------- Comment #3 from vlukas at gmx dot de  2006-08-21 12:04 -------
A variation of the code crashes GCC 4.2.0 20060820 (experimental) with a
different ICE:
------
template<typename>
void f()
{
typedef void (t)();
t a = x;
}

void g()
{
f<int>();
}

------
This produces the following output:
------
b.cc: In function 'void f()':
b.cc:5: error: function 'void a()' is initialized like a variable
b.cc:5: error: 'x' was not declared in this scope
b.cc:5: internal compiler error: tree check: expected var_decl, have
function_decl in cp_finish_decl, at cp/decl.c:5089
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
------
This latter snippet does not crash GCC 3.4.6 or 4.1.1. Should this rather get
its own report?


-- 


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

Reply via email to