This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

Fixes for GCC 3.0 in gdb



The next release of GCC will be 3.0.  In gdb we do check for the GCC
version number in a few places - but not everywhere correctly.  I'm
appending a patch to fix the few problems and ask for inclusion in
the development *and* release branches.

Andreas

2000-04-28  Andreas Jaeger  <aj@suse.de>

	* defs.h: Properly check for GCC version number.

For the testsuite:

2000-04-28  Andreas Jaeger  <aj@suse.de>

	* gdb.c++/templates.cc: Properly check for GCC version number.
	* lib/compiler.cc: Likewise

Index: gdb/defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.15
diff -u -r1.15 defs.h
--- defs.h	2000/04/21 04:10:18	1.15
+++ defs.h	2000/04/28 08:15:49
@@ -253,7 +253,7 @@
    works everywhere we use it. */
 
 #ifndef ATTR_NORETURN
-#if defined(__GNUC__) && __GNUC__ >= 2 && __GNUC_MINOR__ >= 7
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
 #define ATTR_NORETURN __attribute__ ((noreturn))
 #else
 #define ATTR_NORETURN		/* nothing */
@@ -261,7 +261,7 @@
 #endif
 
 #ifndef ATTR_FORMAT
-#if defined(__GNUC__) && __GNUC__ >= 2 && __GNUC_MINOR__ >= 4
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 4))
 #define ATTR_FORMAT(type, x, y) __attribute__ ((format(type, x, y)))
 #else
 #define ATTR_FORMAT(type, x, y)	/* nothing */
Index: gdb/testsuite/gdb.c++/templates.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/templates.cc,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 templates.cc
--- templates.cc	1999/08/02 23:46:56	1.1.1.3
+++ templates.cc	2000/04/28 08:15:49
@@ -523,7 +523,7 @@
 };
 T5<x> t5x(5);
 
-#if !defined(__GNUC__) || (__GNUC__ >= 2 && __GNUC_MINOR__ >= 6)
+#if !defined(__GNUC__) || (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)
 template class T5<char>;
 template class T5<int>;
 template class T5<int (*)(char, void *)>;
Index: gdb/testsuite/lib/compiler.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/compiler.cc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 compiler.cc
--- compiler.cc	1999/11/17 02:30:41	1.1.1.1
+++ compiler.cc	2000/04/28 08:15:49
@@ -13,7 +13,7 @@
    definition made with 'set" to see if one already exists, and if so
    warn about conflicts if it is being set to something else.  */
 
-#if defined(__GNUC__) && __GNUC__ >= 2 && __GNUC_MINOR__ >= 6
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
 set supports_template_debugging 1
 #else
 set supports_template_debugging 0

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

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