View Issue Details

IDProjectCategoryView StatusLast Update
0032917Open CASCADEOCCT:Codingpublic2022-06-17 16:41
Reporterddzama Assigned Toddzama  
PrioritynormalSeverityminor 
Status verifiedResolutionfixed 
PlatformWindowsOSVC++ 2019 
Product Version7.6.0 
Target Version7.7.0 
Summary0032917: Coding Rules - eliminate MSVS warning C26440 on VS2019/C++20 (If your function may not throw, declare it noexcept)
DescriptionMicrosoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Get rid of warning C26440: "If your function may not throw, declare it noexcept"

"If code is not supposed to cause any exceptions,
it should be marked as such by using the 'noexcept' specifier.
This would help to simplify error handling on the client code side,
as well as enable compiler to do additional optimizations."
Steps To ReproduceNot required
TagsNo tags attached.
Test case numberNot required

Relationships

child of 0032887 assignedddzama Coding - Problem of compilation on VS2019/C++20 

Activities

git

2022-04-07 14:24

administrator   ~0107685

Branch CR32917 has been created by ddzama.

SHA-1: e884648d35bf6b224f91a02376d8716ba8edce14


Detailed log of new commits:

Author: Dmitry DZAMA
Date: Thu Mar 31 09:21:08 2022 +0300

    0032917: Coding Rules - eliminate MSVS2019 warning C26440 (If your function may not throw, declare it noexcept)
    
    Microsoft Visual Studio Professional 2019
    Version 16.11.11
    std=c++20
    
    Get rid of warning C26440: "If your function may not throw, declare it noexcept"
    
    "If code is not supposed to cause any exceptions,
    it should be marked as such by using the 'noexcept' specifier.
    This would help to simplify error handling on the client code side,
    as well as enable compiler to do additional optimizations."

git

2022-04-07 14:40

administrator   ~0107702

Branch CR32917 has been updated forcibly by ddzama.

SHA-1: 2af527362db6d0196c6aeb0cace33a719fdd4f46

git

2022-04-07 15:09

administrator   ~0107712

Branch CR32917 has been updated forcibly by ddzama.

SHA-1: fab19ad626fd8c3cb7947d7dab7005418fa2d7dc

kgv

2022-04-08 18:33

developer   ~0107771

@aml, could you please check proposed patch?

aml

2022-04-12 08:57

developer   ~0107874

@ddzama, please clarify 2 things:
1. C26440 is generated for move operators only.
2. Please check replacement possibility `noexcept(true)` -> `noexcept` to reduce syntax sugar.

git

2022-04-20 11:23

administrator   ~0108041

Branch CR32917 has been updated forcibly by ddzama.

SHA-1: 8e5614e359efea9186dd4f0d96bb510dd9d80a40

git

2022-04-25 17:09

administrator   ~0108163

Branch CR32917 has been updated forcibly by ddzama.

SHA-1: af0782421f456732b4471c62627f8a0025bd9923

ddzama

2022-04-25 17:13

developer   ~0108164

@aml
1. In MSVC documentation are not any information relating std::move operand and generating that warning.
2. Yes, noexcept may be used instead noexcept(true)

aml

2022-04-25 17:15

developer   ~0108165

@ddzama

Please proceed with the point number two.

git

2022-04-26 02:09

administrator   ~0108175

Branch CR32917 has been updated forcibly by ddzama.

SHA-1: ebc694145e9bfa0a1d2b1a695b537475d8d52194

aml

2022-04-27 07:19

developer   ~0108206

Reviewed. Please raise the patch.

OCCT - CR32917
Products - NOT

smoskvin

2022-05-01 13:28

administrator   ~0108269

