#13498: 4ti2 fails to build with GCC >= 4.7
-------------------------------------------+--------------------------------
       Reporter:  novoselt                 |         Owner:  tbd      
           Type:  defect                   |        Status:  new      
       Priority:  major                    |     Milestone:  sage-5.10
      Component:  packages: optional       |    Resolution:           
       Keywords:  -fpermissive C++11 spkg  |   Work issues:           
Report Upstream:  N/A                      |     Reviewers:           
        Authors:                           |     Merged in:           
   Dependencies:                           |      Stopgaps:           
-------------------------------------------+--------------------------------
Description changed by leif:

Old description:

> Log attached.
>
> ----
>
> From the [http://gcc.gnu.org/gcc-4.7/changes.html GCC 4.7 release notes]
> (C++ section):
>
> G++ now correctly implements the two-phase lookup rules such that an
> unqualified name used in a template must have an appropriate declaration
> found either in scope at the point of definition of the template or by
> argument-dependent lookup at the point of instantiation. As a result,
> code that relies on a second unqualified lookup at the point of
> instantiation to find functions declared after the template or in
> dependent bases will be rejected. The compiler will suggest ways to fix
> affected code, and using the `-fpermissive` compiler flag will allow the
> code to compile with a warning.
> {{{
> #!c++
>
> template <class T>
> void f() { g(T()); } // error, g(int) not found by argument-dependent
> lookup
> void g(int) { } // fix by moving this declaration before the declaration
> of f
>
> template <class T>
> struct A: T {
>   // error, B::g(B) not found by argument-dependent lookup
>   void f() { g(T()); } // fix by using this->g or A::g
> };
>
> struct B { void g(B); };
>
> int main()
> {
>   f<int>();
>   A<B>().f();
> }
> }}}
>
> ----
>
> From sage-devel (April 2013):
> {{{
> 4ti2 version 1.5 quietly lives in
> http://www.math.ucdavis.edu/~latte/software/latte-integrale-1.5.3.tar.gz
> on http://www.math.ucdavis.edu/~latte/software.php
>
> That version 1.5 still does not work on OSX, but at least it works on
> Linux, as far as I recall.
>
> Dima
> }}}

New description:

 Log attached.

 ----

 From the [http://gcc.gnu.org/gcc-4.7/changes.html GCC 4.7 release notes]
 (C++ section):

 G++ now correctly implements the two-phase lookup rules such that an
 unqualified name used in a template must have an appropriate declaration
 found either in scope at the point of definition of the template or by
 argument-dependent lookup at the point of instantiation. As a result, code
 that relies on a second unqualified lookup at the point of instantiation
 to find functions declared after the template or in dependent bases will
 be rejected. The compiler will suggest ways to fix affected code, and
 using the `-fpermissive` compiler flag will allow the code to compile with
 a warning.
 {{{
 #!c++

 template <class T>
 void f() { g(T()); } // error, g(int) not found by argument-dependent
 lookup
 void g(int) { } // fix by moving this declaration before the declaration
 of f

 template <class T>
 struct A: T {
   // error, B::g(B) not found by argument-dependent lookup
   void f() { g(T()); } // fix by using this->g or A::g
 };

 struct B { void g(B); };

 int main()
 {
   f<int>();
   A<B>().f();
 }
 }}}

 ----

 From sage-devel (April 2013):
 {{{
 4ti2 version 1.5 quietly lives in
 http://www.math.ucdavis.edu/~latte/software/latte-integrale-1.5.3.tar.gz
 on http://www.math.ucdavis.edu/~latte/software.php

 That version 1.5 still does not work on OSX, but at least it works on
 Linux, as far as I recall.

 Dima
 }}}

 The [http://www.math.ucdavis.edu/~latte/software/latte-
 integrale-1.5.3.tar.gz LattE integrale tarball] in turn contains a
 (compressed) 4ti2-1.5 tarball.  From its `NEWS`:
 {{{
 News in 4ti2 version 1.5, compared to 1.4:

  * Latest version of new qsolve.


 News in 4ti2 version 1.4, compared to 1.3.2:

  * Portability fixes

  * New abstract C and C++ API (callable library), header files in 4ti2/

  * New implementation of zsolve in C++

 ...
 }}}

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13498#comment:12>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to