New scope checking patch

Jim Blandy jimb@codesourcery.com
Thu Jan 17 20:15:00 GMT 2008


"Rob Quill" <rob.quill at gmail.com> writes:
> @@ -208,6 +208,8 @@
>  %token TRUEKEYWORD
>  %token FALSEKEYWORD
>  
> +/* $in_scope opperator */
> +%left IN_SCOPE
>  
>  %left ','
>  %left ABOVE_COMMA

Doesn't it work to treat $in_scope like sizeof, declared with %token?
$in_scope isn't really left-associative in any meaningful sense.

> +	  {
> +        write_exp_elt_longcst ((LONGEST) 1);
> +	  }

You should leave out the braces here, and in the 'else', since there's
only one statement.

Also, please be sure that the indentation follows the GNU coding
conventions.  Substatements should be indented by two spaces.
(c-exp.y is not a great place to look for examples, since it's a mess,
but look at, say, frame.c.)

>From looking at your patch as it arrived through my mailer, it seemed
that the code block for the new $in_scope grammar rule was not
indented in the same way as the other blocks.  These should all be
consistent.



More information about the Gdb-patches mailing list