All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Subject: Re: Frozen
Date: Sun, 04 Mar 2012 13:17:29 +0100	[thread overview]
Message-ID: <4F535D59.2080704@gmail.com> (raw)
In-Reply-To: <20120301191517.GC22241@caffeine.csclub.uwaterloo.ca>

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../../../include -I../include  -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=POWERPC_EMU -DGRUB_TARGET_CPU_POWERPC=1 -m32 -DGRUB_FILE=\"normal/charset.c\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include   -I../../../grub-core/lib/posix_wrap   -Os -Wall -W -Wshadow -Wold-style-declaration -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Warray-bounds -Wattributes -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcoverage-mismatch -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-contains-nul -Wformat-extra-args -Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wunsafe-loop-optimizations -Wlogical-op -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -W
>> mudflap -Wmultichar -Wnonnull -Woverflow -Wpacked-bitfield-compat -Wparentheses -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-variable -Wvariadic-macros -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-unwind-tables -m32 -fno-stack-protector -Werror -DUSE_ASCII_FAILBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1         -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
>> ../../../grub-core/normal/charset.c: In function 'grub_bidi_line_logical_to_visual':
>> ../../../grub-core/normal/charset.c:636: error: cannot optimize possibly infinite loops
> Would using this instead work:
>
> for (i = k - 1; i>= 0&&  (unsigned) i>  line_start - 1;
>
> After all if i already had to be>=0 then casting it to unsigned has no
> 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 = 0. Please try:
-        for (i = k - 1; i > (signed) line_start - 1 && i >= 0;
+        for (i = k - 1; i >= 0 && (unsigned) i >= line_start;
> The compiler approves.
>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




  parent reply	other threads:[~2012-03-04 12:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28  3:41 Frozen Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-28 16:39 ` Frozen Lennart Sorensen
2012-03-01 18:37   ` Frozen Lennart Sorensen
2012-03-01 19:15     ` Frozen Lennart Sorensen
2012-03-01 19:25       ` Frozen Lennart Sorensen
2012-03-04 12:17       ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2012-03-04 22:43         ` Frozen Andreas Born
2012-03-05 14:46         ` Frozen Lennart Sorensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F535D59.2080704@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=lsorense@csclub.uwaterloo.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.