diff options
author | 2019-02-26 14:39:01 -0700 | |
---|---|---|
committer | 2019-03-05 08:48:39 -0700 | |
commit | 18cb7c9f3add62ff598f0551a767af8aaa04b07e (patch) | |
tree | 81fa217c13e517539762f3d2d0bd8a19bc3edbc4 /gdb/common/common-defs.h | |
parent | Allow multiple tests to be run on systems with older versions of TCL installed. (diff) | |
download | binutils-gdb-18cb7c9f3add62ff598f0551a767af8aaa04b07e.tar.gz binutils-gdb-18cb7c9f3add62ff598f0551a767af8aaa04b07e.tar.bz2 binutils-gdb-18cb7c9f3add62ff598f0551a767af8aaa04b07e.zip |
Introduce ATTRIBUTE_UNUSED_RESULT and use it
This introduces the new ATTRIBUTE_UNUSED_RESULT define, and applies it
to gdb_argv::release.
gdb/ChangeLog
2019-03-05 Tom Tromey <tromey@adacore.com>
* utils.h (class gdb_argv) <release>: Add
ATTRIBUTE_UNUSED_RESULT.
* common/common-defs.h (ATTRIBUTE_UNUSED_RESULT): Define.
Diffstat (limited to 'gdb/common/common-defs.h')
-rw-r--r-- | gdb/common/common-defs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h index 732693d65cc..6b1f004ab1b 100644 --- a/gdb/common/common-defs.h +++ b/gdb/common/common-defs.h @@ -93,6 +93,12 @@ #undef ATTRIBUTE_PRINTF #define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF +#if GCC_VERSION >= 3004 +#define ATTRIBUTE_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) +#else +#define ATTRIBUTE_UNUSED_RESULT +#endif + #include "libiberty.h" #include "pathmax.h" #include "gdb/signals.h" |