I see it's in _mingw.h
#ifndef _INT128_DEFINED
#define _INT128_DEFINED
#ifdef __GNUC__
#define __int8 char
#define __int16 short
#define __int32 int
#define __int64 long long
#ifdef _WIN64
#ifndef __SIZEOF_INT128__
typedef int __int128 __attribute__ ((__mode__ (TI)));
#endif
#endif
#endif /* __GNUC__ */
#endif /* _INT128_DEFINED */
it's not defined for 32 bit target, I wish it were.
but it appears that __attribute__ I guess is defined as a comment.
and __mode__ doesn't seem to be defined anywhere.
#include <stdio.h>
#include <_mingw.h>
int main(void) {
__int128 i=170141183460469231731687303715884105727LLLL;
unsigned __int128 u=340282366920938463463374607431768211455ULLLL;
printf("i=%I128d\n", i);
printf(" 170141183460469231731687303715884105727\n"); //for comparison
printf("u=%I128u\n", u);
printf(" 340282366920938463463374607431768211455\n"); //for comparison
return 0;
}
__int128.cpp:4:16: error: invalid suffix "LLLL" on integer constant
__int128.cpp:5:25: error: invalid suffix "ULLLL" on integer constant
so I tried one less L...
__int128.cpp:4:16: error: invalid suffix "LLL" on integer constant
__int128.cpp:5:25: error: invalid suffix "ULLL" on integer constant
128-bit constants are not allowed in mingw-w64 apparently. they must be
designed into the language.
I don't know why there isn't a 128-bit data type - there are UUID's on UNIX,
the
MAC, and the equivalent GUID on windows (a 128-bit number).
seems to me that a 128-bit number would be an ideal storage place for this.
All
you would need is some conversion stuff maybe - I guess that's up the
programmer.
I am using 4.5.2 sezero.
________________________________
From: Kai Tietz <[email protected]>
To: Sisyphus <[email protected]>
Cc: Jim Michaels <[email protected]>; mingw64
<[email protected]>
Sent: Thu, February 10, 2011 10:21:46 AM
Subject: Re: [Mingw-w64-public] Looking for unsigned __int128
2011/2/10 Sisyphus <[email protected]>:
>
> ----- Original Message -----
> From: "Jim Michaels"
>
>> cool! I've been wanting to work with a 128-bit data type for a while
>> now...
>> now I can work with GUIDs easier.
>> is this available under stdint.h as uint128_t and int128_t?
>
> Not in my version (4.6.0 20100414) of the compiler - I can't speak for more
> recent editions.
>
> All I have is the (signed) __int128, and now the (unsigned) __uint128.
> However, I guess I could typedef them to int128_t and uint128_t if I wanted
> to use those symbols instead.
>
> Cheers,
> Rob
Well, the builtin __int128 type is just available for targets
supporting wide-enough TImode. For x86 (means 32-bit) this isn't the
case, and therefore this feature is at the moment just available for
x64.
As those aren't standard integers, you won't find them in stdint.h.
But of couse you can typedef them easily (for 4.6 via builtin, for
earlier gcc versions via attribute).
For for 4.6 64-bit typedefs are looking that way:
typedef unsigned __int128 uint128_t;
typedef signed __int128 int128_t;
Regards,
Kai
____________________________________________________________________________________
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public