This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] ATTR_NORETURN on function variable
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 1 Aug 2004 19:56:09 +0200 (CEST)
- Subject: [PATCH] ATTR_NORETURN on function variable
For some reason I found myself hacking on a system with GCC 2.7.3.2.
The compiler complained about conflicting prototypes for
deprecated_error_hook. Seems that GCC 2.7 doesn't support the
attribute on function variables. Rather than trying to fix with more
#ifdef magic, I propose we simply remove ATTR_NORETURN from this
variable. The variable is deprecated and used only once, where
ATTR_NORETURN doesn't really matter.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* defs.h (deprecated_error_hook): Remove RETURN and ATTR_NORETURN
from declaration.
* top.c (deprecated_error_hook): Remove RETURN and ATTR_NORETURN
from definition.
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.154
diff -u -p -r1.154 defs.h
--- defs.h 30 Jul 2004 19:17:19 -0000 1.154
+++ defs.h 1 Aug 2004 17:51:26 -0000
@@ -1265,7 +1261,7 @@ extern void (*deprecated_call_command_ho
extern void (*deprecated_set_hook) (struct cmd_list_element * c);
-extern NORETURN void (*deprecated_error_hook) (void) ATTR_NORETURN;
+extern void (*deprecated_error_hook) (void);
extern void (*deprecated_error_begin_hook) (void);
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.91
diff -u -p -r1.91 top.c
--- top.c 26 Jul 2004 14:53:05 -0000 1.91
+++ top.c 1 Aug 2004 17:51:27 -0000
@@ -290,7 +290,7 @@ void (*deprecated_context_hook) (int id)
/* Takes control from error (). Typically used to prevent longjmps out of the
middle of the GUI. Usually used in conjunction with a catch routine. */
-NORETURN void (*deprecated_error_hook) (void) ATTR_NORETURN;
+void (*deprecated_error_hook) (void);
/* One should use catch_errors rather than manipulating these