MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029151Open CASCADE[OCCT] OCCT:Codingpublic2017-09-28 10:242018-06-29 21:19
Reporterabv 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.3.0Fixed in Version[OCCT] 7.3.0 
Summary0029151: Coding Rules - eliminate GCC compiler warnings -Wimplicit-fallthrough
DescriptionWhen building OCCT with GCC 7.1 compiler (MinGW-64), it generates ~ 120 warnings on switch "case" blocks not ended by break or return or similar statement and passing control through to the next case block.
Steps To ReproduceBuild with GCC 7
TagsNo tags attached.
Test case numberNot required
Attached Files

- Relationships
parent of 0029157closedbugmaster Modeling - suspicious pass-through of case labels in switch statements 
parent of 0029158closedbugmaster Visualization - suspicious pass-through of case labels in switch statements 
related to 0029152closedbugmaster Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation when using MinGW 

-  Notes
(0070933)
git (administrator)
2017-09-28 10:26

Branch CR29151 has been created by abv.

SHA-1: 0587c3eec451fe46af7839283b32ca9f4a5c1b4b


Detailed log of new commits:

Author: abv
Date: Thu Sep 28 10:26:47 2017 +0300

    0029151: GCC 7.1 warnings "this statement may fall through" [-Wimplicit-fallthrough=]
    
    In places where case block of switch passes control to other case intentionally, comment is added for GCC to recognize this as intentional and not issue a warning message.
(0070949)
git (administrator)
2017-09-28 22:43

Branch CR29151 has been updated by kgv.

SHA-1: 6946692c9341c54353d10e29a07c4d0aa3089761


Detailed log of new commits:

Author: kgv
Date: Thu Sep 28 21:29:22 2017 +0300

    Added Standard_FALLTHROUGH macros.

(0070953)
git (administrator)
2017-09-29 10:01

Branch CR29151_1 has been created by abv.

SHA-1: ab542f6560302ea7f4b80ce906e8a23027440ef4


Detailed log of new commits:

Author: abv
Date: Thu Sep 28 10:26:47 2017 +0300

    0029151: GCC 7.1 warnings "this statement may fall through" [-Wimplicit-fallthrough=]
    
    New macro Standard_FALLTHROUGH is defined for use in a switch statement immediately before a case label, if code associated with the previous case label may fall through to that
    next label (i.e. does not end with "break" or "return" etc.).
    This macro indicates that the fall through is intentional and should not be diagnosed by a compiler that warns on fallthrough.
    
    The macro is inserted in places that currently generate such warning message and where fallthrough is intentional.
    
    Doxygen comments are provided for this and other macros in Standard_Macro.hxx.
(0070954)
abv (manager)
2017-09-29 10:01

Fix is pushed to CR29151_1, please review
(0071078)
git (administrator)
2017-09-29 20:18

Branch CR29151_1 has been updated forcibly by abv.

SHA-1: cc710a7df081ea38b855d44cf0e76e9441c64609
(0071133)
bugmaster (administrator)
2017-10-03 09:40

Tested in framework of testing issue 29170
(0071149)
msv (developer)
2017-10-03 12:53

src/Extrema/Extrema_ExtCS.cxx
- 132: This is strange code, and I think 'break' is needed here. Indeed, mtExtElCS computed line-plane case, so why it is passed to the general case? I propose to insert break and run the tests.

src/IGESDraw/IGESDraw_GeneralModule.cxx
- 181: mistake, break is needed here.

Remove info about conflicts from the commit message.
(0071158)
abv (manager)
2017-10-03 15:11

On src/Extrema/Extrema_ExtCS.cxx: I have consulted with AML and he explained that extrema of line vs. plane is not fully implemented and will not give any useful result (except for analysis of parallel case). This means that fallthrough is correct.

On src/IGESDraw/IGESDraw_GeneralModule.cxx: I agree, thank you for noting that!
(0071160)
msv (developer)
2017-10-03 16:18

I have created the bug 0029178 to solve the issue with line-plane extrema.
(0071197)
git (administrator)
2017-10-04 15:28

