This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New hashtable power 2 rehash policy


On 14/05/16 18:13 +0200, François Dumont wrote:
sizeof() returns number of char elements in the given type ? I thought it was the number of bytes and that a byte was always 8 bits. But I know that you know your stuff so fixed in the new patch.

A char is a byte, by definition, so sizeof returns the number of
bytes, which is also the number of chars.

But a byte can have more than 8 bits. The number of bits is given by
the standard macro CHAR_BITS, and the non-standard (but always defined
by GCC) macro __CHAR_BITS__.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]