2004-06-10 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Thu, 10 Jun 2004 21:38:03 +0000 (21:38 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 10 Jun 2004 21:38:03 +0000 (21:38 +0000)
* lib/compiler.cc, lib/compiler.c: Append either
__GNUC_PATCHLEVEL__, or "unknown" to the compiler_info.
* gdb.base/structs.exp (test_struct_calls): Check for gcc-3-3-*
instead of gcc-3-3.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/structs.exp
gdb/testsuite/lib/compiler.c
gdb/testsuite/lib/compiler.cc

index 1698757b9f3d7c100ce3086d1c4324f4ea22c296..db5f0170ec3a8308ccf26c0667e6ab5f20497e8a 100644 (file)
@@ -1,3 +1,10 @@
+2004-06-10  Andrew Cagney  <cagney@gnu.org>
+
+       * lib/compiler.cc, lib/compiler.c: Append either
+       __GNUC_PATCHLEVEL__, or "unknown" to the compiler_info.
+       * gdb.base/structs.exp (test_struct_calls): Check for gcc-3-3-*
+       instead of gcc-3-3.
+
 2004-06-09  Andrew Cagney  <cagney@gnu.org>
 
        * gdb.base/structs.exp (test_struct_calls): Fix KFAIL for
index e1f256fee6e05c6dceaedbb331a67566e02c937b..84435df84f15a5a50153bc431a9990c3a0c8bfcb 100644 (file)
@@ -218,8 +218,8 @@ proc test_struct_calls { n } {
     set tests "call $n ${testfile}"
 
     # Call fun${n}, checking the printed return-value.
-    setup_compiler_kfails structs-tc-tll gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
-    setup_compiler_kfails structs-tc-td gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
+    setup_compiler_kfails structs-tc-tll gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
+    setup_compiler_kfails structs-tc-td gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
     gdb_test "p/c fun${n}()"  "[foo ${n}]" "p/c fun<n>(); ${tests}"
 
     # Check that GDB can always pass a structure to an inferior function.
@@ -230,8 +230,8 @@ proc test_struct_calls { n } {
     # examining that global to confirm that the value is as expected.
 
     gdb_test "call Fun${n}(foo${n})" "" "call Fun<n>(foo<n>); ${tests}"
-    setup_compiler_kfails structs-tc-tll gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
-    setup_compiler_kfails structs-tc-td gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
+    setup_compiler_kfails structs-tc-tll gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
+    setup_compiler_kfails structs-tc-td gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
     gdb_test "p/c L${n}" [foo ${n}] "p/c L<n>; ${tests}"
 }
 
index b1f1f5d5f6291f4a746fad2ea2d91f547eb6ee30..dbce43e8c03c80777c1ce02f102e31472dc584d1 100644 (file)
 set compiler_info ""
 
 #if defined (__GNUC__)
-set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
+#if defined (__GNUC_PATCHLEVEL__)
+/* Only GCC versions >= 3.0 define the __GNUC_PATCHLEVEL__ macro.  */
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__} -]
+#else
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ "unknown"} -]
+#endif
 set gcc_compiled __GNUC__
 #else
 set gcc_compiled 0
index 0c5eb663b969315d271493b54211841ba04fd0aa..8059e976b7549a7c45b1d184930c9bacf4670ba7 100644 (file)
 set compiler_info ""
 
 #if defined (__GNUC__)
-set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
+#if defined (__GNUC_PATCHLEVEL__)
+/* Only GCC versions >= 3.0 define the __GNUC_PATCHLEVEL__ macro.  */
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__} -]
+#else
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ "unknown"} -]
+#endif
 set gcc_compiled __GNUC__
 #else
 set gcc_compiled 0