[LLVMbugs] [Bug 9745] Struct initialization failure

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 18 10:56:50 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=9745

Ted Kremenek <kremenek at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |kremenek at apple.com
         Resolution|                            |FIXED

--- Comment #1 from Ted Kremenek <kremenek at apple.com> 2011-04-18 12:56:50 CDT ---
I think I fixed this particular bug a few weeks ago.  That said, TOT clang
actually rejects this example:

Users/kremenek/Downloads/StructureInit.m:27:29: error: initializing 'CGFloat'
(aka 'double') with an expression of incompatible type 'CGSize' (aka 'struct
__CGSize')
    CGRect rect = { origin, size };
                            ^~~~
/Users/kremenek/Downloads/StructureInit.m:35:41: error: initializing 'CGFloat'
(aka 'double') with an expression of incompatible type 'CGSize' (aka 'struct
__CGSize')
    CGRect rect = { origin.x, origin.y, size };
                                        ^~~~
2 errors generated.

When I change the CGRect definition in the test case to use CGSize (instead of
CGPoint) for 'size', the test case analyzes cleanly.

-- 
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