diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index d98cfddd60f..98292753a3b 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -465,7 +465,8 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer, cp_token *token) else if (token->type == CPP_PRAGMA) { /* We smuggled the cpp_token->u.pragma value in an INTEGER_CST. */ - token->pragma_kind = TREE_INT_CST_LOW (token->u.value); + token->pragma_kind = ((enum pragma_kind) + TREE_INT_CST_LOW (token->u.value)); token->u.value = NULL_TREE; } } @@ -1187,7 +1188,7 @@ function_declarator_p (const cp_declarator *declarator) /* Flags that are passed to some parsing functions. These values can be bitwise-ored together. */ -typedef enum cp_parser_flags +enum cp_parser_flags { /* No flags. */ CP_PARSER_FLAGS_NONE = 0x0, @@ -1196,7 +1197,11 @@ typedef enum cp_parser_flags CP_PARSER_FLAGS_OPTIONAL = 0x1, /* When parsing a type-specifier, do not allow user-defined types. */ CP_PARSER_FLAGS_NO_USER_DEFINED_TYPES = 0x2 -} cp_parser_flags; +}; + +/* This type is used for parameters and variables which hold + combinations of the flags in enum cp_parser_flags. */ +typedef int cp_parser_flags; /* The different kinds of declarators we want to parse. */ @@ -1268,7 +1273,7 @@ typedef struct cp_parser_expression_stack_entry /* Tree code for the binary operation we are parsing. */ enum tree_code tree_type; /* Precedence of the binary operation we are parsing. */ - int prec; + enum cp_parser_prec prec; } cp_parser_expression_stack_entry; /* The stack for storing partial expressions. We only need NUM_PREC_VALUES |