CMake Borland Compiler Issues: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
m (Reverted edit of Rd36694312, changed back to last version by Barre) |
|||
Line 4: | Line 4: | ||
* CMake solves this problem by creating object files by replacing '+' with '_p_'. | * CMake solves this problem by creating object files by replacing '+' with '_p_'. | ||
== Broken streampos implementation == | |||
Using free bcc5.5.1. | |||
<pre> | |||
#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; | |||
} | |||
</pre> | |||
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. | |||
{{CMake/Template/Footer}} | {{CMake/Template/Footer}} |
Revision as of 14:45, 9 March 2006
'+' (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.