X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fcompiler%2F_info;h=d60dff4d17bb0a50b691bb83097debdc94f38cf5;hb=9a5d0387e388594616ce216ce07de39c205d547c;hp=06645b1d8c9d8e26ea2d554553351f53795e8bd7;hpb=18636637ee013ef828cb04b2b7bb4a4922324475;p=ccan diff --git a/ccan/compiler/_info b/ccan/compiler/_info index 06645b1d..d60dff4d 100644 --- a/ccan/compiler/_info +++ b/ccan/compiler/_info @@ -1,25 +1,27 @@ +#include "config.h" #include #include -#include "config.h" /** * compiler - macros for common compiler extensions * * Abstracts away some compiler hints. Currently these include: - * - COLD_ATTRIBUTE + * - COLD * For functions not called in fast paths (aka. cold functions) - * - PRINTF_ATTRIBUTE + * - PRINTF_FMT * For functions which take printf-style parameters. - * - IDEMPOTENT_ATTRIBUTE + * - CONST_FUNCTION * For functions which return the same value for same parameters. - * - NEEDED_ATTRIBUTE + * - NEEDED * For functions and variables which must be emitted even if unused. - * - UNNEEDED_ATTRIBUTE + * - UNNEEDED * For functions and variables which need not be emitted if unused. - * - IS_COMPILE_CONSTANT + * - UNUSED + * For parameters which are not used. + * - IS_COMPILE_CONSTANT() * For using different tradeoffs for compiletime vs runtime evaluation. * - * Licence: LGPL (3 or any later version) + * License: CC0 (Public domain) * Author: Rusty Russell * * Example: @@ -29,7 +31,7 @@ * * // Example of a (slow-path) logging function. * static int log_threshold = 2; - * static void COLD_ATTRIBUTE PRINTF_ATTRIBUTE(2,3) + * static void COLD PRINTF_FMT(2,3) * logger(int level, const char *fmt, ...) * { * va_list ap;