[LLVMbugs] [Bug 2720] New: incorrect sema error: initializer element is not a compile-time constant
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Aug 25 12:55:15 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2720
Summary: incorrect sema error: initializer element is not a
compile-time constant
Product: clang
Version: unspecified
Platform: PC
URL: http://h5l.org
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: unassignedbugs at nondot.org
ReportedBy: kremenek at apple.com
CC: llvmbugs at cs.uiuc.edu
clang doesn't believe the initializer in the following struct variable is a
compile-time constant:
const AlgorithmIdentifier _hx509_signature_rsa_with_sha512_data = {
{ 7, ((void *)(uintptr_t)(const void *)(rsa_with_sha512_oid)) }, ((void
*)0)
};
clang -fsyntax-only emits an error:
gcc -fsyntax-only /tmp/t.c
(kremenek at grue:~)$ clang -fsyntax-only /tmp/t.c
/tmp/t.c:26:19: error: initializer element is not a compile-time constant
{ 7, ((void *)(uintptr_t)(const void *)(rsa_with_sha512_oid)) }, ((void
*)0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 diagnostic generated.
gcc eats this without complaints.
Test case attached. The testcase is reduced from a preprocessed file from
h5l.org (an BSD-style Kerberos 5 implementation).
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list