diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-10-28 16:42:09 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-10-28 16:42:09 +0000 |
commit | c6d229168bc9d5347b670e893ced43cd61a79c14 (patch) | |
tree | cef7f6740048865657633dfa59d177839a5cb90f /libstdc++-v3 | |
parent | 45837d1ec0ad831379ad16213017b452f91edd25 (diff) | |
download | gcc-c6d229168bc9d5347b670e893ced43cd61a79c14.tar.gz |
2005-10-28 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/24559
* include/c_std/std_cwchar.h (wcspbrk): Adjust signature.
* testsuite/21_strings/c_strings/wchar_t/24559.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105939 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/c_std/std_cwchar.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/24559.cc | 32 |
3 files changed, 40 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4c78ad2cf6a..ceea46da626 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2005-10-28 Paolo Carlini <pcarlini@suse.de> + + PR libstdc++/24559 + * include/c_std/std_cwchar.h (wcspbrk): Adjust signature. + * testsuite/21_strings/c_strings/wchar_t/24559.cc: New. + 2005-10-25 Paolo Carlini <pcarlini@suse.de> * docs/html/ext/lwg-active.html, lwg-defects.html: Import Revision 39. diff --git a/libstdc++-v3/include/c_std/std_cwchar.h b/libstdc++-v3/include/c_std/std_cwchar.h index 26c4264ef34..9eaaa4ab579 100644 --- a/libstdc++-v3/include/c_std/std_cwchar.h +++ b/libstdc++-v3/include/c_std/std_cwchar.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -211,7 +211,7 @@ namespace std using ::wcspbrk; inline wchar_t* - wcspbrk(wchar_t* __s1, wchar_t* __s2) + wcspbrk(wchar_t* __s1, const wchar_t* __s2) { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); } using ::wcsrchr; diff --git a/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/24559.cc b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/24559.cc new file mode 100644 index 00000000000..26f03267855 --- /dev/null +++ b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/24559.cc @@ -0,0 +1,32 @@ +// Copyright (C) 2005 Free Software Foundation, Inc. +// +// 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// 21.4: null-terminated sequence utilities + +#include <cwchar> + +// { dg-do compile } + +// libstdc++/24559 +int main() +{ + typedef wchar_t* (*pf)(wchar_t *, const wchar_t*); + pf p1 = std::wcspbrk; + + return 0; +} |