This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/branch??] Remove forward enum declaration in utils.h


This fixes an issue reported by Eli at:

These forward declarations are a GNU extension, and they trigger
a build warning when the compiler does not support it.


        * utils.h: #include "exceptions.h".
        (enum errors): Remove partial declaration.

Tested on x86_64-linux.  Checked in.

I am inclined to port this patch to the branch also, as I think
this issue is preventing non-GNU compilers from building GDB.
Any objections? If OK, I will create a PR, and provide a Wiki


 gdb/ChangeLog |    5 +++++
 gdb/utils.h   |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 13bdc3d..a51543b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2013-05-15  Joel Brobecker  <>
+	* utils.h: #include "exceptions.h".
+	(enum errors): Remove partial declaration.
+2013-05-15  Joel Brobecker  <>
 	* (core_xfer_shared_libraries_aix): New method.
 	* gdbarch.h, gdbarch.c: Regenerate.
 	* corelow.c (core_xfer_partial): Add TARGET_OBJECT_LIBRARIES_AIX
diff --git a/gdb/utils.h b/gdb/utils.h
index ad5bea4..71ce867 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -22,6 +22,7 @@
 #define UTILS_H
 #include "cleanups.h"
+#include "exceptions.h"
 extern void initialize_utils (void);
@@ -278,7 +279,6 @@ extern char *hex_string_custom (LONGEST, int);
 extern void fprintf_symbol_filtered (struct ui_file *, const char *,
 				     enum language, int);
-enum errors;
 extern void throw_perror_with_name (enum errors errcode, const char *string)
 extern void perror_with_name (const char *) ATTRIBUTE_NORETURN;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]