View Issue Details

IDProjectCategoryView StatusLast Update
0032957Open CASCADEOCCT:Codingpublic2022-09-12 01:24
Reportersmoskvin Assigned Toddzama  
PrioritynormalSeverityminor 
Status verifiedResolutionfixed 
Product Version7.7.0 
Target Version7.7.0 
Summary0032957: [REGRESSION] Coding - problem compile OCCT using vc12 due to `noexcept`
Descriptionhttp://jenkins-test-11.nnov.opencascade.com/view/CR0-WEEK-17_CR0-WEEK-17/view/OCCT%20compile/job/CR0-WEEK-17_CR0-WEEK-17-OCCT-Windows-32-VC12-opt-compile/4/parsed_console/
Steps To ReproduceNot required
TagsNo tags attached.
Test case numberN/A

Relationships

has duplicate 0032994 closedbugmaster Open CASCADE key word `noexcept` is undefined on visual studio 2013 (vc12) 
child of 0032887 assignedddzama Open CASCADE Coding - Problem of compilation on VS2019/C++20 

Activities

git

2022-06-03 05:06

administrator   ~0108806

Branch CR32957 has been created by ddzama.

SHA-1: 708ac19e95ffbdd2751abfd88b0078a3b9d2824e


Detailed log of new commits:

Author: ddzama
Date: Tue May 24 11:22:26 2022 +0300

    Employ Standard_Noexcept

Author: ddzama
Date: Fri Jun 3 04:56:33 2022 +0300

    0032957: add /Zc:__cplusplus option to MSVC

Author: ddzama
Date: Tue May 24 11:12:23 2022 +0300

    Add Standard_Noexcept.hxx

git

2022-06-03 12:41

administrator   ~0108822

Branch CR32957 has been updated forcibly by ddzama.

SHA-1: 44959d7cdfc5cf264187243c7e9e9dd44e688e82

git

2022-06-03 14:17

administrator   ~0108832

Branch CR32957 has been updated forcibly by ddzama.

SHA-1: e3da247ace4de41a7e069a66278bf6e2e5b6dd72

git

2022-06-09 14:13

administrator   ~0108937

Branch CR32957 has been updated forcibly by ddzama.

SHA-1: 8a0f3fb2e8aa3083d23e99168055ebb5d3b78d21

git

2022-06-21 11:45

administrator   ~0109137

Branch CR32957 has been updated forcibly by ddzama.

SHA-1: 226969f7e1bf214fbe0bcfed20764e5cf8f38e04

ddzama

2022-06-24 07:12

developer   ~0109212

@kgv, @msv, please, see actual testing result:

http://jenkins-test-occt.nnov.opencascade.com/view/CR32887-cxx11/view/COMPARE/

http://jenkins-test-11.nnov.opencascade.com/view/CR32887_CR32887/

kgv

2022-06-24 09:35

developer   ~0109216

Last edited: 2022-06-24 09:37

@ddzama

> 0032957: Add Standard_Noexcept.hxx

It doesn't look worthwhile declaring this temporary compatibility macros within a separate header file.
Other similar macros are currently defined within `Standard_Macro.hxx`.

> 0032957: Employ Standard_Noexcept

This commit should be merged with the one introducing new macros.

> 0032957: add /Zc:__cplusplus option to MSVC

This change should be suggested as a separate integration ticket.
Moreover, commit description doesn't clarify why this change is required / preferable at all.
I'm not sure that we want adding this flag at all.

+# So, it should compiles with c++11/c++14 language standard.

`should be compiled`.

+# Current Qt version is incompatible with c++20.

Which exactly `current version` is mentioned here?
Please be more specific in the code, not just in git commit description.

because of incomatibility of 5.11.2 version of Qt library interface with C++20 standard.

`incomatibility` misprint.
Qt 5 is NOT the latest version of this library, users are already using Qt 6 in some projects.

+set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
\ No newline at end of file

Please add suggested newlines.
These repetitive hacks in individual projects looks fragile - it would be better unifying this somehow.

ddzama

2022-08-17 10:25

developer   ~0110249

@kgv, about

> 0032957: add /Zc:__cplusplus option to MSVC

This change should be suggested as a separate integration ticket.
Moreover, commit description doesn't clarify why this change is required / preferable at all.
I'm not sure that we want adding this flag at all.

