MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029128Open CASCADE[OCCT] OCCT:Codingpublic2017-09-20 19:172017-10-23 09:10
Reportersan 
Assigned Tosan 
PrioritynormalSeverityfeature 
StatusfeedbackResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0029128: Cross-platform macro for enabling compiler warnings suppressed by third-party products
DescriptionAs mentioned in comment 0028452:0070334, we sometimes have to deal with compiler warnings suppressed by third-party headers included in some OCCT or application source file. As a result, warnings resulted from the source file itself are also suppressed - this results in decreased OCCT/application code quality.

Quick solution implemented in issue 0028452 is to use #pragma warning(push) before the third-party headers and #pragma warning(pop) right after it. This is a Microsoft-specific solution.
So it is preferred to define a reusable pair of macros for pushing/popping warnings - see "#pragma GCC diagnostic push/pop" available in gcc 4.6+ and similar commands in CLang.

For convenience and work optimization, it is proposed to put these macros to some common header in OCCT to make them available to OCCT-based applications.
TagsNo tags attached.
Test case number
Attached Files

- Relationships
child of 0028452closedbugmaster VIS - MSVC 14 compiler warnings 

-  Notes
(0071691)
abv (manager)
2017-10-23 09:05

Sergey, I'm afraid that we cannot create a macro like you proposed. The problem is that you cannot define a macro containing preprocessor directive -- this will not work (preprocessor is one-pass, and # inside a macro is stringizing operator).

It could be possible to put this kind of macros in header file(s), and #include it (them) to trigger the warnings,.. but do we want that?
(0071692)
BenjaminBihler (updater)
2017-10-23 09:10

With g++ there is the possibility to add an include path with "-isystem" instead of "-I". Then no warnings are printed from those include files.

- Issue History
Date Modified Username Field Change
2017-09-20 19:17 san New Issue
2017-09-20 19:17 san Assigned To => kgv
2017-09-20 19:18 san Relationship added child of 0028452
2017-10-23 09:05 abv Note Added: 0071691
2017-10-23 09:05 abv Assigned To kgv => san
2017-10-23 09:05 abv Status new => feedback
2017-10-23 09:10 BenjaminBihler Note Added: 0071692


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker