diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-05-02 23:52:14 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-05-02 23:52:14 +0000 |
commit | c25c4a8b0e4a21b527424fa7f0675a858bf0a9e6 (patch) | |
tree | a707cc4785205eceefe4db29ff3eb98c8fb15ba5 /gdb/defs.h | |
parent | a0b31db1be5fd8d14d9279fcb1672c9e0aa4ab24 (diff) | |
download | binutils-c25c4a8b0e4a21b527424fa7f0675a858bf0a9e6.zip binutils-c25c4a8b0e4a21b527424fa7f0675a858bf0a9e6.tar.gz binutils-c25c4a8b0e4a21b527424fa7f0675a858bf0a9e6.tar.bz2 |
gdb/
* cli/cli-cmds.h (error_no_arg): Remove. Move the comment ...
* command.h (error_no_arg): ... here. Remove NORETURN, change
ATTR_NORETURN to ATTRIBUTE_NORETURN.
* defs.h (NORETURN, ATTR_NORETURN): Remove.
(perror_with_name, verror, error, error_stream, vfatal, fatal)
(internal_verror, internal_error, nomem): Remove NORETURN, change
ATTR_NORETURN to ATTRIBUTE_NORETURN.
* exceptions.c (throw_exception, deprecated_throw_reason, throw_verror)
(throw_vfatal, throw_error): Remove NORETURN.
(throw_it): Remove NORETURN, change ATTR_NORETURN to ATTRIBUTE_NORETURN.
* exceptions.h (throw_exception, throw_verror, throw_vfatal)
(throw_error, deprecated_throw_reason): Remove NORETURN, change
ATTR_NORETURN to ATTRIBUTE_NORETURN.
* linespec.c (cplusplus_error): Remove NORETURN, change ATTR_NORETURN
to ATTRIBUTE_NORETURN for prototype, for the definition only remove
NORETURN.
* remote-mips.c (mips_error): Change NORETURN to ATTRIBUTE_NORETURN.
* remote-sim.c (gdb_os_error): Change ATTR_NORETURN to
ATTRIBUTE_NORETURN.
* target.c (tcomplain): Likewise.
* target.h (noprocess): Remove NORETURN, change ATTR_NORETURN to
ATTRIBUTE_NORETURN.
* utils.c (verror, error, vfatal, fatal, error_stream, internal_verror)
(internal_error, perror_with_name, nomem): Remove NORETURN.
* xml-support.h (gdb_xml_error): Change ATTR_NORETURN to
ATTRIBUTE_NORETURN.
gdb/doc/
* gdbint.texinfo (Host Definition): Remove items NORETURN and
ATTR_NORETURN.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r-- | gdb/defs.h | 60 |
1 files changed, 16 insertions, 44 deletions
@@ -267,36 +267,6 @@ struct cleanup void *arg; }; - -/* The ability to declare that a function never returns is useful, but - not really required to compile GDB successfully, so the NORETURN and - ATTR_NORETURN macros normally expand into nothing. */ - -/* If compiling with older versions of GCC, a function may be declared - "volatile" to indicate that it does not return. */ - -#ifndef NORETURN -#if defined(__GNUC__) \ - && (__GNUC__ == 1 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)) -#define NORETURN volatile -#else -#define NORETURN /* nothing */ -#endif -#endif - -/* GCC 2.5 and later versions define a function attribute "noreturn", - which is the preferred way to declare that a function never returns. - However GCC 2.7 appears to be the first version in which this fully - works everywhere we use it. */ - -#ifndef ATTR_NORETURN -#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) -#define ATTR_NORETURN __attribute__ ((noreturn)) -#else -#define ATTR_NORETURN /* nothing */ -#endif -#endif - /* Be conservative and use enum bitfields only with GCC. This is copied from gcc 3.3.1, system.h. */ @@ -552,7 +522,7 @@ extern char *hex_string_custom (LONGEST, int); extern void fprintf_symbol_filtered (struct ui_file *, char *, enum language, int); -extern NORETURN void perror_with_name (const char *) ATTR_NORETURN; +extern void perror_with_name (const char *) ATTRIBUTE_NORETURN; extern void print_sys_errmsg (const char *, int); @@ -921,24 +891,26 @@ extern char *quit_pre_print; extern char *warning_pre_print; -extern NORETURN void verror (const char *fmt, va_list ap) - ATTR_NORETURN ATTRIBUTE_PRINTF (1, 0); +extern void verror (const char *fmt, va_list ap) + ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 0); -extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN ATTRIBUTE_PRINTF (1, 2); +extern void error (const char *fmt, ...) + ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2); -extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN; +extern void error_stream (struct ui_file *) ATTRIBUTE_NORETURN; -extern NORETURN void vfatal (const char *fmt, va_list ap) - ATTR_NORETURN ATTRIBUTE_PRINTF (1, 0); +extern void vfatal (const char *fmt, va_list ap) + ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 0); -extern NORETURN void fatal (const char *fmt, ...) ATTR_NORETURN ATTRIBUTE_PRINTF (1, 2); +extern void fatal (const char *fmt, ...) + ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2); -extern NORETURN void internal_verror (const char *file, int line, - const char *, va_list ap) - ATTR_NORETURN ATTRIBUTE_PRINTF (3, 0); +extern void internal_verror (const char *file, int line, const char *, + va_list ap) + ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 0); -extern NORETURN void internal_error (const char *file, int line, - const char *, ...) ATTR_NORETURN ATTRIBUTE_PRINTF (3, 4); +extern void internal_error (const char *file, int line, const char *, ...) + ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 4); extern void internal_vwarning (const char *file, int line, const char *, va_list ap) @@ -947,7 +919,7 @@ extern void internal_vwarning (const char *file, int line, extern void internal_warning (const char *file, int line, const char *, ...) ATTRIBUTE_PRINTF (3, 4); -extern NORETURN void nomem (long) ATTR_NORETURN; +extern void nomem (long) ATTRIBUTE_NORETURN; extern void warning (const char *, ...) ATTRIBUTE_PRINTF (1, 2); |