This options set macro variable __cplusplus enabled in MSVC since 2015 (vc14). This definition macro define information about currently used c++ standard.
Unfortunately, this is just a rudiment of this ticket.
And maybe it is worth to get rid of it, at least in this ticket.

git

2022-08-17 10:56

administrator   ~0110251

Branch CR32957 has been updated forcibly by ddzama.

SHA-1: 3ad05fce76799a8e609ed3f6cdf889f562153cf8

git

2022-08-17 12:02

administrator   ~0110254

Branch CR32957 has been updated forcibly by ddzama.

SHA-1: 162d62d0788e07a9ee24bb10560c616abf2fd735

git

2022-08-17 12:38

administrator   ~0110256

Branch CR32957 has been updated forcibly by ddzama.

SHA-1: a0446f8b6efa25abea659b3997674658e33846d5

ddzama

2022-08-18 10:59

developer   ~0110279

@kgv, @msv - i update this branch - please review it.

Jenkins tests results:

http://jenkins-test-occt.nnov.opencascade.com/view/occt-CR32887-occ-pr-CR32887-by-ddzama/view/COMPARE/

ddzama

2022-08-18 11:03

developer   ~0110280

@kgv, please do not take into account occ products last commit of branch CR32887 - it's part of other ticket.

kgv

2022-08-18 11:13

developer   ~0110281

@ddzama,
+//! if noexcept is accessible, Standard_Noexcept is "noexcept" and "throw()" otherwise.
+#ifdef _MSC_VER
+  #if _MSC_VER >= 1900
+    #define Standard_Noexcept noexcept
+  #else
+    #define Standard_Noexcept throw()
+  #endif

Does it make any sense to put "throw()" as fallback? Wouldn't be an empty macros better in this context?

ddzama

2022-08-18 11:18

developer   ~0110282

Last edited: 2022-08-18 11:26

@kgv, sorry, i thought about it: see, in this context yes, but if user will use Standard_Noexcept for his particular case, it will mislead him about what does it mean.
Because 'throw()' is a synonim of 'noexcept' for c++ standards before c++11. And normal support of noexcept qualifier starts from vc140.

ddzama

2022-08-18 11:30

developer   ~0110283

@kgv, maybe create clone of this macros Standard_Noexcept_Desirable with such definition:
  #if _MSC_VER >= 1900
    #define Standard_Noexcept_Desirable noexcept
  #else
    #define Standard_Noexcept_Desirable
  #endif
for cases when we just want to suppress visual studio compiler warnings, as in out case?

kgv

2022-08-18 11:42

developer   ~0110284

@ddzama, OK, let's keep it simple.

Please raise
- OCCT: last commit in branch CR32957;
- OCC Products: none.

git

2022-08-18 11:55

administrator   ~0110286

Branch CR32957 has been updated forcibly by ddzama.

SHA-1: 1a1739b20085bd648b850f633ca234a805897ee2

ddzama

2022-08-18 11:59

developer   ~0110287

@kgv,
OCCT branch CR32957 has been rebased on master,
OCC Pr branch alreaby based on master.

smoskvin

2022-08-20 09:05

administrator   ~0110330

