Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S0LDM-0003Yg-VA for mharc-grub-devel@gnu.org; Wed, 22 Feb 2012 18:03:12 -0500 Received: from eggs.gnu.org ([140.186.70.92]:38872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0LDK-0003Ww-9Q for grub-devel@gnu.org; Wed, 22 Feb 2012 18:03:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0LDI-0003nt-VP for grub-devel@gnu.org; Wed, 22 Feb 2012 18:03:10 -0500 Received: from caffeine.csclub.uwaterloo.ca ([129.97.134.17]:48426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0LDI-0003na-PN for grub-devel@gnu.org; Wed, 22 Feb 2012 18:03:08 -0500 Received: by caffeine.csclub.uwaterloo.ca (Postfix, from userid 20367) id 0E87325BE; Wed, 22 Feb 2012 18:03:07 -0500 (EST) Date: Wed, 22 Feb 2012 18:03:07 -0500 To: The development of GNU GRUB Subject: Re: Lists and aliasing (Re: Freeze on 27 February) Message-ID: <20120222230307.GC13612@caffeine.csclub.uwaterloo.ca> References: <4F451CD7.9080106@gmail.com> <20120222171612.GL24235@caffeine.csclub.uwaterloo.ca> <4F452775.9070900@gmail.com> <20120222174156.GN24235@caffeine.csclub.uwaterloo.ca> <20120222174614.GO24235@caffeine.csclub.uwaterloo.ca> <20120222180141.GP24235@caffeine.csclub.uwaterloo.ca> <20120222182806.GQ24235@caffeine.csclub.uwaterloo.ca> <20120222184104.GS24235@caffeine.csclub.uwaterloo.ca> <4F453B66.4040406@gmail.com> <20120222225037.GB13612@caffeine.csclub.uwaterloo.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20120222225037.GB13612@caffeine.csclub.uwaterloo.ca> User-Agent: Mutt/1.5.20 (2009-06-14) From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 129.97.134.17 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 23:03:11 -0000 On Wed, Feb 22, 2012 at 05:50:37PM -0500, Lennart Sorensen wrote: > Now I get: >=20 > gcc-4.6 -DHAVE_CONFIG_H -I. -I../../../grub-core -I.. -Wall -W -I../../.= =2E/include -I../include -DGRUB_MACHINE_EMU=3D1 -DGRUB_MACHINE=3DPOWERPC_E= MU -DGRUB_TARGET_CPU_POWERPC=3D1 -m32 -DGRUB_FILE=3D\"normal/charset.c\" -I= =2E -I../../../grub-core -I.. -I../../.. -I../../../include -I../include = -I../../../grub-core/lib/posix_wrap -Os -Wall -W -Wshadow -Wold-style-dec= laration -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -= Warray-bounds -Wattributes -Wbuiltin-macro-redefined -Wcast-align -Wchar-su= bscripts -Wclobbered -Wcomment -Wcoverage-mismatch -Wdeprecated -Wdeprecate= d-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-l= abels -Wfloat-equal -Wformat-contains-nul -Wformat-extra-args -Wformat-secu= rity -Wformat-y2k -Wignored-qualifiers -Wimplicit -Wimplicit-function-decla= ration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wuns= afe-loop-optimizations -Wlogical-op -Wmain -Wmissing-braces -Wmissing-field= -initializers -Wmissing-format-attribute -Wmissing-noreturn -W > mudflap -Wmultichar -Wnonnull -Woverflow -Wpacked-bitfield-compat -Wparen= theses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point= -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wsync-nand -Wtrigraphs= -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas -Wunused -Wunused= -function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variab= le -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wmissing-para= meter-type -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredunda= nt-decls -Wmissing-prototypes -Wmissing-declarations -fno-dwarf2-cfi-asm -f= no-asynchronous-unwind-tables -m32 -fno-stack-protector -Werror -Wno-trampo= lines -DUSE_ASCII_FAILBACK=3D1 -DHAVE_UNIFONT_WIDTHSPEC=3D1 -ffrees= tanding -fno-builtin -Wno-redundant-decls -c -o normal/normal_module-char= set.o `test -f 'normal/charset.c' || echo '../../../grub-core/'`normal/char= set.c > ../../../grub-core/normal/charset.c: In function 'bidi_line_wrap': > ../../../grub-core/normal/charset.c:737:55: error: comparison between sig= ned and unsigned integer expressions [-Werror=3Dsign-compare] > cc1: all warnings being treated as errors For some reason the compiler thinks GRUB_INT_MIN which is defined as -0x80000000 is unsigned. If I do: int right_join =3D 0; signed i; for (i =3D k - 1; i > (signed) line_start - 1 && i > (signed) G= RUB_INT_MIN; i--) { then gcc 4.6 stops complaining, but gcc 4.4 complains about: gcc-4.4 -DHAVE_CONFIG_H -I. -I../../../grub-core -I.. -Wall -W -I../../../= include -I../include -DGRUB_MACHINE_EMU=3D1 -DGRUB_MACHINE=3DPOWERPC_EMU -= DGRUB_TARGET_CPU_POWERPC=3D1 -m32 -DGRUB_FILE=3D\"normal/charset.c\" -I. -I= =2E./../../grub-core -I.. -I../../.. -I../../../include -I../include -I..= /../../grub-core/lib/posix_wrap -Os -Wall -W -Wshadow -Wold-style-declara= tion -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Warr= ay-bounds -Wattributes -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscr= ipts -Wclobbered -Wcomment -Wcoverage-mismatch -Wdeprecated -Wdeprecated-de= clarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-label= s -Wfloat-equal -Wformat-contains-nul -Wformat-extra-args -Wformat-security= -Wformat-y2k -Wignored-qualifiers -Wimplicit -Wimplicit-function-declarati= on -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wunsafe-= loop-optimizations -Wlogical-op -Wmain -Wmissing-braces -Wmissing-field-ini= tializers -Wmissing-format-attribute -Wmissing-noreturn -Wmudflap -Wmultich= ar -Wnonnull -Woverflow -Wpacked-bitfield-compat -Wparentheses -Wpointer-ar= ith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-co= mpare -Wstrict-aliasing -Wswitch -Wsync-nand -Wtrigraphs -Wtype-limits -Wu= ndef -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-function -Wunused-= label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macro= s -Wvolatile-register-var -Wwrite-strings -Wmissing-parameter-type -Wnested= -externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-= prototypes -Wmissing-declarations -fno-dwarf2-cfi-asm -fno-asynchronous-unw= ind-tables -m32 -fno-stack-protector -Werror -DUSE_ASCII_FAILBACK=3D1 -DHAV= E_UNIFONT_WIDTHSPEC=3D1 -ffreestanding -fno-builtin -Wno-redundant-= decls -c -o normal/normal_module-charset.o `test -f 'normal/charset.c' ||= echo '../../../grub-core/'`normal/charset.c cc1: warnings being treated as errors =2E./../../grub-core/normal/charset.c: In function 'grub_bidi_line_logical_= to_visual': =2E./../../grub-core/normal/charset.c:737: error: cannot optimize possibly = infinite loops If I do what is already done for GRUB_LONG_MIN and use: #define GRUB_INT_MIN (-0x7fffffff - 1) =2E..then gcc 4.6 is happy. gcc 4.4 goes on complaining about the inability to optimize possibly infinite loops. --=20 Len Sorensen