public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65398] [5 Regression] [C++11] GCC rejects constexpr variable definitions with valid initialization
Date: Mon, 30 Mar 2015 20:48:00 -0000	[thread overview]
Message-ID: <bug-65398-4-BAltyouwBg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65398-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65398

--- Comment #11 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Mon Mar 30 18:39:17 2015
New Revision: 221777

URL: https://gcc.gnu.org/viewcvs?rev=221777&root=gcc&view=rev
Log:
    PR c++/65398
    * constexpr.c (cxx_fold_indirect_ref): Don't perform the
     *(&A[i] p+ j) => A[i + j] transformation here.
    (cxx_eval_pointer_plus_expression): New function.
    (cxx_eval_constant_expression): Use it here.

    * g++.dg/cpp0x/pr65398-2.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/pr65398-2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/testsuite/ChangeLog


  parent reply	other threads:[~2015-03-30 18:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12 11:11 [Bug c++/65398] New: " kariya_mitsuru at hotmail dot com
2015-03-13  9:52 ` [Bug c++/65398] [5 Regression] " mpolacek at gcc dot gnu.org
2015-03-13 10:43 ` mpolacek at gcc dot gnu.org
2015-03-18 13:28 ` rguenth at gcc dot gnu.org
2015-03-21  0:10 ` mpolacek at gcc dot gnu.org
2015-03-21  0:25 ` mpolacek at gcc dot gnu.org
2015-03-29 19:32 ` jason at gcc dot gnu.org
2015-03-30  8:18 ` kariya_mitsuru at hotmail dot com
2015-03-30  8:59 ` daniel.kruegler at googlemail dot com
2015-03-30  9:07 ` kariya_mitsuru at hotmail dot com
2015-03-30 10:35 ` mpolacek at gcc dot gnu.org
2015-03-30 13:30 ` mpolacek at gcc dot gnu.org
2015-03-30 20:48 ` mpolacek at gcc dot gnu.org [this message]
2015-03-30 21:12 ` mpolacek at gcc dot gnu.org
2015-03-31 16:19 ` kariya_mitsuru at hotmail dot com
2015-03-31 16:50 ` mpolacek at gcc dot gnu.org
2015-03-31 18:48 ` mpolacek at gcc dot gnu.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-65398-4-BAltyouwBg@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).