Branch CR29151_2 has been created by abv.

SHA-1: b1811c1d2b78aab36e2e75d0a2191cc768e9c232


Detailed log of new commits:

Author: abv
Date: Thu Sep 28 10:26:47 2017 +0300

    0029151: GCC 7.1 warnings "this statement may fall through" [-Wimplicit-fallthrough=]
    
    New macro Standard_FALLTHROUGH is defined for use in a switch statement immediately before a case label, if code associated with the previous case label may fall through to that
    next label (i.e. does not end with "break" or "return" etc.).
    This macro indicates that the fall through is intentional and should not be diagnosed by a compiler that warns on fallthrough.
    
    The macro is inserted in places that currently generate such warning message and where fallthrough is intentional.
    
    Doxygen comments are provided for this and other macros in Standard_Macro.hxx.
(0071221)
abv (manager)
2017-10-04 23:02

Please integrate corrected version in branch CR29151_2; tests have passed with no diffs - see last run of Jenkins job CR29151-master-abv
(0071234)
bugmaster (administrator)
2017-10-05 13:20

Tested in scope 29170
(0071464)
git (administrator)
2017-10-14 12:19

Branch CR29151 has been deleted by kgv.

SHA-1: 6946692c9341c54353d10e29a07c4d0aa3089761
(0071465)
git (administrator)
2017-10-14 12:19

Branch CR29151_1 has been deleted by kgv.

SHA-1: cc710a7df081ea38b855d44cf0e76e9441c64609
(0071466)
git (administrator)
2017-10-14 12:20

Branch CR29151_2 has been deleted by kgv.

SHA-1: b1811c1d2b78aab36e2e75d0a2191cc768e9c232

- Related Changesets
occt: master b1811c1d
Timestamp: 2017-09-28 07:26:47
Author: abv
Committer: abv
Details ] Diff ]
0029151: GCC 7.1 warnings "this statement may fall through" [-Wimplicit-fallthrough=]

New macro Standard_FALLTHROUGH is defined for use in a switch statement immediately before a case label, if code associated with the previous case label may fall through to that
next label (i.e. does not end with "break" or "return" etc.).
This macro indicates that the fall through is intentional and should not be diagnosed by a compiler that warns on fallthrough.

The macro is inserted in places that currently generate such warning message and where fallthrough is intentional.

