# HG changeset patch # User stephent # Date 1182532537 0 # Node ID f386b9b924173d7cf22f7319ca8052a7d5f30ce5 # Parent c56a675b3b05315b3fc49227d038f4c46607036e [xemacs-hg @ 2007-06-22 17:15:34 by stephent] Try to use UNUSED with more versions of GCC and ICC. <87tzsz52bs.fsf@uwakimon.sk.tsukuba.ac.jp> diff -r c56a675b3b05 -r f386b9b92417 src/ChangeLog --- a/src/ChangeLog Fri Jun 22 16:58:38 2007 +0000 +++ b/src/ChangeLog Fri Jun 22 17:15:37 2007 +0000 @@ -1,3 +1,7 @@ +2007-06-23 Stephen J. Turnbull + + * compiler.h: Try to use USED with more compilers. Thanks, Jerry! + 2007-06-22 Aidan Kehoe * eval.c (restore_int): diff -r c56a675b3b05 -r f386b9b92417 src/compiler.h --- a/src/compiler.h Fri Jun 22 16:58:38 2007 +0000 +++ b/src/compiler.h Fri Jun 22 17:15:37 2007 +0000 @@ -210,19 +210,24 @@ # endif /* GCC_VERSION >= NEED_GCC (2, 5, 0) */ #endif /* ATTRIBUTE_CONST */ -/* Unused declarations; g++ and icc do not support this. */ /* NOTE: These macros MUST be named UNUSED (exactly) or something prefixed with USED_IF_, or DEFUN docstrings will be parsed incorrectly. See comments in make_docfile.c (write_c_args). You'd think that this wouldn't happen, but unfortunately we do indeed have some arguments of DEFUNs unused for GNU compatibility or because features are missing. + + #### At one time, __attribute__ ((unused)) confused G++. We don't know + which versions. Please report problems and fix conditionals. + #### A similar issue arose with the Intel CC. We know that v7 didn't + work and v9 does. Let us know if v8 works or not, please. + See . */ #ifndef UNUSED_ARG # define UNUSED_ARG(decl) unused_##decl #endif #ifndef UNUSED -# if defined(__GNUC__) && !defined(__cplusplus) && !defined(__INTEL_COMPILER) +# if defined(__GNUC__) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 800) # define ATTRIBUTE_UNUSED __attribute__ ((unused)) # else # define ATTRIBUTE_UNUSED