Commit d3f128e9 by Paolo Carlini Committed by Paolo Carlini

1.cc: Fix, null-terminate array1 at the outset.

2005-01-01  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_istream/extractors_character/char/1.cc: Fix,
	null-terminate array1 at the outset.
	* testsuite/27_io/basic_istream/extractors_character/wchar_t/1.cc:
	Likewise.

From-SVN: r92789
parent 91c537b7
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
// 1999-07-26 bkoz
// Copyright (C) 1999, 2003 Free Software Foundation
// Copyright (C) 1999, 2003, 2005 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -41,8 +41,9 @@ void test01()
// template<_CharT, _Traits>
// basic_istream& operator>>(istream&, _CharT*)
int n = 20;
const int n = 20;
char array1[n];
array1[0] = '\0';
typedef std::ios::traits_type ctraits_type;
ctraits_type::int_type i1, i2;
......
// Copyright (C) 2004 Free Software Foundation
// Copyright (C) 2004, 2005 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -39,8 +39,9 @@ void test01()
// template<_CharT, _Traits>
// basic_istream& operator>>(istream&, _CharT*)
int n = 20;
const int n = 20;
wchar_t array1[n];
array1[0] = L'\0';
typedef std::wios::traits_type ctraits_type;
ctraits_type::int_type i1, i2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment