[cfe-dev] Integer and Float type definitions with respect to bits number

Halfdan Ingvarsson halfdan at sidefx.com
Sun Nov 10 10:29:41 PST 2013


Have a look at <stdint.h> for integer types. This should be a part of 
your standard library for any C99-compliant compilers. For Windows, 
they're included in MSVC2012 onwards.

float and double are always defined to be 32- and 64-bit, respectively. 
Beyond that you're in a platform-specific extension area. See, for 
example: http://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html

  - ½

On 13-11-10 10:38 AM, Mehmet Erol Sanliturk wrote:
>
> Dears All ,
>
>
> It seems that , in Clang , there is no a type system like the following :
>
>
> Integer_8_Bits_Positive
> Integer_8_Bits_Signed
>
>
>
> Integer_16_Bits_Positive
> Integer_16_Bits_Signed
>
>
>
> Integer_32_Bits_Positive
> Integer_32_Bits_Signed
>
>
> Integer_64_Bits_Positive
> Integer_64_Bits_Signed
>
>
>
>
> Float_48_Bits
> Float_64_Bits
> Float_80_Bits
> Float_128_Bits
>
>
> The following are defined with respect to above types AND Operating 
> System ,
> Processor requirements to enable to compile the SAME sources for different
> environments :
>
> Integer_Default_Bits_Positive
> Integer_Default_Bits_Signed
>
> Float_Default_Bits
>
>
> The existing definitions ( long , long long , etc. ) are very 
> ambiguous and
> depending on the platform without clearly showing exact bits number .
>
>
>
> Is there a possibility to include definitions such as above into Clang
> or , if there exist such a definition , what is its name ?
>
>
> Thank you very much .
>
> Mehmet Erol Sanliturk
>
>
>
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131110/7f287b45/attachment.html>


More information about the cfe-dev mailing list