public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/59530] New: Incorrect check on string_view operator[]
@ 2013-12-16 19:34 bigotp at acm dot org
  2013-12-18  8:39 ` [Bug libstdc++/59530] " 3dw4rd at verizon dot net
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bigotp at acm dot org @ 2013-12-16 19:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59530

            Bug ID: 59530
           Summary: Incorrect check on string_view operator[]
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bigotp at acm dot org

Created attachment 31449
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31449&action=edit
Patch and test update

Per http://isocpp.org/files/papers/N3762.html#string.view.ops, string_view's
operator[](size()) is undefined, unlike basic_string_view.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/59530] Incorrect check on string_view operator[]
  2013-12-16 19:34 [Bug libstdc++/59530] New: Incorrect check on string_view operator[] bigotp at acm dot org
@ 2013-12-18  8:39 ` 3dw4rd at verizon dot net
  2014-01-24 20:15 ` emsr at gcc dot gnu.org
  2014-01-27 10:22 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: 3dw4rd at verizon dot net @ 2013-12-18  8:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59530

--- Comment #1 from Ed Smith-Rowland <3dw4rd at verizon dot net> ---
I mistakenly took cases for string which must be null terminated.
I think we'll just remove those lines from the testcases.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/59530] Incorrect check on string_view operator[]
  2013-12-16 19:34 [Bug libstdc++/59530] New: Incorrect check on string_view operator[] bigotp at acm dot org
  2013-12-18  8:39 ` [Bug libstdc++/59530] " 3dw4rd at verizon dot net
@ 2014-01-24 20:15 ` emsr at gcc dot gnu.org
  2014-01-27 10:22 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: emsr at gcc dot gnu.org @ 2014-01-24 20:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59530

--- Comment #2 from emsr at gcc dot gnu.org ---
Author: emsr
Date: Fri Jan 24 20:15:00 2014
New Revision: 207060

URL: http://gcc.gnu.org/viewcvs?rev=207060&root=gcc&view=rev
Log:
2014-01-24  Ed Smith-Rowland  <3dw4rd@verizon.net>

    PR libstdc++/59531
    * testsuite/experimental/string_view/operations/copy/char/1.cc: New.
    * testsuite/experimental/string_view/operations/copy/wchar_t/1.cc: New.

2014-01-24  Ed Smith-Rowland  <3dw4rd@verizon.net>
        Peter A. Bigot <pab@pabigot.com>

    PR libstdc++/59531
    * include/experimental/string_view
    (copy(_CharT*, size_type, size_type) const): Correct throw string.
    Correct copy start location.

2014-01-24  Ed Smith-Rowland  <3dw4rd@verizon.net>
        Peter A. Bigot <pab@pabigot.com>

    PR libstdc++/59530
    * include/experimental/string_view (operator[](size_type) const):
    Fix one-off index error in debug check.
    * testsuite/experimental/string_view/element_access/char/1.cc: Don't
    test basic_string_view at size().
    * testsuite/experimental/string_view/element_access/wchar_t/1.cc: Ditto.

2014-01-24  Ed Smith-Rowland  <3dw4rd@verizon.net>
        Peter A. Bigot <pab@pabigot.com>

    PR libstdc++/59529
    * include/experimental/string_view
    (basic_string_view(const _CharT*, size_type)): Don't care if len == 0.
    * testsuite/experimental/string_view/operations/substr/char/1.cc:
    Comment out catch of out_of_range; No terminating null
    in basic_string_view.  Check begin == end.
    * testsuite/experimental/string_view/operations/substr/wchar_t/1.cc:
    Ditto.


Added:
    trunk/libstdc++-v3/testsuite/experimental/string_view/operations/copy/
    trunk/libstdc++-v3/testsuite/experimental/string_view/operations/copy/char/
   
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/copy/char/1.cc
   
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/copy/wchar_t/
   
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/copy/wchar_t/1.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/experimental/string_view
   
trunk/libstdc++-v3/testsuite/experimental/string_view/element_access/char/1.cc
   
trunk/libstdc++-v3/testsuite/experimental/string_view/element_access/wchar_t/1.cc
   
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/substr/char/1.cc
   
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/substr/wchar_t/1.cc


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/59530] Incorrect check on string_view operator[]
  2013-12-16 19:34 [Bug libstdc++/59530] New: Incorrect check on string_view operator[] bigotp at acm dot org
  2013-12-18  8:39 ` [Bug libstdc++/59530] " 3dw4rd at verizon dot net
  2014-01-24 20:15 ` emsr at gcc dot gnu.org
@ 2014-01-27 10:22 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-27 10:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59530

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.9.0

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-27 10:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-16 19:34 [Bug libstdc++/59530] New: Incorrect check on string_view operator[] bigotp at acm dot org
2013-12-18  8:39 ` [Bug libstdc++/59530] " 3dw4rd at verizon dot net
2014-01-24 20:15 ` emsr at gcc dot gnu.org
2014-01-27 10:22 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).