From: Pierre Muller Date: Sat, 8 May 2010 09:18:02 +0000 (+0000) Subject: * p-exp.y (exp : SIZEOF '(' exp ')'): New rule. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=28e176a623b7c5ecbc792d52b46decfe92a81587;p=binutils-gdb.git * p-exp.y (exp : SIZEOF '(' exp ')'): New rule. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 64211b69d74..35f823cabf3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-05-08 Pierre Muller + + * p-exp.y (exp : SIZEOF '(' exp ')'): New rule. + 2010-05-08 Jan Kratochvil * dwarf2read.c (typename_concat): Use (char *) NULL terminated stdarg 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