View Issue Details

IDProjectCategoryView StatusLast Update
0032919Open CASCADEOCCT:Codingpublic2023-03-19 23:17
ReporterddzamaAssigned Toddzama 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2019 
Product Version7.6.0 
Target Version7.7.0Fixed in Version7.6.3 
Summary0032919: Coding Rules, CMake - suppress useless MSVC warning C26812 on VS2019/C++20 (prefer 'enum class' over 'enum')
DescriptionMicrosoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Disable warning messages C26812 (The enum type type-name is unscoped. Prefer enum class over enum (Enum.3))
Steps To ReproduceNot required.
TagsNo tags attached.
Test case numberN/A

Relationships

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

Activities

git

2022-04-07 14:22

administrator   ~0107683

Branch CR32919 has been created by ddzama.

SHA-1: 57d1aba51c3088b618778c587065f954ffc4cc15


Detailed log of new commits:

Author: Dmitry DZAMA
Date: Thu Mar 31 16:18:19 2022 +0300

    0032919: Coding Rules - disable warning messages MSVS2019 C26812 (Warning C26812: Prefer 'enum class' over 'enum' (Enum.3))
    
    Microsoft Visual Studio Professional 2019
    Version 16.11.11
    std=c++20
    
    Disable warning messages C26812 (The enum type type-name is unscoped. Prefer enum class over enum (Enum.3))
    
    Just power off these warning type because of
    very large amount of needed changes, fixes it.

git

2022-04-07 14:41

administrator   ~0107704

Branch CR32919 has been updated forcibly by ddzama.

SHA-1: 7caee452114d3b532808948433220ab0426df235

git

2022-04-07 15:06

administrator   ~0107710

Branch CR32919 has been updated forcibly by ddzama.

SHA-1: b235b87b8c3d9cb40680443b1fad8a4e201fedc7

kgv

2022-04-08 18:24

developer   ~0107769

-  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise")
+  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise /wd\"26812\"")

Wouldn't that generate a compiler warning about unknown warning with older Visual Studio compilers?

git

2022-04-20 11:17

administrator   ~0108040

Branch CR32919 has been updated forcibly by ddzama.

SHA-1: 03875e5375c7527ed1b80c83ed9631014d7df22b

ddzama

2022-04-25 16:53

developer   ~0108161

@kgv
warning 26812 is accessible since MSVC 2015.
In MSVC 2013 putting this option as additional c++ compiler parameter has no effect.

git

2022-04-26 02:09

administrator   ~0108176

Branch CR32919 has been updated forcibly by ddzama.

SHA-1: 16a44cfa1b42adad7d8e7a03f99151d5d3ae44ee

kgv

2022-04-26 16:58

developer   ~0108188

