Makes gmock compile on minGW, which uses gcc 3.4.5.
This commit is contained in:
		@@ -279,9 +279,12 @@ void DefaultPrintTo(IsNotContainer /* dummy */,
 | 
			
		||||
  if (p == NULL) {
 | 
			
		||||
    *os << "NULL";
 | 
			
		||||
  } else {
 | 
			
		||||
    // We cannot use implicit_cast or static_cast here, as they don't
 | 
			
		||||
    // work when p is a function pointer.
 | 
			
		||||
    *os << reinterpret_cast<const void*>(p);
 | 
			
		||||
    // We want to print p as a const void*.  However, we cannot cast
 | 
			
		||||
    // it to const void* directly, even using reinterpret_cast, as
 | 
			
		||||
    // earlier versions of gcc (e.g. 3.4.5) cannot compile the cast
 | 
			
		||||
    // when p is a function pointer.  Casting to UInt64 first solves
 | 
			
		||||
    // the problem.
 | 
			
		||||
    *os << reinterpret_cast<const void*>(reinterpret_cast<internal::UInt64>(p));
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user