Build failure due to block_abi.h

2014-04-04 Thread Marcel Moolenaar
David, The definition of DECLARE_BLOCK seems to trip over GCC 4.2.1 here at Juniper. This is how we run the compiler: /volume/fwtools/gcc/jnpr/4.2.1/amd64-juniper-junos.5/bin/amd64-juniper-junos-gcc -O2 -pipe -I/b/marcelm/fbsd-head/src/lib/libc/include

Re: Build failure due to block_abi.h

2014-04-04 Thread David Chisnall
Hi Marcel, This error is a warning for me with gcc 4.7.3 when I try. With 4.2.1 in the tree, it appears to be silenced by something (or possibly we're using the native blocks code path with gcc and clang doesn't emit that warning in non-blocks mode). We could pull out the structure

Re: Build failure due to block_abi.h

2014-04-04 Thread David Chisnall
It turns out that tomorrow happened 12 minutes after this email... The attached diff lets it build with -Werror for me with FreeBSD clang and gcc (with -fblocks and -fno-blocks) and with ports gcc 4.7.3 and doesn't clutter the code. Please can you test it with Juniper's gcc? David Index:

Re: Build failure due to block_abi.h

2014-04-04 Thread Marcel Moolenaar
On Apr 4, 2014, at 4:13 PM, David Chisnall thera...@freebsd.org wrote: It turns out that tomorrow happened 12 minutes after this email... The attached diff lets it build with -Werror for me with FreeBSD clang and gcc (with -fblocks and -fno-blocks) and with ports gcc 4.7.3 and doesn't