Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: word size and gcc builtins usage |
| Date | 2011-05-20 08:24 +1200 |
| Message-ID | <93lckbF1bbU7@mid.individual.net> (permalink) |
| References | <9eaee802-67e8-44a8-a88d-da20f0381bcc@j13g2000pro.googlegroups.com> |
On 05/20/11 08:12 AM, dr.oktopus wrote: > Hello, > simple question: what is the most appropriate type for implement a bit > array type for > operations like anding, oring, etc.. > simple answer: well, it should be the word size of the microprocessor > you are using. > More exactly, it should be the largest word the os allow you. So, if > you are running > x86 linux on a 64-bit microprocessor, it is 32 bit. But how detect it? Why 32 bit? unsigned long is 64 bit on that platform. Using size_t probably meets your requirements. -- Ian Collins
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
word size and gcc builtins usage "dr.oktopus" <blindwilly@freeonline.zzn.com> - 2011-05-19 13:12 -0700
Re: word size and gcc builtins usage Ian Collins <ian-news@hotmail.com> - 2011-05-20 08:24 +1200
Re: word size and gcc builtins usage Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-05-22 13:06 +0000
Re: word size and gcc builtins usage "Joel C. Salomon" <joelcsalomon@gmail.com> - 2011-05-19 14:21 -0700
Re: word size and gcc builtins usage "robertwessel2@yahoo.com" <robertwessel2@yahoo.com> - 2011-05-19 18:13 -0700
Re: word size and gcc builtins usage Seebs <usenet-nospam@seebs.net> - 2011-05-19 22:06 +0000
Re: word size and gcc builtins usage Keith Thompson <kst-u@mib.org> - 2011-05-19 15:52 -0700
Re: word size and gcc builtins usage Seebs <usenet-nospam@seebs.net> - 2011-05-19 23:38 +0000
Re: word size and gcc builtins usage Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-19 22:30 -0400
Re: word size and gcc builtins usage "dr.oktopus" <blindwilly@freeonline.zzn.com> - 2011-05-19 22:31 -0700
csiph-web