This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/50743] New: [4.7 regression] objc-act.c triggers -Werror=sign-compare breaking bootstrap
- From: "mikpe at it dot uu.se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 16 Oct 2011 10:46:27 +0000
- Subject: [Bug objc/50743] New: [4.7 regression] objc-act.c triggers -Werror=sign-compare breaking bootstrap
- Auto-submitted: auto-generated
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.