[cfe-dev] Integer and Float type definitions with respect to bits number
Mehmet Erol Sanliturk
m.e.sanliturk at gmail.com
Sun Nov 10 13:16:14 PST 2013
On Sun, Nov 10, 2013 at 1:29 PM, Halfdan Ingvarsson <halfdan at sidefx.com>wrote:
> 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
>
> - ½
>
>
In Linux :
/usr/lib/clang/3.3/include/stdint.h
contains these definitions .
In Clang , there is no
quadmath.h .
When Clang encounters
#include <quadmath.h>
it is using gcc source , but it is giving errors .
( In /usr/lib/gcc/x86_86-redhat-linux/4.7.2/include/quadmath.h ,
there are __float128 and __complex128 )
I could not find any __float64 , __float80 , __complex64 , __complex80 .
Thank you very much .
> 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 listcfe-dev at cs.uiuc.eduhttp://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/a493a0a4/attachment.html>
More information about the cfe-dev
mailing list