[Bug objc/50743] New: [4.7 regression] objc-act.c triggers -Werror=sign-compare breaking bootstrap
mikpe at it dot uu.se
gcc-bugzilla@gcc.gnu.org
Sun Oct 16 10:46:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50743
Bug #: 50743
Summary: [4.7 regression] objc-act.c triggers
-Werror=sign-compare breaking bootstrap
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: objc
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: mikpe@it.uu.se
Attempting to bootstrap gcc-4.7-20111015 with objc enabled and
--disable-build-poststage1-with-cxx fails with:
/mnt/scratch/gcc-4.7-20111015/gcc/objc/objc-act.c: In function
'check_duplicates':
/mnt/scratch/gcc-4.7-20111015/gcc/objc/objc-act.c:5073:21: error: comparison
between signed and unsigned integer expressions [-Werror=sign-compare]
/mnt/scratch/gcc-4.7-20111015/gcc/objc/objc-act.c:5106:17: error: comparison
between signed and unsigned integer expressions [-Werror=sign-compare]
/mnt/scratch/gcc-4.7-20111015/gcc/objc/objc-act.c: In function
'insert_method_into_method_map':
/mnt/scratch/gcc-4.7-20111015/gcc/objc/objc-act.c:5828:18: error: comparison
between signed and unsigned integer expressions [-Werror=sign-compare]
/mnt/scratch/gcc-4.7-20111015/gcc/objc/objc-act.c:5840:18: error: comparison
between signed and unsigned integer expressions [-Werror=sign-compare]
cc1: all warnings being treated as errors
make[3]: *** [objc/objc-act.o] Error 1
make[3]: Leaving directory `/mnt/scratch/objdir47/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/mnt/scratch/objdir47'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/mnt/scratch/objdir47'
make: *** [bootstrap] Error 2
This is a regression from r179965:
http://gcc.gnu.org/ml/gcc-cvs/2011-10/msg00561.html
The issue is that the code was rewritten to use a number or for-loops with a
size_t index and a TREE_VEC_LENGTH limit; however, TREE_VEC_LENGTH returns a
signed integer, resulting in a signed/unsigned comparison. The C front-end
catches this error, but the C++ front-end fails to do so due to PR50012.
More information about the Gcc-bugs
mailing list