Summary: | [3.4 regression] ICE on missing typename | ||
---|---|---|---|
Product: | gcc | Reporter: | Jeffrey D. Oldham <oldham> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs |
Priority: | P3 | Keywords: | ice-on-invalid-code |
Version: | unknown | ||
Target Milestone: | 3.4.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | ||
Attachments: | goo.ii |
Description
Jeffrey D. Oldham
2003-01-27 19:56:00 UTC
State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed. Fallout from the implicit typename deprecation. Here's a similar snippet, which I think is even legal since we don't instantiate for a particular value of T (well, legal except for the missing typename, of course): ----------------------------------- template<typename T, typename A> struct X { typedef typename A::template foo<T>::type type; }; template<typename T, typename = int> struct Y { typedef double type; typename X<T,T>::type t; }; template<class T> struct Z { typedef Y<T>::type type; }; ------------------------- g/a> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.ii x.ii: In instantiation of `Y<T, int>': x.ii:12: instantiated from here x.ii:7: error: `Y<T, <anonymous template type parameter> >::t' has incomplete type x.ii:7: internal compiler error: in cxx_incomplete_type_diagnostic, at cp/typeck2.c:278 Please submit a full bug report, with preprocessed source if appropriate. Since an ICE is worse than an error message, I rate this as a regression. It gave warnings about the implicit typename stuff with 3.3 and 3.2.2, and worked with 2.95 W. Fixed on the mainline (20030525), already (in fact this might be a duplicate): [omni:~/src/gccPRs] pinskia% /Volumes/UFS_Partition/pinskia/fsf/bin/g++ pr9464.cc pr9464.cc:13: error: type `Y<T, int>' is not derived from type `Z<T>' pr9464.cc:13: error: ISO C++ forbids declaration of `type' with no type pr9464.cc:13: error: expected `;' |