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

Reply via email to