From 7d4187854f0cac9bfc0efbc105cf61a18420612b Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 1 May 2000 05:45:36 +0000 Subject: [PATCH] From 2000-04-28 Andreas Jaeger : Properly check for GCC version number. --- gdb/ChangeLog | 5 +++++ gdb/defs.h | 4 ++-- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.c++/templates.cc | 2 +- gdb/testsuite/lib/compiler.cc | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 463d9c1f25a..948baf679a8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Mon May 1 15:37:58 2000 Andrew Cagney + + From 2000-04-28 Andreas Jaeger : + * defs.h: Properly check for GCC version number. + 2000-04-30 Mark Kettenis Fix single-stepping out of signal trampolines. diff --git a/gdb/defs.h b/gdb/defs.h index ff23f609d8d..9e6218ac47b 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -253,7 +253,7 @@ struct cleanup 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 @@ struct cleanup #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 */ diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6423ee20b3d..2d7aaf6afe6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +Mon May 1 15:37:58 2000 Andrew Cagney + + From 2000-04-28 Andreas Jaeger : + * gdb.c++/templates.cc: Properly check for GCC version number. + * lib/compiler.cc: Likewise + 2000-04-26 Michael Snyder * gdb.base/call-ar-st.exp: Bail out if target is sparclet. diff --git a/gdb/testsuite/gdb.c++/templates.cc b/gdb/testsuite/gdb.c++/templates.cc index e1d6810930d..1ef0100438f 100644 --- a/gdb/testsuite/gdb.c++/templates.cc +++ b/gdb/testsuite/gdb.c++/templates.cc @@ -523,7 +523,7 @@ public: }; T5 t5x(5); -#if !defined(__GNUC__) || (__GNUC__ >= 2 && __GNUC_MINOR__ >= 6) +#if !defined(__GNUC__) || (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6) template class T5; template class T5; template class T5; diff --git a/gdb/testsuite/lib/compiler.cc b/gdb/testsuite/lib/compiler.cc index aa35c7510ff..5cb00f6685a 100644 --- a/gdb/testsuite/lib/compiler.cc +++ b/gdb/testsuite/lib/compiler.cc @@ -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 -- 2.30.2