From 28e176a623b7c5ecbc792d52b46decfe92a81587 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Sat, 8 May 2010 09:18:02 +0000 Subject: * p-exp.y (exp : SIZEOF '(' exp ')'): New rule. --- gdb/p-exp.y | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/p-exp.y') diff --git a/gdb/p-exp.y b/gdb/p-exp.y index fce3fc7966..2aec487463 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 -- cgit v1.2.3