View Issue Details

IDProjectCategoryView StatusLast Update
0024536Open CASCADEOCCT:Codingpublic2014-05-05 13:37
ReporterabvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformLinuxOSDebian 4.0 
Product Version6.7.0 
Target Version6.7.1Fixed in Version6.7.1 
Summary0024536: GCC compiler warning on breakage of pointer aliasing rules in BRepFill_Evolved.cxx
DescriptionGCC 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.
TagsNo tags attached.
Test case numberNot needed

Relationships

child of 0024252 closedbugmaster GCC warnings on breakage of strict-aliasing rules 

Activities

abv

2014-01-16 14:26

manager   ~0027520

I have pushed branch CR24536 containing possible fix; could you please compile the branch on Linux to see if the warning disappears?

apn

2014-01-16 16:21

administrator   ~0027523

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)

abv

2014-01-16 17:06

manager   ~0027524

Thank you! Please consider it then as reviewed and proceed to testing

apn

2014-01-21 17:16

administrator   ~0027578

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.

Related Changesets

occt: master 73ccc151

2014-01-16 10:25:34

abv


Committer: bugmaster Details Diff
0024536: GCC compiler warning on breakage of pointer aliasing rules in BRepFill_Evolved.cxx

Avoid storing result of call to TopoDS::Edge() as reference
Affected Issues
0024536
mod - src/BRepFill/BRepFill_Evolved.cxx Diff File

Issue History

Date Modified Username Field Change
2014-01-16 11:57 abv New Issue
2014-01-16 11:57 abv Assigned To => kgv
2014-01-16 11:58 abv Relationship added child of 0024252
2014-01-16 14:26 abv Note Added: 0027520
2014-01-16 14:26 abv Assigned To kgv => mkv
2014-01-16 14:26 abv Status new => feedback
2014-01-16 15:25 mkv Assigned To mkv => apn
2014-01-16 16:21 apn Note Added: 0027523
2014-01-16 16:21 apn Assigned To apn => abv
2014-01-16 17:06 abv Note Added: 0027524
2014-01-16 17:06 abv Assigned To abv => apn
2014-01-16 17:06 abv Status feedback => reviewed
2014-01-21 17:16 apn Note Added: 0027578
2014-01-21 17:16 apn Test case number => Not needed
2014-01-21 17:16 apn Assigned To apn => bugmaster
2014-01-21 17:16 apn Status reviewed => tested
2014-01-24 15:35 bugmaster Changeset attached => occt master 73ccc151
2014-01-24 15:35 bugmaster Status tested => verified
2014-01-24 15:35 bugmaster Resolution open => fixed
2014-05-05 13:34 aiv Status verified => closed
2014-05-05 13:37 aiv Fixed in Version => 6.7.1