[cfe-dev] [patch] -fno-constant-cfstrings issue

Jean-Daniel Dupas devlists at shadowlab.org
Tue Jul 5 00:56:40 PDT 2011


Hello,

I have a problem trying to compile unload able bundle with clang. According to CoreFoundation reference (1), when writing such bundle, you should the -fno-constant-cfstrings option to prevent issue with dandling CFStringRef pointer.

Actually, clang completely ignore this flag and always define the __CONSTANT_CFSTRINGS__ macro, used by the CoreFoundation header to conditionally generate constant strings.

I attached a patch to not define this macro when -fno-constant-cfstrings is passed to the compiler.



(1): The last section of this page  http://developer.apple.com/library/mac/#documentation/CoreFoundation/Conceptual/CFBundles/AccessingaBundlesContents/AccessingaBundlesContents.html 


-- Jean-Daniel



-------------- next part --------------
A non-text attachment was scrubbed...
Name: constcfstrings.patch
Type: application/octet-stream
Size: 606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110705/fe4610df/attachment.obj>


More information about the cfe-dev mailing list