This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Fix compilation with gcc-4.7.x
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 20 Dec 2011 20:44:10 +0100
- Subject: [patch] Fix compilation with gcc-4.7.x
Hi,
gcc (GCC) 4.7.0 20111220 (experimental)
(but not gcc-4.6.x)
currently:
exceptions.c: In function ‘throw_error’:
exceptions.c:448:1: error: ‘noreturn’ function does return [-Werror]
utils.c: In function ‘internal_error’:
utils.c:1051:1: error: ‘noreturn’ function does return [-Werror]
utils.c: In function ‘fatal’:
utils.c:834:1: error: ‘noreturn’ function does return [-Werror]
utils.c: In function ‘error’:
utils.c:814:1: error: ‘noreturn’ function does return [-Werror]
Probably obvious, I will check it in, maybe today.
Thanks,
Jan
gdb/
2011-12-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* exceptions.c (throw_error): Replace va_end call by a NOTREACHED
comment.
* utils.c (error, fatal, internal_error): Likewise.
--- a/gdb/exceptions.c
+++ b/gdb/exceptions.c
@@ -444,7 +444,7 @@ throw_error (enum errors error, const char *fmt, ...)
va_start (args, fmt);
throw_it (RETURN_ERROR, error, fmt, args);
- va_end (args);
+ /* NOTREACHED */
}
/* Call FUNC(UIOUT, FUNC_ARGS) but wrapped within an exception
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -810,7 +810,7 @@ error (const char *string, ...)
va_start (args, string);
throw_verror (GENERIC_ERROR, string, args);
- va_end (args);
+ /* NOTREACHED */
}
/* Print an error message and quit.
@@ -830,7 +830,7 @@ fatal (const char *string, ...)
va_start (args, string);
throw_vfatal (string, args);
- va_end (args);
+ /* NOTREACHED */
}
void
@@ -1047,7 +1047,7 @@ internal_error (const char *file, int line, const char *string, ...)
va_start (ap, string);
internal_verror (file, line, string, ap);
- va_end (ap);
+ /* NOTREACHED */
}
static struct internal_problem internal_warning_problem = {