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

Gabriel Dos Reis gdr@integrable-solutions.net
Thu Jan 20 21:27:00 GMT 2011


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 @@
>> > >  template <class CharType, CharType line_terminator = 0>
>> > >  class String {};
>> > >
>> > > -String<char, 255> s;
>> > > +String<char, 255> s;             // { dg-warning "overflow" }
>> >
>> > 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.

-- Gaby



More information about the Gcc-patches mailing list