[LLVMbugs] [Bug 4351] New: Compile-time constants with comparisons of function addresses cannot be determined
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Jun 9 11:01:48 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4351
Summary: Compile-time constants with comparisons of function
addresses cannot be determined
Product: clang
Version: unspecified
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: ed at 80386.nl
CC: llvmbugs at cs.uiuc.edu
Blocks: 3696
Clang chokes on the following piece of code:
void
foo(void)
{
}
int p = (foo == (void *)0) ? 1 : 2;
test.c:6:9: error: initializer element is not a compile-time constant
int p = (foo == (void *)0) ? 1 : 2;
^~~~~~~~~~~~~~~~~~~~~~~~~~
1 diagnostic generated.
I agree, the code is quite silly, but I'm running into pieces of kernel source
that use this.
--
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