From patchwork Fri Jan 4 19:01:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Remove unnecessaily included limits.h in libgcc2.c Date: Fri, 04 Jan 2013 09:01:00 -0000 From: Wookey X-Patchwork-Id: 209520 Message-Id: <20130104190058.GP9131@stoneboat.aleph1.co.uk> To: gcc-patches@gcc.gnu.org I filed http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55743 (my first upstream gcc bug so be gentle :-) Details are there but the short version is that the limits.h inclusion in libgcc2.c is now a relic because the constants that it brings in are no longer used (since http://repo.or.cz/w/official-gcc.git/blobdiff/49f0f270673c4512c11f72a038b84c321ae5534a..7429c938827aa98bf3b02c4ac89510f4d28ef0b1:/gcc/libgcc2.c ) And this inclusion can break --without-headers bootstrapping (which is how I noticed it). Doko poked me to send the patch to this list for consideration for inclusion in trunk. Wookey --- gcc-4.7-4.7.2/src/libgcc/libgcc2.c.orig 2011-11-02 15:26:35.000000000 +0000 +++ gcc-4.7-4.7.2/src/libgcc/libgcc2.c 2012-12-18 19:33:40.000000000 +0000 @@ -1676,18 +1676,6 @@ #endif #if defined(L_fixunsxfsi) && LIBGCC2_HAS_XF_MODE -/* Reenable the normal types, in case limits.h needs them. */ -#undef char -#undef short -#undef int -#undef long -#undef unsigned -#undef float -#undef double -#undef MIN -#undef MAX -#include - UWtype __fixunsxfSI (XFtype a) { @@ -1698,18 +1686,6 @@ #endif #if defined(L_fixunsdfsi) && LIBGCC2_HAS_DF_MODE -/* Reenable the normal types, in case limits.h needs them. */ -#undef char -#undef short -#undef int -#undef long -#undef unsigned -#undef float -#undef double -#undef MIN -#undef MAX -#include - UWtype __fixunsdfSI (DFtype a) { @@ -1720,18 +1696,6 @@ #endif #if defined(L_fixunssfsi) && LIBGCC2_HAS_SF_MODE -/* Reenable the normal types, in case limits.h needs them. */ -#undef char -#undef short -#undef int -#undef long -#undef unsigned -#undef float -#undef double -#undef MIN -#undef MAX -#include - UWtype __fixunssfSI (SFtype a) {