Combination -
OCCT branch : IR-2022-04-29
master SHA - e976df232941aae838b8c3dcf4b9f79f79bea705
49e51745631c52b6c452c65adae4d6dfa21a1b1e
Products branch : IR-2022-04-29 SHA - d8a13f7f0c119514dcb0285266e54f3994f65e57
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: 18668.100000000675 / 18636.43000000061 [+0.17%]
Products
Total CPU difference: 11742.710000000114 / 11717.180000000135 [+0.22%]
Windows-64-VC14:
OCCT
Total CPU difference: 20733.796875 / 20693.28125 [+0.20%]
Products
Total CPU difference: 13272.875 / 13248.015625 [+0.19%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

Related Changesets

occt: master 7b3f255f

2022-03-31 09:21:08

ddzama


Committer: smoskvin Details Diff
0032917: Coding Rules - eliminate MSVS warning C26440 on VS2019/C++20 (If your function may not throw, declare it noexcept)

Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Get rid of warning C26440: "If your function may not throw, declare it noexcept"

"If code is not supposed to cause any exceptions,
it should be marked as such by using the 'noexcept' specifier.
This would help to simplify error handling on the client code side,
as well as enable compiler to do additional optimizations."
Affected Issues
0032917
mod - src/NCollection/NCollection_AliasedArray.hxx Diff File
mod - src/Poly/Poly_ArrayOfNodes.hxx Diff File
mod - src/Poly/Poly_ArrayOfUVNodes.hxx Diff File
mod - src/Standard/Standard_Handle.hxx Diff File
mod - src/TCollection/TCollection_AsciiString.hxx Diff File
mod - src/TCollection/TCollection_ExtendedString.hxx Diff File
mod - src/TopLoc/TopLoc_SListOfItemLocation.hxx Diff File

Issue History

Date Modified Username Field Change
2022-04-07 10:30 ddzama New Issue
2022-04-07 10:30 ddzama Assigned To => ddzama
2022-04-07 12:54 kgv Relationship added child of 0032887
2022-04-07 12:54 kgv Product Version 7.7.0 => 7.6.0
2022-04-07 12:54 kgv Summary Coding Rules - eliminate MSVS2019 warning C26440 (If your function may not throw, declare it noexcept) => Coding Rules - eliminate MSVS warning C26440 on VS2019/C++20 (If your function may not throw, declare it noexcept)
2022-04-07 14:24 git Note Added: 0107685
2022-04-07 14:40 git Note Added: 0107702
2022-04-07 14:52 ddzama Relationship deleted child of 0032887
2022-04-07 14:54 ddzama Relationship added child of 0032887
2022-04-07 15:09 git Note Added: 0107712
2022-04-08 18:33 kgv Assigned To ddzama => aml
2022-04-08 18:33 kgv Status new => resolved
2022-04-08 18:33 kgv Note Added: 0107771
2022-04-12 08:57 aml Note Added: 0107874
2022-04-12 08:57 aml Assigned To aml => ddzama
2022-04-12 08:57 aml Status resolved => assigned
2022-04-20 11:23 git Note Added: 0108041
2022-04-25 17:09 git Note Added: 0108163
2022-04-25 17:13 ddzama Note Added: 0108164
2022-04-25 17:15 aml Note Added: 0108165
2022-04-26 02:09 git Note Added: 0108175
2022-04-26 11:28 ddzama Assigned To ddzama => kgv
2022-04-26 11:28 ddzama Status assigned => resolved
2022-04-26 11:28 ddzama Steps to Reproduce Updated
2022-04-26 21:12 kgv Assigned To kgv => aml
2022-04-27 07:19 aml Assigned To aml => bugmaster
2022-04-27 07:19 aml Status resolved => reviewed
2022-04-27 07:19 aml Note Added: 0108206
2022-05-01 13:28 smoskvin Status reviewed => tested
2022-05-01 13:28 smoskvin Note Added: 0108269
2022-05-01 13:31 smoskvin Test case number => Not required
2022-05-01 14:32 smoskvin Changeset attached => occt master 7b3f255f
2022-05-01 14:32 ddzama Assigned To bugmaster => ddzama
2022-05-01 14:32 ddzama Status tested => verified
2022-05-01 14:32 ddzama Resolution open => fixed
2022-05-04 12:00 kgv Relationship added parent of 0032957
2022-06-17 16:41 ddzama Relationship deleted parent of 0032957