From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24744 invoked by alias); 1 Mar 2003 13:16:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 24716 invoked by uid 71); 1 Mar 2003 13:16:00 -0000 Resent-Date: 1 Mar 2003 13:16:00 -0000 Resent-Message-ID: <20030301131600.24714.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, david@wmol.com Received: (qmail 24573 invoked by uid 48); 1 Mar 2003 13:15:09 -0000 Message-Id: <20030301131509.24572.qmail@sources.redhat.com> Date: Sat, 01 Mar 2003 13:16:00 -0000 From: david@wmol.com Reply-To: david@wmol.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: libstdc++/9897: string.reserve/capacity does not work X-SW-Source: 2003-03/txt/msg00018.txt.bz2 List-Id: >Number: 9897 >Category: libstdc++ >Synopsis: string.reserve/capacity does not work >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sat Mar 01 13:16:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: David Hill >Release: 2.95.3 >Organization: >Environment: OpenBSD 3.3 i386 >Description: // // START OF SOURCE // #include #include int main(void) { string test("david"); string bad; bad.reserve(500); cout << "bad capacity: " << bad.capacity() << endl; cout << "test capacity before: " << test.capacity() << endl; test.reserve(500); cout << "test capacity after: " << test.capacity() << endl; return 0; } // END OF SOURCE this code prints bad capacity: 0 test capacity before: 16 test capacity after: 16 shouldn't the "test capacity after" be 500? >How-To-Repeat: compile the code and execute. >Fix: unknown >Release-Note: >Audit-Trail: >Unformatted: