aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2009-04-20 17:45:15 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2009-04-20 17:45:15 +0000
commita916d97fc0c647034e9330b00349ad8145bf3157 (patch)
treeacedc88c99992164ead5ec0d2e6eca33991eb7d7
parent77022fa8734fdd0b5ac892ba109b77e0ec7dd13b (diff)
downloadgcc-a916d97fc0c647034e9330b00349ad8145bf3157.zip
gcc-a916d97fc0c647034e9330b00349ad8145bf3157.tar.gz
gcc-a916d97fc0c647034e9330b00349ad8145bf3157.tar.bz2
cp-tree.h (base_access): Change typedef to int.
* cp-tree.h (base_access): Change typedef to int. * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR. (cp_parser_omp_threadprivate): Likewise. * pt.c (unify_pack_expansion): Add casts to enum type. From-SVN: r146448
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/cp-tree.h8
-rw-r--r--gcc/cp/parser.c4
-rw-r--r--gcc/cp/pt.c8
4 files changed, 20 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 259aa8e..dbbea2d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-20 Ian Lance Taylor <iant@google.com>
+
+ * cp-tree.h (base_access): Change typedef to int.
+ * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
+ (cp_parser_omp_threadprivate): Likewise.
+ * pt.c (unify_pack_expansion): Add casts to enum type.
+
2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/32061
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 6637d4f..c96e575 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3592,7 +3592,7 @@ enum tsubst_flags {
typedef int tsubst_flags_t;
/* The kind of checking we can do looking in a class hierarchy. */
-typedef enum base_access {
+enum base_access {
ba_any = 0, /* Do not check access, allow an ambiguous base,
prefer a non-virtual base */
ba_unique = 1 << 0, /* Must be a unique base. */
@@ -3600,7 +3600,11 @@ typedef enum base_access {
ba_check = ba_unique | ba_check_bit,
ba_ignore_scope = 1 << 2, /* Ignore access allowed by local scope. */
ba_quiet = 1 << 3 /* Do not issue error messages. */
-} base_access;
+};
+
+/* This type is used for parameters and variables which hold
+ combinations of the flags in enum base_access. */
+typedef int base_access;
/* The various kinds of access check during parsing. */
typedef enum deferring_kind {
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 3dba794..b640033 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -21043,7 +21043,7 @@ static void
cp_parser_omp_flush (cp_parser *parser, cp_token *pragma_tok)
{
if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN))
- (void) cp_parser_omp_var_list (parser, 0, NULL);
+ (void) cp_parser_omp_var_list (parser, OMP_CLAUSE_ERROR, NULL);
cp_parser_require_pragma_eol (parser, pragma_tok);
finish_omp_flush ();
@@ -21884,7 +21884,7 @@ cp_parser_omp_threadprivate (cp_parser *parser, cp_token *pragma_tok)
{
tree vars;
- vars = cp_parser_omp_var_list (parser, 0, NULL);
+ vars = cp_parser_omp_var_list (parser, OMP_CLAUSE_ERROR, NULL);
cp_parser_require_pragma_eol (parser, pragma_tok);
finish_omp_threadprivate (vars);
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 2fd6257..2ee3d18 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -13131,7 +13131,9 @@ unify_pack_expansion (tree tparms, tree targs, tree packed_parms,
match. */
if (resolve_overloaded_unification
- (tparms, targs, parm, arg, strict, sub_strict)
+ (tparms, targs, parm, arg,
+ (unification_kind_t) strict,
+ sub_strict)
!= 0)
return 1;
skip_arg_p = true;
@@ -13150,8 +13152,8 @@ unify_pack_expansion (tree tparms, tree targs, tree packed_parms,
if (!subr)
arg_strict |=
- maybe_adjust_types_for_deduction (strict, &parm, &arg,
- arg_expr);
+ maybe_adjust_types_for_deduction ((unification_kind_t) strict,
+ &parm, &arg, arg_expr);
}
if (!skip_arg_p)