[patch] Fix pr16247

jahanian fjahanian at apple.com
Fri Jun 7 09:51:27 PDT 2013


On Jun 7, 2013, at 7:52 AM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:

> The attached patch implements the restriction:
> 
> An entity with C language linkage shall not be declared with
> the same name as an entity in global scope, unless both declarations
> denote the same entity.
> 
> It does it by just avoiding overloading in that case. The existing
> error checking for redeclarations then reject the different
> signatures.
> 
> One part of the patch I am not sure about is the changes to the ObjC
> rewriter. It was depending on overloading the extern "C" function
> objc_enumerationMutation.

This is dicey. Argument type to objc_enumerationMutation is ‘id’ which is translated into
what ‘id’ is typedef’ed to; “struct objc_object*”. If projects have forward declaration of
objc_enumerationMutation in their header files, this will cause conflicting types error
for objc_enumerationMutation.
- Fariborz

> 
> Cheers,
> Rafael
> <t.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130607/10765d27/attachment.html>


More information about the cfe-commits mailing list