summaryrefslogtreecommitdiff
path: root/gdb/p-exp.y
diff options
context:
space:
mode:
authorPierre Muller <muller@ics.u-strasbg.fr>2010-05-08 09:18:01 +0000
committerPierre Muller <muller@ics.u-strasbg.fr>2010-05-08 09:18:01 +0000
commitdbf32a2538aa4c0c7cbd9efd1aee53e5d5235a23 (patch)
tree0faf54c5cdf117b3321119745f7f0aad9b8cbabb /gdb/p-exp.y
parent5eb195a478e3a37bce4a6a242d566526871057db (diff)
downloadgdb-dbf32a2538aa4c0c7cbd9efd1aee53e5d5235a23.tar.gz
* p-exp.y (exp : SIZEOF '(' exp ')'): New rule.
Diffstat (limited to 'gdb/p-exp.y')
-rw-r--r--gdb/p-exp.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index fce3fc79665..2aec487463c 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -525,6 +525,9 @@ exp : SIZEOF '(' type ')' %prec UNARY
write_exp_elt_opcode (OP_LONG); }
;
+exp : SIZEOF '(' exp ')' %prec UNARY
+ { write_exp_elt_opcode (UNOP_SIZEOF); }
+
exp : STRING
{ /* C strings are converted into array constants with
an explicit null byte added at the end. Thus