]> git.ozlabs.org Git - ccan/blobdiff - ccan/compiler/_info
compiler: don't override existing definitions.
[ccan] / ccan / compiler / _info
index 31f6f0c7ce482cadbc6644e0f60af742da23bd37..c55ba22f086c320de70b4c5d21a0b56da825e16f 100644 (file)
@@ -6,16 +6,18 @@
  * compiler - macros for common compiler extensions
  *
  * Abstracts away some compiler hints.  Currently these include:
  * 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)
  *     For functions not called in fast paths (aka. cold functions)
- * - PRINTF_ATTRIBUTE
+ * - PRINTF_FMT
  *     For functions which take printf-style parameters.
  *     For functions which take printf-style parameters.
- * - IDEMPOTENT_ATTRIBUTE
+ * - IDEMPOTENT
  *     For functions which return the same value for same parameters.
  *     For functions which return the same value for same parameters.
- * - NEEDED_ATTRIBUTE
+ * - NEEDED
  *     For functions and variables which must be emitted even if unused.
  *     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.
  *     For functions and variables which need not be emitted if unused.
+ * - UNUSED
+ *     For parameters which are not used.
  * - IS_COMPILE_CONSTANT
  *     For using different tradeoffs for compiletime vs runtime evaluation.
  *
  * - IS_COMPILE_CONSTANT
  *     For using different tradeoffs for compiletime vs runtime evaluation.
  *
@@ -29,7 +31,7 @@
  *
  *     // Example of a (slow-path) logging function.
  *     static int log_threshold = 2;
  *
  *     // 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;
  *             logger(int level, const char *fmt, ...)
  *     {
  *             va_list ap;