[LLVMbugs] [Bug 4386] New: Constant evaluation doesn' t handle converting the address of a weak global to a boolean correctly
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Jun 13 19:21:14 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4386
Summary: Constant evaluation doesn't handle converting the
address of a weak global to a boolean correctly
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: sharparrow1 at yahoo.com
CC: llvmbugs at cs.uiuc.edu
Testcase:
__attribute((weak)) int foo();
int a = !foo;
clang currently evaluates "!foo" to zero; it should give an error.
I'm not sure how this should end up working with the following case:
int s(); int a = s == 0; int s() __attribute((weak));
--
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