]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r260311, r260831:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 26 Jan 2014 19:49:54 +0000 (19:49 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 26 Jan 2014 19:49:54 +0000 (19:49 +0000)
commitd139321a1dd1ca2876ab67d1f294d796e5526d96
tree388002273457e1ebeee9510b9908dc299e3748f1
parente9be13549fb18d50fee0fd84aafdb71268c2b8dc
MFC r260311, r260831:

gcc: Add support for Apple's Block extension

Block objects [1] are a C-level syntactic and runtime feature. They
are similar to standard C functions, but in addition to executable
code they may also contain variable bindings to automatic (stack)
or managed (heap) memory. A block can therefore maintain a set of
state (data) that it can use to impact behavior when executed.

This port is based on Apple's GCC 5646 with some bugfixes from
Apple GCC 5666.3. It has some small differences with the support
in clang, which remains the recommended compiler.

Perhaps the most notable difference is that in GCC __block is not
actually a keyword, but a macro. There may be workaround for this
issue in the future. Other issues can be consulted in the clang
documentation [2]

For better compatiblity with Apple's GCC and llvm-gcc, some related
fixes and features from Apple have been included. Support for the
non-standard nested functions in GCC is now off by default.

No effort was made to update the ObjC support since FreeBSD doesn't
carry ObjC in the base system but some of the code crept in and
was more difficult to remove than to adjust.

References:
[1]
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html
[2]
http://clang.llvm.org/compatibility.html#block-variable-initialization

Obtained from: Apple GCC 4.2

git-svn-id: svn://svn.freebsd.org/base/stable/10@261188 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
67 files changed:
contrib/gcc/ChangeLog.apple
contrib/gcc/attribs.c
contrib/gcc/c-common.c
contrib/gcc/c-common.h
contrib/gcc/c-convert.c
contrib/gcc/c-cppbuiltin.c
contrib/gcc/c-decl.c
contrib/gcc/c-objc-common.h
contrib/gcc/c-opts.c
contrib/gcc/c-parser.c
contrib/gcc/c-pretty-print.c
contrib/gcc/c-pretty-print.h
contrib/gcc/c-tree.h
contrib/gcc/c-typeck.c
contrib/gcc/c.opt
contrib/gcc/calls.c
contrib/gcc/cgraph.h
contrib/gcc/cgraphunit.c
contrib/gcc/convert.c
contrib/gcc/convert.h
contrib/gcc/cp/ChangeLog.apple
contrib/gcc/cp/call.c
contrib/gcc/cp/class.c
contrib/gcc/cp/cp-gimplify.c
contrib/gcc/cp/cp-objcp-common.c
contrib/gcc/cp/cp-objcp-common.h
contrib/gcc/cp/cp-tree.h
contrib/gcc/cp/decl.c
contrib/gcc/cp/decl.h
contrib/gcc/cp/decl2.c
contrib/gcc/cp/error.c
contrib/gcc/cp/init.c
contrib/gcc/cp/mangle.c
contrib/gcc/cp/name-lookup.c
contrib/gcc/cp/name-lookup.h
contrib/gcc/cp/parser.c
contrib/gcc/cp/pt.c
contrib/gcc/cp/semantics.c
contrib/gcc/cp/tree.c
contrib/gcc/cp/typeck.c
contrib/gcc/dbxout.c
contrib/gcc/doc/extend.texi
contrib/gcc/doc/invoke.texi
contrib/gcc/dwarf2.h
contrib/gcc/dwarf2out.c
contrib/gcc/expmed.c
contrib/gcc/expr.c
contrib/gcc/fold-const.c
contrib/gcc/function.c
contrib/gcc/function.h
contrib/gcc/ggc-common.c
contrib/gcc/ggc.h
contrib/gcc/langhooks-def.h
contrib/gcc/langhooks.c
contrib/gcc/langhooks.h
contrib/gcc/stor-layout.c
contrib/gcc/stub-objc.c
contrib/gcc/targhooks.c
contrib/gcc/toplev.c
contrib/gcc/tree-gimple.h
contrib/gcc/tree-nested.c
contrib/gcc/tree.c
contrib/gcc/tree.def
contrib/gcc/tree.h
contrib/gcc/varasm.c
contrib/gcclibs/include/libiberty.h
contrib/gcclibs/libiberty/physmem.c