* 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.
+2010-05-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * 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.
+
2010-05-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* ada-lang.c (lim_warning): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
extern int find_and_open_script (const char *file, int search_path,
FILE **streamp, char **full_path);
-/* Used everywhere whenever at least one parameter is required and
- none is specified. */
-
-extern NORETURN void error_no_arg (char *) ATTR_NORETURN;
-
/* Command tracing state. */
extern int source_verbose;
extern void cmd_show_list (struct cmd_list_element *, int, char *);
-extern NORETURN void error_no_arg (char *) ATTR_NORETURN;
+/* Used everywhere whenever at least one parameter is required and
+ none is specified. */
+
+extern void error_no_arg (char *) ATTRIBUTE_NORETURN;
extern void dont_repeat (void);
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. */
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);
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)
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);
+2010-05-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdbint.texinfo (Host Definition): Remove items NORETURN and
+ ATTR_NORETURN.
+
2010-04-29 Phil Muldoon <pmuldoon@redhat.com>
- Tom Tromey <tromey@redhat.com>
- Thiago Jung Bauermann <bauerman@br.ibm.com>
+ Tom Tromey <tromey@redhat.com>
+ Thiago Jung Bauermann <bauerman@br.ibm.com>
- * gdb.texinfo (Parameters In Python): New Node.
+ * gdb.texinfo (Parameters In Python): New Node.
2010-04-29 Mihail Zenkov <mihail.zenkov@gmail.com>
@code{n} in the file. This is only used when reading source files. It
is normally faster to define @code{CRLF_SOURCE_FILES} when possible.
-@item NORETURN
-If defined, this should be one or more tokens, such as @code{volatile},
-that can be used in both the declaration and definition of functions to
-indicate that they never return. The default is already set correctly
-if compiling with GCC. This will almost never need to be defined.
-
-@item ATTR_NORETURN
-If defined, this should be one or more tokens, such as
-@code{__attribute__ ((noreturn))}, that can be used in the declarations
-of functions to indicate that they never return. The default is already
-set correctly if compiling with GCC. This will almost never need to be
-defined.
-
@item lint
Define this to help placate @code{lint} in some situations.
/* Return EXCEPTION to the nearest containing catch_errors(). */
-NORETURN void
+void
throw_exception (struct gdb_exception exception)
{
struct thread_info *tp = NULL;
static char *last_message;
-NORETURN void
+void
deprecated_throw_reason (enum return_reason reason)
{
struct gdb_exception exception;
}
}
-NORETURN static void ATTR_NORETURN ATTRIBUTE_PRINTF (3, 0)
+static void ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 0)
throw_it (enum return_reason reason, enum errors error, const char *fmt,
va_list ap)
{
throw_exception (e);
}
-NORETURN void
+void
throw_verror (enum errors error, const char *fmt, va_list ap)
{
throw_it (RETURN_ERROR, error, fmt, ap);
}
-NORETURN void
+void
throw_vfatal (const char *fmt, va_list ap)
{
throw_it (RETURN_QUIT, GDB_NO_ERROR, fmt, ap);
}
-NORETURN void
+void
throw_error (enum errors error, const char *fmt, ...)
{
va_list args;
be a good thing or a dangerous thing.'' -- the Existential
Wombat. */
-extern NORETURN void throw_exception (struct gdb_exception exception) ATTR_NORETURN;
-extern NORETURN void throw_verror (enum errors, const char *fmt, va_list ap)
- ATTR_NORETURN ATTRIBUTE_PRINTF (2, 0);
-extern NORETURN void throw_vfatal (const char *fmt, va_list ap)
- ATTR_NORETURN ATTRIBUTE_PRINTF (1, 0);
-extern NORETURN void throw_error (enum errors error, const char *fmt,
- ...) ATTR_NORETURN ATTRIBUTE_PRINTF (2, 3);
+extern void throw_exception (struct gdb_exception exception) ATTRIBUTE_NORETURN;
+extern void throw_verror (enum errors, const char *fmt, va_list ap)
+ ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (2, 0);
+extern void throw_vfatal (const char *fmt, va_list ap)
+ ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 0);
+extern void throw_error (enum errors error, const char *fmt, ...)
+ ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (2, 3);
/* Instead of deprecated_throw_reason, code should use catch_exception
and throw_exception. */
-extern NORETURN void deprecated_throw_reason (enum return_reason reason) ATTR_NORETURN;
+extern void deprecated_throw_reason (enum return_reason reason)
+ ATTRIBUTE_NORETURN;
/* Call FUNC(UIOUT, FUNC_ARGS) but wrapped within an exception
handler. If an exception (enum return_reason) is thrown using
struct symbol *sym_class,
int *not_found_ptr);
-static NORETURN void cplusplus_error (const char *name,
- const char *fmt, ...)
- ATTR_NORETURN ATTRIBUTE_PRINTF (2, 3);
+static void cplusplus_error (const char *name, const char *fmt, ...)
+ ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (2, 3);
static int total_number_of_methods (struct type *type);
single quoted demangled C++ symbols as part of the completion
error. */
-static NORETURN void
+static void
cplusplus_error (const char *name, const char *fmt, ...)
{
struct ui_file *tmp_stream;
all hell to break loose--the rest of GDB will tend to get left in an
inconsistent state. */
-static NORETURN void
+static void ATTRIBUTE_NORETURN
mips_error (char *string,...)
{
va_list args;
static void gdb_os_evprintf_filtered (host_callback *, const char *, va_list);
-static void gdb_os_error (host_callback *, const char *, ...) ATTR_NORETURN;
+static void gdb_os_error (host_callback *, const char *, ...)
+ ATTRIBUTE_NORETURN;
static void gdbsim_kill (struct target_ops *);
static int nosymbol (char *, CORE_ADDR *);
-static void tcomplain (void) ATTR_NORETURN;
+static void tcomplain (void) ATTRIBUTE_NORETURN;
static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
extern void initialize_targets (void);
-extern NORETURN void noprocess (void) ATTR_NORETURN;
+extern void noprocess (void) ATTRIBUTE_NORETURN;
extern void target_require_runnable (void);
The first argument STRING is the error message, used as a fprintf string,
and the remaining args are passed as arguments to it. */
-NORETURN void
+void
verror (const char *string, va_list args)
{
throw_verror (GENERIC_ERROR, string, args);
}
-NORETURN void
+void
error (const char *string, ...)
{
va_list args;
The first argument STRING is the error message, used as a fprintf string,
and the remaining args are passed as arguments to it. */
-NORETURN void
+void
vfatal (const char *string, va_list args)
{
throw_vfatal (string, args);
}
-NORETURN void
+void
fatal (const char *string, ...)
{
va_list args;
va_end (args);
}
-NORETURN void
+void
error_stream (struct ui_file *stream)
{
char *message = ui_file_xstrdup (stream, NULL);
"internal-error", internal_problem_ask, internal_problem_ask
};
-NORETURN void
+void
internal_verror (const char *file, int line, const char *fmt, va_list ap)
{
internal_vproblem (&internal_error_problem, file, line, fmt, ap);
deprecated_throw_reason (RETURN_ERROR);
}
-NORETURN void
+void
internal_error (const char *file, int line, const char *string, ...)
{
va_list ap;
as the file name for which the error was encountered.
Then return to command level. */
-NORETURN void
+void
perror_with_name (const char *string)
{
char *err;
/* Called when a memory allocation fails, with the number of bytes of
memory requested in SIZE. */
-NORETURN void
+void
nomem (long size)
{
if (size > 0)
parsing. */
void gdb_xml_error (struct gdb_xml_parser *parser, const char *format, ...)
- ATTR_NORETURN ATTRIBUTE_PRINTF (2, 0);
+ ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (2, 0);
/* Parse an integer attribute into a ULONGEST. */