public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Martin Sebor <msebor@gmail.com>, Marek Polacek <polacek@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: C++ PATCH for c++/69496 (ICE on VLA in constexpr function)
Date: Wed, 27 Jan 2016 21:08:00 -0000	[thread overview]
Message-ID: <56A931C2.7020602@redhat.com> (raw)
In-Reply-To: <56A8F5BD.4010104@gmail.com>

On 01/27/2016 11:52 AM, Martin Sebor wrote:
> I agree that there is some risk that it might break some working
> programs.  I would expect the most common use of initialized VLAs
> be to set all elements to zero using the "= { }" or "= { 0 }"
> syntax.  Initializers with more elements are, IMO, likely to be
> a bug where the user doesn't realize they defined a VLA rather
> than an ordinary array.  Since VLAs are required to have at least
> 1 element, would diagnosing initializers with more than one element
> more loudly (such as by default or with -Wall as opposed to with
> -Wpedantic) be a good solution?

That makes sense to me.

Jason


  reply	other threads:[~2016-01-27 21:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 23:02 Marek Polacek
2016-01-27  3:58 ` Martin Sebor
2016-01-27 11:20   ` Marek Polacek
2016-01-27 16:52     ` Martin Sebor
2016-01-27 21:08       ` Jason Merrill [this message]
2016-01-28 22:27       ` Marek Polacek
2016-01-29  3:29         ` Martin Sebor
2016-01-27 14:08 ` Jason Merrill
2016-01-27 14:11   ` Marek Polacek

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=56A931C2.7020602@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=msebor@gmail.com \
    --cc=polacek@redhat.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).