Bayeux  3.4.1
Core Foundation library for SuperNEMO
Macros
compiler_macros.h File Reference

Portable macros for compiler attributes. More...

Go to the source code of this file.

Macros

#define DT_UNUSED(X)   X
 

Detailed Description

Portable macros for compiler attributes.

Working with many different compilers often requires using different statements for this like attributes (deprecation, visibility) and pragmas (suppressing external warnings)

To help developers use these features without needing to know the exact compiler constructs, datatools supplies preprocessor macros that expand to the required construct for the compiler in use.

Macro Definition Documentation

◆ DT_UNUSED

#define DT_UNUSED (   X)    X

Mark variable X as possibly unused Use this to wrap a variable requires naming but that may be unused in the current scope. Primarily for use in declarations/definitions of concrete functions where some of the arguments from the abstract method are not used

Parameters
Xvariable name to mark
void foo(int bar, int DT_UNUSED(baz));
Todo:
See http://julipedia.meroh.net/2015/02/unused-parameters-in-c-and-c.html for an additional marking convention to handle case when variable is needed!