[PATCH][libstdc++][Testsuite] isctype test fails for newlib.

Matthew Wahab matthew.wahab@arm.com
Mon Feb 9 17:50:00 GMT 2015


On 09/02/15 13:18, Hans-Peter Nilsson wrote:
> On Mon, 9 Feb 2015, Matthew Wahab wrote:
>> On 07/02/15 00:11, Jonathan Wakely wrote:
>>> Any idea why HP still sees the tests fail? See comment 8 at
>>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64467#c8
>>
>> It looks like he's found the problem: that _NEWLIB_ is a recent addition that
>> isn't in the version he's using. I'll try replacing _NEWLIB_ with
>> _NEWLIB_VERSION_ as suggested.
>
> (Careful with that macro spelling, if nothing else.)
>
> Better to use existing mechanisms and stop playing with
> target-related macros.  Add this at the top (see other
> placements of dg-options) and replace "#if defined (__NEWLIB__)"
> with "#ifdef NEWLINE_IN_CLASS_BLANK":
>
> // { dg-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
>

Attached a patch to replace the test for macro __NEWLIB__ with a test 
for macro NEWLINE_IN_CLASS_BLANK, defined by
   { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }

Tested with check-target-libstdc++-v3, with the modified tests, for 
arm-none-eabi and aarch64-none-linux-gnu.

Does this look ok to commit?
Matthew

libstdc++-v3/testsuite/
2015-02-09  Matthew Wahab  <matthew.wahab@arm.com>

	* 28_regex/traits/char/isctype.cc (test01): Replace test
	for __NEWLIB__ macro with a dejagnu set macro.
	* 28_regex/traits/wchar_t/isctype.cc (test01): Likewise.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: isctype_target.patch
Type: text/x-patch
Size: 1915 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20150209/4bffdc43/attachment.bin>


More information about the Libstdc++ mailing list