public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jaehnesn at gmx dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65695] [4.9/5 Regression] NSDMI calling constexpr constructor with pointer-to-member is not a constant expression
Date: Fri, 10 Apr 2015 12:02:00 -0000	[thread overview]
Message-ID: <bug-65695-4-l9pG7yrMJB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65695-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from Sebastian Jähne <jaehnesn at gmx dot de> ---
(In reply to Daniel Krügler from comment #9)
> (In reply to Sebastian Jähne from comment #8)
> > [..] However, please remember that you are using a
> > constexpr static member to store this address. Constexpr are evaluated at
> > compile time. 
> 
> Yes.
> 
> > Correct me if I'm wrong, but as far as I know, you can only
> > take the address of a member function at runtime.
> 
> That is a wrong assumption. It is a valid constant expression to retrieve a
> pointer-to-member address.

I made this assumption on the fact that your code runs when not using a
constexpr. I will investigate the exact requirements for constexpr in the
standard and reply when I find something helpful.
>From gcc-bugs-return-483293-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Apr 10 12:04:05 2015
Return-Path: <gcc-bugs-return-483293-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 28141 invoked by alias); 10 Apr 2015 12:04:05 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 28097 invoked by uid 48); 10 Apr 2015 12:04:02 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65695] [4.9/5 Regression] NSDMI calling constexpr constructor with pointer-to-member is not a constant expression
Date: Fri, 10 Apr 2015 12:04:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65695-4-1PgDI823jJ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65695-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65695-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-04/txt/msg00845.txt.bz2
Content-length: 257

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide695

--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Please take the discussion somewhere else, it doesn't belong here. The testcase
in this bug report is valid code and should be accepted.


  parent reply	other threads:[~2015-04-10 12:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 10:59 [Bug c++/65695] New: [4.9/5 Regression] " redi at gcc dot gnu.org
2015-04-08 11:02 ` [Bug c++/65695] [4.9/5 Regression] NSDMI " redi at gcc dot gnu.org
2015-04-08 11:04 ` redi at gcc dot gnu.org
2015-04-08 11:08 ` redi at gcc dot gnu.org
2015-04-08 11:10 ` rguenth at gcc dot gnu.org
2015-04-09  9:15 ` rguenth at gcc dot gnu.org
2015-04-10 10:50 ` jaehnesn at gmx dot de
2015-04-10 11:18 ` jaehnesn at gmx dot de
2015-04-10 11:34 ` daniel.kruegler at googlemail dot com
2015-04-10 12:02 ` jaehnesn at gmx dot de [this message]
2015-04-11 14:57 ` jason at gcc dot gnu.org
2015-04-14 16:03 ` [Bug c++/65695] [4.9/5/6 " jason at gcc dot gnu.org
2015-04-22 20:53 ` jason at gcc dot gnu.org
2015-04-23 13:21 ` jason at gcc dot gnu.org
2015-04-23 13:25 ` jason 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-65695-4-l9pG7yrMJB@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).