public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bkoz at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/45923] constexpr diagnostic w/ non-literal
Date: Wed, 03 Nov 2010 17:37:00 -0000	[thread overview]
Message-ID: <bug-45923-4-nan8SuWBWo@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-45923-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Benjamin Kosnik <bkoz at gcc dot gnu.org> 2010-11-03 17:37:39 UTC ---
Created attachment 22256
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22256
constexpr diagnostics test case #01


This is a test case that shows locality information for failed constant
expressions in a simple class hierarchy.

The test case is comprised of a base class with member data, and no constexpr
constructor.

The error is:

%$bin/H-x86_64-gcc-trunk.20101101/bin/g++ -g -std=gnu++0x
constexpr-diagnostics-base1.cc
constexpr-diagnostics-base1.cc:18:19: error: the type ‘const derived’ of
constexpr variable ‘obj’ is not literal

The error desired is:

%$bin/H-x86_64-gcc-trunk.20101101/bin/g++ -g -std=gnu++0x
constexpr-diagnostics-base1.cc
constexpr-diagnostics-base1.cc:18:19: error: the type ‘const derived’ of
constexpr variable ‘obj’ is not literal

constexpr-diagnostics-base1.cc:8: error: base class constructor is not
"constexpr"


  parent reply	other threads:[~2010-11-03 17:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06 23:58 [Bug c++/45923] New: " bkoz at gcc dot gnu.org
2010-10-07 15:35 ` [Bug c++/45923] " jason at gcc dot gnu.org
2010-10-08 17:12 ` bkoz at redhat dot com
2010-10-08 18:38 ` jason at gcc dot gnu.org
2010-11-03 17:32 ` bkoz at gcc dot gnu.org
2010-11-03 17:37 ` bkoz at gcc dot gnu.org [this message]
2010-11-03 17:42 ` bkoz at gcc dot gnu.org
2010-11-03 20:48 ` bkoz at gcc dot gnu.org
2010-11-03 20:55 ` bkoz at gcc dot gnu.org
2010-11-11  4:54 ` [Bug c++/45923] constexpr diagnostics, more more bkoz at gcc dot gnu.org
2010-11-24 21:00 ` bkoz at gcc dot gnu.org
2011-01-20 20:00 ` bkoz at gcc dot gnu.org
2011-06-27  4:10 ` jason at gcc dot gnu.org
2011-06-29 14:36 ` jason at gcc dot gnu.org
2011-07-05  3:53 ` b.r.longbons at gmail dot com
2011-07-25 23:59 ` 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-45923-4-nan8SuWBWo@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).