C++ PATCH to implement SFINAE for non-constant template arguments

Ulrich Weigand uweigand@de.ibm.com
Fri Jan 21 13:11:00 GMT 2011


Gabriel Dos Reis wrote:
> On Thu, Jan 20, 2011 at 1:46 PM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> > Jakub Jelinek wrote:
> >> On Thu, Jan 20, 2011 at 01:16:03PM +0100, Ulrich Weigand wrote:
> >> > Jason Merrill wrote:
> >> >
> >> > > --- a/gcc/testsuite/g++.dg/template/char1.C
> >> > > +++ b/gcc/testsuite/g++.dg/template/char1.C
> >> > > @@ -1,4 +1,4 @@
> >> > > =A0template <class CharType, CharType line_terminator =3D 0>
> >> > > =A0class String {};
> >> > >
> >> > > -String<char, 255> s;
> >> > > +String<char, 255> s; =A0 =A0 =A0 =A0 =A0 =A0 // { dg-warning "overf=
> low" }
> >> >
> >> > It seems this causes the test to fail on platforms where "char"
> >> > is unsigned by default (e.g. spu, powerpc, s390), because there
> >> > is no warning on such platforms.
> >> >
> >> > Maybe the test can be changed to use explicitly signed or
> >> > unsigned char variants?
> >>
> >> Or add -fsigned-char to dg-options...
> >
> > You mean like so?
> 
> yes.

Huh, I see in the meantime Rainer Orth has checked in an alternative solution:
http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01454.html
so I guess my patch is no longer necessary ...

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com



More information about the Gcc-patches mailing list