aboutsummaryrefslogtreecommitdiff
path: root/gdb/p-exp.y
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2010-05-08 09:18:02 +0000
committerPierre Muller <muller@sourceware.org>2010-05-08 09:18:02 +0000
commit28e176a623b7c5ecbc792d52b46decfe92a81587 (patch)
tree777f3c480c65f57f7bc43463120ba124dd68ad1c /gdb/p-exp.y
parent48cb83fdd097716c0f21511e0e5b475bb1f2aa41 (diff)
downloadgdb-28e176a623b7c5ecbc792d52b46decfe92a81587.zip
gdb-28e176a623b7c5ecbc792d52b46decfe92a81587.tar.gz
gdb-28e176a623b7c5ecbc792d52b46decfe92a81587.tar.bz2
* 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 fce3fc7..2aec487 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