aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-12-16 14:03:58 +0000
committerDaniel Jacobowitz <drow@false.org>2003-12-16 14:03:58 +0000
commit265c8f45d5034e73e065959d00d3a563a0597adf (patch)
tree8fdfd3697b92377f6f41cfdef58c3b9b952069e3 /gdb
parent8da52b50a8fc289c1ca850369922d23f225121ae (diff)
downloadgdb-265c8f45d5034e73e065959d00d3a563a0597adf.zip
gdb-265c8f45d5034e73e065959d00d3a563a0597adf.tar.gz
gdb-265c8f45d5034e73e065959d00d3a563a0597adf.tar.bz2
2003-12-16 Daniel Jacobowitz <drow@mvista.com>
* cp-names.y (function_arglist): Call d_qualify. (ptr_operator_seq): Reverse the list. (decl1b): Add the declarator-id.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog.cplus6
-rw-r--r--gdb/cp-names.y25
2 files changed, 19 insertions, 12 deletions
diff --git a/gdb/ChangeLog.cplus b/gdb/ChangeLog.cplus
index b9b4063..aab1a6e 100644
--- a/gdb/ChangeLog.cplus
+++ b/gdb/ChangeLog.cplus
@@ -1,3 +1,9 @@
+2003-12-16 Daniel Jacobowitz <drow@mvista.com>
+
+ * cp-names.y (function_arglist): Call d_qualify.
+ (ptr_operator_seq): Reverse the list.
+ (decl1b): Add the declarator-id.
+
2003-12-14 Daniel Jacobowitz <drow@mvista.com>
* Makefile.in: Add cp-names.y.
diff --git a/gdb/cp-names.y b/gdb/cp-names.y
index 3a85d17..5cf08b9 100644
--- a/gdb/cp-names.y
+++ b/gdb/cp-names.y
@@ -434,11 +434,12 @@ function_args : type
}
;
-/*FIXME d_qualify */
function_arglist: '(' function_args ')' qualifiers_opt
- { $$ = d_make_comp (di, D_COMP_FUNCTION_TYPE, NULL, $2.comp); }
+ { $$ = d_make_comp (di, D_COMP_FUNCTION_TYPE, NULL, $2.comp);
+ $$ = d_qualify ($$, $4, 1); }
| '(' ')' qualifiers_opt
- { $$ = d_make_comp (di, D_COMP_FUNCTION_TYPE, NULL, NULL); }
+ { $$ = d_make_comp (di, D_COMP_FUNCTION_TYPE, NULL, NULL);
+ $$ = d_qualify ($$, $3, 1); }
;
/*
@@ -457,6 +458,7 @@ typed_function : type base_function
;
*/
+/* FIXME actions all wrong */
qualified : ext_name function_arglist
{}
| type1a ext_name function_arglist
@@ -601,10 +603,10 @@ ptr_operator : ptr_operator_1
;
ptr_operator_seq: ptr_operator
- | ptr_operator ptr_operator_seq
- { $$.comp = $2.comp;
- $$.last = $1.last;
- *$2.last = $1.comp; }
+ | ptr_operator_seq ptr_operator
+ { $$.comp = $1.comp;
+ $$.last = $2.last;
+ *$1.last = $2.comp; }
;
/* "type1" are the type productions which can legally be followed by a ::
@@ -657,13 +659,12 @@ type1b : ext_name '(' ptr_operator_seq ')' '(' function_args ')'
*$3.last = funtype; }
;
-/* FIXME ACTION */
-/* FIXME when I add the name here I get a conflict on ptr-to-members that I don't see a soln for */
-decl1b : ext_name '(' ptr_operator_seq ')' '(' function_args ')'
+/* FIXME ACTION is quite wrong; need a new type for identifiers? */
+decl1b : ext_name '(' ptr_operator_seq ext_name '(' function_args ')' ')'
{ struct d_comp *funtype;
funtype = d_make_comp (di, D_COMP_FUNCTION_TYPE, $1, $6.comp);
- $$ = $3.comp;
- *$3.last = funtype; }
+ *$3.last = funtype;
+ $$ = d_make_comp (di, D_COMP_TYPED_NAME, $4, $3.comp); }
/*
| COLONCOLON ext_name '(' ptr_operator_seq ')' '(' function_args ')'