From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S4ANg-0008Vb-Tt for mharc-grub-devel@gnu.org; Sun, 04 Mar 2012 07:17:40 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4ANe-0008VS-Gu for grub-devel@gnu.org; Sun, 04 Mar 2012 07:17:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4ANc-0003dr-H4 for grub-devel@gnu.org; Sun, 04 Mar 2012 07:17:38 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:49021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4ANc-0003dl-7P for grub-devel@gnu.org; Sun, 04 Mar 2012 07:17:36 -0500 Received: by eaal1 with SMTP id l1so1148381eaa.0 for ; Sun, 04 Mar 2012 04:17:33 -0800 (PST) Received-SPF: pass (google.com: domain of phcoder@gmail.com designates 10.213.17.132 as permitted sender) client-ip=10.213.17.132; Authentication-Results: mr.google.com; spf=pass (google.com: domain of phcoder@gmail.com designates 10.213.17.132 as permitted sender) smtp.mail=phcoder@gmail.com; dkim=pass header.i=phcoder@gmail.com Received: from mr.google.com ([10.213.17.132]) by 10.213.17.132 with SMTP id s4mr1327009eba.207.1330863453277 (num_hops = 1); Sun, 04 Mar 2012 04:17:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=OihUG2ul3QVOhLYrCQvH58ObeXoLs8vuQ0nvhGQBKtw=; b=FMewKot7eBcKQl2rGdtPbPQoTubWihZS1h2ux/5k7z15b2o69GTAu6XYyuQE4RROIe waAhCMeaPdGnrWzyElJAQtmlmNEPBuoyN9kEJHqiumQ/D+zi4FprRC1d3WLmrChB467a QnLGVaLI+HqNUcOWwZEQQxY8pZvY/bAiuzYcD+gh7oY9eHMc5CoEJogDeFRi6CmGHARj mhmI05kjwjVSR4nUwBFWIhqXyfDx26JKUZtuP4R43coKzv8Qpfyu5MbxtZ6J6/9RDtJw 4mHxAL34bUXmYCuzqSwyxE0PIQvh3N3+l+n4iSOGdX01K/w/mH0hkPnF3vTz3l0CMXXh 3j0Q== Received: by 10.213.17.132 with SMTP id s4mr1015551eba.207.1330863453188; Sun, 04 Mar 2012 04:17:33 -0800 (PST) Received: from debian.x201.phnet (220-15.62-81.cust.bluewin.ch. [81.62.15.220]) by mx.google.com with ESMTPS id u9sm47399475eem.11.2012.03.04.04.17.30 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 04 Mar 2012 04:17:31 -0800 (PST) Message-ID: <4F535D59.2080704@gmail.com> Date: Sun, 04 Mar 2012 13:17:29 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120216 Icedove/8.0 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: Frozen References: <4F4C4CE8.6010001@gmail.com> <20120228163932.GO13612@caffeine.csclub.uwaterloo.ca> <20120301183710.GB22241@caffeine.csclub.uwaterloo.ca> <20120301191517.GC22241@caffeine.csclub.uwaterloo.ca> In-Reply-To: <20120301191517.GC22241@caffeine.csclub.uwaterloo.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.169 Cc: Lennart Sorensen 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: Sun, 04 Mar 2012 12:17:40 -0000 On 01.03.2012 20:15, Lennart Sorensen wrote: > On Thu, Mar 01, 2012 at 01:37:10PM -0500, Lennart Sorensen wrote: >> gcc-4.4 -DHAVE_CONFIG_H -I. -I../../../grub-core -I.. -Wall -W -I../.= =2E/../include -I../include -DGRUB_MACHINE_EMU=3D1 -DGRUB_MACHINE=3DPOWE= RPC_EMU -DGRUB_TARGET_CPU_POWERPC=3D1 -m32 -DGRUB_FILE=3D\"normal/charset= =2Ec\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../i= nclude -I../../../grub-core/lib/posix_wrap -Os -Wall -W -Wshadow -Wol= d-style-declaration -Wold-style-definition -Wpointer-arith -Wundef -Wextr= a -Waddress -Warray-bounds -Wattributes -Wbuiltin-macro-redefined -Wcast-= align -Wchar-subscripts -Wclobbered -Wcomment -Wcoverage-mismatch -Wdepre= cated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -We= mpty-body -Wendif-labels -Wfloat-equal -Wformat-contains-nul -Wformat-ext= ra-args -Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit -W= implicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer= -cast -Winvalid-pch -Wunsafe-loop-optimizations -Wlogical-op -Wmain -Wmis= sing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmis= sing-noreturn -W >> mudflap -Wmultichar -Wnonnull -Woverflow -Wpacked-bitfield-compat -Wpa= rentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-= point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wsync-nand -Wtr= igraphs -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas -Wunused= -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wun= used-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -= Wmissing-parameter-type -Wnested-externs -Wstrict-prototypes -Wpointer-si= gn -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -fno-= dwarf2-cfi-asm -fno-asynchronous-unwind-tables -m32 -fno-stack-protector = -Werror -DUSE_ASCII_FAILBACK=3D1 -DHAVE_UNIFONT_WIDTHSPEC=3D1 -ff= reestanding -fno-builtin -Wno-redundant-decls -c -o normal/normal_modul= e-charset.o `test -f 'normal/charset.c' || echo '../../../grub-core/'`nor= mal/charset.c >> cc1: warnings being treated as errors >> ../../../grub-core/normal/charset.c: In function 'grub_bidi_line_logic= al_to_visual': >> ../../../grub-core/normal/charset.c:636: error: cannot optimize possib= ly infinite loops > Would using this instead work: > > for (i =3D k - 1; i>=3D 0&& (unsigned) i> line_start - 1; > > After all if i already had to be>=3D0 then casting it to unsigned has n= o > harm, whereas casting line_start to signed could potentially generate > a very negative number if line_start was very big. You forget the case line_start =3D 0. Please try: - for (i =3D k - 1; i > (signed) line_start - 1 && i >=3D 0; + for (i =3D k - 1; i >=3D 0 && (unsigned) i >=3D line_start; > The compiler approves. > --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko