[cfe-dev] Bug: assertion "only C++ supports non-constant static initializers!"
Ted Kremenek
kremenek at apple.com
Thu Jan 29 09:33:46 PST 2009
On Jan 29, 2009, at 10:19 AM, Max Kellermann wrote:
> Hi,
>
> with clang r63301, I get the following assertion failure:
>
> clang: CGDecl.cpp:93: llvm::GlobalValue*
> clang::CodeGen::CodeGenFunction::GenerateStaticBlockVarDecl(const
> clang::VarDecl&, bool, const char*): Assertion
> `getContext().getLangOptions().CPlusPlus && "only C++ supports
> non-constant static initializers!"' failed.
>
> A test source and the full error message is attached.
>
> The error occurs only if the first element of "struct foo" is a
> pointer and only the second one gets explicitly initialized.
>
> Max
Hi Max,
Thanks for the bug report. If it is no trouble, please file an actual
Bugzilla PR (link off the clang website) so that we can track the
resolution of this issue. While sending these reports to the mailing
lists is fine, if the issue isn't resolve immediately it can easily
get forgotten.
Ted
More information about the cfe-dev
mailing list