From: Kevin Shanahan <kmshanah@disenchant.net>
To: Ian Lance Taylor <ian@airs.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: gcc 4.1 -O1 problem
Date: Thu, 16 Mar 2006 06:11:00 -0000 [thread overview]
Message-ID: <20060316061144.GG9176@cubit> (raw)
In-Reply-To: <m33bhjszie.fsf@gossamer.airs.com>
On Wed, Mar 15, 2006 at 09:57:13PM -0800, Ian Lance Taylor wrote:
> Kevin Shanahan <kmshanah@disenchant.net> writes:
> > Are there any other options besides these which -O1 affects?
>
> -O1 is unfortunately not the sum of individual options. The compiler
> often simply checks whether you are optimizing at all, rather than
> checking specific options.
Okay, thanks anyway. I found out that the signed char cast in this
snippet of code changed behaviour with -O1:
int snd_scaletable[32][256];
int i, j;
for (i = 0; i < 32; i++)
for (j = 0; j < 256; j++)
snd_scaletable[i][j] = ((signed char)j) * i * 8;
I made the value explicit as '(j < 128) ? j : j - 256' instead.
Cheers,
Kevin.
next prev parent reply other threads:[~2006-03-16 6:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-16 4:49 Kevin Shanahan
2006-03-16 5:57 ` Ian Lance Taylor
2006-03-16 6:11 ` Kevin Shanahan [this message]
2006-03-16 12:50 ` John Love-Jensen
2006-03-16 18:38 ` Kevin Shanahan
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=20060316061144.GG9176@cubit \
--to=kmshanah@disenchant.net \
--cc=gcc-help@gcc.gnu.org \
--cc=ian@airs.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).