------- Comment #11 from jakub at gcc dot gnu dot org 2008-12-19 20:05 ------- With COMPOUND_EXPR, finish_decltype_type doesn't ICE, but as you note, probably doesn't do the right thing.
Say on: struct A { static A *bar (); }; struct B : public A { static int baz (); }; template <class T> void foo () { __decltype ((static_cast<B *> (A::bar ()))->baz ()) i; } void blah () { __decltype ((static_cast<B *> (A::bar ()))->baz ()) i; } void bar () { foo<int> (); } in foo finish_decltype_type is called just with CALL_EXPR and does the right thing, but in blah is called with COMPOUND_EXPR and doesn't handle it as CALL_EXPR, but just returns TREE_TYPE. Not sure how would a testcase where this would make a difference look though. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38577