C-Pluff C API  0.2.0
Macros
GCC attributes

These macros conditionally define GCC attributes for declarations. More...

Macros

#define CP_GCC_PURE
 Declares a function as pure function having no side effects. More...
 
#define CP_GCC_NONNULL(...)
 Specifies that some pointer arguments to a function should have non-NULL values. More...
 

Detailed Description

These macros conditionally define GCC attributes for declarations.

They are used in C-Pluff API declarations to enable better optimization and error checking when using GCC. In non-GCC platforms they have empty values.

Macro Definition Documentation

◆ CP_GCC_PURE

#define CP_GCC_PURE

Declares a function as pure function having no side effects.

This attribute is supported in GCC since version 2.96. Such functions can be subject to common subexpression elimination and loop optimization.

◆ CP_GCC_NONNULL

#define CP_GCC_NONNULL (   ...)

Specifies that some pointer arguments to a function should have non-NULL values.

Takes a variable length list of argument indexes as arguments. This attribute is supported in GCC since version 3.3. It can be used for enhanced error checking and some optimizations.


Generated on Fri May 1 2020 01:06:58 for C-Pluff C API by doxygen 1.8.13