View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032903 | Open CASCADE | OCCT:Coding | public | 2022-04-04 16:57 | 2023-03-19 19:04 |
Reporter | Assigned To | ||||
Priority | normal | Severity | integration request | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2019 | ||
Product Version | 7.6.0 | ||||
Target Version | 7.7.0 | Fixed in Version | 7.6.3 | ||
Summary | 0032903: Coding Rules - eliminate MSVC warning C26451 on VS2019/C++20 | ||||
Description | When C++20 enables, warning messages occures: Put explicit type casting to avoid: Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2). | ||||
Steps To Reproduce | Not required | ||||
Tags | No tags attached. | ||||
Test case number | N/A | ||||
child of | 0032887 | assigned | Coding - Problem of compilation on VS2019/C++20 |
|
Branch CR0032903 has been created by ddzama. SHA-1: db4bf50c9fd2d73cf9d89685cbfcbaec118bc3fc Detailed log of new commits: Author: Dmitry DZAMA Date: Tue Mar 29 16:32:46 2022 +0300 0032903: Get rid of warning message C26451 on VS 2019/C++20 Put explicit type casting to avoid: When C++20 enables, warning messages occures: Put explicit type casting to avoid: Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2). |
|
Branch CR0032903 has been deleted by ddzama. SHA-1: db4bf50c9fd2d73cf9d89685cbfcbaec118bc3fc |
|
Branch CR32903 has been created by ddzama. SHA-1: db4bf50c9fd2d73cf9d89685cbfcbaec118bc3fc Detailed log of new commits: Author: Dmitry DZAMA Date: Tue Mar 29 16:32:46 2022 +0300 0032903: Get rid of warning message C26451 on VS 2019/C++20 Put explicit type casting to avoid: When C++20 enables, warning messages occures: Put explicit type casting to avoid: Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2). |
|
Branch CR32903 has been updated forcibly by ddzama. SHA-1: f06188416ab7d294d00378fa5332f5eefe38cdef |
|
Branch CR32903 has been updated forcibly by ddzama. SHA-1: 70e8f0105c987aa496d50871078c8d5edeeaa2e7 |
|
there should be no "merge" commits in the patch, |
|
Jenkins testing: http://jenkins-test-occt.nnov.opencascade.com/view/CR32887-master-ddzama/view/TESTING/ |
|
+ const double aDelta_x = (double)(aDelta.x()); + const double aDelta_y = (double)(aDelta.y()); Graphic3d_Vec2d aDeltaF (aDelta); + if ( std::fabs(aDelta_x) + std::fabs(aDelta_y) > aPanTol ) Abs() In addition, patch has to be rebased onto current IR / updated next week as IR includes modification in the same place. |
|
Branch CR32903 has been updated forcibly by ddzama. SHA-1: 4baa1b64fceb743bb03d6245019852268dcf4fad |
|
Branch CR32903 has been updated forcibly by ddzama. SHA-1: d2c44be0f44c7006caa0d96498d6d7a27ca7717f |
|
Branch CR32903_1 has been created by kgv. SHA-1: 7da34757e1ef91e6ae5a801ac377655868555d72 Detailed log of new commits: Author: Dmitry DZAMA Date: Tue Mar 29 16:32:46 2022 +0300 0032903: Coding Rules - eliminate MSVC warning C26451 on VS2019/C++20 Put explicit type casting to avoid: Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2). |
|
Please raise the patch - OCCT: branch CR32903_1. |
|
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 |
|
Branch CR32903 has been deleted by mnt. SHA-1: d2c44be0f44c7006caa0d96498d6d7a27ca7717f |
|
Branch CR32903_1 has been deleted by mnt. SHA-1: 7da34757e1ef91e6ae5a801ac377655868555d72 |
occt: master 4e1b5fcb 2022-03-29 16:32:46
Committer: |
0032903: Coding Rules - eliminate MSVC warning C26451 on VS2019/C++20 Put explicit type casting to avoid: Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2). |
Affected Issues 0032903 |
|
mod - src/AIS/AIS_ViewController.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx | Diff File | ||
mod - src/Message/Message_ProgressScope.hxx | Diff File | ||
mod - src/Standard/Standard_Real.hxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-04-04 16:57 |
|
New Issue | |
2022-04-04 16:57 |
|
Assigned To | => kgv |
2022-04-04 16:58 |
|
Relationship added | child of 0032887 |
2022-04-05 09:39 | git | Note Added: 0107619 | |
2022-04-05 09:42 | git | Note Added: 0107620 | |
2022-04-05 09:43 | git | Note Added: 0107621 | |
2022-04-05 10:03 |
|
Relationship added | parent of 0032906 |
2022-04-05 10:05 |
|
Relationship deleted | child of 0032887 |
2022-04-05 10:05 |
|
Relationship deleted | parent of 0032906 |
2022-04-05 10:05 |
|
Relationship added | child of 0032906 |
2022-04-07 12:32 | kgv | Relationship added | child of 0032887 |
2022-04-07 12:32 | kgv | Product Version | 7.7.0 => 7.6.0 |
2022-04-07 12:32 | kgv | Summary | Get rid of warning message C26451 on VS 2019/C++20 => Coding Rules - eliminate MSVC warning C26451 on VS 2019/C++20 |
2022-04-07 12:33 | kgv | Relationship deleted | child of 0032906 |
2022-04-07 12:34 | kgv | Summary | Coding Rules - eliminate MSVC warning C26451 on VS 2019/C++20 => Coding Rules - eliminate MSVC warning C26451 on VS2019/C++20 |
2022-04-07 14:36 | git | Note Added: 0107693 | |
2022-04-07 14:52 |
|
Relationship deleted | child of 0032887 |
2022-04-07 14:53 |
|
Relationship added | child of 0032887 |
2022-04-07 15:22 | git | Note Added: 0107720 | |
2022-04-08 14:54 | kgv | Note Added: 0107759 | |
2022-04-08 14:54 | kgv | File Added: image.png | |
2022-04-08 15:09 |
|
Note Added: 0107761 | |
2022-04-08 15:09 | kgv | File Deleted: image.png | |
2022-04-08 18:09 | kgv | Note Added: 0107763 | |
2022-04-08 18:09 | kgv | Assigned To | kgv => ddzama |
2022-04-08 18:09 | kgv | Status | new => assigned |
2022-04-20 13:35 | git | Note Added: 0108046 | |
2022-04-25 17:46 | git | Note Added: 0108168 | |
2022-04-26 11:20 |
|
Assigned To | ddzama => kgv |
2022-04-26 11:20 |
|
Status | assigned => resolved |
2022-04-26 11:20 |
|
Steps to Reproduce Updated | |
2022-04-26 21:27 | git | Note Added: 0108198 | |
2022-04-26 21:28 | kgv | Assigned To | kgv => bugmaster |
2022-04-26 21:28 | kgv | Status | resolved => reviewed |
2022-04-26 21:28 | kgv | Test case number | => N/A |
2022-04-26 21:28 | kgv | Note Added: 0108199 | |
2022-05-01 13:28 |
|
Status | reviewed => tested |
2022-05-01 13:28 |
|
Note Added: 0108268 | |
2022-05-01 14:32 |
|
Changeset attached | => occt master 4e1b5fcb |
2022-05-01 14:32 |
|
Assigned To | bugmaster => ddzama |
2022-05-01 14:32 |
|
Status | tested => verified |
2022-05-01 14:32 |
|
Resolution | open => fixed |
2022-05-01 15:14 | git | Note Added: 0108272 | |
2022-05-01 15:14 | git | Note Added: 0108273 | |
2023-03-19 19:04 | vglukhik | Status | verified => closed |
2023-03-19 19:04 | vglukhik | Fixed in Version | => 7.6.3 |