diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-07 18:31:45 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-07 18:31:45 (GMT) |
| commit | 24cfa12d40215a41ab6507a92a20d8600e320d94 (patch) | |
| tree | 0986de40129959fd9e194794e03013c3e48ba64d | |
| parent | 2c34ced219c028ad38fe079b9000f31049a0a42c (diff) | |
| parent | 89b0bdb8829f03a5216972f59d54b3fa8a1bef16 (diff) | |
| download | tcl-24cfa12d40215a41ab6507a92a20d8600e320d94.zip tcl-24cfa12d40215a41ab6507a92a20d8600e320d94.tar.gz tcl-24cfa12d40215a41ab6507a92a20d8600e320d94.tar.bz2 | |
Merge 8.7
| -rw-r--r-- | generic/tcl.h | 13 | ||||
| -rw-r--r-- | generic/tclInt.h | 13 |
2 files changed, 14 insertions, 12 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 0a6db09..29f64bc 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -66,12 +66,11 @@ extern "C" { # define STRINGIFY(x) STRINGIFY1(x) # define STRINGIFY1(x) #x #endif -#endif /* RC_INVOKED */ - #ifndef JOIN # define JOIN(a,b) JOIN1(a,b) # define JOIN1(a,b) a##b #endif +#endif /* RC_INVOKED */ /* * A special definition used to allow this header file to be included from @@ -107,11 +106,6 @@ extern "C" { # define TCL_NORETURN __attribute__ ((noreturn)) # define TCL_NOINLINE __attribute__ ((noinline)) # define TCL_NORETURN1 __attribute__ ((noreturn)) -# if defined(__cplusplus) -# define TCL_UNUSED(T) T -# else -# define TCL_UNUSED(T) T JOIN(dummy, __LINE__) __attribute__((unused)) -# endif #else # define TCL_FORMAT_PRINTF(a,b) # if defined(_MSC_VER) && (_MSC_VER >= 1310) @@ -122,11 +116,6 @@ extern "C" { # define TCL_NOINLINE /* nothing */ # endif # define TCL_NORETURN1 /* nothing */ -# if defined(__cplusplus) -# define TCL_UNUSED(T) T -# else -# define TCL_UNUSED(T) T JOIN(dummy, __LINE__) -# endif #endif /* diff --git a/generic/tclInt.h b/generic/tclInt.h index 15f6b54..452d915 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -39,6 +39,19 @@ # endif #endif +#ifndef JOIN +# define JOIN(a,b) JOIN1(a,b) +# define JOIN1(a,b) a##b +#endif + +#if defined(__cplusplus) +# define TCL_UNUSED(T) T +#elif defined(__GNUC__) && (__GNUC__ > 2) +# define TCL_UNUSED(T) T JOIN(dummy, __LINE__) __attribute__((unused)) +#else +# define TCL_UNUSED(T) T JOIN(dummy, __LINE__) +#endif + /* * Common include files needed by most of the Tcl source files are included * here, so that system-dependent personalizations for the include files only |
