Attempting to bootstrap gcc-4.6-20100814 (r163252) on arm-linux-gnueabi fails due to a warning in stage2 and the default use of -Werror there: /home/mikpe/gcc-4.6-20100814/gcc/config/arm/arm.c: In function 'arm_get_pcs_model': /home/mikpe/gcc-4.6-20100814/gcc/config/arm/arm.c:3720:7: error: passing argument 1 of 'stdarg_p' discards 'const' qualifier from pointer target type [-Werror] /home/mikpe/gcc-4.6-20100814/gcc/tree.h:4829:13: note: expected 'tree' but argument is of type 'const_tree' cc1: all warnings being treated as errors make[3]: *** [arm.o] Error 1 make[3]: Leaving directory `/home/mikpe/objdir46/gcc' make[2]: *** [all-stage2-gcc] Error 2 make[2]: Leaving directory `/home/mikpe/objdir46' make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory `/home/mikpe/objdir46' make: *** [bootstrap] Error 2 Presumably caused by r163033: http://gcc.gnu.org/ml/gcc-cvs/2010-08/msg00244.html
Created attachment 21511 [details] proposed fix The issue is that stdarg_p has a non-const parameter but the call site in the ARM backend has a const value it wants to pass. The right solution seems to be to make stdarg_p accept a const parameter, but then the problem is that the parameter is stored in the iterator's fntype field. Nothing uses that field, so removing it and then making the parameter const fixes the issue. ARM bootstrap still fails for me with comparison failures, however. (I'm in an email black hole at the moment so can't easily submit this to gcc-patches.)
Subject: Bug 45321 Author: ramana Date: Wed Sep 1 11:52:55 2010 New Revision: 163726 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163726 Log: 2010-09-01 Mikael Pettersson <mikpe@it.uu.se> PR bootstrap/45321 * tree.c (stdarg_p): Make fntype parameter const. * tree.h (stdarg_p): Likewise. (function_args_iterator): Remove unused fntype field. (function_args_iter_init): Do not initialize fntype field. Make fntype parameter const. Modified: trunk/gcc/ChangeLog trunk/gcc/tree.c trunk/gcc/tree.h
Fixed.