This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Setting long long bitfields
- From: Andreas Schwab <schwab at suse dot de>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: Paul Hilfinger <hilfingr at gnat dot com>,gdb-patches at sources dot redhat dot com
- Date: Sun, 31 Oct 2004 19:40:28 +0100
- Subject: Re: [RFA] Setting long long bitfields
- References: <20041031090847.2E303F2985@nile.gnat.com><41852B2B.6030305@gnu.org>
Andrew Cagney <cagney@gnu.org> writes:
> One possible tweak, several of us have an aversion to "?:", it would be
> nice if it wasn't there :-)
Like this perhaps:
+ ULONGEST mask = (ULONGEST) -1 >> (8 * sizeof (ULONGEST) - bitsize);
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."