public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/36089]  New: [4.2/4.3/4.4 Regression] Funny rejects valid with constant integral expression
Date: Wed, 30 Apr 2008 16:42:00 -0000	[thread overview]
Message-ID: <bug-36089-6528@http.gcc.gnu.org/bugzilla/> (raw)

Testcase:
template <int>
struct a
{
    static bool f()
    {
        const int as(2);
        float anArray[as] = { 0.0f, 0.0f };
        return (anArray[0] == anArray[1]);
    }
};

----

If we remove the const from the declaration of as, we get an error with
-pedantic-errors that we have a VLA (otherwise we accept the code).


-- 
           Summary: [4.2/4.3/4.4 Regression] Funny rejects valid with
                    constant integral expression
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


             reply	other threads:[~2008-04-30 16:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30 16:42 pinskia at gcc dot gnu dot org [this message]
2008-04-30 16:42 ` [Bug c++/36089] [4.1/4.2/4.3/4.4 " pinskia at gcc dot gnu dot org
2008-04-30 16:55 ` pinskia at gcc dot gnu dot org
2008-05-07 23:18 ` pinskia at gcc dot gnu dot org
2008-05-16 19:37 ` rguenth at gcc dot gnu dot org
2008-05-16 20:01 ` pinskia at gcc dot gnu dot org
2008-07-04 22:42 ` [Bug c++/36089] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-11-10 21:21 ` jakub at gcc dot gnu dot org
2008-11-17  7:58 ` jakub at gcc dot gnu dot org
2009-03-31 20:50 ` [Bug c++/36089] [4.3 " jsm28 at gcc dot gnu dot org
2009-07-10 15:55 ` rguenth at gcc dot gnu dot org
2009-07-10 16:03 ` rguenth at gcc dot gnu dot 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-36089-6528@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).