2012/4/8 Ruben Van Boxem <[email protected]>:
> 2012/4/8 Ozkan Sezer <[email protected]>
>>
>> On Sun, Apr 8, 2012 at 3:56 PM, Ruben Van Boxem
>> <[email protected]> wrote:
>> > 2012/4/8 Ozkan Sezer <[email protected]>
>> >>
>> >> On Sun, Apr 8, 2012 at 3:37 PM, Ruben Van Boxem
>> >> <[email protected]> wrote:
>> >> > 2012/4/8 Ozkan Sezer <[email protected]>
>> >> >>
>> >> >> On Sun, Apr 8, 2012 at 3:14 PM, Ruben Van Boxem
>> >> >> <[email protected]> wrote:
>> >> >> > Hi,
>> >> >> >
>> >> >> > Clang doesn't support the __int128 stuff, and the _mingw.h header
>> >> >> > is
>> >> >> > doing a
>> >> >> > typedef that Clang does not understand.
>> >> >> >
>> >> >> > It is on line 218 of _mingw.h:
>> >> >> >
>> >> >> > #ifndef __SIZEOF_INT128__
>> >> >> > typedef int __int128 __attribute__ ((__mode__ (TI)));
>> >> >> > #endif
>> >> >> >
>> >> >> > should be:
>> >> >> >
>> >> >> > #if !defined(__SIZEOF_INT128__) && !defined(__clang__)
>> >> >> > typedef int __int128 __attribute__ ((__mode__ (TI)));
>> >> >> > #endif
>> >> >> >
>> >> >> > Does this seem plausible?
>> >> >>
>> >> >> __mode__ (TI) is the problem, I guess?  If that is the case, one
>> >> >> would
>> >> >> like to know whether they would support it in the future.
>> >> >
>> >> >
>> >> > Doesn't seem so:
>> >> >
>> >> >
>> >> >
>> >> > M:/Development/mingw64/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\_mingw.h:220:13:
>> >> > error: cannot combine with previous 'int' declaration specifier
>> >> > typedef int __int128;// __attribute__ ((__mode__ (TI)));
>> >> >             ^
>> >> > 1 error generated.
>> >> >
>> >> > A small test also shows that __int128 is a Clang builtin type. So the
>> >>
>> >> Ah. Then do they not define a macro indicating the type's size
>> >> like __SIZEOF_INT128__ from gcc? If not, then your suggestion seem
>> >> as the right solution to me
>> >
>> >
>> > I can't find anything in the source, and no compiler-defined macro's.
>> > Only
>> > for the char/short/int/long/wchar_t types. I have no idea how they
>> > implement
>> > it or how it works. sizeof(__int128) returns 16, which seems right.
>>
>> I see. Then the additional clang ifdef seems as the the right solution.
>>
>> BTW, is it a yet-to-be-released clang 3.1 thing (judging from the
>> command line you pasted here), or do the older versions of clang
>> have it?
>
>
> It's very new, in order to match libstdc++ changes incorporating the change
> on GCC side:
> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120402/055712.html
>
> So I guess only Clang 3.1 is affected. These are the version macros:
> (__clang_major__ ==3) && (__clang_minor__ >= 1)
>
> My version check thinking isn't working today and I gotta go very soon,
> sorry.
>
> Ruben

Proper fix for Clang would be in _mingw.h.in header before the first
use of __SIZEOF_INT128__.

#if !defined (__SIZEOF_INT128__) && (__clang_major__ ==3) &&
(__clang_minor__ >= 1)
#define __SIZEOF_INT128__ 16
#endif


Regards,
Kai

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to