This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/55879] [C++11] nested constexpr Initialisation raises internal compiler error


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]