[EMAIL PROTECTED] writes:

> All around in glr.c are lines with multiple vars on one line.
> It can be considered to use one var on one line because (from
> experience) some compiler warnings possibly are not detected
> when multiple vars are on one single line. Its compiler issue.

I haven't run into this problem.  Is it a serious one?  If not,
let's leave things alone.  The GNU coding standards allow you
to say things like "int foo, bar;".

> For example: ...
> static int
> yypreference (yySemanticOption* y0, yySemanticOption* y1)
> {
>   yyRuleNum r0 = y0->yyrule, r1 = y1->yyrule;
>   int p0 = yydprec[r0], p1 = yydprec[r1];
>
> To be changed into: ...
> static int
> yypreference (yySemanticOption* y0, yySemanticOption* y1)
> {
>   yyRuleNum r0 = y0->yyrule;  <--------
>   yyRuleNum r1 = y1->yyrule;  <--------
>   int p0 = yydprec[r0];       <--------
>   int p1 = yydprec[r1];       <--------
>
> Adding the missing '{' '}' possibly improves compiler optimizing.

I don't understand the last comment.  There aren't any missing braces
here.  And I wouldn't expect the revised version to be easier for a
compiler to optimize.

I do prefer the second form myself -- it's easier for me to see the
parallel forms in the code, and to catch coding errors -- but this is
mainly a style issue, and a minor one at that, and I'd rather defer to
Paul Hilfinger's stylistic sense here.


Reply via email to