This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55058] [4.7/4.8 Regression] Unexpected invalid type conversion error
- From: "sebastian dot huber at embedded-brains dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 26 Oct 2012 13:28:08 +0000
- Subject: [Bug c++/55058] [4.7/4.8 Regression] Unexpected invalid type conversion error
- Auto-submitted: auto-generated
- References: <bug-55058-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55058
Sebastian Huber <sebastian.huber@embedded-brains.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #28518|0 |1
is obsolete| |
Attachment #28527|0 |1
is obsolete| |
--- Comment #5 from Sebastian Huber <sebastian.huber@embedded-brains.de> 2012-10-26 13:28:08 UTC ---
Created attachment 28537
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28537
Test case.
Thanks for the hint to the delta tool. This is great for automatic test case
reduction.
The test code is now:
template <typename T>
struct A { };
template <typename T>
struct B {
B(const A<T> T::* p);
typedef A<T> D;
};
template <typename T>
B<T>::B(const D T::* p) { }
struct C {
C() : e() {};
const A<C> e;
};
B<C> g(&C::e);
The crucial thing is the "typedef A<T> D". It works, if we move it before the
constructor declaration "B(const A<T> T::* p)". Removing the constructor
definition works also.