Message ID | CA+C-WL__qEBQrH+ZFK1Nij1FiLvCCbnzTFevL3h_W4+8eTxWpw@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 07/26/2015 01:50 PM, Patrick Palka wrote: > Hmm, on second thought, I don't think this fix is right. It may be > the case that the 'return b;' was there to make instantiation of that > template a compile-time error. By changing it to 'return;' > instantiation is allowed. Is this property important here? Should I > preserve the original property (that instantiation is a compile-time > error) by instead doing the following? Sure, can't hurt. Jason
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload.C b/gcc/testsuite/g++.old-deja/g++.jason/overload.C index 28b029f..5d27713 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/overload.C @@ -5,7 +5,7 @@ enum bar {}; void operator+ (int, int);// { dg-error "" } .* void operator+ (bar&, int); -template <class T> void operator+ (int b, T& t) { return; } +template <class T> void operator+ (int b, T& t) { (void) T::bogus; } void operator+ (int, bar&); template <class T> class foo