[cfe-dev] clang defines __weak as if -fobjc-gc were specified
Frank Rehwinkel
frankrehwinkel at gmail.com
Sat Jun 1 05:00:15 PDT 2013
This is with a clang built from trunk head yesterday.
When clang is run without objc-gc mode,
clang defines the symbol __weak as if -fobjc-gc were specified.
clang defines the symbol __strong as empty.
Here are two commands, the first shows the clang symbols,
the second shows the warning when a source file wants to define
__strong and __weak itself.
$ echo | clang -E - -dM | egrep "strong|weak"
#define __strong
#define __weak __attribute__((objc_gc(weak)))
$ clang -E - <<EOF
#define __strong
#define __weak
EOF
<stdin>:2:9: warning: '__weak' macro redefined
#define __weak
^
<built-in>:158:9: note: previous definition is here
#define __weak __attribute__((objc_gc(weak)))
^
1 warning generated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130601/6b6219d2/attachment.html>
More information about the cfe-dev
mailing list