Doxygen comments are provided for this and other macros in Standard_Macro.hxx.
mod - src/APIHeaderSection/APIHeaderSection_EditHeader.cxx Diff ] File ]
mod - src/Approx/Approx_CurvlinFunc.cxx Diff ] File ]
mod - src/BndLib/BndLib.cxx Diff ] File ]
mod - src/BndLib/BndLib_AddSurface.cxx Diff ] File ]
mod - src/BRepLib/BRepLib_FindSurface.cxx Diff ] File ]
mod - src/BRepTest/BRepTest_CheckCommands.cxx Diff ] File ]
mod - src/Extrema/Extrema_ExtCS.cxx Diff ] File ]
mod - src/GeometryTest/GeometryTest_ContinuityCommands.cxx Diff ] File ]
mod - src/GeomLib/GeomLib.cxx Diff ] File ]
mod - src/IFSelect/IFSelect_SessionPilot.cxx Diff ] File ]
mod - src/IGESConvGeom/IGESConvGeom.cxx Diff ] File ]
mod - src/IGESDraw/IGESDraw_GeneralModule.cxx Diff ] File ]
mod - src/IGESDraw/IGESDraw_ToolDrawing.cxx Diff ] File ]
mod - src/IGESToBRep/IGESToBRep_TopoSurface.cxx Diff ] File ]
mod - src/IntPatch/IntPatch_ALineToWLine.cxx Diff ] File ]
mod - src/IntPatch/IntPatch_ImpPrmIntersection.cxx Diff ] File ]
mod - src/IntPatch/IntPatch_Intersection.cxx Diff ] File ]
mod - src/Intrv/Intrv_Intervals.cxx Diff ] File ]
mod - src/IntTools/IntTools_EdgeEdge.cxx Diff ] File ]
mod - src/LDOM/LDOMBasicString.cxx Diff ] File ]
mod - src/LDOM/LDOMParser.cxx Diff ] File ]
mod - src/LDOM/LDOMString.cxx Diff ] File ]
mod - src/LDOM/LDOM_XmlReader.cxx Diff ] File ]
mod - src/Message/Message_MsgFile.cxx Diff ] File ]
mod - src/NCollection/NCollection_UtfIterator.lxx Diff ] File ]
mod - src/OpenGl/OpenGl_AspectMarker.cxx Diff ] File ]
mod - src/ProjLib/ProjLib_ProjectOnPlane.cxx Diff ] File ]
mod - src/SelectMgr/SelectMgr_SelectionManager.cxx Diff ] File ]
mod - src/Standard/Standard_Macro.hxx Diff ] File ]
mod - src/STEPControl/STEPControl_ActorWrite.cxx Diff ] File ]
mod - src/TDataXtd/TDataXtd_Geometry.cxx Diff ] File ]
mod - src/TNaming/TNaming_Name.cxx Diff ] File ]
mod - src/UnitsAPI/UnitsAPI.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_AutoUpdater.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2017-09-28 10:24 abv New Issue
2017-09-28 10:24 abv Assigned To => kgv
2017-09-28 10:26 git Note Added: 0070933
2017-09-28 13:04 kgv Relationship added related to 0029152
2017-09-28 21:51 kgv Summary GCC 7.1 warnings "this statement may fall through" [-Wimplicit-fallthrough=] => Coding Rules - eliminate GCC compiler warnings -Wimplicit-fallthrough
2017-09-28 22:43 git Note Added: 0070949
2017-09-29 09:17 abv Relationship added parent of 0029157
2017-09-29 09:20 abv Relationship added parent of 0029158
2017-09-29 09:22 abv Description Updated View Revisions
2017-09-29 10:01 git Note Added: 0070953
2017-09-29 10:01 abv Note Added: 0070954
2017-09-29 10:01 abv Assigned To kgv => msv
2017-09-29 10:01 abv Status new => resolved
2017-09-29 10:01 abv Steps to Reproduce Updated View Revisions
2017-09-29 11:27 kgv Description Updated View Revisions
2017-09-29 20:18 git Note Added: 0071078
2017-10-03 09:39 bugmaster Assigned To msv => bugmaster
2017-10-03 09:39 bugmaster Status resolved => reviewed
2017-10-03 09:40 bugmaster Note Added: 0071133
2017-10-03 09:40 bugmaster Status reviewed => tested
2017-10-03 09:52 bugmaster Test case number => Not required
2017-10-03 12:53 msv Note Added: 0071149
2017-10-03 12:53 msv Assigned To bugmaster => abv
2017-10-03 12:53 msv Status tested => assigned
2017-10-03 15:11 abv Note Added: 0071158
2017-10-03 16:18 msv Note Added: 0071160
2017-10-04 15:28 git Note Added: 0071197
2017-10-04 23:02 abv Note Added: 0071221
2017-10-04 23:02 abv Assigned To abv => kgv
2017-10-04 23:02 abv Status assigned => resolved
2017-10-04 23:02 abv Assigned To kgv => bugmaster
2017-10-04 23:02 abv Status resolved => reviewed
2017-10-05 13:20 bugmaster Note Added: 0071234
2017-10-05 13:20 bugmaster Status reviewed => tested
2017-10-06 14:55 abv Changeset attached => occt master b1811c1d
2017-10-06 14:55 abv Assigned To bugmaster => abv
2017-10-06 14:55 abv Status tested => verified
2017-10-06 14:55 abv Resolution open => fixed
2017-10-14 12:19 git Note Added: 0071464
2017-10-14 12:19 git Note Added: 0071465
2017-10-14 12:20 git Note Added: 0071466
2018-06-29 21:15 user533 Fixed in Version => 7.3.0
2018-06-29 21:19 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker