Archived issue #0013258
Improvements in FDC (64-bit warnings, etc.)
Description
The main goal of this patch is to eliminate the 64-bit issues that are indicated
in Visual C++ compilations when the following parameters are set (I used VC++
8.0, similar results can be obtained in VC++ 7.1):
- Detect64BitPortabilityProblems="true" (equivalent switch /Wp64)
- Define _CRT_SECURE_NO_DEPRECATE symbol
See the IFMT record 199 for the detailed description.
Other improvements:
- Additional functionality in TColStd_PackedMapOfInteger
- Additional functionality in Bnd_B3x, Bnd_B2x
- Internal improvements in classes Precision, gp_GTrsf.
I joined these changes in one BT record to facilitate testing and certification.
in Visual C++ compilations when the following parameters are set (I used VC++
8.0, similar results can be obtained in VC++ 7.1):
- Detect64BitPortabilityProblems="true" (equivalent switch /Wp64)
- Define _CRT_SECURE_NO_DEPRECATE symbol
See the IFMT record 199 for the detailed description.
Other improvements:
- Additional functionality in TColStd_PackedMapOfInteger
- Additional functionality in Bnd_B3x, Bnd_B2x
- Internal improvements in classes Precision, gp_GTrsf.
I joined these changes in one BT record to facilitate testing and certification.
Additional information
Documentation remark, added by ABV 2006-11-21 16:51:36:
New features:
New primitive type added: Standard_Size, typedefed to size_t
Improvements:
Improve the 64-bit portability of Foundation Classes. The three toolkits
included in the Foundation Classes (Tkernel, TKMath, TKAdvTools) component are
improved to exclude 64-bit compilation issues. These issues are reported by
Microsoft Visual C++ compiler version 7.x or 8.x with the compiler-switch
/Wp64. The common sources of problems:
- treatment of size_t typed parameter of operator new() as Standard_Integer
in OCC memory manager (method Standard::Allocate())
- conversion between integer type (Standard_Integer or long) and a pointer
type
- conversion of a result of a CRT or WindowsAPI function (strlen(), time(),
CreateFile(), etc.) to Standard_Integer type.
As part of this solution, the new primitive type was created: Standard_Size
defined as "typedef size_t". It is used for the parameter of methods
Standard::Allocate() and Standard::Reallocate(), insead of the previous
Standard_Integer. This type is also used in other classes (e.g., OSD_FileNode)
to store integer values that may be 8-byte of size.
New features:
New primitive type added: Standard_Size, typedefed to size_t
Improvements:
Improve the 64-bit portability of Foundation Classes. The three toolkits
included in the Foundation Classes (Tkernel, TKMath, TKAdvTools) component are
improved to exclude 64-bit compilation issues. These issues are reported by
Microsoft Visual C++ compiler version 7.x or 8.x with the compiler-switch
/Wp64. The common sources of problems:
- treatment of size_t typed parameter of operator new() as Standard_Integer
in OCC memory manager (method Standard::Allocate())
- conversion between integer type (Standard_Integer or long) and a pointer
type
- conversion of a result of a CRT or WindowsAPI function (strlen(), time(),
CreateFile(), etc.) to Standard_Integer type.
As part of this solution, the new primitive type was created: Standard_Size
defined as "typedef size_t". It is used for the parameter of methods
Standard::Allocate() and Standard::Reallocate(), insead of the previous
Standard_Integer. This type is also used in other classes (e.g., OSD_FileNode)
to store integer values that may be 8-byte of size.
Public activity
1 archived note
Participants are labeled by their role within this record.
The changes proposed in this issue have either been integrated during last years or are considered obsolete now due to changes in OCCT
Related records