#18240: fix MPIR's compliance with c++
-------------------------------------+-------------------------------------
       Reporter:  dimpase            |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.7
      Component:  packages:          |   Resolution:
  standard                           |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  Dima Pasechnik     |  Work issues:
Report Upstream:  Reported           |       Commit:
  upstream. Developers acknowledge   |  6785ef2000d220f511fcf3e9830b05099500ef47
  bug.                               |     Stopgaps:
         Branch:  u/dimpase/18240    |
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by leif):

 Replying to [comment:22 jakobkroeker]:
 > @leif
 > it seems that the HAVE_MPZ_INT64_CONVERSION check by the configure
 script fails in case
 > g++ is used without enabling c++ 2011 standard. When using g++ with
 '-std=c++11'  flag (or similar), the  HAVE_MPZ_INT64_CONVERSION check
 should succeed and define '_4ti2_HAVE_MPZ_INT64_CONVERSION'.
 > Please check if that is indeed the case.

 FWIW, '''without''' setting any `CXXFLAGS` (just from the logs),[[BR]]
 with GCC 4.8:
 {{{
 ...
 checking whether C++ compiler accepts -std=c++0x... yes
 checking whether C++ compiler accepts -ftrapv... yes
 checking whether -ftrapv actually seems to work for int... no
 checking whether -ftrapv actually seems to work for long long... no
 ...
 checking whether we can use the int32_t and int64_t types... yes
 checking whether we can convert between int32_t and mpz_class... no
 checking whether we can convert between int64_t and mpz_class... no
 ...
 }}}

 With GCC 4.9:
 {{{
 ...
 checking whether C++ compiler accepts -std=c++0x... yes
 checking whether C++ compiler accepts -ftrapv... yes
 checking whether -ftrapv actually seems to work for int... no
 checking whether -ftrapv actually seems to work for long long... no
 ...
 checking whether we can use the int32_t and int64_t types... yes
 checking whether we can convert between int32_t and mpz_class... no
 checking whether we can convert between int64_t and mpz_class... no
 ...
 }}}

 With GCC 5.1:
 {{{
 ...
 checking whether C++ compiler accepts -std=c++0x... yes
 checking whether C++ compiler accepts -ftrapv... yes
 checking whether -ftrapv actually seems to work for int... yes
 checking whether -ftrapv actually seems to work for long long... no
 ...
 checking whether we can use the int32_t and int64_t types... yes
 checking whether we can convert between int32_t and mpz_class... yes
 checking whether we can convert between int64_t and mpz_class... yes
 ...
 }}}

 In all cases, the C++ sources are compiled with `-std=c++0x` by the way,
 and
 {{{
 #!sh
 $ for v in 4.4 4.8 4.9 5.0 5.1; do echo -n "g++ $v:  "; g++-$v -E -dM -x
 c++ -std=c++0x /dev/null | grep __cplusplus; done
 g++ 4.4:  #define __cplusplus 1
 g++ 4.8:  #define __cplusplus 201103L
 g++ 4.9:  #define __cplusplus 201103L
 g++ 5.0:  #define __cplusplus 201103L
 g++ 5.1:  #define __cplusplus 201103L
 }}}
 so there doesn't seem to be any difference (in case the version is checked
 in the source files).

 [[BR]]

 Haven't digged deeper yet.  (Should take a look at the `config.log`s, and
 `configure`.)

--
Ticket URL: <http://trac.sagemath.org/ticket/18240#comment:28>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to