I've previously built cvs head snapshots for aarch64-linux. Attempting to do so with the binutils-2.23 release fails as follows: gcc -DHAVE_CONFIG_H -I. -I/tmp/binutils-2.23/gas -I. -I/tmp/binutils-2.23/gas -I../bfd -I/tmp/binutils-2.23/gas/config -I/tmp/binutils-2.23/gas/../include -I/tmp/binutils-2.23/gas/.. -I/tmp/binutils-2.23/gas/../bfd -DLOCALEDIR="\"/tmp/install/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT tc-aarch64.o -MD -MP -MF .deps/tc-aarch64.Tpo -c -o tc-aarch64.o `test -f 'config/tc-aarch64.c' || echo '/tmp/binutils-2.23/gas/'`config/tc-aarch64.c /tmp/binutils-2.23/gas/config/tc-aarch64.c: In function 'first_error_fmt': /tmp/binutils-2.23/gas/config/tc-aarch64.c:646:11: error: variable 'ret' set but not used [-Werror=unused-but-set-variable] The code in question is: { int ret; va_start (args, format); ret = vsnprintf (buffer, size, format, args); know (ret <= size - 1 && ret >= 0); va_end (args); set_syntax_error (buffer); } That is, the variable ret is only used in the assert-like know call. However, know is a macro that expands to a dummy statement (do{}while(0)), so the actual parameter expression disappears and ret is unused-but-set. This doesn't happen when building from cvs head, presumably because know then expands to gas_assert which does evaluate the expression. I don't want to use --disable-werror by default. Is there a reason why know(p) can't use the standard technique of expanding to (void)(p)? That change fixes the problem for me.
Sorry for the rather late response; I only realized today the existence of this bugzilla.
This should have been fixed in both the trunk and binutils-2_23-branch. See the following two commits: http://sourceware.org/ml/binutils-cvs/2012-11/msg00129.html http://sourceware.org/ml/binutils-cvs/2012-11/msg00130.html The fix happened after the release of binutils 2.23.1, so if you are using binutils 2.23.1, please apply the same patch, or use binutils-2_23-branch instead. Sorry for the inconvenience.