This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/9341: [3.4 regression] Specialization after use gives error
- From: rguenth at tat dot physik dot uni-tuebingen dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: 16 Jan 2003 10:40:21 -0000
- Subject: c++/9341: [3.4 regression] Specialization after use gives error
- Reply-to: rguenth at tat dot physik dot uni-tuebingen dot de
>Number: 9341
>Category: c++
>Synopsis: [3.4 regression] Specialization after use gives error
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Thu Jan 16 02:46:02 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Richard Guenther
>Release: g++ (GCC) 3.4 20030115 (experimental)
>Organization:
>Environment:
ix86-linux
>Description:
template<class T, class U>
struct UnaryReturn {
typedef T Type_t;
};
struct foo
{
template <class T>
typename UnaryReturn<T, int>::Type_t foo();
};
template<class T>
struct UnaryReturn<T, int> {
typedef bool Type_t;
};
gives
bellatrix:~/src/tests$ ~/ix86/gcc3.4/bin/g++ -c -Wall insbefdecl.cpp
insbefdecl.cpp:8: error: return type specification for constructor invalid
insbefdecl.cpp:11: error: specialization of `UnaryReturn<T, int>' after instantiation
>From Mark Mitchell:
This is a bug -- but not in the new parser. This is lingering fallout from the now-almost-gone implicit typename extension. I will use this as the excuse to kill the last vestiges of that ugliness.
>How-To-Repeat:
compile the testcase with the new parser
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: