This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
GCC 3.0 c-parse.y typo?
- To: <gcc-bugs at gcc dot gnu dot org>
- Subject: GCC 3.0 c-parse.y typo?
- From: "Gwang Sik Yoon" <yoon at macroimpact dot com>
- Date: Fri, 3 Aug 2001 17:45:26 +0900
...
pushlevel: /* empty */
{ pushlevel (0);
clear_last_expr ();
add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0);
}
;
poplevel: /* empty */
{ $$ = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); }
/* Start and end blocks created for the new scopes of C99. */
c99_block_start: /* empty */
....
| error compstmt
;
compstmt_start: '{' { compstmt_count++;
$$ = c_begin_compound_stmt (); }
compstmt_nostart: '}'
...
compstmt_primary_start:
'(' '{'
{ if (current_function_decl == 0)
{
error ("braced-group within expression allowed only inside a function");
YYERROR;
}
/* We must force a BLOCK for this level
so that, if it is not expanded later,
there is a way to turn off the entire subtree of blocks
that are contained in it. */
keep_next_level ();
push_label_level ();
compstmt_count++;
$$ = add_stmt (build_stmt (COMPOUND_STMT, last_tree));
}
compstmt: compstmt_start compstmt_nostart
...
---- cut here ----
poplevel, compstmet_start, compstmt_primary_start are missing ';'s.
Though it doesn't make any difference for my yacc, it may cause
troubles somewhere.
anyway, rules are rules.. aren't they? :)