Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
b74f9790
Commit
b74f9790
authored
3 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
Remove deprecated DUNE_UNUSED
parent
8046a2d7
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1076
Remove deprecated code parts or properly deprecate parts that were meant for removal
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+5
-0
5 additions, 0 deletions
CHANGELOG.md
cmake/modules/CheckCXXFeatures.cmake
+0
-15
0 additions, 15 deletions
cmake/modules/CheckCXXFeatures.cmake
config.h.cmake
+1
-3
1 addition, 3 deletions
config.h.cmake
dune/common/unused.hh
+1
-19
1 addition, 19 deletions
dune/common/unused.hh
with
7 additions
and
37 deletions
CHANGELOG.md
+
5
−
0
View file @
b74f9790
...
...
@@ -36,6 +36,11 @@
that it is no drop-in replacement, as it must be sometimes placed at
different position in the code.
-
The macros
`DUNE_UNUSED`
is removed Use C++17's attribute
`[[maybe_unused]]`
instead, but be aware that it is no drop-in
replacement, as it must be sometimes placed at a different position
in the code.
# Release 2.8
-
Set minimal required CMake version in cmake to >= 3.13.
...
...
This diff is collapsed.
Click to expand it.
cmake/modules/CheckCXXFeatures.cmake
+
0
−
15
View file @
b74f9790
...
...
@@ -10,9 +10,6 @@
# This module internally sets the following variables, which are then
# exported into the config.h of the current dune module.
#
# :code:`HAS_ATTRIBUTE_UNUSED`
# True if attribute unused is supported
#
# .. cmake_variable:: DISABLE_CXX_VERSION_CHECK
#
# You may set this variable to TRUE to disable checking for
...
...
@@ -180,18 +177,6 @@ endif()
# make sure we have at least C++17
dune_require_cxx_standard
(
MODULE
"DUNE"
VERSION 17
)
# perform tests
# __attribute__((unused))
check_cxx_source_compiles
(
"
int main(void)
{
int __attribute__((unused)) foo;
return 0;
};
"
HAS_ATTRIBUTE_UNUSED
)
# ******************************************************************************
#
# Checks for standard library features
...
...
This diff is collapsed.
Click to expand it.
config.h.cmake
+
1
−
3
View file @
b74f9790
...
...
@@ -20,9 +20,6 @@
/* Standard debug streams with a level below will collapse to doing nothing */
#define DUNE_MINIMAL_DEBUG_LEVEL ${DUNE_MINIMAL_DEBUG_LEVEL}
/* does the compiler support
__attribute__
((
unused
))
? */
#cmakedefine HAS_ATTRIBUTE_UNUSED 1
/* does the standard library provide experimental::
make_array
()
? */
#cmakedefine DUNE_HAVE_CXX_EXPERIMENTAL_MAKE_ARRAY 1
...
...
@@ -97,6 +94,7 @@
/* old feature support macros which were tested until 2.8, kept around for one more release */
#define HAS_ATTRIBUTE_DEPRECATED 0
#define HAS_ATTRIBUTE_DEPRECATED_MSG 0
#define HAS_ATTRIBUTE_UNUSED 0
/* Define to ENABLE_UMFPACK if the UMFPack library is available */
#cmakedefine HAVE_UMFPACK ENABLE_SUITESPARSE
...
...
This diff is collapsed.
Click to expand it.
dune/common/unused.hh
+
1
−
19
View file @
b74f9790
...
...
@@ -4,27 +4,9 @@
#define DUNE_COMMON_UNUSED_HH
/** \file
* \brief Definition of the DUNE_UNUSED macro for the case that config.h
* is not available
* \brief Definition of the `DUNE_UNUSED_PARAMETER` macro.
*/
#ifndef HAS_ATTRIBUTE_UNUSED
//! A macro for marking variables that the compiler mistakenly flags as unused, which sometimes happens due to templates.
/**
* \ingroup CxxUtilities
* \deprecated Use C++17's \code[[maybe_unused]]\endcode instead. This
* macro will be removed after Dune 2.8. Be aware that it must be
* sometimes placed at a different position in the code.
*/
#define DUNE_UNUSED
#else
#ifdef __GNUC__
# define DUNE_UNUSED _Pragma("GCC warning \"DUNE_UNUSED is deprecated\"") __attribute__((unused))
#else
# define DUNE_UNUSED _Pragma("message \"DUNE_UNUSED is deprecated\"") __attribute__((unused))
#endif
#endif
/**
* A macro to mark intentionally unused function parameters with.
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment