DiscussionsIssue archiveOCCT:Foundation Classes

Archived issue #0030846

Foundation Classes - StorageInfo violates the C++ One Definition Rule

CommunityOCCT:Foundation Classesclosed5 public notes

Search issues

Description

When building with link-time optimization (-flto), g++ warns that the struct StorageInfo is defined both in OSD_MAllocHook.cxx:250 and in NCollection_BaseAllocator.cxx:72. This violates the C++ One Definition Rule. Therefore the structures should be merged or renamed.

Public activity

5 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Commenter 3.

[revision removed]


Detailed log of new commits:

Author: Commenter 3
Date: Wed Sep 4 18:42:42 2019 +0300

    0030846: Foundation Classes - StorageInfo violates the C++ One Definition Rule
    
    Local definitions have been put into anonymouse namespace within files
    OSD_MAllocHook.cxx and NCollection_BaseAllocator.cxx.
02Commenter 3
03Commenter 3
No remarks, please integrate
04Commenter 1
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16200.500000000076 / 16167.270000000033 [+0.21%]
Products
Total CPU difference: 10489.310000000056 / 10484.930000000048 [+0.04%]
Windows-64-VC14:
OCCT
Total CPU difference: 18288.9375 / 18256.515625 [+0.18%]
Products
Total CPU difference: 12130.375 / 12168.265625 [-0.31%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
05Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]