MantisBT - Open CASCADE
View Issue Details
0031044Open CASCADE[OCCT] OCCT:Codingpublic2019-10-07 21:302019-10-15 06:54
abv 
bugmaster 
normalminor 
reviewedopen 
 
[OCCT] 7.5.0* 
0031044: Coding - Standard_NODISCARD should be placed before Standard_EXPORT
When compiling OCCT with Platform Toolset set to "LLVM (clang-cl)", the compiler issues error where Standard_EXPORT is followed by Standard_NODISCARD in the method declaration, such as:

1>..\..\..\inc/../src/Units/Units_Token.hxx(138,19): error : an attribute list cannot appear here
1>..\..\..\inc/../src/Standard/Standard_Macro.hxx(69,32): message : expanded from macro 'Standard_NODISCARD'

 
Generate projects for MSVC 2019 for toolset LLVM (or generate standard, then edit project's propertied to set LLVM toolset) and build
No tags attached.
patch Standard_LOCAL.patch (4,625) 2019-10-15 06:52
https://tracker.dev.opencascade.org/
Issue History
2019-10-07 21:30abvNew Issue
2019-10-07 21:30abvAssigned To => kgv
2019-10-08 08:08gitNote Added: 0087935
2019-10-09 23:11abvNote Added: 0087994
2019-10-09 23:11abvStatusnew => resolved
2019-10-09 23:11abvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22016#r22016
2019-10-10 09:23gitNote Added: 0088002
2019-10-10 09:57kgvNote Added: 0088004
2019-10-10 09:57kgvNote Deleted: 0088004
2019-10-10 09:59kgvNote Added: 0088005
2019-10-10 09:59kgvAssigned Tokgv => abv
2019-10-10 09:59kgvStatusresolved => assigned
2019-10-11 21:53gitNote Added: 0088055
2019-10-11 22:07gitNote Added: 0088056
2019-10-12 22:58abvNote Added: 0088070
2019-10-12 22:58abvAssigned Toabv => kgv
2019-10-12 22:58abvStatusassigned => resolved
2019-10-13 09:24kgvAssigned Tokgv => bugmaster
2019-10-13 09:24kgvStatusresolved => reviewed
2019-10-15 06:52abvFile Added: Standard_LOCAL.patch
2019-10-15 06:52gitNote Added: 0088126
2019-10-15 06:54abvNote Added: 0088127

Notes
(0087935)
git   
2019-10-08 08:08   
Branch CR31044 has been created by abv.

SHA-1: 1ac58326fbc21fb09beb4ac81d5d2c969238be52


Detailed log of new commits:

Author: abv
Date: Mon Oct 7 21:32:21 2019 +0300

    0031044: Coding - Standard_NODISCARD should be placed before Standard_EXPORT
    
    Standard_NODISCARD is put before Standard_EXPORT in all places throughout OCCT code
(0087994)
abv   
2019-10-09 23:11   
Fix is pushed to branch CR31044, please review. Tests are OK, see Jenkins job CR31044-abv
(0088002)
git   
2019-10-10 09:23   
Branch CR31044_gcc_vis has been created by kgv.

SHA-1: f8d1a6fd07f693c7e43b1ca2cdfddfb051847d7f


Detailed log of new commits:

Author: kgv
Date: Thu Oct 10 09:22:29 2019 +0300

    0031044: Coding - Standard_NODISCARD should be placed before Standard_EXPORT
(0088005)
kgv   
2019-10-10 09:59   
There are still compilation errors on macOS - not all places have been corrected:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/job/CR31044_gcc_vis-master-KGV-OCCT-MacOS-opt-compile/1/parsed_console/ [^]
(0088055)
git   
2019-10-11 21:53   
Branch CR31044 has been updated forcibly by abv.

SHA-1: 6656c1c585e504d9b590820474ad5750060f615f
(0088056)
git   
2019-10-11 22:07   
Branch CR31044_gcc_vis has been updated forcibly by abv.

SHA-1: f13058c55af657144f64c536c1d65f8694fbf6db
(0088070)
abv   
2019-10-12 22:58   
Sorry, my commit was lacking three files. Please review updated branches. Your branch CR31044_gcc_vis now passes tests OK, see Jenkins job CR31044_gcc_vis-master-KGV.

I believe we can introduce Standard_LOCAL and use it where reasonable, but I see no use in defining Standard_EXPORT as non-empty on Linux. Please reconsider this in commit in CR31044_gcc_vis.
(0088126)
git   
2019-10-15 06:52   
Branch CR31044_gcc_vis has been deleted by abv.

SHA-1: f13058c55af657144f64c536c1d65f8694fbf6db
(0088127)
abv   
2019-10-15 06:54   
Branch to be integrated is CR31044. Content of branch CR31044_gcc_vis is archived as patch attached to this issue (Standard_LOCAL.patch)