MantisBT - Open CASCADE
View Issue Details
0024536Open CASCADE[OCCT] OCCT:Codingpublic2014-01-16 11:572014-05-05 13:37
abv 
bugmaster 
normalminor 
closedfixed 
LinuxDebian 4.064 bit
[OCCT] 6.7.0 
[OCCT] 6.7.1[OCCT] 6.7.1 
Not needed
0024536: GCC compiler warning on breakage of pointer aliasing rules in BRepFill_Evolved.cxx
GCC compiler reports warnings on breakage of C pointer aliasing rules on reference type cast in call to TopoDS::Edge() in BRepFill_Evolved.cxx (see 0024252):

TopoDS_Shape.hxx:54: warning: dereferencing pointer ‘E’ does break strict-aliasing rules
TopoDS_Shape.lxx:90: warning: dereferencing pointer ‘E’ does break strict-aliasing rules
BRepFill_Evolved.cxx:1702: note: initialized from here

The strange point is that this seems to be the only place where such warning is produced, despite of many calls to TopoDS methods in OCCT code. Perhaps the cause is that the type of the local variable initialized by result of call to TopoDS::Edge() is reference.
No tags attached.
child of 0024252closed bugmaster GCC warnings on breakage of strict-aliasing rules 
Issue History
2014-01-16 11:57abvNew Issue
2014-01-16 11:57abvAssigned To => kgv
2014-01-16 11:58abvRelationship addedchild of 0024252
2014-01-16 14:26abvNote Added: 0027520
2014-01-16 14:26abvAssigned Tokgv => mkv
2014-01-16 14:26abvStatusnew => feedback
2014-01-16 15:25mkvAssigned Tomkv => apn
2014-01-16 16:21apnNote Added: 0027523
2014-01-16 16:21apnAssigned Toapn => abv
2014-01-16 17:06abvNote Added: 0027524
2014-01-16 17:06abvAssigned Toabv => apn
2014-01-16 17:06abvStatusfeedback => reviewed
2014-01-21 17:16apnNote Added: 0027578
2014-01-21 17:16apnTest case number => Not needed
2014-01-21 17:16apnAssigned Toapn => bugmaster
2014-01-21 17:16apnStatusreviewed => tested
2014-01-24 15:35bugmasterChangeset attached => occt master 73ccc151
2014-01-24 15:35bugmasterStatustested => verified
2014-01-24 15:35bugmasterResolutionopen => fixed
2014-05-05 13:34aivStatusverified => closed
2014-05-05 13:37aivFixed in Version => 6.7.1

Notes
(0027520)
abv   
2014-01-16 14:26   
I have pushed branch CR24536 containing possible fix; could you please compile the branch on Linux to see if the warning disappears?
(0027523)
apn   
2014-01-16 16:21   
Branch CR24536 (and products from GIT master) was compiled on Linux platforms.
SHA-1: 13b7165a0bbb04619d9f4c21037fbda489bbc12d

Number of compiler warnings:

occt component :
Linux: 53 (55 on master) - 2 warnings disappear:
TopoDS_Shape.hxx:54, GNU C Compiler 4 (gcc), Priority: Normal
dereferencing pointer ‘E’ does break strict-aliasing rules
TopoDS_Shape.lxx:90, GNU C Compiler 4 (gcc), Priority: Normal
dereferencing pointer ‘E’ does break strict-aliasing rules
Windows: 0 (0 on master)

products component :
Linux: 20 (20 on master)
Windows: 1 (1 on master)
(0027524)
abv   
2014-01-16 17:06   
Thank you! Please consider it then as reviewed and proceed to testing
(0027578)
apn   
2014-01-21 17:16   
Dear BugMaster,

Branch CR24536 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 13b7165a0bbb04619d9f4c21037fbda489bbc12d

Number of compiler warnings:

occt component :
Linux: 53 (55 on master)
Windows: 0 (0 on master)

products component :
Linux: 20 (20 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 326180716 / 325195272
Total CPU difference: 43493.92000000011 / 42240.05999999985

Testing on Windows:
Total MEMORY difference: 377601216 / 377422272
Total CPU difference: 30223.015625 / 31353.0625

There are not differences in images found by testdiff.