Mercurial > hg > xemacs-beta
diff src/compiler.h @ 2286:04bc9d2f42c7
[xemacs-hg @ 2004-09-20 19:18:55 by james]
Mark all unused parameters as unused. Also eliminate some unneeded local
variables.
author | james |
---|---|
date | Mon, 20 Sep 2004 19:20:08 +0000 |
parents | 0be6ff2356c8 |
children | ba4677f54a05 |
line wrap: on
line diff
--- a/src/compiler.h Mon Sep 20 19:11:29 2004 +0000 +++ b/src/compiler.h Mon Sep 20 19:20:08 2004 +0000 @@ -28,7 +28,7 @@ Many changes and improvements by Jerry James, 2003. Split out of lisp.h, reorganized, and modernized. {BEGIN,END}_C_DECLS, NEED_GCC, GCC_VERSION - ATTRIBUTE_MALLOC, ATTRIBUTE_CONST, ATTRIBUTE_PURE, UNUSED_ARG + ATTRIBUTE_MALLOC, ATTRIBUTE_CONST, ATTRIBUTE_PURE, UNUSED */ #ifndef INCLUDED_compiler_h @@ -193,14 +193,18 @@ # endif /* GCC_VERSION >= NEED_GCC (2, 5, 0) */ #endif /* ATTRIBUTE_CONST */ -/* Unused declarations; g++ doesn't support this. */ +/* Unused declarations; g++ and icc do not support this. */ #ifndef UNUSED_ARG -# if defined(__GNUC__) && !defined(__cplusplus) -# define UNUSED_ARG __attribute__ ((unused)) +# define UNUSED_ARG(decl) unused_##decl +#endif +#ifndef UNUSED +# if defined(__GNUC__) && !defined(__cplusplus) && !defined(__INTEL_COMPILER) +# define ATTRIBUTE_UNUSED __attribute__ ((unused)) # else -# define UNUSED_ARG +# define ATTRIBUTE_UNUSED # endif -#endif /* ATTRIBUTE_UNUSED */ +# define UNUSED(decl) UNUSED_ARG (decl) ATTRIBUTE_UNUSED +#endif /* UNUSED */ #ifdef DEBUG_XEMACS # define REGISTER