Difference between revisions of "CMake Borland Compiler Issues"

From KitwarePublic
Jump to navigationJump to search
(Note about STL multisets with comparators)
Line 39: Line 39:


There is a bug in the definition of std::streampos::operator<= where the implementation do the contrary of what expected.
There is a bug in the definition of std::streampos::operator<= where the implementation do the contrary of what expected.
== STL multisets with comparators ==
The Borland 5.5 compiler's STL implementation does not properly copy comparators during assignment operations. For an example of how to work around this, see [http://public.kitware.com/cgi-bin/viewcvs.cgi/Rendering/vtkLabelHierarchy.cxx?r1=1.12&r2=1.13 vtkLabelHierarchy.cxx (rev 1.13)]


{{CMake/Template/Footer}}
{{CMake/Template/Footer}}

Revision as of 23:30, 19 November 2008

'+' (plus) in the file name problem

  • Borland linker when creating executable does not support '+' in the name.
  • CMake solves this problem by creating object files by replacing '+' with '_p_'.

Broken streampos implementation

Using free bcc5.5.1.

#include <iostream>

int main()
{
  std::streampos a = 9;
  long c = 10;

  if( a >= c )
   {
   std::cerr << "Impossible happen !" << std::endl;
   }
  else
   {
   std::cerr << "Seems resonable" << std::endl;
   }

  return 0;
}

On borland a >= c is true ...

According to the doc:

http://www.cplusplus.com/ref/iostream/streampos.html

This type describes a class to contain all the information needed to restore an arbitrary file-position indicator within a stream. It can be constructed from or casted to an integer offset value (streamoff).

There is a bug in the definition of std::streampos::operator<= where the implementation do the contrary of what expected.

STL multisets with comparators

The Borland 5.5 compiler's STL implementation does not properly copy comparators during assignment operations. For an example of how to work around this, see vtkLabelHierarchy.cxx (rev 1.13)



CMake: [Welcome | Site Map]