Problem situation is when we have:
undef _x86_64_
__FLT_EVAL_METHOD__ = -1
2012/12/24 Алексей Павлов <alex...@gmail.com>
> It not work because __FLT_EVAL_METHOD__ = -1
>
>
> 2012/12/24 Kai Tietz <ktiet...@googlemail.com>
>
>> Hmm, well, I see. We could simplify code here.
>>
>> #if defined (__x86_64__) || (defined (__FLT_EVAL_METHOD__) &&
>> __FLT_EVAL_METHOD__ == 0)
>> typedef float float_t;
>> typedef double double_t;
>> #else
>> typedef long double float_t;
>> typedef long double double_t;
>> #endif
>>
>> 2012/12/24 Алексей Павлов <alex...@gmail.com>:
>> > I still have error:
>> > $ echo "#include <cmath>" | g++ -x c++ -c - -m32 -mfpmath=both
>> -std=gnu++11
>> > -o /dev/null
>> > In file included from <stdin>:1:0:
>> >
>> c:\gccbuild\msys\temp\x64-4.7.2-release-posix-sjlj-rev5\prefix\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/include/c++/cmath:1040:11:
>> > error: '::double_t' has not been declared
>> >
>> c:\gccbuild\msys\temp\x64-4.7.2-release-posix-sjlj-rev5\prefix\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/include/c++/cmath:1041:11:
>> > error: '::float_t' has not been declared
>> >
>> > On 64 multilib toolchain when execute
>> > echo "#include <cmath>" | g++ -x c++ -c - -m32 -mfpmath=both
>> -std=gnu++11 -o
>> > /dev/null
>> >
>> > 2012/12/24 Kai Tietz <ktiet...@googlemail.com>
>> >>
>> >> Hmm, I don't see the point why we should limit that for x64 case to
>> >> __FLT_EVAL_METHOD == -1? In all cases it has simply to use
>> >> float/double for x64. Btw AFAIK is *nix using same approach.
>> >> What is actual the issue you still get?
>> >>
>> >> Kai
>> >>
>> >> 2012/12/24 Алексей Павлов <alex...@gmail.com>:
>> >> > I think possible patch to complete resolve this problem is
>> >> >
>> >> > --- math.h.orig 2012-12-23 11:56:01 +0400
>> >> > +++ math.h 2012-12-24 13:10:52 +0400
>> >> > @@ -318,8 +318,16 @@
>> >> >
>> >> > /* Use the compiler's builtin define for FLT_EVAL_METHOD to
>> >> > set float_t and double_t. */
>> >> > -#if defined (__x86_64__) || defined(__FLT_EVAL_METHOD__)
>> >> > -# if defined (__x86_64__) || ( __FLT_EVAL_METHOD__== 0)
>> >> > +#if defined(__FLT_EVAL_METHOD__)
>> >> > +# if ( __FLT_EVAL_METHOD__== -1)
>> >> > +# if defined (__x86_64__)
>> >> > +typedef long double float_t;
>> >> > +typedef long double double_t;
>> >> > +# else
>> >> > +typedef float float_t;
>> >> > +typedef double double_t;
>> >> > +# endif
>> >> > +# elif ( __FLT_EVAL_METHOD__== 0)
>> >> > typedef float float_t;
>> >> > typedef double double_t;
>> >> > # elif (__FLT_EVAL_METHOD__ == 1)
>> >> >
>> >> >
>> >> > 2012/12/24 Алексей Павлов <alex...@gmail.com>
>> >> >>
>> >> >> I find that when I try to execute
>> >> >> echo "#include <cmath>" | g++ -x c++ -c - -m32 -mfpmath=both
>> >> >> -std=gnu++11
>> >> >> -o /dev/null
>> >> >>
>> >> >> _x86_64_ not defined and __FLT_EVAL_METHOD__==-1
>> >> >>
>> >> >> Why gcc internal definition of __FLT_EVAL_METHOD__ not applied
>> during
>> >> >> execute code?
>> >> >>
>> >> >>
>> >> >> 2012/12/24 Алексей Павлов <alex...@gmail.com>
>> >> >>>
>> >> >>> Below is difference of gcc internal definitions of 64 multilib
>> >> >>> toolchain
>> >> >>> with -m32 switch and without it:
>> >> >>>
>> >> >>> --- m32.txt 2012-12-24 09:46:13 +0400
>> >> >>> +++ m64.txt 2012-12-24 09:44:19 +0400
>> >> >>> @@ -7,9 +7,10 @@
>> >> >>> #define __INTMAX_C(c) c ## LL
>> >> >>> #define __CHAR_BIT__ 8
>> >> >>> #define __UINT8_MAX__ 255
>> >> >>> +#define _WIN64 1
>> >> >>> #define __WINT_MAX__ 65535
>> >> >>> #define __ORDER_LITTLE_ENDIAN__ 1234
>> >> >>> -#define __SIZE_MAX__ 4294967295U
>> >> >>> +#define __SIZE_MAX__ 18446744073709551615ULL
>> >> >>> #define __WCHAR_MAX__ 65535
>> >> >>> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
>> >> >>> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
>> >> >>> @@ -17,8 +18,9 @@
>> >> >>> #define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L)
>> >> >>> #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
>> >> >>> #define __GCC_ATOMIC_CHAR_LOCK_FREE 2
>> >> >>> -#define __FLT_EVAL_METHOD__ 2
>> >> >>> +#define __FLT_EVAL_METHOD__ 0
>> >> >>> #define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
>> >> >>> +#define __x86_64 1
>> >> >>> #define __UINT_FAST64_MAX__ 18446744073709551615ULL
>> >> >>> #define __SIG_ATOMIC_TYPE__ int
>> >> >>> #define __DBL_MIN_10_EXP__ (-307)
>> >> >>> @@ -44,11 +46,12 @@
>> >> >>> #define __DBL_DIG__ 15
>> >> >>> #define __GCC_ATOMIC_POINTER_LOCK_FREE 2
>> >> >>> #define __SIZEOF_INT__ 4
>> >> >>> -#define __SIZEOF_POINTER__ 4
>> >> >>> -#define __USER_LABEL_PREFIX__ _
>> >> >>> +#define __SIZEOF_POINTER__ 8
>> >> >>> +#define __USER_LABEL_PREFIX__
>> >> >>> #define __STDC_HOSTED__ 1
>> >> >>> #define __WIN32 1
>> >> >>> #define __LDBL_HAS_INFINITY__ 1
>> >> >>> +#define __WIN64 1
>> >> >>> #define __FLT_EPSILON__ 1.19209289550781250000e-7F
>> >> >>> #define __LDBL_MIN__ 3.36210314311209350626e-4932L
>> >> >>> #define __DEC32_MAX__ 9.999999E96DF
>> >> >>> @@ -63,7 +66,7 @@
>> >> >>> #define _cdecl __attribute__((__cdecl__))
>> >> >>> #define __MMX__ 1
>> >> >>> #define __FLT_HAS_DENORM__ 1
>> >> >>> -#define __SIZEOF_LONG_DOUBLE__ 12
>> >> >>> +#define __SIZEOF_LONG_DOUBLE__ 16
>> >> >>> #define __BIGGEST_ALIGNMENT__ 16
>> >> >>> #define __DBL_MAX__ ((double)1.79769313486231570815e+308L)
>> >> >>> #define _thiscall __attribute__((__thiscall__))
>> >> >>> @@ -81,10 +84,12 @@
>> >> >>> #define __DEC32_MIN__ 1E-95DF
>> >> >>> #define __DBL_MAX_EXP__ 1024
>> >> >>> #define __DEC128_EPSILON__ 1E-33DL
>> >> >>> +#define __SSE2_MATH__ 1
>> >> >>> #define __WIN32__ 1
>> >> >>> -#define __PTRDIFF_MAX__ 2147483647
>> >> >>> +#define __PTRDIFF_MAX__ 9223372036854775807LL
>> >> >>> +#define __amd64 1
>> >> >>> #define __LONG_LONG_MAX__ 9223372036854775807LL
>> >> >>> -#define __SIZEOF_SIZE_T__ 4
>> >> >>> +#define __SIZEOF_SIZE_T__ 8
>> >> >>> #define __SIZEOF_WINT_T__ 2
>> >> >>> #define __GXX_ABI_VERSION 1002
>> >> >>> #define __FLT_MIN_EXP__ (-125)
>> >> >>> @@ -99,12 +104,10 @@
>> >> >>> #define __cdecl __attribute__((__cdecl__))
>> >> >>> #define __UINT8_TYPE__ unsigned char
>> >> >>> #define __NO_INLINE__ 1
>> >> >>> -#define __i386 1
>> >> >>> #define __FLT_MANT_DIG__ 24
>> >> >>> #define __VERSION__ "4.7.2"
>> >> >>> #define __UINT64_C(c) c ## ULL
>> >> >>> #define __GCC_ATOMIC_INT_LOCK_FREE 2
>> >> >>> -#define _X86_ 1
>> >> >>> #define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
>> >> >>> #define __INT32_C(c) c
>> >> >>> #define __DEC64_EPSILON__ 1E-15DD
>> >> >>> @@ -113,18 +116,20 @@
>> >> >>> #define __INT_FAST32_TYPE__ int
>> >> >>> #define __UINT_LEAST16_TYPE__ short unsigned int
>> >> >>> #define __INT16_MAX__ 32767
>> >> >>> -#define __i386__ 1
>> >> >>> -#define __SIZE_TYPE__ unsigned int
>> >> >>> +#define __SIZE_TYPE__ long long unsigned int
>> >> >>> #define __UINT64_MAX__ 18446744073709551615ULL
>> >> >>> #define __INT8_TYPE__ signed char
>> >> >>> #define __FLT_RADIX__ 2
>> >> >>> #define __INT_LEAST16_TYPE__ short int
>> >> >>> #define __LDBL_EPSILON__ 1.08420217248550443401e-19L
>> >> >>> #define __UINTMAX_C(c) c ## ULL
>> >> >>> +#define __SSE_MATH__ 1
>> >> >>> #define __k8 1
>> >> >>> +#define __SEH__ 1
>> >> >>> #define __SIG_ATOMIC_MAX__ 2147483647
>> >> >>> #define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
>> >> >>> -#define __SIZEOF_PTRDIFF_T__ 4
>> >> >>> +#define __SIZEOF_PTRDIFF_T__ 8
>> >> >>> +#define __x86_64__ 1
>> >> >>> #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
>> >> >>> #define __MSVCRT__ 1
>> >> >>> #define __INT_FAST16_MAX__ 32767
>> >> >>> @@ -149,7 +154,7 @@
>> >> >>> #define __INT_LEAST8_TYPE__ signed char
>> >> >>> #define __DEC32_MAX_EXP__ 97
>> >> >>> #define __INT_FAST8_MAX__ 127
>> >> >>> -#define __INTPTR_MAX__ 2147483647
>> >> >>> +#define __INTPTR_MAX__ 9223372036854775807LL
>> >> >>> #define __GXX_MERGED_TYPEINFO_NAMES 0
>> >> >>> #define __stdcall __attribute__((__stdcall__))
>> >> >>> #define __SSE2__ 1
>> >> >>> @@ -157,20 +162,24 @@
>> >> >>> #define __DBL_HAS_QUIET_NAN__ 1
>> >> >>> #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
>> >> >>> #define __k8__ 1
>> >> >>> -#define __INTPTR_TYPE__ int
>> >> >>> +#define __INTPTR_TYPE__ long long int
>> >> >>> #define __UINT16_TYPE__ short unsigned int
>> >> >>> #define __WCHAR_TYPE__ short unsigned int
>> >> >>> #define __SIZEOF_FLOAT__ 4
>> >> >>> -#define __UINTPTR_MAX__ 4294967295U
>> >> >>> +#define __pic__ 1
>> >> >>> +#define __UINTPTR_MAX__ 18446744073709551615ULL
>> >> >>> #define __DEC64_MIN_EXP__ (-382)
>> >> >>> #define __INT_FAST64_MAX__ 9223372036854775807LL
>> >> >>> #define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
>> >> >>> #define __FLT_DIG__ 6
>> >> >>> #define __UINT_FAST64_TYPE__ long long unsigned int
>> >> >>> #define __INT_MAX__ 2147483647
>> >> >>> +#define __amd64__ 1
>> >> >>> #define WIN32 1
>> >> >>> #define __INT64_TYPE__ long long int
>> >> >>> #define __FLT_MAX_EXP__ 128
>> >> >>> +#define WIN64 1
>> >> >>> +#define __ORDER_BIG_ENDIAN__ 4321
>> >> >>> #define __DBL_MANT_DIG__ 53
>> >> >>> #define __INT_LEAST64_MAX__ 9223372036854775807LL
>> >> >>> #define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
>> >> >>> @@ -181,6 +190,7 @@
>> >> >>> #define __SSE__ 1
>> >> >>> #define __LDBL_MIN_EXP__ (-16381)
>> >> >>> #define __INT_LEAST8_MAX__ 127
>> >> >>> +#define __SIZEOF_INT128__ 16
>> >> >>> #define __LDBL_MAX_10_EXP__ 4932
>> >> >>> #define __ATOMIC_RELAXED 0
>> >> >>> #define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L)
>> >> >>> @@ -193,13 +203,14 @@
>> >> >>> #define __fastcall __attribute__((__fastcall__))
>> >> >>> #define __DBL_DECIMAL_DIG__ 17
>> >> >>> #define __DEC_EVAL_METHOD__ 2
>> >> >>> -#define __ORDER_BIG_ENDIAN__ 4321
>> >> >>> +#define __MINGW64__ 1
>> >> >>> #define __UINT32_C(c) c ## U
>> >> >>> #define __INTMAX_MAX__ 9223372036854775807LL
>> >> >>> #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
>> >> >>> #define WINNT 1
>> >> >>> #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F
>> >> >>> #define __INT8_MAX__ 127
>> >> >>> +#define __PIC__ 1
>> >> >>> #define __UINT_FAST32_TYPE__ unsigned int
>> >> >>> #define __CHAR32_TYPE__ unsigned int
>> >> >>> #define __FLT_MAX__ 3.40282346638528859812e+38F
>> >> >>> @@ -207,7 +218,6 @@
>> >> >>> #define __SIZEOF_DOUBLE__ 8
>> >> >>> #define __FLT_MIN_10_EXP__ (-37)
>> >> >>> #define __INTMAX_TYPE__ long long int
>> >> >>> -#define i386 1
>> >> >>> #define _INTEGRAL_MAX_BITS 64
>> >> >>> #define __DEC128_MAX_EXP__ 6145
>> >> >>> #define __ATOMIC_CONSUME 1
>> >> >>> @@ -218,10 +228,10 @@
>> >> >>> #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
>> >> >>> #define __INT16_C(c) c
>> >> >>> #define __STDC__ 1
>> >> >>> -#define __PTRDIFF_TYPE__ int
>> >> >>> +#define __PTRDIFF_TYPE__ long long int
>> >> >>> #define __ATOMIC_SEQ_CST 5
>> >> >>> #define __UINT32_TYPE__ unsigned int
>> >> >>> -#define __UINTPTR_TYPE__ unsigned int
>> >> >>> +#define __UINTPTR_TYPE__ long long unsigned int
>> >> >>> #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
>> >> >>> #define __DEC128_MANT_DIG__ 34
>> >> >>> #define __LDBL_MIN_10_EXP__ (-4931)
>> >> >>> @@ -233,6 +243,7 @@
>> >> >>> #define __GNUC_GNU_INLINE__ 1
>> >> >>> #define __GCC_ATOMIC_SHORT_LOCK_FREE 2
>> >> >>> #define __UINT_FAST8_TYPE__ unsigned char
>> >> >>> +#define __WIN64__ 1
>> >> >>> #define __ATOMIC_ACQ_REL 4
>> >> >>> #define __ATOMIC_RELEASE 3
>> >> >>> #define __declspec(x) __attribute__((x))
>> >> >>>
>> >> >>>
>> >> >>> 2012/12/24 Алексей Павлов <alex...@gmail.com>
>> >> >>>>
>> >> >>>> Hi!
>> >> >>>> This is only resolve a part of error. Error is present in 64-bit
>> >> >>>> multilib builds if you try to execute example code with -m32
>> switch.
>> >> >>>>
>> >> >>>>
>> >> >>>> 2012/12/20 Kai Tietz <ktiet...@googlemail.com>
>> >> >>>>>
>> >> >>>>> 2012/12/20 Ruben Van Boxem <vanboxem.ru...@gmail.com>:
>> >> >>>>> > Not to meddle in other people's affairs, but this is probably
>> >> >>>>> > valuable for
>> >> >>>>> > v2 (unless v3 is due very very soon ;-))
>> >> >>>>> >
>> >> >>>>> > Ruben
>> >> >>>>>
>> >> >>>>> Back-merged at rev. 5509.
>> >> >>>>>
>> >> >>>>> Cheers,
>> >> >>>>> Kai
>> >> >>>>>
>> >> >>>>>
>> >> >>>>>
>> >> >>>>>
>> ------------------------------------------------------------------------------
>> >> >>>>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free
>> Trial
>> >> >>>>> Remotely access PCs and mobile devices and provide instant
>> support
>> >> >>>>> Improve your efficiency, and focus on delivering more value-add
>> >> >>>>> services
>> >> >>>>> Discover what IT Professionals Know. Rescue delivers
>> >> >>>>> http://p.sf.net/sfu/logmein_12329d2d
>> >> >>>>> _______________________________________________
>> >> >>>>> Mingw-w64-public mailing list
>> >> >>>>> Mingw-w64-public@lists.sourceforge.net
>> >> >>>>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>> >> >>>>
>> >> >>>>
>> >> >>>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >
>> ------------------------------------------------------------------------------
>> >> > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
>> >> > Remotely access PCs and mobile devices and provide instant support
>> >> > Improve your efficiency, and focus on delivering more value-add
>> services
>> >> > Discover what IT Professionals Know. Rescue delivers
>> >> > http://p.sf.net/sfu/logmein_12329d2d
>> >> > _______________________________________________
>> >> > Mingw-w64-public mailing list
>> >> > Mingw-w64-public@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> | (\_/) This is Bunny. Copy and paste
>> >> | (='.'=) Bunny into your signature to help
>> >> | (")_(") him gain world domination
>> >>
>> >>
>> >>
>> ------------------------------------------------------------------------------
>> >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
>> >> Remotely access PCs and mobile devices and provide instant support
>> >> Improve your efficiency, and focus on delivering more value-add
>> services
>> >> Discover what IT Professionals Know. Rescue delivers
>> >> http://p.sf.net/sfu/logmein_12329d2d
>> >> _______________________________________________
>> >> Mingw-w64-public mailing list
>> >> Mingw-w64-public@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>> >
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
>> > Remotely access PCs and mobile devices and provide instant support
>> > Improve your efficiency, and focus on delivering more value-add services
>> > Discover what IT Professionals Know. Rescue delivers
>> > http://p.sf.net/sfu/logmein_12329d2d
>> > _______________________________________________
>> > Mingw-w64-public mailing list
>> > Mingw-w64-public@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>> >
>>
>>
>>
>> --
>> | (\_/) This is Bunny. Copy and paste
>> | (='.'=) Bunny into your signature to help
>> | (")_(") him gain world domination
>>
>>
>> ------------------------------------------------------------------------------
>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
>> Remotely access PCs and mobile devices and provide instant support
>> Improve your efficiency, and focus on delivering more value-add services
>> Discover what IT Professionals Know. Rescue delivers
>> http://p.sf.net/sfu/logmein_12329d2d
>> _______________________________________________
>> Mingw-w64-public mailing list
>> Mingw-w64-public@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>
>
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public