trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: April 2012

Re: [trinity-devel] Massive Build Failures on Arch - 13 prior building packages FAIL

From: "David C. Rankin" <drankinatty@...>
Date: Thu, 05 Apr 2012 13:25:07 -0500
On 04/05/2012 08:17 AM, Calvin Morrison wrote:
> http://gcc.gnu.org/gcc-4.7/changes.html
> 
> Relevant links. Also can we get some output of the failures in an
> attachment or something?
> 
> Calvin

Calvin,

  I read that. What are you saying that we are being bitten by in there? Most of
it was Greek, but the only thing I could draw from it is that some of the new
C++11 implementation is now clashing with old code in TDE causing it to be
interpreted by the compiler as something other than what it was designed to be.

  That is the only GUESS I have after reading through the information...
Continuing to GUESS, these two looked suspect:

-> G++ now sets the predefined macro __cplusplus to the correct value, 199711L
for C++98/03, and 201103L for C++11.

-> 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.

    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();
    }

  Which would explain why I had to compile tdebase with -fpermissive for the
first time last night.

  How you check for this stuff is way beyond me....

-- 
David C. Rankin, J.D.,P.E.