aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/c/c-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/c/c-parser.c')
-rw-r--r--gcc-4.9/gcc/c/c-parser.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/gcc-4.9/gcc/c/c-parser.c b/gcc-4.9/gcc/c/c-parser.c
index 6eb235c5c..a51af2e30 100644
--- a/gcc-4.9/gcc/c/c-parser.c
+++ b/gcc-4.9/gcc/c/c-parser.c
@@ -1707,14 +1707,10 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok,
" initializer");
init = convert_lvalue_to_rvalue (init_loc, init, true, true);
tree init_type = TREE_TYPE (init.value);
- /* As with typeof, remove _Atomic and const
- qualifiers from atomic types. */
+ /* As with typeof, remove all qualifiers from atomic types. */
if (init_type != error_mark_node && TYPE_ATOMIC (init_type))
init_type
- = c_build_qualified_type (init_type,
- (TYPE_QUALS (init_type)
- & ~(TYPE_QUAL_ATOMIC
- | TYPE_QUAL_CONST)));
+ = c_build_qualified_type (init_type, TYPE_UNQUALIFIED);
bool vm_type = variably_modified_type_p (init_type,
NULL_TREE);
if (vm_type)
@@ -3011,16 +3007,11 @@ c_parser_typeof_specifier (c_parser *parser)
if (was_vm)
ret.expr = c_fully_fold (expr.value, false, &ret.expr_const_operands);
pop_maybe_used (was_vm);
- /* For use in macros such as those in <stdatomic.h>, remove
- _Atomic and const qualifiers from atomic types. (Possibly
- all qualifiers should be removed; const can be an issue for
- more macros using typeof than just the <stdatomic.h>
- ones.) */
+ /* For use in macros such as those in <stdatomic.h>, remove all
+ qualifiers from atomic types. (const can be an issue for more macros
+ using typeof than just the <stdatomic.h> ones.) */
if (ret.spec != error_mark_node && TYPE_ATOMIC (ret.spec))
- ret.spec = c_build_qualified_type (ret.spec,
- (TYPE_QUALS (ret.spec)
- & ~(TYPE_QUAL_ATOMIC
- | TYPE_QUAL_CONST)));
+ ret.spec = c_build_qualified_type (ret.spec, TYPE_UNQUALIFIED);
}
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>");
return ret;
@@ -11881,8 +11872,17 @@ c_parser_omp_for_loop (location_t loc, c_parser *parser, enum tree_code code,
tree l = build_omp_clause (OMP_CLAUSE_LOCATION (*c),
OMP_CLAUSE_LASTPRIVATE);
OMP_CLAUSE_DECL (l) = OMP_CLAUSE_DECL (*c);
- OMP_CLAUSE_CHAIN (l) = clauses;
- clauses = l;
+ if (code == OMP_SIMD)
+ {
+ OMP_CLAUSE_CHAIN (l)
+ = cclauses[C_OMP_CLAUSE_SPLIT_FOR];
+ cclauses[C_OMP_CLAUSE_SPLIT_FOR] = l;
+ }
+ else
+ {
+ OMP_CLAUSE_CHAIN (l) = clauses;
+ clauses = l;
+ }
OMP_CLAUSE_SET_CODE (*c, OMP_CLAUSE_SHARED);
}
}
@@ -14064,7 +14064,7 @@ c_parser_array_notation (location_t loc, c_parser *parser, tree initial_index,
tree value_tree = NULL_TREE, type = NULL_TREE, array_type = NULL_TREE;
tree array_type_domain = NULL_TREE;
- if (array_value == error_mark_node)
+ if (array_value == error_mark_node || initial_index == error_mark_node)
{
/* No need to continue. If either of these 2 were true, then an error
must be emitted already. Thus, no need to emit them twice. */