public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: gdr@integrable-solutions.net
Cc: Ian Lance Taylor <iant@google.com>,  gcc@gcc.gnu.org
Subject: Re: C++: variable length arrays and operator new[]
Date: Tue, 22 Sep 2009 17:03:00 -0000	[thread overview]
Message-ID: <873a6edi9f.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <206fcf960909211536x5e7528c3p3eaf9c69299951e6@mail.gmail.com> 	(Gabriel Dos Reis's message of "Mon, 21 Sep 2009 17:36:15 -0500")

* Gabriel Dos Reis:

>>> Is this intentional?  The equivalent "new char[a][b]" is rejected (as
>>> required by the C++ standard).
>>
>> Is there any reason that g++ should reject your sample program?
>
> Yes: there is no obvious reason for gratuitous incompatibility in
> semantics.

That, and it requires full saturating multiplication support at
run-time if we want to fix PR19351 in the most straightforward way (by
passing size_t(-1) to the underlying allocator function in case of
overflow).

      reply	other threads:[~2009-09-22 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-20  9:59 Florian Weimer
2009-09-21 21:56 ` Ian Lance Taylor
2009-09-21 22:36   ` Gabriel Dos Reis
2009-09-22 17:03     ` Florian Weimer [this message]

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=873a6edi9f.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=gcc@gcc.gnu.org \
    --cc=gdr@integrable-solutions.net \
    --cc=iant@google.com \
    /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).