aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-06-19 19:49:42 +0000
committerTom Tromey <tromey@redhat.com>2012-06-19 19:49:42 +0000
commit95c391b64aafe6d8868a99dd476e6f110011dd2d (patch)
tree10fb350b0855dab2a352174353005d4775911086 /gdb/testsuite
parente910f0b61f40b0fcbbba3607dbe3e153f45e00d4 (diff)
downloadgdb-95c391b64aafe6d8868a99dd476e6f110011dd2d.zip
gdb-95c391b64aafe6d8868a99dd476e6f110011dd2d.tar.gz
gdb-95c391b64aafe6d8868a99dd476e6f110011dd2d.tar.bz2
PR exp/9514:
* parser-defs.h (insert_type, insert_type_address_space): Declare. (push_type_address_space): Remove. * parse.c (insert_into_type_stack): New function. (insert_type): Likewise. (insert_type_address_space): Rename from push_type_address_space. Insert tp_space_identifier. * c-exp.y (ptr_operator): New production. (abs_decl): Use ptr_operator. (space_identifier): Call insert_type_address_space. (ptype): Don't use const_or_volatile_or_space_identifier. (const_or_volatile_noopt): Call insert_type. (conversion_type_id, conversion_declarator): New productions. (operator): Use conversion_type_id. testsuite * gdb.base/whatis.exp: Add tests.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/whatis.exp14
2 files changed, 18 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 26e4ce0..f123984 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2012-06-19 Tom Tromey <tromey@redhat.com>
+ * gdb.base/whatis.exp: Add tests.
+
+2012-06-19 Tom Tromey <tromey@redhat.com>
+
* gdb.cp/m-static.cc (keepalive): New function.
(gnu_obj_1::method): Use it.
diff --git a/gdb/testsuite/gdb.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp
index 9198ef2..793bf0b 100644
--- a/gdb/testsuite/gdb.base/whatis.exp
+++ b/gdb/testsuite/gdb.base/whatis.exp
@@ -465,3 +465,17 @@ gdb_test "whatis char_addr" \
gdb_test "whatis a_char_addr" \
"type = char_addr" \
"whatis applied to variable defined by typedef"
+
+# Regression tests for PR 9514.
+
+gdb_test "whatis void (**)()" \
+ "type = void \\(\\*\\*\\)\\(\\)" \
+ "whatis applied to pointer to pointer to function"
+
+gdb_test "whatis void (** const)()" \
+ "type = void \\(\\*\\* const\\)\\(\\)" \
+ "whatis applied to const pointer to pointer to function"
+
+gdb_test "whatis void (* const *)()" \
+ "type = void \\(\\* const \\*\\)\\(\\)" \
+ "whatis applied to pointer to const pointer to function"