mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-26 16:51:01 +08:00
parser.c (cp_parser_expression_stack): Clarify why it is an array of NUM_PREC_VALUES elements.
2004-09-24 Paolo Bonzini <bonzini@gnu.org> * parser.c (cp_parser_expression_stack): Clarify why it is an array of NUM_PREC_VALUES elements. (cp_parser_binary_expression): Clarify why we do not need to handle stack overflow. From-SVN: r88042
This commit is contained in:
parent
55e74277ea
commit
43c2a69adf
@ -1,3 +1,10 @@
|
||||
2004-09-24 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* parser.c (cp_parser_expression_stack): Clarify why it is
|
||||
an array of NUM_PREC_VALUES elements.
|
||||
(cp_parser_binary_expression): Clarify why we do not need to
|
||||
handle stack overflow.
|
||||
|
||||
2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
PR c++/16889
|
||||
|
@ -1106,6 +1106,9 @@ typedef struct cp_parser_expression_stack_entry
|
||||
int prec;
|
||||
} cp_parser_expression_stack_entry;
|
||||
|
||||
/* The stack for storing partial expressions. We only need NUM_PREC_VALUES
|
||||
entries because precedence levels on the stack are monotonically
|
||||
increasing. */
|
||||
typedef struct cp_parser_expression_stack_entry
|
||||
cp_parser_expression_stack[NUM_PREC_VALUES];
|
||||
|
||||
@ -5356,7 +5359,9 @@ cp_parser_binary_expression (cp_parser* parser)
|
||||
if (lookahead_prec > new_prec)
|
||||
{
|
||||
/* ... and prepare to parse the RHS of the new, higher priority
|
||||
expression. */
|
||||
expression. Since precedence levels on the stack are
|
||||
monotonically increasing, we do not have to care about
|
||||
stack overflows. */
|
||||
sp->prec = prec;
|
||||
sp->tree_type = tree_type;
|
||||
sp->lhs = lhs;
|
||||
|
Loading…
x
Reference in New Issue
Block a user