From: Andreas Schwab <schwab@suse.de>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] Port of the posix timers to IA64
Date: Fri, 28 Feb 2003 12:41:52 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805944@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590709805943@msgid-missing>
Eric Piel <Eric.Piel@Bull.Net> writes:
|> Hello David,
|>
|> I'm working on the port of the posix timers to IA64. The first (over 4)
|> part has just been integrated in the linus tree (2.5.63) so I think you
|> can find interest in my work.
|> Even if it's supposed to be portable accross platforms, due to some mix
|> between long and int, it doesn't run correctly on IA64.
|>
|> Here comes my question, I'm still newbie to kernel hacking and IA64
|> compilation and I don't know how I should handle some troubles with
|> longs. In the code I have some cases like this one:
|>
|> long v;
|> :
|> :
|> if ( v >= (1 << 56)){
|> :
|> }
|>
|> It seems very strange for me that when compiling this part gcc considers
|> that eveything must be converted to int. I have to write 1UL instead of
|> 1 in order to obtain the correct behaviour of the code. I guess you've
|> already come along with such problem.
That's how C is working. A type of an expression is determined
independent of the context, so the type of 1 is always int. And shifting
by more than the width of the type is an undefined operation.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
prev parent reply other threads:[~2003-02-28 12:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-28 9:52 [Linux-ia64] Port of the posix timers to IA64 Eric Piel
2003-02-28 12:41 ` Andreas Schwab [this message]
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=marc-linux-ia64-105590709805944@msgid-missing \
--to=schwab@suse.de \
--cc=linux-ia64@vger.kernel.org \
/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.