public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "theo dot bosman at net dot HCC dot nl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/29688] resize initializes whole array
Date: Thu, 02 Nov 2006 15:57:00 -0000	[thread overview]
Message-ID: <20061102155654.13001.qmail@sourceware.org> (raw)
In-Reply-To: <bug-29688-13504@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from theo dot bosman at net dot HCC dot nl  2006-11-02 15:56 -------
Subject: Re:  resize initializes whole array

There is no argument against the ISO standard, but to a non C/C++ programmer 
it seems a waist of time to reallocate the array and initialize it when one 
wants to add something to an array. Some other compilers will copy the 
existing data into the newly allocated space which seems more in line with 
the text book.
The application will be changed to avoid the loss of data on a resize of 
arrays, which is a better idea anyway. Thanks for the speedy reply.
Theo Bosman

----- Original Message ----- 
From: "pcarlini at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: <theo.bosman@net.HCC.nl>
Sent: Thursday, November 02, 2006 2:51 PM
Subject: [Bug libstdc++/29688] resize initializes whole array


>
>
> ------- Comment #2 from pcarlini at suse dot de  2006-11-02 13:51 -------
> The only possible change I can see, as an optimization, is using
> __valarray_fill instead of __valarray_destroy_elements and
> __valarray_fill_construct, when _M_size == __n. Let's ask Gaby...
>
>
> -- 
>
> pcarlini at suse dot de changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                 CC|                            |pcarlini at suse dot de, 
> gdr
>                   |                            |at integrable-solutions 
> dot
>                   |                            |net
>             Status|RESOLVED                    |UNCONFIRMED
>         Resolution|INVALID                     |
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29688
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> 


-- 


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


  parent reply	other threads:[~2006-11-02 15:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-02 13:18 [Bug c++/29688] New: " theo dot bosman at net dot HCC dot nl
2006-11-02 13:34 ` [Bug libstdc++/29688] " pcarlini at suse dot de
2006-11-02 13:51 ` pcarlini at suse dot de
2006-11-02 15:57 ` theo dot bosman at net dot HCC dot nl [this message]
2006-11-03  0:08 ` pcarlini at suse dot de
2006-11-03  7:29 ` fang at csl dot cornell dot edu
2006-11-14  0:53 ` pcarlini at suse dot de

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=20061102155654.13001.qmail@sourceware.org \
    --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).