| To: | Andreas Schwab <schwab@xxxxxxx> |
|---|---|
| Subject: | Re: MSEC_TO_JIFFIES is messed up... |
| From: | "J. Bruce Fields" <bfields@xxxxxxxxxxxx> |
| Date: | Wed, 12 May 2004 18:07:33 -0400 |
| Cc: | Davide Libenzi <davidel@xxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxx>, Greg KH <greg@xxxxxxxxx>, Andrew Morton <akpm@xxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Netdev <netdev@xxxxxxxxxxx> |
| In-reply-to: | <jevfj1nwe1.fsf@sykes.suse.de> |
| References: | <20040512020700.6f6aa61f.akpm@osdl.org> <20040512181903.GG13421@kroah.com> <40A26FFA.4030701@pobox.com> <20040512193349.GA14936@elte.hu> <Pine.LNX.4.58.0405121247011.11950@bigblue.dev.mdolabs.com> <20040512200305.GA16078@elte.hu> <Pine.LNX.4.58.0405121400360.11950@bigblue.dev.mdolabs.com> <20040512213913.GA16658@fieldses.org> <jevfj1nwe1.fsf@sykes.suse.de> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.6i |
On Wed, May 12, 2004 at 11:55:18PM +0200, Andreas Schwab wrote: > "J. Bruce Fields" <bfields@xxxxxxxxxxxx> writes: > > > If gcc really optimizes that to just the identity function, then surely > > that's a gcc bug? Multiplication is left-associative, so i * 1000 / > > 1000 = (i * 1000) / 1000, but (i * 1000) should be zero for any i > > divisible by i^(sizeof(int) - 12). > > Signed integer overflow is undefined in C, so the compiler is allowed to > assume it does not happen. Ugh, right, got it.--b. |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: MSEC_TO_JIFFIES is messed up..., Zan Lynx |
|---|---|
| Next by Date: | Re: MSEC_TO_JIFFIES is messed up..., William Lee Irwin III |
| Previous by Thread: | Re: MSEC_TO_JIFFIES is messed up..., Andreas Schwab |
| Next by Thread: | Re: MSEC_TO_JIFFIES is messed up..., Chris Wedgwood |
| Indexes: | [Date] [Thread] [Top] [All Lists] |