Please propagate solution also to project files generated by `genproj.bat` tool (templates `adm/templates/template.vc10` and `adm/templates/template.vc10x`.

azv

2022-04-27 09:23

administrator   ~0108211

Kirill, do you really think, that the suppression of this kind of warning is necessary for vc10? Firstly, we stopped support of old Visual Studios since 2022. Secondly, do you observe such kind of warning on vc10?

kgv

2022-04-27 10:39

developer   ~0108213

@azv, `template.vc10` is a template of VS project file.

VS hasn't changed project file format since VS2010, and just amends new properties / values.
That's why our project generator `genproj.tcl` uses the same templates for generating VS2010-VS2022 project files with minor modifications of file content by Tcl script.

Technically, it is even possible generating a single project file that could be opened by all VS2010-VS2022 versions without suggests to upgrade project, but we don't do that for now.

git

2022-05-04 12:12

administrator   ~0108289

Branch CR32919 has been updated by ddzama.

SHA-1: b47888c13783f9ad13618b9873265f4fc7d4a909


Detailed log of new commits:

Author: ddzama
Date: Wed May 4 12:09:56 2022 +0300

    0032919: Disable warning 26812 in genproj.bat.

ddzama

2022-05-04 12:32

developer   ~0108292

@kgv, `adm/templates/template.vc10` and `adm/templates/template.vc10x` have been modified.

git

2022-05-04 14:21

administrator   ~0108298

Branch CR32919_1 has been created by kgv.

SHA-1: 7983b13d9e7867c86c4abc53ab98336ff5805e76


Detailed log of new commits:

Author: Dmitry DZAMA
Date: Thu Mar 31 16:18:19 2022 +0300

    0032919: Coding Rules - suppress useless MSVC warning C26812 on VS2019/C++20 (prefer 'enum class' over 'enum')
    
    CMake and genproj scripts have been updated to suppress this misleading warning that cannot be fixed without breaking existing API.

git

2022-05-04 14:29

administrator   ~0108299

Branch CR32919_1 has been updated forcibly by kgv.

SHA-1: 0dc11122a3f3f09dbc6cc1728bd7ac2c7976ea9e

kgv

2022-05-04 14:30

developer   ~0108300

Please raise the patch
- OCCT: branch CR32919_1.

git

2022-05-04 15:18

administrator   ~0108307

Branch CR32919 has been updated forcibly by ddzama.

SHA-1: 0994a9288282146051b1e5eeb534ba2fa43f7439

git

2022-05-04 15:38

administrator   ~0108311

Branch CR32919 has been updated by ddzama.

SHA-1: a2556859dd5ed48889bacec1a7f7d90f4a1e89e0


Detailed log of new commits:

Author: ddzama
Date: Thu Mar 31 16:18:19 2022 +0300

    0032919: Coding Rules - suppress useless MSVC warning C26812 on VS2019/C++20 (prefer 'enum class' over 'enum')
    
    CMake and genproj scripts have been updated to suppress this misleading warning that cannot be fixed without breaking existing API.

ddzama

2022-05-04 15:38

developer   ~0108312

@kgv, CR32919_1 have been cherry-picked.

git

2023-01-21 21:16

administrator   ~0112958

Branch CR32919_1 has been deleted by vglukhik.

SHA-1: 0dc11122a3f3f09dbc6cc1728bd7ac2c7976ea9e

git

2023-01-21 21:16

administrator   ~0112959

Branch CR32919 has been deleted by vglukhik.

SHA-1: a2556859dd5ed48889bacec1a7f7d90f4a1e89e0

Related Changesets

occt: master 1966e6af

2022-03-31 16:18:19

ddzama


Committer: smoskvin Details Diff
0032919: Coding Rules - suppress useless MSVC warning C26812 on VS2019/C++20 (prefer 'enum class' over 'enum')

CMake and genproj scripts have been updated to suppress this misleading warning that cannot be fixed without breaking existing API.
Affected Issues
0032919
mod - adm/cmake/occt_defs_flags.cmake Diff File
mod - adm/templates/template.vc10 Diff File
mod - adm/templates/template.vc10x Diff File

Issue History

Date Modified Username Field Change
2022-04-07 10:48 ddzama New Issue
2022-04-07 10:48 ddzama Assigned To => ddzama
2022-04-07 12:51 kgv Relationship added child of 0032887
2022-04-07 12:52 kgv Summary Coding Rules - disable warning messages MSVS2019 C26812 (Warning C26812: Prefer 'enum class' over 'enum' (Enum.3)) => Coding Rules, CMake - suppress useless MSVC warning C26812 on VS2019/C++20 (prefer 'enum class' over 'enum')
2022-04-07 12:52 kgv Product Version 7.7.0 => 7.6.0
2022-04-07 14:22 git Note Added: 0107683
2022-04-07 14:41 git Note Added: 0107704
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:06 git Note Added: 0107710
2022-04-08 18:24 kgv Note Added: 0107769
2022-04-20 11:17 git Note Added: 0108040
2022-04-25 16:53 ddzama Note Added: 0108161
2022-04-26 02:09 git Note Added: 0108176
2022-04-26 11:29 ddzama Assigned To ddzama => kgv
2022-04-26 11:29 ddzama Status new => resolved
2022-04-26 11:29 ddzama Steps to Reproduce Updated
2022-04-26 16:58 kgv Assigned To kgv => ddzama
2022-04-26 16:58 kgv Status resolved => assigned
2022-04-26 16:58 kgv Note Added: 0108188
2022-04-27 09:23 azv Note Added: 0108211
2022-04-27 10:39 kgv Note Added: 0108213
2022-05-04 12:12 git Note Added: 0108289
2022-05-04 12:32 ddzama Note Added: 0108292
2022-05-04 14:21 git Note Added: 0108298
2022-05-04 14:29 git Note Added: 0108299
2022-05-04 14:30 kgv Assigned To ddzama => bugmaster
2022-05-04 14:30 kgv Status assigned => resolved
2022-05-04 14:30 kgv Test case number => N/A
2022-05-04 14:30 kgv Note Added: 0108300
2022-05-04 14:30 kgv Status resolved => reviewed
2022-05-04 15:18 git Note Added: 0108307
2022-05-04 15:38 git Note Added: 0108311
2022-05-04 15:38 ddzama Note Added: 0108312
2022-05-08 13:54 bugmaster Status reviewed => tested
2022-05-08 16:15 smoskvin Changeset attached => occt master 1966e6af
2022-05-08 16:15 ddzama Assigned To bugmaster => ddzama
2022-05-08 16:15 ddzama Status tested => verified
2022-05-08 16:15 ddzama Resolution open => fixed
2023-01-21 21:16 git Note Added: 0112958
2023-01-21 21:16 git Note Added: 0112959
2023-03-19 23:17 vglukhik Status verified => closed
2023-03-19 23:17 vglukhik Fixed in Version => 7.6.3