public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/109205] vector.resize( v.size() + 100 ) does unnecessary comparison
Date: Tue, 21 Mar 2023 00:35:01 +0000	[thread overview]
Message-ID: <bug-109205-4-UH5FRWOp1v@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109205-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109205

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Huh, but that causes a test to FAIL with -D_GLIBCXX_DEBUG

FAIL: 23_containers/vector/59829.cc (test for excess errors)


/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_vector.h:989:
error: no match for 'operator<' in '((const std::__cxx1998::vector<int,
Alloc<int> >*)this)->std::__cxx1998::vector<int, Alloc<int>
>::<anonymous>.std::__cxx1998::_Vector_base<int, Alloc<int>
>::_M_impl.std::__cxx1998::_Vector_base<int, Alloc<int>
>::_Vector_impl::<anonymous>.std::__cxx1998::_Vector_base<int, Alloc<int>
>::_Vector_impl_data::_M_finish < ((const std::__cxx1998::vector<int,
Alloc<int> >*)this)->std::__cxx1998::vector<int, Alloc<int>
>::<anonymous>.std::__cxx1998::_Vector_base<int, Alloc<int>
>::_M_impl.std::__cxx1998::_Vector_base<int, Alloc<int>
>::_Vector_impl::<anonymous>.std::__cxx1998::_Vector_base<int, Alloc<int>
>::_Vector_impl_data::_M_start' (operand types are 'const
std::__cxx1998::_Vector_base<int, Alloc<int> >::pointer' {aka 'const
std::allocator_traits<Alloc<int> >::pointer'} and 'const
std::__cxx1998::_Vector_base<int, Alloc<int> >::pointer' {aka 'const
std::allocator_traits<Alloc<int> >::pointer'})

  parent reply	other threads:[~2023-03-21  0:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20  8:26 [Bug c++/109205] New: " joerg.richter@pdv-fs.de
2023-03-20 18:09 ` [Bug libstdc++/109205] " pinskia at gcc dot gnu.org
2023-03-20 18:09 ` pinskia at gcc dot gnu.org
2023-03-20 22:01 ` redi at gcc dot gnu.org
2023-03-21  0:35 ` redi at gcc dot gnu.org [this message]
2023-06-01 10:53 ` redi at gcc dot gnu.org
2023-06-01 10:56 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109205-4-UH5FRWOp1v@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).