[LLVMbugs] [Bug 11292] New: Objective-C - incompatible pointer type assignment not detected when used with init method
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Nov 1 23:38:19 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11292
Bug #: 11292
Summary: Objective-C - incompatible pointer type assignment not
detected when used with init method
Product: new-bugs
Version: unspecified
Platform: Macintosh
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: muthuveerappan.al at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 7571
--> http://llvm.org/bugs/attachment.cgi?id=7571
example showing incompatible pointer type assignment not detected when used
with init method
Objective-C - incompatible pointer type assignment not detected when used with
init method
When an init method returns a pointer type and when that pointer is assigned to
another incompatible pointer variable, the compiler doesn't throw an error /
warning
Note - When tested with a method that doesn't have the prefix as "init",
compiler manages to detect the error / warning
Actual Behavior
============
The compiler doesn't throw an error / warning, when pointer type returned by an
init method is assigned to an incompatible variable.
Expected Behavior
==============
The compiler should throw an error / warning, when pointer type returned by an
init method is assigned to an incompatible variable.
Example (Sample Objective-C program)
=================================
Sample program showing incompatible pointer assignment by init method is
attached
--
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