Combination -
OCCT branch : IR-2022-08-19
master SHA - changes and them, and you can discard any commits you make in this
1a1739b20085bd648b850f633ca234a805897ee2
changes and them, and you can discard any commits you make in this
e0ceb716c70188b98130b1550914140d0502a6f9
Products branch : IR-2022-08-19 SHA - d69fdb0b90e80500fad94ec94a075185cd820071
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: 18736.06000000064 / 18724.320000000742 [+0.06%]
Products
Total CPU difference: 11972.270000000151 / 11976.950000000106 [-0.04%]
Windows-64-VC14:
OCCT
Total CPU difference: 20773.21875 / 20769.1875 [+0.02%]
Products
Total CPU difference: 13548.546875 / 13536.125 [+0.09%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2022-08-20 13:53

administrator   ~0110331

Branch CR32957 has been deleted by mnt.

SHA-1: 1a1739b20085bd648b850f633ca234a805897ee2

dpasukhi

2022-09-12 01:24

developer   ~0110966

@ddzama, after quick review of the Standard_Macro I find only Standard_[UPPERCASE] macros.
Why did you choose the current naming type?

Related Changesets

occt-products: master d69fdb0b

2022-06-21 12:55:18

ddzama

Details Diff
0032957: Add WRAP_INCLUDE for new OCCT header. Affected Issues
0032957
mod - samples/swig/TKernel.i Diff File

occt: master 1a1739b2

2022-08-17 11:11:26

ddzama

Details Diff
0032957: Add Standard_Noexcept definition
into Standard_Macro.hxx and
employ Standard_Noexcept.
Affected Issues
0032957
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/Standard/Standard_Macro.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-05-04 10:04 smoskvin New Issue
2022-05-04 10:04 smoskvin Assigned To => ddzama
2022-05-04 12:00 kgv Relationship added child of 0032917
2022-05-04 12:01 kgv Product Version => 7.5.0
2022-05-04 12:01 kgv Target Version 7.6.3 => 7.7.0
2022-05-04 12:01 kgv Status new => assigned
2022-05-04 12:02 kgv Summary Problem compile OCCT on Windows with VC12 => [REGRESSION] Coding - problem compile OCCT using vc12 due to `noexcept`
2022-05-04 12:04 kgv Product Version 7.5.0 => 7.7.0
2022-06-02 17:09 kgv Relationship added has duplicate 0032994
2022-06-03 04:39 ddzama Relationship added parent of 0032921
2022-06-03 05:06 git Note Added: 0108806
2022-06-03 12:41 git Note Added: 0108822
2022-06-03 14:17 git Note Added: 0108832
2022-06-09 14:13 git Note Added: 0108937
2022-06-17 16:41 ddzama Relationship deleted child of 0032917
2022-06-17 16:49 ddzama Relationship added related to 0032887
2022-06-17 16:49 ddzama Relationship deleted related to 0032887
2022-06-17 16:51 ddzama Relationship added child of 0032887
2022-06-20 13:32 ddzama Relationship deleted child of 0032887
2022-06-20 13:36 ddzama Relationship deleted parent of 0032921
2022-06-20 13:37 ddzama Relationship added child of 0032887
2022-06-21 11:45 git Note Added: 0109137
2022-06-24 07:09 ddzama Assigned To ddzama => kgv
2022-06-24 07:09 ddzama Status assigned => resolved
2022-06-24 07:09 ddzama Steps to Reproduce Updated
2022-06-24 07:12 ddzama Note Added: 0109212
2022-06-24 07:15 ddzama Assigned To kgv => bugmaster
2022-06-24 09:35 kgv Note Added: 0109216
2022-06-24 09:35 kgv Assigned To bugmaster => ddzama
2022-06-24 09:35 kgv Status resolved => assigned
2022-06-24 09:37 kgv Note Edited: 0109216
2022-08-17 10:25 ddzama Note Added: 0110249
2022-08-17 10:56 git Note Added: 0110251
2022-08-17 12:02 git Note Added: 0110254
2022-08-17 12:38 git Note Added: 0110256
2022-08-18 10:59 ddzama Note Added: 0110279
2022-08-18 10:59 ddzama Assigned To ddzama => kgv
2022-08-18 10:59 ddzama Status assigned => resolved
2022-08-18 11:03 ddzama Note Added: 0110280
2022-08-18 11:13 kgv Note Added: 0110281
2022-08-18 11:18 ddzama Note Added: 0110282
2022-08-18 11:26 ddzama Note Edited: 0110282
2022-08-18 11:30 ddzama Note Added: 0110283
2022-08-18 11:42 kgv Assigned To kgv => bugmaster
2022-08-18 11:42 kgv Status resolved => reviewed
2022-08-18 11:42 kgv Test case number => N/A
2022-08-18 11:42 kgv Note Added: 0110284
2022-08-18 11:55 git Note Added: 0110286
2022-08-18 11:59 ddzama Note Added: 0110287
2022-08-20 09:05 smoskvin Status reviewed => tested
2022-08-20 09:05 smoskvin Note Added: 0110330
2022-08-20 10:59 ddzama Changeset attached => occt-products master d69fdb0b
2022-08-20 10:59 ddzama Assigned To bugmaster => ddzama
2022-08-20 10:59 ddzama Status tested => verified
2022-08-20 10:59 ddzama Resolution open => fixed
2022-08-20 13:53 git Note Added: 0110331
2022-08-28 10:55 ddzama Changeset attached => occt master 1a1739b2
2022-09-12 01:24 dpasukhi Note Added: 0110966