diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc index 7c47045..b6fd6ff 100644 --- a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc +++ b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc @@ -1,5 +1,6 @@ // { dg-do run } // { dg-options "-std=gnu++11" } +// { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } } // // 2010-06-23 Stephen M. Webb @@ -53,8 +54,8 @@ test01() VERIFY(!t.isctype('_', t.lookup_classname(range(digit)))); VERIFY( t.isctype(' ', t.lookup_classname(range(blank)))); VERIFY( t.isctype('\t', t.lookup_classname(range(blank)))); -#if defined (__NEWLIB__) - /* newlib includes '\n' in class 'blank'. +#if defined (NEWLINE_IN_CLASS_BLANK) + /* On some targets, '\n' is in class 'blank'. See https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00059.html. */ VERIFY( t.isctype('\n', t.lookup_classname(range(blank)))); #else diff --git a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc index 1b3d69a..144d679 100644 --- a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc +++ b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc @@ -1,5 +1,6 @@ // { dg-do run } // { dg-options "-std=gnu++11" } +// { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } } // Copyright (C) 2010-2015 Free Software Foundation, Inc. // @@ -50,8 +51,8 @@ test01() VERIFY(!t.isctype(L'_', t.lookup_classname(range(digit)))); VERIFY( t.isctype(L' ', t.lookup_classname(range(blank)))); VERIFY( t.isctype(L'\t', t.lookup_classname(range(blank)))); -#if defined (__NEWLIB__) - /* newlib includes '\n' in class 'blank'. +#if defined (NEWLINE_IN_CLASS_BLANK) + /* On some targets, '\n' is in class 'blank'. See https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00059.html. */ VERIFY( t.isctype(L'\n', t.lookup_classname(range(blank)))); #else