diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-07 18:25:27 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-07 18:25:27 (GMT) |
commit | 89b0bdb8829f03a5216972f59d54b3fa8a1bef16 (patch) | |
tree | 73278c17cb6109836ecaafb24f992889f642b1c0 /generic/tclInt.h | |
parent | 467d03dbc94f1e8b6ec74da6ac0f54ce4975bf10 (diff) | |
download | tcl-89b0bdb8829f03a5216972f59d54b3fa8a1bef16.zip tcl-89b0bdb8829f03a5216972f59d54b3fa8a1bef16.tar.gz tcl-89b0bdb8829f03a5216972f59d54b3fa8a1bef16.tar.bz2 |
Move TCL_UNUSED to tclInt.h, so we can still deprecate JOIN()
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 6704789..9126c3b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -53,7 +53,18 @@ # 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 |