skalibs: the gccattributes header
Keywords: skalibs header gccattributes gcc attributes

libstddjb
libskarnet
skalibs
Software
skarnet.org

# The `skalibs/gccattributes.h` header

`skalibs/gccattributes.h` is a set of wrappers around gcc attributes (duh). It defines macros that are always valid, and that have no effect if the compiler is not gcc or the used version of gcc does not support the wanted attribute.

For instance:

     extern size_t str_len (char const *) gccattr_pure ;

defines the `str_len` function as pure if it is supported.

The source code is self-explanatory.