Apple's GCC 42 enhancements (was Re: [CFT] Experimental gcc update).

David Chisnall theraven at FreeBSD.org
Sun Nov 24 12:54:28 UTC 2013


On 23 Nov 2013, at 22:11, Pedro Giffuni <pfg at freebsd.org> wrote:

> I have particular interest in -fwritable-strings
> and the block support, mostly with the idea of making our gcc
> somewhat more compatible to clang.

I would absolutely love to see our GCC have blocks support.  It would be very nice to be able to use blocks in libc.  

I have some macros that allow code to call blocks even when compiled with a compiler that doesn't support them, but having native blocks support would be fantastic.  It's worth noting that Apple's libc includes a few _b variants of standard library functions:

scandir_b
err_set_exit_b
fts_open_b
glob_b
atexit_b
bsearch_b
heapsort_b
mergesort_b
psort_b
qsort_b

These all do the same as their non-_b-suffixed equivalents, but take a block as an argument instead of a function pointer.  Adding them has been on my todo list for a while, and this would give me a strong incentive to do so...

David



More information about the freebsd-toolchain mailing list