This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libstdc++/8096: deque::at() throws std::range_error instead of std::out_of_range


>Number:         8096
>Category:       libstdc++
>Synopsis:       deque::at() throws std::range_error instead of std::out_of_range
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 30 07:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     johnb@stl.sarov.ru (Eugeny Belov)
>Release:        gcc v3.2
>Organization:
>Environment:
Red Hat 8.0 beta (7.3.94)
>Description:
According to C++ ISO/IEC 14882 Standard , see 23.1.1.13, the deque::at() should throw out_of_range exception if there is a bounds violation. Instead of out_of_range it throws range_error exception. See the testcase.
>How-To-Repeat:
Compile testcase with g++ 3.2 and run it, You`ll see the Failed message.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test232.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test232.cpp"

I2luY2x1ZGUgPGl0ZXJhdG9yPgojaW5jbHVkZSA8ZGVxdWU+CiNpbmNsdWRlIDxuZXc+CiNpbmNs
dWRlIDxzdGRleGNlcHQ+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdHlwZWRlZiBkZXF1ZTxjaGFy
LCAgYWxsb2NhdG9yPGNoYXI+ID4gQ29udDsKCmludCBtYWluKGludCwgY2hhciAqW10pCnsKCUNv
bnQgcTA7CglpbnQgY250ID0gMDsKCglxMC5wdXNoX2JhY2soKGNoYXIpJ2EnKTsKCXEwLnB1c2hf
YmFjaygoY2hhciknYicpOwoJcTAucG9wX2JhY2soKTsKCgl0cnkgewoJICBxMC5hdCgyKTsgCgkg
fQoJY2F0Y2ggKG91dF9vZl9yYW5nZSkKCQl7KytjbnQ7IH0KCgljYXRjaCAocmFuZ2VfZXJyb3Ip
CgkJe2NudCs9MTA7IH0KCgljYXRjaCAoLi4uKQoJCXtjbnQgKz0gMjA7IH0KCglpZiAoY250ICE9
IDEpCiAJICBwcmludGYgKCJGQUlMRUQ6IEdvdCBjbnQgPT0gJWQsIHNob3VsZCBiZSAxXG4iLGNu
dCk7CiAgICAgICAgZWxzZQogCSAgcHJpbnRmICgiUEFTU0VELlxuIik7CgkgIAogIAogIHJldHVy
biAoY250LTEpOwp9Cg==


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]