Changes between Initial Version and Version 1 of IntegerTypes


Ignore:
Timestamp:
Nov 3, 2009, 3:30:00 PM (15 years ago)
Author:
Nicolas Pouillon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IntegerTypes

    v1 v1  
     1= The problem with integer types =
     2
     3C defines integer types `int`, `long`, `short`, `char`, `signed` or `unsigned`.
     4
     5These types raise numerous problems in portable code:
     6 * They change size from one arch/cpu to another
     7 * There is no integer type which does the size of a pointer
     8
     9= C99 Types =
     10
     11C99 defines portable fixed-size types:
     12
     13`[u]intXX_t` where `u` is present if unsigned, and `XX` is the size in bits. `XX` can range from 8 to 64, and is power of 2.
     14
     15Moreover, C99 defines:
     16 * `[u]intptr_t`, which is the size of an address, thus can contain a pointer
     17 * `[u]int_fastXX_t`, which are '''at least''' XX bits long, but may be larger if the larger implementation is cheaper
     18 
     19= C types in MutekH =
     20
     21Using legacy integer types in MutekH's core code is not wanted.
     22
     23Default settings in configuration of the build system makes the legacy types emit a warning, or even dont compile at all.
     24
     25Sometimes, because you are using huge amounts of code that
     26must be used without a complete rewrite, you may want to disable this
     27limitation adding the following line in the configuration file:
     28{{{
     29CONFIG_HEXO_INTTYPES_DEPRECATED undefined
     30}}}