public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "npl at chello dot at" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/55879] [C++11] nested constexpr Initialisation raises internal compiler error
Date: Tue, 08 Jan 2013 19:31:00 -0000	[thread overview]
Message-ID: <bug-55879-4-SJyNoA5HId@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55879-4@http.gcc.gnu.org/bugzilla/>


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

--- Comment #2 from npl at chello dot at 2013-01-08 19:30:29 UTC ---
(In reply to comment #1)
> The problem also occurs for gcc 4.8.0 20121209 (experimental). Let me remark
> that according to C++11 the variable s_Memmap could not be used in constant
> expressions, because it contains an (effective) reinterpret_cast, which is not
> allowed in this context.

If I understand you right, then you mean that the s_Memmap is not an
"constexpr" array. As far as I understand this is not an issue that schould
prevent compiling - I believe constexpr arrays are valid and different to const
arrays? The former should not compile with this initializer.
Also this variable is an linkervariable in my project, and I dont think gcc
could "constexpr" it... even if I might be able to do away with the cast with
something like
extern "C" const unsigned _lnkDDRRAM[];

btw here is my error output for 4.7.2:
nestedconstexpr.cpp:35:1:   in constexpr expansion of
‘CNested(CAddress(1107296256u))’
nestedconstexpr.cpp:22:26:   in constexpr expansion of
‘((CNested*)this)->CNested::m_PrimaryBlock.CAddress::CAddress((* & primary))’
nestedconstexpr.cpp:35:1: internal compiler error: in cxx_eval_indirect_ref, at
cp/semantics.c:7435


  parent reply	other threads:[~2013-01-08 19:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 19:40 [Bug c++/55879] New: [C++11][constexpr] " npl at chello dot at
2013-01-07 16:59 ` [Bug c++/55879] " paolo.carlini at oracle dot com
2013-01-07 23:25 ` [Bug c++/55879] [C++11] " daniel.kruegler at googlemail dot com
2013-01-08 19:31 ` npl at chello dot at [this message]
2013-01-08 20:26 ` daniel.kruegler at googlemail dot com
2013-02-13 17:57 ` jason at gcc dot gnu.org
2013-02-13 18:05 ` jason at gcc dot gnu.org
2013-02-15 19:32 ` 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-55879-4-SJyNoA5HId@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).