Allow gather loads to be used for grouped accesses
[official-gcc.git] / gcc / c / ChangeLog
blob95404fb5f54d87a17bca87b30ceeae14ba0dae9a
1 2018-01-13  Jakub Jelinek  <jakub@redhat.com>
3         PR c/83801
4         * c-tree.h (decl_constant_value_1): Add a bool argument.
5         * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
6         returning a CONSTRUCTOR if it is true.  Use error_operand_p.
7         (decl_constant_value): Adjust caller.
8         * c-fold.c (c_fully_fold_internal): If in_init, pass true to
9         decl_constant_value_1 as IN_INIT.  Otherwise, punt if
10         decl_constant_value returns initializer that has BLKmode or
11         array type.
12         (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
14 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
15             Alan Hayward  <alan.hayward@arm.com>
16             David Sherwood  <david.sherwood@arm.com>
18         * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
19         TYPE_VECTOR_SUBPARTS.
21 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23         Update copyright years.
25 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
27         PR c/83595
28         * c-parser.c (c_parser_braced_init, c_parser_initelt,
29         c_parser_conditional_expression, c_parser_cast_expression,
30         c_parser_sizeof_expression, c_parser_alignof_expression,
31         c_parser_postfix_expression, c_parser_omp_declare_reduction,
32         c_parser_transaction_expression): Use set_error () method instead
33         of setting value member to error_mark_node.
35 2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
37         * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
38         and _Float<N>X built-in functions.
40 2017-12-22  Jakub Jelinek  <jakub@redhat.com>
42         PR debug/83550
43         * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
44         TYPE_STUB_DECL and call rest_of_type_compilation before processing
45         incomplete vars rather than after it.
47         PR debug/83547
48         * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
49         indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
50         and consider empty ones if there are no other stmts.  For
51         -Wunused-value walk all statements before the one only followed by
52         DEBUG_BEGIN_STMTs.
54 2017-12-22  Mike Stump  <mikestump@comcast.net>
55             Eric Botcazou  <ebotcazou@adacore.com>
57         * c-parser.c (c_parser_while_statement): Add unroll parameter and
58         build ANNOTATE_EXPR if present.  Add 3rd operand to ANNOTATE_EXPR.
59         (c_parser_do_statement): Likewise.
60         (c_parser_for_statement): Likewise.
61         (c_parser_statement_after_labels): Adjust calls to above.
62         (c_parse_pragma_ivdep): New static function.
63         (c_parser_pragma_unroll): Likewise.
64         (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
65         <PRAGMA_UNROLL>: New case.
67 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
69         * c-typeck.c (comptypes_internal, function_types_compatible_p,
70         perform_integral_promotions, digest_init): Replace Yoda conditions
71         with typical order conditions.
72         * c-decl.c (check_bitfield_type_and_width): Likewise.
74 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
76         * c-typeck.c (c_safe_arg_type_equiv_p,
77         c_safe_function_type_cast_p): New function.
78         (build_c_cast): Implement -Wcast-function-type.
80 2017-12-14  Richard Biener  <rguenther@suse.de>
82         PR c/83415
83         * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
84         like REALPART_EXPR for the behavior of whether its operand
85         is an lvalue.
87 2017-12-12  Marek Polacek  <polacek@redhat.com>
89         PR c/82679
90         * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
92 2017-12-12  Alexandre Oliva <aoliva@redhat.com>
94         * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
95         * c-parser.c (add_debug_begin_stmt): New.
96         (c_parser_declaration_or_fndef): Call it.
97         (c_parser_compound_statement_nostart): Likewise.
98         (c_parser_statement_after_labels): Likewise.
99         * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
101 2017-12-07  Joseph Myers  <joseph@codesourcery.com>
103         * c-decl.c (build_compound_literal): Add parameter alignas_align
104         and set alignment of decl if nonzero.
105         * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
106         (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
107         qualifier.
108         (c_parser_struct_declaration): Update syntax comment.
109         (c_parser_type_name): Add alignas_ok argument and pass it to
110         c_parser_declspecs.
111         (c_parser_cast_expression): Pass true to c_parser_type_name and
112         give error if a cast used an _Alignas specifier.
113         (c_parser_sizeof_expression): Pass true to c_parser_type_name and
114         give error if sizeof (type-name) used an _Alignas specifier.
115         (c_parser_alignof_expression): Pass true to c_parser_type_name and
116         give error if _Alignof (type-name) used an _Alignas specifier.
117         (c_parser_postfix_expression_after_paren_type): Check specified
118         alignment for a compound literal and pass it to
119         build_compound_literal.
120         * c-parser.h (c_parser_type_name): Update prototype.
121         * c-tree.h (build_compound_literal): Update prototype.
123 2017-12-07  Martin Sebor  <msebor@redhat.com>
125         PR c/81544
126         * c-decl.c (c_decl_attributes): Look up existing declaration and
127         pass it to decl_attributes.
129 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
131         PR c/83236
132         * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
133         reserved for use by the implementation.
135 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
137         * c-decl.c: Include "c-family/c-spellcheck.h".
139 2017-12-05  Martin Liska  <mliska@suse.cz>
140             Jakub Jelinek  <jakub@redhat.com>
142         * c-typeck.c (pointer_diff): Add new argument and instrument
143         pointer subtraction.
144         (build_binary_op): Similar for pointer comparison.
146 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
148         PR c/79153
149         * c-parser.c: Include tree-iterator.h.
150         (c_parser_switch_statement): Emit LABEL_EXPR for the break label
151         into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
152         on it.
154         PR c/83222
155         * c-tree.h (decl_constant_value_1): Declare.
156         * c-typeck.c (decl_constant_value_1): New function.
157         (decl_constant_value): Use it.
158         * c-fold.c (c_fully_fold_internal): If in_init, use
159         decl_constant_value_1 instead of decl_constant_value.
161 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
163         * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
165 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
167         PR sanitizer/81275
168         * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
169         c_switch_covers_all_cases_p returns true.
171 2017-11-28  Julia Koval  <julia.koval@intel.com>
172             Sebastian Peryt  <sebastian.peryt@intel.com>
174         * Make-lang.in (c/c-array-notation.o): Remove.
175         * c-array-notation.c: Delete.
176         * c-decl.c: Remove cilkplus condition.
177         * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
178         c_parser_cilk_verify_simd, c_parser_array_notation,
179         c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
180         c_parser_cilk_simd_fn_vector_attrs,
181         c_finish_cilk_simd_fn_tokens): Delete.
182         (c_parser_declaration_or_fndef): Remove cilkplus condition.
183         (c_parser_direct_declarator_inner): Ditto.
184         (CILK_SIMD_FN_CLAUSE_MASK): Delete.
185         (c_parser_attributes, c_parser_compound_statement,
186         c_parser_statement_after_labels, c_parser_if_statement,
187         c_parser_switch_statement, c_parser_while_statement,
188         c_parser_do_statement, c_parser_for_statement,
189         c_parser_unary_expression, c_parser_postfix_expression,
190         c_parser_postfix_expression_after_primary,
191         c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
192         c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
193         support.
194         * c-typeck.c (build_array_ref, build_function_call_vec,
195         convert_arguments,
196         lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
197         c_finish_loop, build_binary_op): Remove cilkplus support.
199 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
201         * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
202         of build3.
204 2017-11-14 Boris Kolpackov  <boris@codesynthesis.com>
206         * Make-lang.in (c.install-plugin): Install backend import library.
208 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
210         * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
211         pragma_stmt context.
213 2017-11-23  Mike Stump  <mikestump@comcast.net>
214             Eric Botcazou  <ebotcazou@adacore.com>
216         * c-parser.c (c_parser_while_statement): Pass 3rd operand to
217         ANNOTATE_EXPR.
218         (c_parser_do_statement): Likewise.
219         (c_parser_for_statement): Likewise.
221 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
223         PR c++/62170
224         * c-objc-common.c (c_tree_printer): Convert penultimate param from
225         bool to bool *.  Within '%T' handling, if showing an "aka", use
226         "quoted" param to add appropriate quoting.
228 2017-11-22  Marek Polacek  <polacek@redhat.com>
230         PR c++/60336
231         PR middle-end/67239
232         PR target/68355
233         * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
235 2017-11-21  David Malcolm  <dmalcolm@redhat.com>
237         PR c/83056
238         * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
239         earlier failed lookups.
241 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
243         * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
244         * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
246 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
248         PR c/81404
249         * c-decl.c: Include "c-family/known-headers.h".
250         (get_c_name_hint): Rename to get_stdlib_header_for_name and move
251         to known-headers.cc.
252         (class suggest_missing_header): Move to known-header.h.
253         (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
254         than get_c_name_hint.
256 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
258         * c-decl.c (get_c_name_hint): New function.
259         (class suggest_missing_header): New class.
260         (lookup_name_fuzzy): Call get_c_name_hint and use it to
261         suggest missing headers to the user.
263 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
265         * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
266         Include "c-family/name-hint.h"
267         (implicit_decl_warning): Convert "hint" from
268         const char * to name_hint.  Pass location to
269         lookup_name_fuzzy.  Suppress any deferred diagnostic if the
270         warning was not printed.
271         (undeclared_variable): Likewise for "guessed_id".
272         (lookup_name_fuzzy): Convert return type from const char *
273         to name_hint.  Add location_t param.
274         * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
275         Include "c-family/name-hint.h"
276         (c_parser_declaration_or_fndef): Convert "hint" from
277         const char * to name_hint.  Pass location to lookup_name_fuzzy.
278         (c_parser_parameter_declaration): Likewise.
280 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
282         PR c/66618
283         PR c/69960
284         * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
285         where needed.
286         * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
287         handle_omp_array_sections): Likewise.
288         (digest_init): Don't call decl_constant_value_for_optimization.
289         * c-tree.h (decl_constant_value_for_optimization): Removed.
290         * c-fold.c (c_fold_array_ref): New function.
291         (c_fully_fold_internal): Add LVAL argument, propagate it through
292         recursive calls.  For VAR_P call decl_constant_value and
293         unshare if not LVAL and either optimizing or IN_INIT.  Remove
294         decl_constant_value_for_optimization calls.  If IN_INIT and not LVAL,
295         fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
296         (c_fully_fold): Add LVAL argument, pass it through to
297         c_fully_fold_internal.
298         (decl_constant_value_for_optimization): Removed.
300 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
302         PR c/81156
303         * c-parser.c (check_tgmath_function): New function.
304         (enum tgmath_parm_kind): New enum.
305         (c_parser_postfix_expression): Handle __builtin_tgmath.
307 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
309         * c-decl.c (implicit_decl_warning): Update for renaming of
310         pedwarn_at_rich_loc and warning_at_rich_loc.
311         (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
312         (undeclared_variable): Likewise for renaming of error_at_rich_loc.
313         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
314         (c_parser_struct_or_union_specifier): Likewise for renaming of
315         pedwarn_at_rich_loc.
316         (c_parser_parameter_declaration): Likewise for renaming of
317         error_at_rich_loc.
318         * c-typeck.c (build_component_ref): Likewise.
319         (build_unary_op): Likewise for renaming of inform_at_rich_loc.
320         (pop_init_level): Likewise for renaming of warning_at_rich_loc.
321         (set_init_label): Likewise for renaming of error_at_rich_loc.
323 2017-10-30  Richard Biener  <rguenther@suse.de>
325         * gimple-parser.c (c_parser_gimple_statement): Parse conditional
326         stmts.
328 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
330         * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
331         fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
333 2017-10-25  David Malcolm  <dmalcolm@redhat.com>
335         PR c/7356
336         * c-parser.c (c_parser_declaration_or_fndef): Detect missing
337         semicolons.
339 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
341         PR libstdc++/81706
342         * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
343         newdecl to corresponding __builtin_ if any.
345 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
347         PR c++/82466
348         * c-decl.c (diagnose_mismatched_decls): Use
349         OPT_Wbuiltin_declaration_mismatch.
351 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
353         * c-parser.c (c_parser_require): Add "type_is_unique" param and
354         use it to guard calls to maybe_suggest_missing_token_insertion.
355         (c_parser_parms_list_declarator): Override default value of new
356         "type_is_unique" param to c_parser_require.
357         (c_parser_asm_statement): Likewise.
358         * c-parser.h (c_parser_require): Add "type_is_unique" param,
359         defaulting to true.
361 2017-10-11  Nathan Sidwell  <nathan@acm.org>
363         * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
365 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
367         * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
368         operating on trees as wide_ints.
369         * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
370         (c_tree_equal): Likewise.
372 2017-10-04  David Malcolm  <dmalcolm@redhat.com>
374         * c-decl.c (push_parm_decl): Store c_parm's location into the
375         PARAM_DECL.
376         (build_c_parm): Add "loc" param and store it within the c_parm.
377         * c-parser.c (struct c_parser): Add "last_token_location" field.
378         (c_parser_consume_token): Store location of the token into the
379         new field.
380         (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
381         when handling a FUNCTION_DECL, if it doesn't already have them.
382         (c_parser_parameter_declaration): Generate a location for the
383         parameter, and pass it to the call to build_c_parm.
384         * c-tree.h (struct c_parm): Add field "loc".
385         (build_c_parm): Add location_t param.
386         * c-typeck.c (get_fndecl_argument_location): New function.
387         (inform_for_arg): New function.
388         (convert_for_assignment): Use inform_for_arg when dealing with
389         ic_argpass.
391 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
393         * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
394         width is non-NULL.
395         (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
396         don't SET_DECL_C_BIT_FIELD here.
398         PR c/82340
399         * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
400         instead of trying to set just TREE_READONLY manually.
402 2017-09-16  Tom de Vries  <tom@codesourcery.com>
404         PR c/81875
405         * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
406         cond itself.
408 2017-09-15  Joseph Myers  <joseph@codesourcery.com>
410         PR c/82071
411         * c-typeck.c (ep_convert_and_check): Just call convert_and_check
412         for C11.
413         (build_conditional_expr): For C11, generate result with excess
414         precision when one argument is an integer and the other is of a
415         type using excess precision.
417 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
419         * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
421 2017-09-13  Marek Polacek  <polacek@redhat.com>
423         PR c/82167
424         * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
425         than expr.original_type.
427 2017-09-12  Nathan Sidwell  <nathan@acm.org>
429         * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
430         resort_sorted_fields): Moved from c-family/c-common.c.
431         * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
433 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
435         PR c/82071
436         * c-typeck.c (build_atomic_assign): Handle argument with excess
437         precision.  Ensure any EXCESS_PRECISION_EXPR is present in
438         argument passed to build_binary_op and convert_for_assignment but
439         not for call to c_fully_fold.
440         (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
441         Ensure build_binary_op is called with argument with original
442         semantic type.  Avoid calling c_fully_fold with an
443         EXCESS_PRECISION_EXPR from build_binary_op.
445 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
447         PR c/81887
448         * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
450 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
451             Alan Hayward  <alan.hayward@arm.com>
452             David Sherwood  <david.sherwood@arm.com>
454         * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
455         (c_common_type): Likewise.  Use as_a <scalar_mode> when setting
456         m1 and m2 to the signed equivalent of a fixed-point
457         SCALAR_TYPE_MODE.
459 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
461         * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
462         than CAN_HAVE_LOCATION_P when determining whether to use the
463         location_t value within "value".
465 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
467         * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
468         rather than peeking the location of the first token.
469         * c-tree.h (c_expr::get_location): New method.
471 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
473         * c-typeck.c (build_function_call_vec): Pass arg_loc to call
474         to check_function_arguments.
476 2017-08-18  Marek Polacek  <polacek@redhat.com>
478         * c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
479         commentary.
481 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
483         PR c/53037
484         * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
485         (check_bitfield_type_and_width): Don't allow bit-field with
486         warn_if_not_aligned type.
488 2017-08-14  Martin Sebor  <msebor@redhat.com>
490         PR c/81117
491         * c-objc-common.c (c_objc_common_init): Handle 'G'.
493 2017-08-11  Marek Polacek  <polacek@redhat.com>
495         PR c/81795
496         * c-decl.c (pushtag): Only print inform if the warning was printed.
497         (grokdeclarator): Likewise.
499 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
501         * c-parser.c (c_parser_error): Rename to...
502         (c_parser_error_richloc): ...this, making static, and adding
503         "richloc" parameter, passing it to the c_parse_error call,
504         rather than calling c_parser_set_source_position_from_token.
505         (c_parser_error): Reintroduce, reimplementing in terms of the
506         above, converting return type from void to bool.
507         (class token_pair): New class.
508         (struct matching_paren_traits): New struct.
509         (matching_parens): New typedef.
510         (struct matching_brace_traits): New struct.
511         (matching_braces): New typedef.
512         (get_matching_symbol): New function.
513         (c_parser_require): Add param MATCHING_LOCATION, using it to
514         highlight matching "opening" tokens for missing "closing" tokens.
515         (c_parser_skip_until_found): Likewise.
516         (c_parser_static_assert_declaration_no_semi): Convert explicit
517         parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
518         class matching_parens, so that the pertinent open parenthesis is
519         highlighted when there are problems locating the close
520         parenthesis.
521         (c_parser_struct_or_union_specifier): Likewise.
522         (c_parser_typeof_specifier): Likewise.
523         (c_parser_alignas_specifier): Likewise.
524         (c_parser_simple_asm_expr): Likewise.
525         (c_parser_braced_init): Likewise, for matching_braces.
526         (c_parser_paren_condition): Likewise, for matching_parens.
527         (c_parser_switch_statement): Likewise.
528         (c_parser_for_statement): Likewise.
529         (c_parser_asm_statement): Likewise.
530         (c_parser_asm_operands): Likewise.
531         (c_parser_cast_expression): Likewise.
532         (c_parser_sizeof_expression): Likewise.
533         (c_parser_alignof_expression): Likewise.
534         (c_parser_generic_selection): Likewise.
535         (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
536         RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
537         RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
538         In case CPP_OPEN_PAREN, pass loc_open_paren to the
539         c_parser_skip_until_found call.
540         (c_parser_objc_class_definition): Use class matching_parens as
541         above.
542         (c_parser_objc_method_decl): Likewise.
543         (c_parser_objc_try_catch_finally_statement): Likewise.
544         (c_parser_objc_synchronized_statement): Likewise.
545         (c_parser_objc_at_property_declaration): Likewise.
546         (c_parser_oacc_wait_list): Likewise.
547         (c_parser_omp_var_list_parens): Likewise.
548         (c_parser_omp_clause_collapse): Likewise.
549         (c_parser_omp_clause_default): Likewise.
550         (c_parser_omp_clause_if): Likewise.
551         (c_parser_omp_clause_num_threads): Likewise.
552         (c_parser_omp_clause_num_tasks): Likewise.
553         (c_parser_omp_clause_grainsize): Likewise.
554         (c_parser_omp_clause_priority): Likewise.
555         (c_parser_omp_clause_hint): Likewise.
556         (c_parser_omp_clause_defaultmap): Likewise.
557         (c_parser_oacc_single_int_clause): Likewise.
558         (c_parser_omp_clause_ordered): Likewise.
559         (c_parser_omp_clause_reduction): Likewise.
560         (c_parser_omp_clause_schedule): Likewise.
561         (c_parser_omp_clause_num_teams): Likewise.
562         (c_parser_omp_clause_thread_limit): Likewise.
563         (c_parser_omp_clause_aligned): Likewise.
564         (c_parser_omp_clause_linear): Likewise.
565         (c_parser_omp_clause_safelen): Likewise.
566         (c_parser_omp_clause_simdlen): Likewise.
567         (c_parser_omp_clause_depend): Likewise.
568         (c_parser_omp_clause_map): Likewise.
569         (c_parser_omp_clause_device): Likewise.
570         (c_parser_omp_clause_dist_schedule): Likewise.
571         (c_parser_omp_clause_proc_bind): Likewise.
572         (c_parser_omp_clause_uniform): Likewise.
573         (c_parser_omp_for_loop): Likewise.
574         (c_parser_cilk_clause_vectorlength): Likewise.
575         (c_parser_cilk_clause_linear): Likewise.
576         (c_parser_transaction_expression): Likewise.
577         * c-parser.h (c_parser_require): Add param matching_location with
578         default UNKNOWN_LOCATION.
579         (c_parser_error): Convert return type from void to bool.
580         (c_parser_skip_until_found): Add param matching_location with
581         default UNKNOWN_LOCATION.
583 2017-08-09  Marek Polacek  <polacek@redhat.com>
585         * c-decl.c (build_enumerator): Use true/false instead of 1/0.
586         * c-tree.h (build_external_ref): Update declaration.
587         * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
588         (build_external_ref): Change the type of a parameter to bool.
589         (parser_build_binary_op): Use true/false instead of 1/0.
590         (pointer_diff): Likewise.
591         (build_modify_expr): Likewise.
592         (set_designator): Change the type of a parameter to bool.
593         (set_init_index): Use true/false instead of 1/0.
594         (set_init_label): Likewise.
595         (output_init_element): Change the type of a parameter to bool.
596         (output_pending_init_elements): Use true/false instead of 1/0.
597         (process_init_element): Likewise.
598         (build_binary_op): Change the type of a parameter to bool.
600 2017-08-09  Marek Polacek  <polacek@redhat.com>
602         PR c/81233
603         * c-typeck.c (pedwarn_init): Make the function take a variable list.
604         Call emit_diagnostic_valist instead of pedwarn.
605         (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
606         Print the relevant types in diagnostics.
608 2017-08-09  Marek Polacek  <polacek@redhat.com>
610         PR c/81417
611         * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
612         build_conditional_expr. 
613         * c-parser.c (c_parser_conditional_expression): Create locations for
614         EXP1 and EXP2 from their source ranges.  Pass the locations down to
615         build_conditional_expr.
616         * c-tree.h (build_conditional_expr): Update declaration.
617         * c-typeck.c (build_conditional_expr): Add location_t parameters.
618         For -Wsign-compare, also print the types.
620 2017-08-08  Martin Liska  <mliska@suse.cz>
622         * c-convert.c: Include header files.
623         * c-typeck.c: Likewise.
625 2017-08-07  Martin Liska  <mliska@suse.cz>
627         * c-parser.c (c_parser_attributes): Canonicalize name of an
628         attribute.
630 2017-08-02  Marek Polacek  <polacek@redhat.com>
632         PR c/81289
633         * c-parser.c (c_parser_unary_expression): Use set_error.
635         PR c/81448
636         PR c/81306
637         * c-warn.c (warn_for_multistatement_macros): Prevent bogus
638         warnings.  Avoid walking MACRO_MAP_LOCATIONS.
640 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
641             Martin Liska  <mliska@suse.cz>
643         * c-typeck.c (c_finish_goto_label): Build gimple predict
644         statement.
646 2017-07-31  Martin Liska  <mliska@suse.cz>
648         PR sanitize/81530
649         * c-convert.c (convert): Guard condition with flag_sanitize_p
650         also with current_function_decl non-null equality.
651         * c-decl.c (grokdeclarator): Likewise.
652         * c-typeck.c (build_binary_op): Likewise.
654 2017-07-25  Marek Polacek  <polacek@redhat.com>
656         * c-decl.c (grokfield): Remove local variable.
658 2017-07-25  Marek Polacek  <polacek@redhat.com>
660         PR c/81364
661         * c-parser.c (c_parser_else_body): Don't warn about multistatement
662         macro expansion if the body is in { }.
663         (c_parser_while_statement): Likewise.
664         (c_parser_for_statement): Likewise.
666 2017-07-18  Nathan Sidwell  <nathan@acm.org>
668         * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
670 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
672         * c-decl.c (implicitly_declare): When suggesting a missing
673         #include, provide a fix-it hint.
675 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
677         * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
678         and call that instead.
679         * c-tree.h (selftest::run_c_tests): New decl.
681 2017-06-26  Marek Polacek  <polacek@redhat.com>
683         PR c/80116
684         * c-parser.c (c_parser_if_body): Set the location of the
685         body of the conditional after parsing all the labels.  Call
686         warn_for_multistatement_macros.
687         (c_parser_else_body): Likewise.
688         (c_parser_switch_statement): Likewise.
689         (c_parser_while_statement): Likewise.
690         (c_parser_for_statement): Likewise.
691         (c_parser_statement): Add a default argument.  Save the location
692         after labels have been parsed.
693         (c_parser_c99_block_statement): Likewise.
695 2017-06-19  Richard Biener  <rguenther@suse.de>
697         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
698         negated _Literals to parse _Literal (int) -1.
700 2017-06-13  Martin Liska  <mliska@suse.cz>
702         PR sanitize/78204
703         * c-convert.c (convert): Use sanitize_flags_p.
704         * c-decl.c (grokdeclarator): Likewise.
705         * c-typeck.c (convert_for_assignment): Likewise.
706         (c_finish_return): Likewise.
707         (build_binary_op): Likewise.
709 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
711         PR c/81006
712         * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
713         to sizetype before size_binop.
715 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
717         * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
718         of TDI_generic.
720 2017-06-06  Marek Polacek  <polacek@redhat.com>
722         PR c/79983
723         * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
724         ref.
725         (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
727 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
729         * c-parser.c (c_parser_binary_expression): Implement the
730         -Wsizeof_pointer_div warning.
731         (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
732         from a parenthesized expression.
733         (c_parser_expr_list): Use c_last_sizeof_loc.
734         * c-tree.h (c_last_sizeof_loc): New external.
735         * c-typeck.c (c_last_sizeof_loc): New variable.
736         (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
738 2017-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
740         PR testsuite/80580
741         * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
743 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
745         * c-objc-common.c (c_tree_printer): Gain bool and const char **
746         parameters.
748 2017-05-24  Martin Sebor  <msebor@redhat.com>
750         PR c/80731
751         * c-fold.c (c_fully_fold_internal): Adjust.
752         * c-typeck.c (parser_build_unary_op): Adjust.
754 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
756         * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
757         "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
758         "VECTOR_LENGTH".
760 2017-05-23  Marek Polacek  <polacek@redhat.com>
762         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
763         quotes.
765 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
767         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
768         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
769         it returned invariant.  Call tree_invariant_p unconditionally
770         afterwards to decide whether to return expr or op0.
772 2017-05-22  Nathan Sidwell  <nathan@acm.org>
774         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
776 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
778         * c-parser.c (c_parser_omp_clause_default): Handle
779         "OMP_CLAUSE_DEFAULT_PRESENT".
781 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
783         * config-lang.in (gtfiles): Add c-family/c-format.c.
785 2017-05-18  Nathan Sidwell  <nathan@acm.org>
787         * c-decl.c (pushdecl_top_level): Delete unused function.
789 2017-05-18  Marek Polacek  <polacek@redhat.com>
791         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
792         (check_earlier_gotos): Likewise.
793         (define_label): Likewise.
794         (pending_xref_error): Likewise.
795         (smallest_type_quals_location): Likewise.
796         (grokdeclarator): Likewise.
797         (grokparms): Likewise.
798         (identifier_global_value): Likewise.
799         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
800         (find_init_member): Likewise.
802 2017-05-18  Marek Polacek  <polacek@redhat.com>
804         * c-decl.c (start_decl): Use false/true instead of 0/1.
805         (grokdeclarator): Likewise.
806         (finish_struct): Likewise.
807         (start_function): Change the return type to bool.  Use false/true
808         instead of 0/1.
809         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
810         * c-tree.h (start_function): Update.
811         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
812         (set_designator): Change the return type to bool.  Use false/true
813         instead of 0/1.
815 2017-05-17  Marek Polacek  <polacek@redhat.com>
817         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
818         * c-typeck.c: Likewise.
820 2017-05-17  Marek Polacek  <polacek@redhat.com>
822         PR sanitizer/80659
823         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
824         DECL_IGNORED_P even for non-static compound literals.
826 2017-05-17  Martin Liska  <mliska@suse.cz>
828         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
829         use it instead of int type.
831 2017-05-17  Marek Polacek  <polacek@redhat.com>
833         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
834         call c_fully_fold.
835         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
836         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr. 
837         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
838         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
839         save_expr.
840         (c_parser_conditional_expression): Likewise.
841         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
842         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
843         (process_init_element): Likewise.
844         (build_binary_op): Likewise.
845         (handle_omp_array_sections_1): Likewise.
847 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
849         * c-parser.c (c_parser_omp_clause_num_gangs)
850         (c_parser_omp_clause_num_workers)
851         (c_parser_omp_clause_vector_length): Merge functions into...
852         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
853         all users.
855 2017-05-11  Nathan Sidwell  <nathan@acm.org>
857         * gimple-parser.c: Don't #include tree-dump.h.
859 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
861         PR testsuite/80580
862         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
864 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
866         PR testsuite/80580
867         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
868         incorrect __MEM syntax.
870 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
872         PR testsuite/80580
873         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
874         type of unary '*'.
876 2017-05-09  Nathan Sidwell  <nathan@acm.org>
878         * c-tree.h (pushdecl): Declare.
880 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
882         * c-decl.c (warn_defaults_to): Replace report_diagnostic
883         with diagnostic_report_diagnostic.
884         * c-errors.c (pedwarn_c99): Likewise.
885         (pedwarn_c90): Likewise.
887 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
889         PR c++/80038
890         * c-gimplify.c (c_gimplify_expr): Remove calls to
891         cilk_gimplifY_call_params_in_spawned_fn.
893 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
895         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
896         hint for removing extra semicolon.
898 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
900         PR c/80468
901         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
902         enabled, set specs->type to integer_type_node.
904 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
906         * c-array-notation.c: Fix typo in comment.
908 2017-03-29  Marek Polacek  <polacek@redhat.com>
910         PR c/79730
911         * c-decl.c (finish_decl): Check VAR_P.
913 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
915         PR middle-end/80162
916         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
917         * c-typeck.c (c_mark_addressable): Likewise.  Look through
918         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
919         to ARRAY_TYPE.
920         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
922 2017-03-23  Marek Polacek  <polacek@redhat.com>
924         * c-tree.h: Remove a C_RID_YYCODE reference.
926 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
928         PR c/80097
929         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
930         optional COMPOUND_EXPR with ubsan instrumentation.
932 2017-03-17  Marek Polacek  <polacek@redhat.com>
934         * c-parser.c: Add C11 references.
936 2017-03-15  Marek Polacek  <polacek@redhat.com>
938         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
940 2017-03-11  Marek Polacek  <polacek@redhat.com>
942         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
944 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
946         PR translation/79848
947         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
948         "%qs".
949         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
951 2017-03-09  Marek Polacek  <polacek@redhat.com>
953         PR sanitizer/79757
954         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
955         parameter declarations with initializers.
957 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
959         PR c/79969
960         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
961         TYPE_STUB_DECL.
963 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
965         PR c/79834
966         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
967         for "may only be used in compound statements" diagnostics, change it
968         such that the same translatable string is used for all pragmas.  For
969         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
970         diagnostics.
971         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
972         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
973         "may only be used in compound statements" diagnostics, such that the
974         same translatable string is used for all pragmas.
976 2017-03-04  Marek Polacek  <polacek@redhat.com>
978         PR c/79847
979         * c-decl.c (implicit_decl_warning): Add missing space.
981 2017-03-03  Marek Polacek  <polacek@redhat.com>
983         PR c/79758
984         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
985         current_function_prototype_arg_types is error_mark_node.  Fix
986         formatting.  Use TREE_VALUE instead of TREE_TYPE.
988 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
990         PR c/79837
991         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
992         %<min%> or %<max%> in the diagnostics, instead mention identifier.
993         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
994         diagnostics.
996         PR c/79836
997         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
998         instead of %<_Generic>.
999         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1000         (c_parser_omp_target_exit_data): Use %<release%> instead of
1001         %<release>.
1003 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
1005         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1006         instead of just cond ? "..." : "...".
1007         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1008         for "enter"/"exit" keyword.
1009         (c_finish_oacc_routine): Don't use %s to supply portions of the
1010         message.
1012 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
1014         PR c++/79588
1015         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1016         handle -Wrestrict here.
1017         * c-typeck.c (build_function_call_vec): Adjust
1018         check_function_arguments caller.
1020 2017-02-23  Richard Biener  <rguenther@suse.de>
1022         PR c/79684
1023         * gimple-parser.c (c_parser_gimple_statement): Use set_error
1024         to initialize c_exprs to return.
1025         (c_parser_gimple_binary_expression): Likewise.
1026         (c_parser_gimple_unary_expression): Likewise.
1027         (c_parser_gimple_postfix_expression): Likewise.
1029 2017-02-22  Marek Polacek  <polacek@redhat.com>
1031         PR c/79662
1032         * c-typeck.c (convert_arguments): Handle error_mark_node.
1034 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1036         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1037         value of c_parser_parse_ssa_name against error_mark_node and emit
1038         error if ssa name is anonymous and written as default definition.
1040 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1042         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1043         FMA_EXPR.
1045 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
1047         PR c++/79512
1048         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1049         ignore #pragma omp target even when not followed by identifier.
1051 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1053         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1054         (c_parser_gimple_unary_expression): Likewise.
1056 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
1058         * c-parser.c (c_parser_oacc_declare): Add missing space in
1059         diagnostics.
1061 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1063         PR c/79478
1064         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1065         set_c_expr_source_range when parsing ssa-name.
1067 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
1068         Richard Biener  <rguenther@suse.de>
1070         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1071         building IL when arguments are error_mark_node.
1072         (c_parser_gimple_unary_expression): Likewise.
1073         (c_parser_gimple_if_stmt): Likewise.
1074         (c_parser_gimple_switch_stmt): Likewise.
1075         (c_parser_gimple_return_stmt): Likewise.
1076         (c_parser_parse_ssa_name): When name lookup fails do not build
1077         an SSA name.  Use undeclared rather than not declared in error
1078         reporting.
1080 2017-02-09  Marek Polacek  <polacek@redhat.com>
1082         PR c/79428
1083         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1084         instead of c_parser_skip_until_found.
1086 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
1088         PR c/79431
1089         * c-parser.c (c_parser_omp_declare_target): Don't invoke
1090         symtab_node::get on automatic variables.
1092 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
1093             Chung-Lin Tang  <cltang@codesourcery.com>
1095         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1096         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1097         semantic checking.
1098         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1100 2017-02-07  Richard Biener  <rguenther@suse.de>
1102         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1103         (c_parser_gimple_postfix_expression_after_primary):
1104         Do not use c_build_function_call_vec to avoid folding and promotion.
1105         Simplify.
1107 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
1109         PR lto/79061
1110         * c-decl.c (pop_scope): Pass main_input_filename to
1111         build_translation_unit_decl.
1113 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
1115         * c-parser.c: Include "read-rtl-function.h" and
1116         "run-rtl-passes.h".
1117         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1118         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
1119         production.  Update for renaming of field "gimple_pass" to
1120         "gimple_or_rtl_pass".  If __RTL was seen, call
1121         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
1122         to an auto_timevar, to cope with early exit.
1123         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1124         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1125         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1126         Handle RID_RTL.
1127         (c_parser_parse_rtl_body): New function.
1128         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1129         (struct c_declspecs): Rename field "gimple_pass" to
1130         "gimple_or_rtl_pass".  Add field "rtl_p".
1131         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1132         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1133         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1134         (c_parser_gimple_or_rtl_pass_list): ...this.
1136 2017-01-20  Marek Polacek  <polacek@redhat.com>
1138         PR c/64279
1139         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1141 2017-01-13  Richard Biener  <rguenther@suse.de>
1143         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1144         nops.
1146 2017-01-13  Richard Biener  <rguenther@suse.de>
1148         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1149         _Literal ( type-name ) number.
1151 2017-01-12  Richard Biener  <rguenther@suse.de>
1153         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1154         __MEM.
1156 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
1158         PR c++/72813
1159         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1160         PCH file.
1162 2017-01-11  Richard Biener  <rguenther@suse.de>
1164         PR bootstrap/79052
1165         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1166         returns on parse errors.
1168 2017-01-04  Marek Polacek  <polacek@redhat.com>
1170         PR c++/64767
1171         * c-parser.c (c_parser_postfix_expression): Mark zero character
1172         constants by setting original_type in c_expr.
1173         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1174         with a zero character constant.
1175         (char_type_p): New function.
1177 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
1179         * c-parser.c (c_parser_declaration_or_fndef): Create a
1180         rich_location at init_loc and parse it to start_init.
1181         (last_init_list_comma): New global.
1182         (c_parser_braced_init): Update last_init_list_comma when parsing
1183         commas.  Pass it to pop_init_level.  Pass location of closing
1184         brace to pop_init_level.
1185         (c_parser_postfix_expression_after_paren_type): Create a
1186         rich_location at type_loc and parse it to start_init.
1187         (c_parser_omp_declare_reduction): Likewise for loc.
1188         * c-tree.h (start_init): Add rich_location * param.
1189         (pop_init_level): Add location_t param.
1190         * c-typeck.c (struct initializer_stack): Add field
1191         "missing_brace_richloc".
1192         (start_init): Add richloc param, use it to initialize
1193         the stack node's missing_brace_richloc.
1194         (last_init_list_comma): New decl.
1195         (finish_implicit_inits): Pass last_init_list_comma to
1196         pop_init_level.
1197         (push_init_level): When finding missing open braces, add fix-it
1198         hints to the richloc.
1199         (pop_init_level): Add "insert_before" param and pass it
1200         when calling pop_init_level.  Add fixits about missing
1201         close braces to any richloc.  Use the richloc for the
1202         -Wmissing-braces warning.
1203         (set_designator): Pass last_init_list_comma to pop_init_level.
1204         (process_init_element): Likewise.
1206 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1208         Update copyright years.
1210 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
1212         PR bootstrap/78817
1213         * c-typeck.c (build_function_call_vec): If check_function_arguments
1214         returns true, set TREE_NO_WARNING on CALL_EXPR.
1216         PR c/77767
1217         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1218         to *expr instead of overwriting it.
1220 2016-12-20  Richard Biener  <rguenther@suse.de>
1222         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1223         error recovery.
1224         (c_parser_gimple_statement): Only build assigns for non-error
1225         stmts.
1226         (c_parser_gimple_postfix_expression_after): Improve error recovery.
1228 2016-12-14  Martin Jambor  <mjambor@suse.cz>
1230         * c-parser.c: Include omp-general.h and omp-offload.h instead of
1231         omp-low.h.
1232         (c_finish_oacc_routine): Adjusted call to
1233         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1234         to use their new names.
1235         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1236         use its new name.
1237         (c_parser_oacc_update): Likewise.
1238         (c_parser_omp_simd): Likewise.
1239         (c_parser_omp_target_update): Likewise.
1240         * c-typeck.c: Include omp-general.h instead of omp-low.h.
1241         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1242         name.
1243         (c_finish_omp_cancellation_point): Likewise.
1244         * gimple-parser.c: Do not include omp-low.h
1246 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
1247             James Norris  <jnorris@codesourcery.com>
1249         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1250         EXIT_DATA,WAIT} are not used in compound statements.
1251         (c_parser_oacc_enter_exit_data): Update diagnostics.
1253 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1255         PR c++/71973
1256         * c-decl.c (diagnose_mismatched_decls): Use
1257         OPT_Wbuiltin_declaration_mismatch here too.
1259 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
1260             Alan Hayward  <alan.hayward@arm.com>
1261             David Sherwood  <david.sherwood@arm.com>
1263         * c-decl.c (merge_decls): Use SET_DECL_MODE.
1264         (make_label, finish_struct): Likewise.
1266 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
1267             Richard Biener  <rguenther@suse.de>
1269         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1270         * config-lang.in (gtfiles): Add c/c-parser.h.
1271         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1272         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1273         * c-parser.c (enum c_id_kind, struct c_token,
1274         c_parser_next_token_is, c_parser_next_token_is_not,
1275         c_parser_next_token_is_keyword,
1276         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1277         Split out to ...
1278         * c-parser.h: ... new header.
1279         * c-parser.c: Include c-parser.h and gimple-parser.h.
1280         (c_parser_peek_token, c_parser_peek_2nd_token,
1281         c_token_starts_typename, c_parser_next_token_starts_declspecs,
1282         c_parser_next_tokens_start_declaration, c_parser_consume_token,
1283         c_parser_error, c_parser_require, c_parser_skip_until_found,
1284         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1285         c_parser_type_name): Export.
1286         (c_parser_tokens_buf): New function.
1287         (c_parser_error): Likewise.
1288         (c_parser_set_error): Likewise.
1289         (c_parser_declspecs): Handle RID_GIMPLE.
1290         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1291         via c_parser_parse_gimple_body.
1292         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1293         c_token_starts_typename, c_parser_next_token_starts_declspecs,
1294         c_parser_next_tokens_start_declaration, c_parser_consume_token,
1295         c_parser_error, c_parser_require, c_parser_skip_until_found,
1296         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1297         c_parser_type_name): Declare.
1298         (struct c_parser): Declare forward.
1299         (c_parser_tokens_buf): Declare.
1300         (c_parser_error): Likewise.
1301         (c_parser_set_error): Likewise.
1302         * gimple-parser.c: New file.
1303         * gimple-parser.h: Likewise.
1305 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1307         PR c/35503
1308         * c-parser.c (c_parser_postfix_expression_after_primary): Call
1309         warn_for_restrict.
1311 2016-09-11  Le-Chun Wu  <lcwu@google.com>
1312             Mark Wielaard  <mjw@redhat.com>
1314         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1315         to the given -Wshadow= variant.
1317 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1319         * c-typeck.c: Include memmodel.h.
1321 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
1323         PR target/77957
1324         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1325         instead of lhd_return_null_tree_v.
1327 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
1329         PR c++/69733
1330         * c-decl.c (smallest_type_quals_location): New static function.
1331         (grokdeclarator): Try to find the correct location for an ignored
1332         qualifier.
1334 2016-09-26  Marek Polacek  <polacek@redhat.com>
1336         PR c/7652
1337         * c-decl.c (pop_scope): Add gcc_fallthrough.
1339 2016-09-26  Marek Polacek  <polacek@redhat.com>
1341         PR c/7652
1342         * c-parser.c (struct c_token): Add flags field.
1343         (c_lex_one_token): Pass it to c_lex_with_flags.
1344         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1345         into IFN_FALLTHROUGH.
1346         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
1347         attribute fallthrough after a case label or default label.
1348         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1350 2016-09-24  Marek Polacek  <polacek@redhat.com>
1352         PR c/77490
1353         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1354         have boolean value.  Warn about ++/-- on booleans.
1356 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
1358         * c-parser.c (incomplete_record_decls): Remove unnecessary
1359         = vNULL initialization of file scope vec.
1361 2016-09-16  Marek Polacek  <polacek@redhat.com>
1363         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1365 2016-09-14  Marek Polacek  <polacek@redhat.com>
1367         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1368         (fix_array_notation_expr): Likewise.
1369         * c-decl.c (finish_decl): Likewise.
1370         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1371         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1372         (function_to_pointer_conversion): Use false instead of 0.
1373         (convert_lvalue_to_rvalue): Likewise.
1374         (parser_build_unary_op): Likewise.
1375         (build_atomic_assign): Likewise.
1376         (build_unary_op): Change nonconvert parameter type to bool, use
1377         true/false instead of 1/0.
1378         (build_binary_op): Use true instead of 1.
1380 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
1382         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1383         of add_fixit_insert to add_fixit_insert_before.
1385 2016-09-13  Marek Polacek  <polacek@redhat.com>
1387         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
1388         it.
1390 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1392         PR c++/77496
1393         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1394         COMPOUND_EXPR to warn_for_omitted_condop.
1396 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
1398         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1399         c_get_substring_location for this new langhook.
1401 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
1403         PR c/65467
1404         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1405         flag_openmp.
1406         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1407         instead of mark_exp_read on low_bound/length expression.
1408         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1409         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1410         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1411         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1412         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1413         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1414         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1415         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1416         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1417         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1418         instead of mark_expr_read.
1419         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1420         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1421         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1422         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1423         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1424         array section bases outside of depend clause, for depend clause
1425         use convert_lvalue_to_rvalue on the base.
1426         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1427         linear, aligned, map, to and from clauses.
1428         (c_omp_clause_copy_ctor): New function.
1430 2016-09-01  Marek Polacek  <polacek@redhat.com>
1432         PR c/7652
1433         * c-typeck.c (composite_type): Add FALLTHRU comment.
1435 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
1437         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1438         to the insertion fixits for "struct", "union", and "enum".
1440 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
1442         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1443         rather than add_fixit_misspelled_id.
1444         (undeclared_variable): Likewise.
1445         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
1446         now-redundant "here" params from add_fixit_insert method calls.
1447         (c_parser_parameter_declaration): Likewise.
1448         * c-typeck.c (build_component_ref): Remove now-redundant range
1449         param from add_fixit_replace method calls.
1451 2016-08-25  Marek Polacek  <polacek@redhat.com>
1453         * c-typeck.c (parser_build_binary_op): Pass LHS to
1454         warn_logical_not_parentheses.
1456 2016-08-25  Marek Polacek  <polacek@redhat.com>
1458         PR c/77323
1459         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1460         or _FloatN or _FloatNx is not supported.
1461         (finish_declspecs): Set type to integer_type_node when _FloatN or
1462         _FloatNx is not supported.
1464 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
1466         PR c/32187
1467         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1468         (struct c_declspecs): Add field floatn_nx_idx.
1469         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1470         and _FloatNx type specifiers.
1471         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1472         (c_parser_declspecs, c_parser_attribute_any_word)
1473         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1474         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1475         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1476         narrower than double.
1478 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
1479             Martin Liska  <mliska@suse.cz>
1481         PR c/67410
1482         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1483         % to determine val element to change.  Assert that
1484         wchar_bytes * charwidth fits into val array.
1486 2016-08-12  Marek Polacek  <polacek@redhat.com>
1488         PR c/7652
1489         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1490         (c_parser_postfix_expression): Likewise.
1491         * c-typeck.c (build_unary_op): Adjust fall through comment.
1492         (c_mark_addressable): Likewise.
1494 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
1496         PR c/72816
1497         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1498         array member through typedef, for orig_qual_indirect == 0 clear
1499         orig_qual_type.
1501 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
1503         PR c/64955
1504         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1505         this up to selftest::run_c_tests.
1506         (selftest::run_c_tests): New function.
1508 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
1510         * c-parser.c (struct oacc_routine_data): Add error_seen and
1511         fndecl_seen members.
1512         (c_finish_oacc_routine): Use these.
1513         (c_parser_declaration_or_fndef): Adjust.
1514         (c_parser_oacc_routine): Likewise.  Support more C language
1515         constructs, and improve diagnostics.  Move pragma context
1516         checking...
1517         (c_parser_pragma): ... here.
1519         * c-parser.c (struct oacc_routine_data): New.
1520         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1521         Simplify code.
1522         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
1523         declare target" attribute.
1525 2016-08-01  Jan Beulich  <jbeulich@suse.com>
1527         * c-fold.c (c_fully_fold_internal): Also emit shift count
1528         warnings for vector types.
1529         * c-typeck.c (build_binary_op): Likewise.
1531 2016-07-29  Marek Polacek  <polacek@redhat.com>
1533         PR c/71742
1534         * c-decl.c (finish_struct): Rephrase an error message.
1536         PR c/71853
1537         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1538         to error node for invalid code.
1540         PR c/71573
1541         * c-decl.c (implicitly_declare): Return decl early not only for
1542         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1544 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
1546         PR c/71969
1547         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1548         on GNU extern inline functions.
1550 2016-07-29  Marek Polacek  <polacek@redhat.com>
1552         PR c/71583
1553         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1554         check expr.value.
1556 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
1558         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1560 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
1562         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1563         spellcheck-tree.h
1564         (best_macro_match): Likewise, converting from a typedef to a
1565         subclass.
1566         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1567         (lookup_name_fuzzy): Update for change of best_macro_match to a
1568         subclass with a ctor that calls cpp_forall_identifiers.
1570 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
1572         * c-decl.c (implicit_decl_warning): Update for conversion of
1573         return type of lookup_name_fuzzy to const char *.
1574         (undeclared_variable): Likewise.
1575         (lookup_name_fuzzy): Convert return type from tree to
1576         const char *.
1577         * c-parser.c (c_parser_declaration_or_fndef): Update for
1578         conversion of return type of lookup_name_fuzzy to const char *.
1579         (c_parser_parameter_declaration): Likewise.
1581 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
1583         * c-parser.c (c_parser_oacc_declare): Don't scan for
1584         GOMP_MAP_POINTER.
1585         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1586         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1587         zero-length subarrays.
1589 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
1591         PR c/71858
1592         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1593         instead of FUZZY_LOOKUP_NAME.
1594         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1595         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1597 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
1599         PR c/71858
1600         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1602 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1604         * c-parser.c (c_parser_generic_selection): Make type of variable
1605         auto_vec.
1606         (c_parser_omp_declare_simd): Likewise.
1608 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1610         * c-decl.c (struct c_struct_parse_info): Change member types
1611         from vec to auto_vec.
1612         (start_struct): Adjust.
1613         (finish_struct): Likewise.
1615 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
1617         PR c/71719
1618         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1620 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
1622         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1623         Move pragma context checking into...
1624         (c_parser_omp_cancellation_point): ... here, and improve
1625         diagnostic messages.
1626         * c-typeck.c (c_finish_omp_cancel)
1627         (c_finish_omp_cancellation_point): Improve diagnostic messages.
1629 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
1631         PR c/71685
1632         * c-typeck.c (c_build_qualified_type): Don't clear
1633         C_TYPE_INCOMPLETE_VARS for the main variant.
1635 2016-06-28  Martin Sebor  <msebor@redhat.com>
1637         PR c/71552
1638         * c-typeck.c (output_init_element): Diagnose incompatible types
1639         before non-constant initializers.
1641 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
1643         * Make-lang.in: Don't cat ../stage_current if it does not exist.
1645 2016-06-23  Andi Kleen  <ak@linux.intel.com>
1647         * Make-lang.in: Add support for autofdo.
1649 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
1651         PR c/70339
1652         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1653         (implicit_decl_warning): When issuing warnings for implicit
1654         declarations, attempt to provide a suggestion via
1655         lookup_name_fuzzy.
1656         (undeclared_variable): Likewise when issuing errors.
1657         (lookup_name_in_scope): Likewise.
1658         (struct edit_distance_traits<cpp_hashnode *>): New struct.
1659         (best_macro_match): New typedef.
1660         (find_closest_macro_cpp_cb): New function.
1661         (lookup_name_fuzzy): New function.
1662         * c-parser.c: Include gcc-rich-location.h.
1663         (c_token_starts_typename): Split out case CPP_KEYWORD into...
1664         (c_keyword_starts_typename): ...this new function.
1665         (c_parser_declaration_or_fndef): When issuing errors about
1666         missing "struct" etc, add a fixit.  For other kinds of errors,
1667         attempt to provide a suggestion via lookup_name_fuzzy.
1668         (c_parser_parms_declarator): When looking ahead to detect typos in
1669         type names, also reject CPP_KEYWORD.
1670         (c_parser_parameter_declaration): When issuing errors about
1671         unknown type names, attempt to provide a suggestion via
1672         lookup_name_fuzzy.
1673         * c-tree.h (c_keyword_starts_typename): New prototype.
1675 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
1677         PR c/71601
1678         * c-typeck.c (build_conditional_expr): Return error_mark_node if
1679         c_common_type returns error_mark_node.
1681 2016-06-19  Martin Sebor  <msebor@redhat.com>
1683         PR c/69507
1684         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1685         __alignof__ (expression).
1687 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
1689         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1691 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
1693         * c-typeck.c (build_component_ref): Simplify fixit code by
1694         using gcc_rich_location::add_fixit_misspelled_id.
1695         (set_init_label): Likewise.
1697 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
1699         * c-parser.c (c_parser_initelt): Provide location of name for new
1700         location_t param of set_init_label.
1701         * c-tree.h (set_init_label): Add location_t param.
1702         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1703         param and use it when issuing error messages about unrecognized
1704         field names.  Attempt to provide a fixit hint if appropriate,
1705         otherwise update the error message to provide the type name.
1707 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
1709         PR c/71381
1710         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1711         Loosen checking.
1713 2016-06-08  Martin Sebor  <msebor@redhat.com>
1714             Jakub Jelinek  <jakub@redhat.com>
1716         PR c++/70507
1717         PR c/68120
1718         * c-typeck.c (convert_arguments): Don't promote last argument
1719         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1721 2016-06-08  Marek Polacek  <polacek@redhat.com>
1723         PR c/71418
1724         * c-decl.c (grokdeclarator): Check TYPE_P.
1726         PR c/71426
1727         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1728         code.
1730 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
1732         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1733         and structure element reference, capture the location of the
1734         element name token and pass it to build_component_ref.
1735         (c_parser_postfix_expression_after_primary): Likewise for
1736         structure element dereference.
1737         (c_parser_omp_variable_list): Likewise for
1738         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1739         * c-tree.h (build_component_ref): Add location_t param.
1740         * c-typeck.c (build_component_ref): Add location_t param
1741         COMPONENT_LOC.  Use it, if available, when issuing hints about
1742         mispelled member names to provide a fixit replacement hint.
1744 2016-06-06  Marek Polacek  <polacek@redhat.com>
1746         PR c/71362
1747         * c-parser.c (c_parser_direct_declarator): Set location.
1749 2016-06-06  Marek Polacek  <polacek@redhat.com>
1751         * c-typeck.c (comptypes_internal): Handle comparisons of
1752         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
1753         TYPE_REF_CAN_ALIAS_ALL.
1755 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
1757         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1758         arguments as addressable when async clause exists.
1760 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
1762         PR c++/71349
1763         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1764         when combined with target construct.
1766 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
1768         * c-parser.c (c_parser_omp_clause_schedule): Warn if
1769         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1771 2016-05-25  Marek Polacek  <polacek@redhat.com>
1773         PR c/71265
1774         * c-decl.c (c_make_fname_decl): Don't check seen_error.
1776         PR c/71266
1777         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1779 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
1781         * c-parser.c (c_parser_oacc_declare): Add support for
1782         GOMP_MAP_FIRSTPRIVATE_POINTER.
1783         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1784         argument with enum c_omp_region_type ort.
1785         (handle_omp_array_sections): Likewise.  Update call to
1786         handle_omp_array_sections_1.
1787         (c_finish_omp_clauses): Add specific errors and warning messages for
1788         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
1789         call to handle_omp_array_sections.
1791 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
1793         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1795 2016-05-24  Richard Biener  <rguenther@suse.de>
1797         PR middle-end/70434
1798         PR c/69504
1799         * c-typeck.c (build_array_ref): Do not complain about indexing
1800         non-lvalue vectors.  Adjust for function name change.
1802 2016-05-20  Martin Sebor  <msebor@redhat.com>
1804         PR c/71115
1805         * c-typeck.c (error_init): Use
1806         expansion_point_location_if_in_system_header.
1807         (warning_init): Same.
1809 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
1811         PR c/71171
1812         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1813         in error-handling.
1814         (c_parser_postfix_expression): Likewise.
1815         * c-tree.h (c_expr::set_error): New method.
1816         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1817         that result's range is initialized.
1819 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1821         * c-typeck.c (parser_build_unary_op): Fix formatting.
1823 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
1825         * c-decl.c (grokdeclarator): Remove errmsg and use of
1826         targetm.invalid_return_type.
1827         (grokparms): Remove errmsg and use of
1828         targetm.invalid_parameter_type.
1830 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
1832         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1833         function return type.
1835 2016-05-12  Marek Polacek  <polacek@redhat.com>
1837         PR c/70756
1838         * c-decl.c (build_compound_literal): Pass LOC down to
1839         c_incomplete_type_error.
1840         * c-tree.h (require_complete_type): Adjust declaration.
1841         (c_incomplete_type_error): Likewise.
1842         * c-typeck.c (require_complete_type): Add location parameter, pass it
1843         down to c_incomplete_type_error.
1844         (c_incomplete_type_error): Add location parameter, pass it down to
1845         error_at.
1846         (build_component_ref): Pass location down to c_incomplete_type_error.
1847         (default_conversion): Pass location down to require_complete_type.
1848         (build_array_ref): Likewise.
1849         (build_function_call_vec): Likewise.
1850         (convert_arguments): Likewise.
1851         (build_unary_op): Likewise.
1852         (build_c_cast): Likewise.
1853         (build_modify_expr): Likewise.
1854         (convert_for_assignment): Likewise.
1855         (c_finish_omp_clauses): Likewise.
1857 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1859         PR c/43651
1860         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1861         is enabled.
1862         * c-errors.c (pedwarn_c90): Return true if warned.
1863         * c-tree.h (pedwarn_c90): Change return type to bool.
1864         (enum c_declspec_word): Add new enumerator cdw_atomic.
1866 2016-05-11  Marek Polacek  <polacek@redhat.com>
1868         PR c++/71024
1869         * c-decl.c (diagnose_mismatched_decls): Factor out code to
1870         diagnose_mismatched_attributes and call it.
1872 2016-05-10  Marek Polacek  <polacek@redhat.com>
1874         PR c/70255
1875         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1876         on a declaration following the definition.
1878 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
1880         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1881         parse it through to c_parser_c99_block_statement.
1882         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1883         caller.
1885 2016-05-04  Marek Polacek  <polacek@redhat.com>
1887         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1888         OPT_Wdangling_else.
1890 2016-05-04  Marek Polacek  <polacek@redhat.com>
1892         PR c/48778
1893         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1894         for macro expansions.
1896 2016-05-03  Marek Polacek  <polacek@redhat.com>
1898         PR c/70859
1899         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1900         check_builtin_function_arguments.
1902 2016-05-03  Richard Biener  <rguenther@suse.de>
1904         * Make-lang.in (cc1-checksum.c): For stage-final re-use
1905         the checksum from the previous stage.
1907 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
1909         * c-parser.c (c_parser_oacc_all_clauses): Update call to
1910         c_finish_omp_clauses.
1911         (c_parser_omp_all_clauses): Likewise.
1912         (c_parser_oacc_cache): Likewise.
1913         (c_parser_oacc_loop): Likewise.
1914         (omp_split_clauses): Likewise.
1915         (c_parser_omp_declare_target): Likewise.
1916         (c_parser_cilk_all_clauses): Likewise.
1917         (c_parser_cilk_for): Likewise.
1918         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1919         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1921 2016-05-02  Marek Polacek  <polacek@redhat.com>
1923         PR c/70851
1924         * c-decl.c (grokdeclarator): Diagnose when array's size has an
1925         incomplete type.
1927 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
1929         PR middle-end/70626
1930         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1931         OACC_LOOP_CLAUSE_MASK.
1932         (c_parser_oacc_kernels_parallel): Update call to
1933         c_oacc_split_loop_clauses.
1935 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
1937         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1938         argument to build_modify_expr in two cases.
1940 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
1942         * c-parser.c (c_parser_postfix_expression_after_primary): Call
1943         warn_for_memset instead of warning directly here.
1945 2016-04-26  Marek Polacek  <polacek@redhat.com>
1947         PR c/67784
1948         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1949         out of ...
1950         (c_parser_for_statement): ... here.
1951         (c_parser_if_statement): Use it.
1952         (c_parser_switch_statement): Use it.
1953         (c_parser_while_statement): Use it.
1955         PR c/70791
1956         * c-decl.c (pushdecl): Pass LOCUS down to warning.
1958 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1960         PR c++/69363
1961         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1962         instead of c_finish_cilk_clauses.
1963         * c-tree.h (c_finish_omp_clauses): Add new default argument.
1964         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
1965         floating-point variables in the linear clause for Cilk Plus.
1967 2016-04-18  Michael Matz  <matz@suse.de>
1969         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1970         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1972 2016-04-15  Marek Polacek  <polacek@redhat.com>
1974         PR c/70671
1975         * c-typeck.c (build_unary_op): Pass location down to error and
1976         warning call.
1978 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
1980         PR c/70436
1981         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1982         where needed.
1983         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1984         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1985         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1986         Adjust c_parser_pragma callers.
1987         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
1988         caller.
1989         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1990         c_parser_statement.
1991         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1992         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1993         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1994         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1995         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1996         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1997         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1998         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1999         down where needed.
2000         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
2001         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2002         calls.
2004 2016-04-13  Marek Polacek  <polacek@redhat.com>
2006         PR c/70436
2007         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2008         adjust callers.
2009         (c_parser_statement): Likewise.
2010         (c_parser_c99_block_statement): Likewise.
2011         (c_parser_while_statement): Likewise.
2012         (c_parser_for_statement): Likewise.
2013         (c_parser_if_body): Don't set IF_P here.
2014         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
2015         about dangling else here.
2016         * c-tree.h (c_finish_if_stmt): Adjust declaration.
2017         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
2018         warn about dangling else here.
2020 2016-04-04  Marek Polacek  <polacek@redhat.com>
2022         PR c/70307
2023         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2025 2016-03-31  Marek Polacek  <polacek@redhat.com>
2027         PR c/70297
2028         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2030 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
2032         PR c/70281
2033         * c-parser.c (c_parser_postfix_expression): Set the source range
2034         for uses of "__builtin_types_compatible_p".
2036 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
2038         PR c/70280
2039         * c-typeck.c (composite_type): Don't count void_list_node
2040         into len, if the list is terminated by void_list_node, start
2041         with void_list_node instead of NULL for newargs.  Stop
2042         at void_list_node.
2044 2016-03-16  Marek Polacek  <polacek@redhat.com>
2046         PR c/70093
2047         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2048         nested functions returning VM types.
2050 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
2052         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2053         when calling c_finish_omp_clauses.
2055 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
2057         PR c/69824
2058         * c-decl.c (get_parm_info): Don't queue implicit function declarations
2059         for later.
2061 2016-03-04  Marek Polacek  <polacek@redhat.com>
2063         PR c/69798
2064         * c-parser.c (c_parser_postfix_expression): Call
2065         c_parser_cast_expression rather than c_parser_postfix_expression.
2067 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
2069         PR c/69796
2070         PR c/69974
2071         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2072         of incomplete decls to error_mark_node.
2074 2016-02-24  Marek Polacek  <polacek@redhat.com>
2076         PR c/69819
2077         * c-decl.c (finish_decl): Don't update the copy of the type of a
2078         different decl type.
2080 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
2082         PR objc/69844
2083         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2084         in id_kind reclassification.
2086 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
2088         PR c/69835
2089         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2091 2016-02-16  James Norris  <jnorris@codesourcery.com>
2093         PR c/64748
2094         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2096 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
2098         * c-decl.c (build_null_declspecs): Zero the entire struct.
2100         PR c/69522
2101         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
2102         callers changed.  If nested_p is true, use it to call
2103         finish_implicit_inits.
2104         * c-tree.h (finish_implicit_inits): Declare.
2105         * c-typeck.c (finish_implicit_inits): New function.  Move code
2106         from ...
2107         (push_init_level): ... here.
2108         (set_designator, process_init_element): Call finish_implicit_inits.
2110 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
2112         PR c/69768
2113         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2114         arguments for -Waddress warning.
2116 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
2118         PR c/69669
2119         * c-decl.c (finish_enum): When honoring mode attribute,
2120         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2122 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
2124         PR debug/69518
2125         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2126         all type variants, not just TYPE_MAIN_VARIANT.
2128 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
2130         PR debug/66869
2131         * c-decl.c (c_write_global_declarations_1): Warn with
2132         warn_unused_function if static prototype without definition
2133         is not C_DECL_USED.
2135 2016-01-27  Marek Polacek  <polacek@redhat.com>
2137         PR c/68062
2138         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2139         to unsigned, if needed.  Add -Wsign-compare warning.
2141 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
2143         PR tree-optimization/69483
2144         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2146 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2148         PR c/24293
2149         * c-tree.h (incomplete_record_decls): Declare.
2150         * c-parser.c (incomplete_record_decls): Define.
2151         (c_parser_translation_unit): Iterate through incomplete_record_decls and
2152         report error if any decl has zero size.
2153         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2154         or enum type to incomplete_record_decls.
2156 2016-01-14  Tom de Vries  <tom@codesourcery.com>
2158         PR tree-optimization/68773
2159         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2160         set force_output.
2162 2016-01-14  Marek Polacek  <polacek@redhat.com>
2164         PR c/69262
2165         * c-decl.c (grokdeclarator): Provide more information for invalid
2166         array declarations.
2168 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
2170         * c-parser.c (c_parser_unary_expression): For dereferences, build
2171         a combined location before calling build_indirect_ref, so that
2172         error reports cover the full range, manually updating the c_expr
2173         src_range.
2175 2016-01-06  Marek Polacek  <polacek@redhat.com>
2177         PR sanitizer/69099
2178         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
2179         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
2180         NULL.
2182 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
2184         Update copyright years.
2186 2016-01-04  Marek Polacek  <polacek@redhat.com>
2188         PR c/68908
2189         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
2190         optimization to use __atomic_fetch_* built-in if possible.
2192 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
2194         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2195         into...
2196         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
2197         all users.
2199 2015-12-22  Marek Polacek  <polacek@redhat.com>
2201         PR c/69002
2202         * c-typeck.c (build_component_ref): Warn when acessing elements of
2203         atomic structures or unions.
2205 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
2207         * c-typeck.c: Include "gcc-rich-location.h".
2208         (build_binary_op): In the two places that call binary_op_error,
2209         create a gcc_rich_location and populate it with the location of
2210         the binary op and its two operands.
2212 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2214         * c-parser.c (c_parser_statement_after_labels): When calling
2215         c_finish_return, Use the return expression's location if it has
2216         one, falling back to the location of the first token within it.
2217         * c-typeck.c (c_finish_return): When issuing warnings about
2218         the incorrect presence/absence of a return value, issue a note
2219         showing the declaration of the function.
2221 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2223         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2224         to 4.
2225         (c_parser_peek_nth_token): New function.
2226         (c_parser_peek_conflict_marker): New function.
2227         (c_parser_error): Detect conflict markers and report them as such.
2229 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2231         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2232         to preserve range information for the primary expression
2233         in the call to c_parser_postfix_expression_after_primary.
2235 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2237         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2238         expression location, falling back on the first token location,
2239         rather than always using the latter.
2241 2015-12-16  Marek Polacek  <polacek@redhat.com>
2243         PR c/64637
2244         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2245         available.
2247 2015-12-15  Marek Polacek  <polacek@redhat.com>
2249         PR c/68907
2250         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2251         artificial decl.
2253 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
2255         * c-parser.c (c_parser_alignof_expression): Capture location of
2256         closing parenthesis (if any), or of end of unary expression, and
2257         use it to build a src_range for the expression.
2259 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
2261         PR c/68757
2262         * c-parser.c (c_parser_get_builtin_args): Add
2263         "out_close_paren_loc" param, and write back to it.
2264         (c_parser_postfix_expression): Capture the closing
2265         parenthesis location for RID_CHOOSE_EXPR,
2266         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2267         RID_BUILTIN_SHUFFLE and use it to set the source range
2268         for such expressions; within RID_BUILTIN_COMPLEX set
2269         the underlying location.
2271 2015-12-07  Marek Polacek  <polacek@redhat.com>
2273         PR c/68668
2274         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2275         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2277 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
2279         * c-tree.h (c_build_va_arg): Adjust prototype.
2280         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2281         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2282         parameter, adjust throughout and issue an error if EXPR is a component
2283         with reverse storage order.
2285 2015-12-02  Jason Merrill  <jason@redhat.com>
2287         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2288         (c_fully_fold_internal, decl_constant_value_for_optimization):
2289         Move from c-common.c.
2290         * c-tree.h: Declare decl_constant_value_for_optimization.
2291         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2293 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
2295         PR c/68162
2296         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2297         following link from declarator to next declarator.  Track original
2298         qualified type and pass it to c_build_qualified_type.
2299         * c-typeck.c (c_build_qualified_type): Add arguments
2300         orig_qual_type and orig_qual_indirect.
2302 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
2304         * c-parser.c (c_parser_omp_clause_name)
2305         (c_parser_oacc_all_clauses): Alphabetical sorting.
2307 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
2309         PR c/68533
2310         * c-decl.c (get_parm_info): Use b->locus instead of input_location
2311         for diagnostics.
2313 2015-12-01  Julian Brown  <julian@codesourcery.com>
2314             Cesar Philippidis  <cesar@codesourcery.com>
2315             James Norris  <James_Norris@mentor.com>
2317         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2318         (c_parser_oacc_clause_use_device): New function.
2319         (c_parser_oacc_all_clauses): Add use_device support.
2320         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2321         (c_parser_oacc_host_data): New function.
2322         (c_parser_omp_construct): Add host_data support.
2323         * c-tree.h (c_finish_oacc_host_data): Add prototype.
2324         * c-typeck.c (c_finish_oacc_host_data): New function.
2325         (c_finish_omp_clauses): Add use_device support.
2327 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
2329         PR c/67106
2330         * c-decl.c: Set TYPE_PACKED in variants.
2332 2015-11-27  Martin Liska  <mliska@suse.cz>
2334         PR c++/68312
2335         * c-array-notation.c (fix_builtin_array_notation_fn):
2336         Use release_vec_vec instead of vec::release.
2337         (build_array_notation_expr): Likewise.
2338         (fix_conditional_array_notations_1): Likewise.
2339         (fix_array_notation_expr): Likewise.
2340         (fix_array_notation_call_expr): Likewise.
2342 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
2344         PR c/63326
2345         * c-parser.c (c_parser_compound_statement_nostart): If
2346         last_label is true, use pragma_stmt instead of pragma_compound
2347         as second c_parser_pragma argument.
2348         (c_parser_omp_ordered, c_parser_omp_target_update,
2349         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2350         false as second argument to c_parser_skip_to_pragma_eol after
2351         diagnosing standalone directives used in pragma_stmt context.
2353 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
2355         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2356         with "if (ENABLE_OFFLOADING)".
2358 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
2360         PR objc/68438
2361         * c-parser.c (c_parser_postfix_expression): Set up source ranges
2362         for various Objective-C constructs: Class.name syntax,
2363         @selector(), @protocol(), @encode(), and [] message syntax.
2365 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
2367         PR 62314
2368         * c-typeck.c (should_suggest_deref_p): New function.
2369         (build_component_ref): Special-case POINTER_TYPE when
2370         generating a "not a structure of union"  error message, and
2371         suggest a "->" rather than a ".", providing a fix-it hint.
2373 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
2375         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2376         candidate into a new function, find_closest_identifier.
2378 2015-11-19  Marek Polacek  <polacek@redhat.com>
2380         PR c/68412
2381         * c-typeck.c (parser_build_binary_op): Properly handle
2382         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2384 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
2386         * c-parser.c (set_c_expr_source_range): Bulletproof both
2387         overloaded implementations against NULL expr->value.
2388         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2389         values.
2390         (c_parser_unary_expression): Likewise when handling addresses of
2391         labels.
2392         (c_parser_postfix_expression): Likewise for statement expressions,
2393         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2394         __builtin_va_arg, and for __builtin_offset_of.
2395         (c_parser_postfix_expression_after_paren_type): Initialize expr's
2396         src_range using the range of the braced initializer.
2397         (c_parser_transaction_expression): Set src_range for "ret" to a
2398         sane pair of values.
2400 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
2402         * c-parser.c (c_finish_omp_declare_simd): Look for
2403         "simd" attribute as well. Update error message.
2405 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
2407         * c-parser.c (c_parser_omp_declare_target): Adjust.
2409 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
2411         * c-typeck.c (c_finish_omp_clauses): Don't mark
2412         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2414 2015-11-14  Marek Polacek  <polacek@redhat.com>
2416         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2417         * c-typeck.c: Likewise.
2419 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
2421         * c-decl.c (warn_defaults_to): Pass line_table to
2422         rich_location ctor.
2423         * c-errors.c (pedwarn_c99): Likewise.
2424         (pedwarn_c90): Likewise.
2425         * c-parser.c (set_c_expr_source_range): New functions.
2426         (c_token::get_range): New method.
2427         (c_token::get_finish): New method.
2428         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2429         based on the range from the start of the LHS to the end of the
2430         RHS.
2431         (c_parser_conditional_expression): Likewise, based on the range
2432         from the start of the cond.value to the end of exp2.value.
2433         (c_parser_binary_expression): Call set_c_expr_source_range on
2434         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2435         (c_parser_cast_expression): Call set_c_expr_source_range on ret
2436         based on the cast_loc through to the end of the expr.
2437         (c_parser_unary_expression): Likewise, based on the
2438         op_loc through to the end of op.
2439         (c_parser_sizeof_expression) Likewise, based on the start of the
2440         sizeof token through to either the closing paren or the end of
2441         expr.
2442         (c_parser_postfix_expression): Likewise, using the token range,
2443         or from the open paren through to the close paren for
2444         parenthesized expressions.
2445         (c_parser_postfix_expression_after_primary): Likewise, for
2446         various kinds of expression.
2447         * c-tree.h (struct c_expr): Add field "src_range".
2448         (c_expr::get_start): New method.
2449         (c_expr::get_finish): New method.
2450         (set_c_expr_source_range): New decls.
2451         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2452         on ret for prefix unary ops.
2453         (parser_build_binary_op): Likewise, running from the start of
2454         arg1.value through to the end of arg2.value.
2456 2015-11-13  Marek Polacek  <polacek@redhat.com>
2458         PR c/68320
2459         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2461 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
2463         * c-typeck.c: Include spellcheck.h.
2464         (lookup_field_fuzzy_find_candidates): New function.
2465         (lookup_field_fuzzy): New function.
2466         (build_component_ref): If the field was not found, try using
2467         lookup_field_fuzzy and potentially offer a suggestion.
2469 2015-11-12  James Norris  <jnorris@codesourcery.com>
2470             Joseph Myers  <joseph@codesourcery.com>
2472         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2473         (c_parser_omp_clause_name): Handle 'device_resident' clause.
2474         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2475         and PRAGMA_OMP_CLAUSE_LINK.
2476         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2477         and PRAGMA_OACC_CLAUSE_LINK.
2478         (OACC_DECLARE_CLAUSE_MASK): New definition.
2479         (c_parser_oacc_declare): New function.
2481 2015-11-12  Marek Polacek  <polacek@redhat.com>
2483         PR c/67784
2484         * c-parser.c (c_parser_for_statement): Reclassify the token in
2485         a correct scope.
2487 2015-11-11  Marek Polacek  <polacek@redhat.com>
2489         PR c/68107
2490         PR c++/68266
2491         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
2492         checking the size of an array.
2494 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
2496         * c-array-notation.c: Remove unused header files.
2497         * c-aux-info.c: Likewise.
2498         * c-convert.c: Likewise.
2499         * c-decl.c: Likewise.
2500         * c-errors.c: Likewise.
2501         * c-lang.c: Likewise.
2502         * c-objc-common.c: Likewise.
2503         * c-parser.c: Likewise.
2504         * c-typeck.c: Likewise.
2505         * gccspec.c: Likewise.
2507 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
2508             Cesar Philippidis  <cesar@codesourcery.com>
2509             James Norris  <jnorris@codesourcery.com>
2510             Julian Brown  <julian@codesourcery.com>
2511             Nathan Sidwell  <nathan@codesourcery.com>
2513         c/
2514         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2515         routine arg.
2516         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2517         (c_parser_pragma): Parse 'acc routine'.
2518         (OACC_ROUTINE_CLAUSE_MARK): Define.
2519         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2521 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2523         PR debug/67192
2524         * c-typeck.c (c_finish_loop): For unconditional loops, set the
2525         location of the backward-goto to the start of the loop body.
2527 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2529         PR debug/67192
2530         * c-parser.c (c_parser_while_statement): Finish the loop before
2531         parsing ahead for misleading indentation.
2532         (c_parser_for_statement): Likewise.
2534 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
2536         * c-decl.c (finish_struct): If the structure has reverse storage
2537         order, rewrite the type of array fields with scalar component.  Call
2538         maybe_apply_pragma_scalar_storage_order on entry.
2539         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
2540         errors on bit-fields and reverse SSO here and not...
2541         (c_mark_addressable): ...here.
2542         (output_init_element): Adjust call to initializer_constant_valid_p.
2543         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2545 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
2547         * c-decl.c (warn_defaults_to): Update for change in signature
2548         of diagnostic_set_info.
2549         * c-errors.c (pedwarn_c99): Likewise.
2550         (pedwarn_c90): Likewise.
2551         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2552         for textinfo::set_location.
2554 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
2555             Thomas Schwinge  <thomas@codesourcery.com>
2556             James Norris  <jnorris@codesourcery.com>
2558         * c-parser.c (c_parser_omp_clause_name): Add support for
2559         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2560         (c_parser_omp_clause_default): Add is_oacc argument. Handle
2561         default(none) in OpenACC.
2562         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2563         arguments.
2564         (c_parser_oacc_clause_tile): New function.
2565         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2566         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2567         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2568         TILE}.
2569         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2570         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2571         FIRSTPRIVATE}.
2572         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2573         (c_parser_oacc_update): Update the error message for missing clauses.
2574         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2575         and OMP_CLAUSE_INDEPENDENT.
2577 2015-11-05  Marek Polacek  <polacek@redhat.com>
2579         PR c/68090
2580         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2581         deal with pre-evaluation on invalid types.
2583 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
2584             Ilya Verbin  <ilya.verbin@intel.com>
2586         * c-parser.c: Include context.h and gimple-expr.h.
2587         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2588         monotonic together with nonmonotonic.
2589         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
2590         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2591         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2592         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2593         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
2594         expressions on combined target teams before the target.
2595         (c_parser_omp_declare_target): If decl has "omp declare target" or
2596         "omp declare target link" attribute, and cgraph or varpool node already
2597         exists, then set corresponding flags.  Call c_finish_omp_clauses
2598         in the parenthesized extended-list syntax case.
2599         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2600         declare target.
2601         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2602         on OMP_CLAUSE_REDUCTION array sections.
2603         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2604         into the constant offset, or for variable low-bound using
2605         POINTER_PLUS_EXPR.  For structure element based array sections use
2606         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2607         (c_finish_omp_clauses): Drop generic_field_head, structure
2608         elements are now always mapped even as array section bases,
2609         diagnose same var in data sharing and mapping clauses.  Diagnose if
2610         linear step on declare simd is neither a constant nor a uniform
2611         parameter.  Look through POINTER_PLUS_EXPR for array section
2612         reductions.  Diagnose the same var or function appearing multiple
2613         times on the same directive.  Fix up wording for the to clause if t
2614         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
2615         modifier on kinds other than dynamic or guided or nonmonotonic
2616         modifier together with ordered clause.
2618 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
2619             Chung-Lin Tang  <cltang@codesourcery.com>
2621         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2623 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
2625         * c-array-notation.c: Reorder #include's and remove duplicates.
2626         * c-aux-info.c: Likewise.
2627         * c-convert.c: Likewise.
2628         * c-decl.c: Likewise.
2629         * c-errors.c: Likewise.
2630         * c-lang.c: Likewise.
2631         * c-objc-common.c: Likewise.
2632         * c-parser.c: Likewise.
2633         * c-typeck.c: Likewise.
2635 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
2637         PR debug/66068
2638         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2639         after calling build_qualified_type.
2641 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
2642             Thomas Schwinge  <thomas@codesourcery.com>
2643             James Norris  <jnorris@codesourcery.com>
2644             Joseph Myers  <joseph@codesourcery.com>
2645             Julian Brown  <julian@codesourcery.com>
2646             Bernd Schmidt  <bschmidt@redhat.com>
2648         * c-parser.c (c_parser_oacc_shape_clause): New.
2649         (c_parser_oacc_simple_clause): New.
2650         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2651         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2653 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
2654             James Norris  <jnorris@codesourcery.com>
2655             Cesar Philippidis  <cesar@codesourcery.com>
2657         PR c/64765
2658         PR c/64880
2659         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2660         parameters, and handle these.  Adjust all users.
2661         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2662         into...
2663         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
2664         all users.
2665         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2666         declare functions.
2667         (c_finish_omp_construct): Declare function.
2668         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2669         Merge functions into...
2670         (c_finish_omp_construct): ... this new function.
2672 2015-10-22  Richard Biener  <rguenther@suse.de>
2674         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2675         before folding a MINUS_EXPR.
2677 2015-10-21  Marek Polacek  <polacek@redhat.com>
2679         PR c/68024
2680         * c-decl.c (start_function): Warn about vararg functions without
2681         a prototype.
2683 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
2685         * c-typeck.c (build_conditional_expr): Use boolean vector
2686         type for vector comparison.
2687         (build_vec_cmp): New.
2688         (build_binary_op): Use build_vec_cmp for comparison.
2690 2015-10-20  Marek Polacek  <polacek@redhat.com>
2692         * c-parser.c (is_cilkplus_vector_p): Don't define here.
2694 2015-10-20  Marek Polacek  <polacek@redhat.com>
2696         PR c/67964
2697         * c-parser.c (c_parser_attributes): Break out of the loop if the
2698         token after an attribute isn't a comma.
2700 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
2701             Aldy Hernandez  <aldyh@redhat.com>
2703         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2704         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2705         (c_parser_omp_variable_list): Handle structure elements for
2706         map, to and from clauses.  Handle array sections in reduction
2707         clause.  Formatting fixes.
2708         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2709         if clause modifiers.
2710         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2711         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2712         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2713         c_parser_omp_clause_is_device_ptr): New functions.
2714         (c_parser_omp_clause_ordered): Parse optional parameter.
2715         (c_parser_omp_clause_reduction): Handle array reductions.
2716         (c_parser_omp_clause_schedule): Parse optional simd modifier.
2717         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2718         functions.
2719         (c_parser_omp_clause_linear): Parse linear clause modifiers.
2720         (c_parser_omp_clause_depend_sink): New function.
2721         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2722         (c_parser_omp_clause_map): Parse release/delete map kinds and
2723         optional always modifier.
2724         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2725         and c_finish_omp_clauses callers.
2726         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
2727         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2728         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2729         (OMP_CRITICAL_CLAUSE_MASK): Define.
2730         (c_parser_omp_critical): Parse critical clauses.
2731         (c_parser_omp_for_loop): Handle doacross loops, adjust
2732         c_finish_omp_for and c_finish_omp_clauses callers.
2733         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2734         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2735         (OMP_FOR_CLAUSE_MASK): Add linear clause.
2736         (c_parser_omp_for): Disallow ordered clause when combined with
2737         distribute.  Disallow linear clause when combined with distribute
2738         and not combined with simd.
2739         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2740         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2741         parse clauses and if depend clause is found, don't parse a body.
2742         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2743         Allow target parallel without for after it.
2744         (OMP_TASK_CLAUSE_MASK): Add priority clause.
2745         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2746         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2747         invalid kinds.
2748         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2749         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2750         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2751         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2752         functions.
2753         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2754         defaultmap and is_device_ptr clauses.
2755         (c_parser_omp_target): Parse target parallel and target simd.  Set
2756         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
2757         and target exit data.  Diagnose invalid map kinds.
2758         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2759         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2760         construct.
2761         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2762         &omp_priv.
2763         (OMP_TASKLOOP_CLAUSE_MASK): Define.
2764         (c_parser_omp_taskloop): New function.
2765         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2766         handle PRAGMA_OMP_TASKLOOP.
2767         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2768         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2769         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2770         Add IS_OMP argument, handle structure element bases, diagnose
2771         bitfields, pass IS_OMP recursively, diagnose known zero length
2772         array sections in depend clauses, handle array sections in reduction
2773         clause, diagnose negative length even for pointers.
2774         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2775         types, pass IS_OMP down to handle_omp_array_sections_1, handle
2776         array sections in reduction clause, set
2777         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2778         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2779         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2780         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2782 2015-10-06  Marek Polacek  <polacek@redhat.com>
2784         * c-parser.c (c_parser_statement_after_labels): Use
2785         protected_set_expr_location.
2786         (c_parser_omp_clause_num_gangs): Likewise.
2787         (c_parser_omp_clause_num_threads): Likewise.
2788         (c_parser_omp_clause_num_workers): Likewise.
2789         (c_parser_omp_clause_vector_length): Likewise.
2790         (c_parser_omp_clause_num_teams): Likewise.
2791         (c_parser_omp_clause_thread_limit): Likewise.
2792         * c-typeck.c (build_c_cast): Likewise.
2793         (c_cast_expr): Likewise.
2795 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
2797         * c-typeck.c (c_tree_equal): Use real_equal instead of
2798         REAL_VALUES_EQUAL.
2800 2015-10-04  Jason Merrill  <jason@redhat.com>
2802         * c-parser.c (c_lex_one_token): Handle @synchronized.
2803         * c-decl.c (match_builtin_function_types): A declaration of a built-in
2804         can change whether the function is transaction_safe.
2806 2015-10-02  Marek Polacek  <polacek@redhat.com>
2808         PR c/67730
2809         * c-typeck.c (convert_for_assignment): Use the expansion point
2810         location throughout.
2812 2015-10-02  Marek Polacek  <polacek@redhat.com>
2814         PR c/64249
2815         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2816         and pass it down to c_parser_if_statement.
2817         (c_parser_else_body): Add CHAIN parameter and pass it down to
2818         c_parser_statement_after_labels.
2819         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
2820         duplicated if-else-if conditions.
2822 2015-10-01  Marek Polacek  <polacek@redhat.com>
2824         * c-typeck.c (convert_for_assignment): Improve commentary.
2826 2015-09-30  Marek Polacek  <polacek@redhat.com>
2828         PR c/67730
2829         * c-typeck.c (c_finish_return): Use the expansion point location for
2830         certain "return with value" warnings.
2832 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2834         * c-parser.c (pragma_lex): Add loc argument.
2836 2015-09-15  Marek Polacek  <polacek@redhat.com>
2838         PR c/67580
2839         * c-decl.c (tag_exists_p): New function.
2840         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2841         struct/union/enum keywords are missing.
2842         * c-tree.h (tag_exists_p): Declare.
2844 2015-09-15  Marek Polacek  <polacek@redhat.com>
2846         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2847         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2848         Return NULL_TREE instead of 0.
2849         (lookup_name): Return NULL_TREE instead of 0.
2850         (lookup_name_in_scope): Likewise.
2851         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2852         (parser_xref_tag): Use false instead of 0.
2853         (start_struct): Use true instead of 1.
2854         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2856 2015-09-14  Marek Polacek  <polacek@redhat.com>
2858         * c-typeck.c (set_nonincremental_init_from_string): Use
2859         HOST_WIDE_INT_M1U when shifting a negative value.
2861 2015-09-09  Mark Wielaard  <mjw@redhat.com>
2863         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2864         parm against NULL.
2866 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
2868         PR c/67502
2869         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2870         into OMP_FOR_PRE_BODY rather than before the loop.
2872 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
2874         PR c/67501
2875         * c-parser.c (c_parser_oacc_all_clauses,
2876         c_parser_omp_all_clauses): Remove invalid clause from
2877         list of clauses even if parser->error is set.
2879         PR c/67500
2880         * c-parser.c (c_parser_omp_clause_aligned,
2881         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2882         test for errors.
2883         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2884         error_mark_node.
2886         PR c/67495
2887         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2888         instead of c_parser_unary_expression.  If the result is !lvalue_p,
2889         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2891 2015-09-04  Marek Polacek  <polacek@redhat.com>
2893         PR sanitizer/67279
2894         * c-typeck.c (build_binary_op): Don't instrument static initializers.
2896 2015-09-03  Martin Sebor  <msebor@redhat.com>
2898         PR c/66516
2899         * c-typeck.c (convert_arguments, parser_build_unary_op,
2900         build_conditional_expr, c_cast_expr, convert_for_assignment,
2901         build_binary_op, _objc_common_truthvalue_conversion): Call
2902         reject_gcc_builtin.
2903         (c_decl_implicit): Define.
2905 2015-09-02  Marek Polacek  <polacek@redhat.com>
2907         PR c/67432
2908         * c-parser.c (c_parser_enum_specifier): Give a better error for
2909         an empty enum.
2911 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
2913         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2915 2015-08-12  Marek Polacek  <polacek@redhat.com>
2917         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2918         LOC to it.
2920 2015-08-03  Marek Polacek  <polacek@redhat.com>
2922         PR c/67088
2923         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2924         Use it.
2925         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2927 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
2929         * c-parser.c (c_parser_if_body): Take token_indent_info
2930         argument. Call warn_for_misleading_indentation even when the
2931         body is a semicolon.  Extract token_indent_infos corresponding
2932         to the guard, body and next tokens.  Adjust call to
2933         warn_for_misleading_indentation accordingly.
2934         (c_parser_else_body): Likewise.
2935         (c_parser_if_statement): Likewise.
2936         (c_parser_while_statement): Likewise.
2937         (c_parser_for_statement): Likewise.
2939 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
2940             Manuel López-Ibáñez  <manu@gcc.gnu.org>
2942         * c-decl.c (get_parm_info): Remove static var. Update warning
2943         message.
2945 2015-07-27  Marek Polacek  <polacek@redhat.com>
2947         PR c++/66555
2948         PR c/54979
2949         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2951 2015-07-20  Marek Polacek  <polacek@redhat.com>
2953         PR c++/55095
2954         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2955         (build_binary_op): Warn about left shift overflows.
2957 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
2959         * c-array-notation.c: Adjust includes for flags.h changes.
2960         * c-objc-common.c: Likewise.
2962 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
2964         * c-array-notation.c: Adjust includes.
2965         * c-aux-info.c: Likewise.
2966         * c-convert.c: Likewise.
2967         * c-decl.c: Likewise.
2968         * c-errors.c: Likewise.
2969         * c-lang.c: Likewise.
2970         * c-objc-common.c: Likewise.
2971         * c-parser.c: Likewise.
2972         * c-typeck.c: Likewise.
2974 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2976         PR fortran/66605
2977         * c-decl.c (finish_function): Call do_warn_unused_parameter.
2979 2015-06-29  Marek Polacek  <polacek@redhat.com>
2981         PR c/66322
2982         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2983         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
2984         about -Wswitch-bool here.
2985         (do_case): Update c_add_case_label call.
2986         (c_finish_case): Update c_do_switch_warnings call.
2988 2015-06-27  Marek Polacek  <polacek@redhat.com>
2990         * c-typeck.c: Use VECTOR_TYPE_P throughout.
2992 2015-06-26  Marek Polacek  <polacek@redhat.com>
2994         * c-array-notation.c (fix_builtin_array_notation_fn): Use
2995         INDIRECT_REF_P.
2996         * c-typeck.c (array_to_pointer_conversion): Likewise.
2997         (build_unary_op): Likewise.
2998         (c_finish_return): Likewise.
3000 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
3002         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3003         * c-parser.c: Likewise.
3005 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
3007         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3008         instead of pointer_hash.
3009         (detect_field_duplicates): Likewise.
3011 2015-06-25  Marek Polacek  <polacek@redhat.com>
3013         * c-array-notation.c: Use VAR_P throughout.
3014         * c-decl.c: Likewise.
3015         * c-objc-common.c: Likewise.
3016         * c-parser.c: Likewise.
3017         * c-typeck.c: Likewise.
3019 2015-06-25  Marek Polacek  <polacek@redhat.com>
3021         * c-decl.c: Use is_global_var throughout.
3022         * c-parser.c: Likewise.
3023         * c-typeck.c: Likewise.
3025 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
3027         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3028         * c-aux-info.c: Likewise.
3029         * c-convert.c: Likewise.
3030         * c-decl.c: Likewise.
3031         * c-errors.c: Likewise.
3032         * c-lang.c: Likewise.
3033         * c-objc-common.c: Likewise.
3034         * c-parser.c: Likewise.
3035         * c-typeck.c: Likewise.
3037 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
3039         PR middle-end/66325
3040         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3041         variants.
3043 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
3045         * c-decl.c (pop_scope): Register the main translation unit
3046         through the new debug hook.
3048 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
3050         * c-array-notation.c : Adjust include files.
3051         * c-aux-info.c : Likewise.
3052         * c-convert.c : Likewise.
3053         * c-decl.c : Likewise.
3054         * c-errors.c : Likewise.
3055         * c-lang.c : Likewise.
3056         * c-lang.h : Likewise.
3057         * c-objc-common.c : Likewise.
3058         * c-parser.c : Likewise.
3059         * c-typeck.c : Likewise.
3061 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
3063         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3064         immediately clobber it.
3065         (c_write_global_declarations_1): Remove call to
3066         check_global_declaration_1.
3067         (c_write_global_declarations_2): Remove.
3068         (c_write_final_cleanups): Rename from c_write_global_declarations.
3069         Remove call to finalize_compilation_unit.
3070         Remove calls to debugging hooks.
3071         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3072         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3073         * c-tree.h: Remove c_write_global_declarations.
3075 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
3077         * c-array-notation.c: Adjust includes for restructured coretypes.h.
3078         * c-aux-info.c: Likewise.
3079         * c-convert.c: Likewise.
3080         * c-decl.c: Likewise.
3081         * c-errors.c: Likewise.
3082         * c-lang.c: Likewise.
3083         * c-objc-common.c: Likewise.
3084         * c-parser.c: Likewise.
3085         * c-typeck.c: Likewise.
3087 2015-06-04  Marek Polacek  <polacek@redhat.com>
3089         PR c/66341
3090         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3091         it is a lvalue.
3093 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3095         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3096         Warn for empty struct.
3097         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3099 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
3101         * c-decl.c (start_function): Call plugin before parsing.
3102         (finish_function): Call plugin after parsing.
3104 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3106         PR c/49551
3107         * c-decl.c (merge_decls): Merge DECL_COMMON.
3109 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
3111         * Make-lang.in (check_gcc_pallelize): Define.
3113 2015-05-22  Marek Polacek  <polacek@redhat.com>
3115         PR c/47043
3116         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3117         attributes.
3119 2015-05-21  Marek Polacek  <polacek@redhat.com>
3121         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3122         DECL_BUILT_IN.
3124 2015-05-20  Marek Polacek  <polacek@redhat.com>
3126         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3127         * c-typeck.c: Likewise.
3129 2015-05-19  Marek Polacek  <polacek@redhat.com>
3131         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3133 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
3135         PR middle-end/66199
3136         * c-parser.c (c_parser_omp_for_loop): Don't add
3137         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3138         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3139         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3140         constructs.
3142 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
3144         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3145         swaps.
3147 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3149         PR fortran/44054
3150         * c-objc-common.c (c_tree_printer): Replace locus pointer with
3151         accessor function.
3153 2015-05-14  Marek Polacek  <polacek@redhat.com>
3155         PR c/66066
3156         PR c/66127
3157         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3158         rather than with 0.
3160 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
3162         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3163         to add a call to warn_for_misleading_indentation.
3164         (c_parser_else_body): Likewise, adding param "else_loc".
3165         (c_parser_if_statement): Check for misleading indentation.
3166         (c_parser_while_statement): Likewise.
3167         (c_parser_for_statement): Likewise.
3169 2015-05-08  Marek Polacek  <polacek@redhat.com>
3171         PR c/64918
3172         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3173         (output_init_element): Likewise.
3175 2015-05-07  Marek Polacek  <polacek@redhat.com>
3177         PR c/65179
3178         * c-typeck.c (build_binary_op): Warn when left shifting a negative
3179         value.
3181 2015-04-30  Marek Polacek  <polacek@redhat.com>
3183         * c-typeck.c (set_init_label): Call error_at instead of error and
3184         pass LOC to it.
3186         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
3187         the type of a decl.
3189         * c-typeck.c (c_build_va_arg): Clarify the error message.
3191 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
3193         * c-parser.c (c_parser_oacc_enter_exit_data): Use
3194         OMP_STANDALONE_CLAUSES.
3196 2015-04-28  Marek Polacek  <polacek@redhat.com>
3198         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3200 2015-04-28  Marek Polacek  <polacek@redhat.com>
3202         PR c/65901
3203         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3205 2015-04-25  Marek Polacek  <polacek@redhat.com>
3207         PR c/52085
3208         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
3209         attribute.
3211 2015-04-23  Marek Polacek  <polacek@redhat.com>
3213         PR c/65345
3214         * c-decl.c (set_labels_context_r): New function.
3215         (store_parm_decls): Call it via walk_tree_without_duplicates.
3216         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3217         instead of create_tmp_var.  Build TARGET_EXPR instead of
3218         COMPOUND_EXPR.
3219         (build_atomic_assign): Use create_tmp_var_raw instead of
3220         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
3222 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
3224         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3225         (c_parser_omp_target_update): Add missed %> to error_at ().
3227 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
3229         PR target/55143
3230         * c-decl.c (c_default_pointer_mode): Remove definition.
3231         * c-tree.h (c_default_pointer_mode): Remove declaration.
3233 2015-03-27  Tobias Burnus  <burnus@net-b.de>
3235         PR c/65586
3236         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3237         error out.
3238         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3239         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3240         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3242 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
3244         * c-decl.c (c_decl_attributes): Also add "omp declare target"
3245         attribute for DECL_EXTERNAL VAR_DECLs.
3247 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
3249         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3250         argument.
3252 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
3254         PR c/65120
3255         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3256         before preparing arguments to warn_logical_not_parentheses.
3258 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
3260         PR c/65120
3261         * c-typeck.c (parser_build_binary_op): Don't warn for
3262         !!x == y or !b == y where b is _Bool.
3264 2015-03-09  Marek Polacek  <polacek@redhat.com>
3266         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3267         * c-decl.c (grokdeclarator): Likewise.
3268         * c-typeck.c (build_binary_op): Likewise.
3270 2015-02-27  Marek Polacek  <polacek@redhat.com>
3272         PR c/65228
3273         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3275 2015-02-14  Marek Polacek  <polacek@redhat.com>
3277         PR c/64768
3278         * c-decl.c (grokdeclarator): Set the range of a flexible array member
3279         declared through a typedef name.
3281 2015-02-13  Marek Polacek  <polacek@redhat.com>
3283         PR c/65050
3284         * c-decl.c (grokdeclarator): Print also the type when giving
3285         the error message about array's incomplete element type.
3287 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
3289         PR c/64824
3290         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3291         check in the POP macro.
3293 2015-02-09  Marek Polacek  <polacek@redhat.com>
3295         PR c/64856
3296         * c-typeck.c (process_init_element): Don't always wrap
3297         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3298         initializing a range of elements.
3300 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
3302         PR c/64824
3303         PR c/64868
3304         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3306 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
3308         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3309         processing enum declaration.
3311 2015-01-29  Marek Polacek  <polacek@redhat.com>
3313         PR c/64709
3314         * c-typeck.c (pop_init_level): If constructor_elements has
3315         exactly one element with integer_zerop value, set constructor_zeroinit
3316         to 1.  Remove braces around warning_init call.
3318 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
3320         PR c/64766
3321         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3322         of FUNCTION_DECLs with error_mark_node.
3324 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
3326         PR c/64778
3327         * c-typeck.c (convert_arguments): Return -1 if there are
3328         error_args, even if we've diagnosed too many arguments.
3330 2015-01-21  Richard Biener  <rguenther@suse.de>
3332         PR middle-end/64313
3333         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3334         for builtins the user declared correctly.
3336 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
3337             Bernd Schmidt  <bernds@codesourcery.com>
3338             Cesar Philippidis  <cesar@codesourcery.com>
3339             James Norris  <jnorris@codesourcery.com>
3340             Jakub Jelinek  <jakub@redhat.com>
3341             Ilmir Usmanov  <i.usmanov@samsung.com>
3343         * c-parser.c: Include "gomp-constants.h".
3344         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3345         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3346         Use OMP_CLAUSE_SET_MAP_KIND.
3347         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3348         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3349         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3350         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3351         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3352         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3353         "copyout", "create", "delete", "deviceptr", "gang", "host",
3354         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3355         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3356         "present_or_create", "pcreate", "seq", "self", "vector",
3357         "vector_length", "wait", "worker".
3358         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3359         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3360         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3361         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3362         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3363         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3364         (c_parser_oacc_data_clause_deviceptr)
3365         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3366         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3367         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3368         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3369         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3370         (c_parser_oacc_parallel, c_parser_oacc_update)
3371         (c_parser_oacc_wait): New functions.
3372         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3373         (c_finish_oacc_data): New prototypes.
3374         * c-typeck.c: Include "gomp-constants.h".
3375         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
3376         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
3377         OMP_CLAUSE_SET_MAP_KIND.
3378         (c_finish_oacc_parallel, c_finish_oacc_kernels)
3379         (c_finish_oacc_data): New functions.
3380         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3381         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3382         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3383         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3384         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3385         GOMP_MAP_FORCE_DEVICEPTR.
3387 2015-01-09  Michael Collison  <michael.collison@linaro.org>
3389         * c-array-notation.c: Include hash-set.h, machmode.h,
3390         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3391         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3392         * c-aux-info.c: Ditto.
3393         * c-convert.c: Ditto.
3394         * c-decl.c: Ditto.
3395         * c-errors.c: Ditto.
3396         * c-lang.c: Dittoxs.
3397         * c-objc-common.c: Ditto.
3398         * c-parser.c: Ditto.
3399         * c-typeck.c: Include hash-set.h, machmode.h,
3400         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3401         fold-const.h, wide-int.h, inchash.h, real.h and
3402         fixed-value.h due to flattening of tree.h.
3404 2015-01-07  Marek Polacek  <polacek@redhat.com>
3406         PR c/64417
3407         * c-typeck.c (process_init_element): Disallow initialization of
3408         a flexible array member with a string constant if the structure
3409         is in an array.
3411 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
3413         PR sanitizer/64344
3414         * c-typeck.c (convert_for_assignment, c_finish_return): For
3415         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3416         types also set in_late_binary_op around convert call.
3417         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3418         to integral type casts, if not in_late_binary_op, pass c_fully_fold
3419         result on expr as last argument to ubsan_instrument_float_cast,
3420         if in_late_binary_op, don't use c_save_expr but save_expr.
3422         Update copyright years.
3424 2015-01-05  Marek Polacek  <polacek@redhat.com>
3426         PR c/64423
3427         * c-typeck.c (build_array_ref): Pass loc down to
3428         warn_array_subscript_with_type_char.
3430 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
3432         * c-typeck.c: New behavious for pointers to arrays with qualifiers
3433         (common-pointer-type): For pointers to arrays take qualifiers from
3434         element type.
3435         (build_conditional_expr): Add warnings for lost qualifiers.
3436         (comp-target-types): Allow pointers to arrays with different qualifiers.
3437         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3438         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3439         to PEDWARN_FOR_QUALIFIERS.
3441 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
3443         PR sanitizer/64289
3444         * c-convert.c: Include ubsan.h.
3445         (convert): For real -> integral casts and
3446         -fsanitize=float-cast-overflow don't call convert_to_integer, but
3447         instead instrument the float cast directly.
3449 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
3451         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3452         c_finish_stmt_expr): Remove NULL last argument from
3453         create_tmp_var_raw and create_tmp_var calls.
3454         * c-array-notation.c (fix_builtin_array_notation_fn,
3455         build_array_notation_expr, fix_conditional_array_notations_1,
3456         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3458 2014-11-28  Marek Polacek  <polacek@redhat.com>
3460         PR c/63862
3461         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3462         convert the right operand to integer type.
3464 2014-11-25  Marek Polacek  <polacek@redhat.com>
3466         PR c/63877
3467         * c-decl.c (start_function): Disable -Wmissing-declarations warning
3468         for inline functions.
3470 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
3472         PR target/63764
3473         * c-typeck.c (build_array_ref): Adjust
3474         convert_vector_to_pointer_for_subscript caller.  If it returns true,
3475         call non_lvalue_loc on the result.
3477 2014-11-11  Richard Biener  <rguenther@suse.de>
3479         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3480         to true.
3482 2014-11-10  Andi Kleen  <ak@linux.intel.com>
3484         PR c/60804
3485         * c-parser.c (c_parser_statement_after_labels): Call
3486         check_no_cilk.
3487         (c_parser_if_statement): Dito.
3488         (c_parser_switch_statement): Dito.
3489         (c_parser_while_statement): Dito.
3490         (c_parser_do_statement): Dito.
3491         (c_parser_for_statement): Dito.
3492         * c-typeck.c (c_finish_loop): Dito.
3494 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
3496         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3497         OPT_Wshift_count_overflow in the warnings.
3499 2014-10-30  Marek Polacek  <polacek@redhat.com>
3501         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3502         print the stripped version as well, if they're not the same.
3504 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
3506         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3507         machine_mode.
3509 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
3511         * c-decl.c: Adjust include files.
3512         * c-parser.c: Ditto.
3514 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
3515             Tom Tromey  <tromey@redhat.com>
3517         * c-tree.h (enum c_oracle_request): New.
3518         (c_binding_oracle_function): New typedef.
3519         (c_binding_oracle, c_pushtag, c_bind): Declare.
3520         * c-decl.c (c_binding_oracle): New global.
3521         (I_SYMBOL_CHECKED): New macro.
3522         (i_symbol_binding): New function.
3523         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3524         (I_TAG_CHECKED): New macro.
3525         (i_tag_binding): New function.
3526         (I_TAG_BINDING, I_TAG_DECL): Redefine.
3527         (I_LABEL_CHECKED): New macro.
3528         (i_label_binding): New function.
3529         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3530         (c_print_identifier): Save and restore c_binding_oracle.
3531         (c_pushtag, c_bind): New functions.
3533 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
3535         * c-typeck.c: Adjust include files.
3537 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3539         PR c++/53061
3540         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3541         initialization here...
3542         (c_initialize_diagnostics): ... but here. Set defaults after
3543         building pretty-printer.
3545 2014-10-23  Marek Polacek  <polacek@redhat.com>
3547         PR c/63626
3548         * c-decl.c (pop_scope): Don't print warning in external_scope.
3550 2014-10-19  Marek Polacek  <polacek@redhat.com>
3552         PR c/63567
3553         * c-typeck.c (output_init_element): Allow initializing objects with
3554         static storage duration with compound literals even in C99 and add
3555         pedwarn for it.
3557 2014-10-17  Marek Polacek  <polacek@redhat.com>
3559         PR c/63567
3560         * c-typeck.c (digest_init): Allow initializing objects with static
3561         storage duration with compound literals even in C99 and add pedwarn
3562         for it.
3564 2014-10-17  Marek Polacek  <polacek@redhat.com>
3566         PR c/63543
3567         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3568         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3569         error multiple times.  Print the type.
3571 2014-10-17  Marek Polacek  <polacek@redhat.com>
3573         PR c/63549
3574         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3575         type.
3577 2014-10-17  Marek Polacek  <polacek@redhat.com>
3579         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3580         (start_function): Use OPT_Wimplicit_int instead of 0.
3581         (store_parm_decls_oldstyle): Likewise.
3583 2014-10-17  Alan Modra  <amodra@gmail.com>
3585         PR middle-end/61848
3586         * c-decl.c (merge_decls): Don't merge section name or tls model
3587         to newdecl symtab node, instead merge to olddecl.  Override
3588         existing olddecl section name.  Set tls_model for all thread-local
3589         vars, not just OMP thread-private ones.  Remove incorrect comment.
3591 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
3593         * c-decl.c: Adjust include files.
3595 2014-10-14  DJ Delorie  <dj@redhat.com>
3597         * c-parser.c (c_parse_init): Add RID entries for each __intN.
3598         (c_token_starts_typename): Check all __intN, not just __int128.
3599         (c_token_starts_declspecs): Likewise.
3600         (c_parser_declspecs): Likewise.
3601         (c_parser_attribute_any_word): Likewise.
3602         (c_parser_objc_selector): Likewise.
3603         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3604         (struct c_declspecs): Add int_n_idx field to record *which* __intN
3605         is specified.
3606         * c-decl.c (declspecs_add_type): Check for all __intN, not just
3607         __int128.
3608         (finish_declspecs): Likewise.
3610 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
3612         * c-parser.c (c_parser_all_labels): New function to replace
3613         the duplicate code.
3614         (c_parser_statement): Call the new function.
3616 2014-10-09  Marek Polacek  <polacek@redhat.com>
3618         PR c/63480
3619         * c-typeck.c (pop_init_level): Don't warn about initializing
3620         with { }.
3622 2014-10-07  Marek Polacek  <polacek@redhat.com>
3624         PR c/59717
3625         * c-decl.c (header_for_builtin_fn): New function.
3626         (implicitly_declare): Suggest which header to include.
3628 2014-10-07  Marek Polacek  <polacek@redhat.com>
3630         * c-convert.c (convert): Use error_operand_p.
3631         * c-typeck.c (require_complete_type): Likewise.
3632         (really_atomic_lvalue): Likewise.
3633         (digest_init): Likewise.
3634         (handle_omp_array_sections_1): Likewise.
3636 2014-10-03  Marek Polacek  <polacek@redhat.com>
3638         PR c/63453
3639         * c-decl.c (pop_scope): Don't warn about "inline function declared
3640         but never defined" for functions marked with gnu_inline attribute.
3642 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
3644         PR c++/63249
3645         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3646         on low_bound and length.
3648 2014-09-24  Marek Polacek  <polacek@redhat.com>
3650         PR c/61405
3651         PR c/53874
3652         * c-parser.c: Don't define CPP_KEYWORD.
3653         (c_parser_switch_statement): Pass original type to c_finish_case.
3654         * c-tree.h (c_finish_case): Update declaration.
3655         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
3656         conditionally to c_do_switch_warnings.
3658 2014-09-03  Marek Polacek  <polacek@redhat.com>
3660         PR c/62024
3661         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3662         conversions.
3664 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
3665             Balaji V. Iyer  <balaji.v.iyer@intel.com>
3666             Igor Zamyatin  <igor.zamyatin@intel.com>
3668         * c-parser.c (c_parser_cilk_for): New function.
3669         (c_parser_cilk_grainsize): Likewise.
3670         (c_get_temp_regvar): Likewise.
3671         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3672         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3673         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3674         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3675         case.
3677 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
3679         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3680         with using HOST_WIDE_INT without truncation to 'int'
3682 2014-08-22  Marek Polacek  <polacek@redhat.com>
3684         PR c++/62199
3685         * c-typeck.c (parser_build_binary_op): Adjust call to
3686         warn_logical_not_parentheses.
3688 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
3690         PR other/62008
3691         * c-parser.c (c_parser_array_notation): Check for correct
3692         type of an array added.
3694 2014-08-19  Marek Polacek  <polacek@redhat.com>
3696         PR c++/62153
3697         * c-typeck.c (build_binary_op): If either operand of a comparison
3698         is a boolean expression, call maybe_warn_bool_compare.
3700 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
3702         PR c/45584
3703         * c-typeck.c (build_c_cast): Do a conversion even when the
3704         TYPE_MAIN_VARIANTs are the same.
3706 2014-08-19  Marek Polacek  <polacek@redhat.com>
3708         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3709         pedwarn_c99 instead of pedwarn.
3710         (grokfield): Likewise.
3711         (warn_defaults_to): New function.
3712         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3713         Unconditionally call pedwarn_c99 instead of pedwarn.
3714         (start_function): Call warn_defaults_to instead of pedwarn_c99.
3715         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3716         check flag_isoc11 before.
3717         * c-errors.c (pedwarn_c99): Change the return type to bool.
3718         Handle -Wc99-c11-compat.
3719         * c-parser.c (disable_extension_diagnostics): Handle
3720         warn_c99_c11_compat.
3721         (restore_extension_diagnostics): Likewise.
3722         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3723         instead of pedwarn, don't check flag_isoc11 before.
3724         (c_parser_declspecs): Likewise.
3725         (c_parser_alignas_specifier): Likewise.
3726         (c_parser_alignof_expression): Likewise.
3727         (c_parser_generic_selection): Likewise.
3728         * c-tree.h (pedwarn_c99): Update declaration.
3729         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3730         of pedwarn_c99.
3732 2014-08-19  Marek Polacek  <polacek@redhat.com>
3734         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3735         to pedwarn_c90.
3736         * c-errors.c: Include "opts.h".
3737         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3738         * c-parser.c (disable_extension_diagnostics): Handle negative value
3739         of warn_c90_c99_compat, too.
3740         (restore_extension_diagnostics): Likewise.
3741         (c_parser_compound_statement_nostart): Pass
3742         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3744 2014-08-12  Marek Polacek  <polacek@redhat.com>
3746         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3747         Add pedwarn.
3748         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3749         Likewise.
3750         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3752 2014-08-10  Marek Polacek  <polacek@redhat.com>
3754         PR c/51849
3755         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3756         Call pedwarn_c90 instead of pedwarn.
3757         (check_bitfield_type_and_width): Likewise.
3758         (declspecs_add_qual): Likewise.
3759         (declspecs_add_type): Likewise.
3760         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3761         Adjust to only call pedwarn_c90.
3762         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
3763         pedwarn_c90 instead of pedwarn.
3764         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3765         * c-parser.c (disable_extension_diagnostics): Handle
3766         warn_c90_c99_compat.
3767         (restore_extension_diagnostics): Likewise.
3768         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
3769         pedwarn_c90 instead of pedwarn.
3770         (c_parser_initelt): Likewise.
3771         (c_parser_postfix_expression): Likewise.
3772         (c_parser_postfix_expression_after_paren_type): Likewise.
3773         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3774         * c-tree.h: Fix formatting.
3775         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
3776         pedwarn_c90 instead of pedwarn.
3778 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
3780         * c-typeck.c: Remove include of pointer-set.h.
3782 2014-08-07  Marek Polacek  <polacek@redhat.com>
3784         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3786 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
3788         * c-typeck.c: Use hash_map instead of pointer_map.
3790 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
3792         * c-decl.c: Use hash_set instead of pointer_set.
3794 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
3796         PR middle-end/61455
3797         * c-array-notation.c (expand_array_notations): Handling
3798         of DECL_EXPR added.
3800 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
3802         PR c++/60517
3803         * c-typeck.c (c_finish_return): Return 0 instead of the address of
3804         a local variable.
3806 2014-07-30  Tom Tromey  <tromey@redhat.com>
3808         * c-typeck.c (struct constructor_stack) <designator_depth>: New
3809         field.
3810         (really_start_incremental_init, push_init_level): Initialize
3811         designator_depth.
3812         (pop_init_level): Set global designator_depth.
3813         (process_init_element): Check for designated_init attribute.
3815 2014-07-20  Marek Polacek  <polacek@redhat.com>
3817         PR c/61852
3818         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
3819         (implicitly_declare): Pass location to implicit_decl_warning.
3821 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
3823         PR middle-end/61294
3824         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3825         If non-NULL, call c_parser_check_literal_zero.
3826         (c_parser_check_literal_zero): New function.
3827         (c_parser_postfix_expression_after_primary): Adjust
3828         c_parser_expr_list caller, handle -Wmemset-transposed-args.
3830 2014-07-06  Marek Polacek  <polacek@redhat.com>
3832         PR c/6940
3833         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3834         * c-tree.h (C_ARRAY_PARAMETER): Define.
3835         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3836         function parameter.
3838 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
3839             Chen Gang  <gang.chen.5i5j@gmail.com>
3841         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3842         releasing symbol.
3844 2014-07-01  Marek Polacek  <polacek@redhat.com>
3846         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3847         instead of 0 to WARN_FOR_ASSIGNMENT.
3849 2014-07-01  Marek Polacek  <polacek@redhat.com>
3851         PR c/58286
3852         * c-typeck.c (convert_for_assignment): Pass
3853         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3855 2014-06-30  Marek Polacek  <polacek@redhat.com>
3857         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3858         has no_sanitize_undefined attribute.
3860 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
3862         PR middle-end/57541
3863         * c-array-notation.c (fix_builtin_array_notation_fn):
3864         Check for 0 arguments in builtin call. Check that bultin argument is
3865         correct.
3866         * c-parser.c (c_parser_array_notation): Check for incorrect initial
3867         index.
3869 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3871         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3872         qualifiers in __auto_type for atomic types.
3873         (c_parser_typeof_specifier): Discard all type qualifiers in
3874         __typeof__ for atomic types.
3876 2014-06-25  Marek Polacek  <polacek@redhat.com>
3878         PR c/61162
3879         * c-parser.c (c_parser_statement_after_labels): Pass the location of
3880         the return expression to c_finish_return.
3882 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
3884         * c-typeck.c (c_finish_omp_clauses): Make sure
3885         OMP_CLAUSE_LINEAR_STEP has correct type.
3887 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
3889         * c-decl.c: Adjust.
3891 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
3893         * c-parser.c (c_parser_omp_for_loop): For
3894         #pragma omp parallel for simd move lastprivate clause from parallel
3895         to for rather than simd.
3897 2014-06-23  Marek Polacek  <polacek@redhat.com>
3899         * c-typeck.c (parser_build_binary_op): Don't call
3900         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3902 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
3904         * c-parser.c (c_parser_omp_threadprivate): Likewise.
3905         * c-decl.c (merge_decls): Likewise.
3907 2014-06-09  Marek Polacek  <polacek@redhat.com>
3909         PR c/36446
3910         * c-typeck.c (error_init): Call inform instead of error_at.
3911         (pedwarn_init): Call inform instead of pedwarn.
3912         (warning_init): Call inform instead of warning_at.
3914 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
3916         * c-decl.c (merge_decls): Use set_decl_section_name.
3917         (duplicate_decls): Remove node if it exists.
3919 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
3921         PR c/53119
3922         * c-typeck.c (push_init_level, process_init_element,
3923         pop_init_level): Correct check for zero initialization, move
3924         missing brace warning to respect zero initialization.
3926 2014-06-05  Marek Polacek  <polacek@redhat.com>
3928         PR c/56724
3929         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3931 2014-06-05  Marek Polacek  <polacek@redhat.com>
3933         PR c/49706
3934         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3935         on the left hand side operand of a comparison. 
3937 2014-06-05  Marek Polacek  <polacek@redhat.com>
3939         PR c/48062
3940         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3941         Print note only if the warning was printed.
3943 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
3945         PR c/58942
3946         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3947         with a pointer.
3949 2014-06-03  Marek Polacek  <polacek@redhat.com>
3951         PR c/60439
3952         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3953         c_start_case.
3954         * c-tree.h (c_start_case): Update.
3955         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
3956         switch condition has boolean value.
3958 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
3960         * c-decl.c: Include builtins.h.
3961         * c-parser.c: Likewise.
3963 2014-05-27  Marek Polacek  <polacek@redhat.com>
3965         PR c/56724
3966         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
3967         error and warning calls to error_at and warning_at.  Pass location of
3968         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
3969         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3970         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
3972 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
3974         PR c/61191
3975         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3976         function parameters.
3978 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
3980         * c-decl.c (merge_decls): Preserve symtab node pointers.
3981         (duplicate_decls): Free new decl.
3983 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
3985         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3986         initialization.
3988         * c-parser.c (c_parser_omp_target): Return bool values.
3990 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
3992         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3993         num_teams_loc variable to num_thread_limit_loc.
3995 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
3997         * c-array-notation.c (expand_array_notations): Use void_node
3998         instead of void_zero_node.
4000 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
4002         * c-decl.c (finish_struct): Adjust.
4003         (finish_enum): Likewise.
4004         (bind): Adjust.
4005         (record_inline_static): Likewise.
4006         (push_scope): Likewise.
4007         (make_label): Likewise.
4008         (lookup_label_for_goto): Likewise.
4009         (finish_struct): Likewise.
4010         (finish_enum): Likewise.
4011         (store_parm_decls): Likewise.
4012         (c_push_function_context): Likewise.
4013         * c-lang.h: Remove usage of variable_size gty attribute.
4014         * c-parser.c (c_parse_init): Adjust.
4015         (c_parse_file): Likewise.
4017 2014-05-13  Marek Polacek  <polacek@redhat.com>
4019         PR c/61162
4020         * c-typeck.c (convert_for_assignment): Pass location to
4021         WARN_FOR_ASSIGNMENT instead of input_location.
4023 2014-05-10  Marek Polacek  <polacek@redhat.com>
4025         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4026         maybe_warn_string_init.
4027         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4028         maybe_warn_string_init.
4029         * c-tree.h (maybe_warn_string_init): Update declaration.
4030         * c-typeck.c (maybe_warn_string_init): Add location parameter.
4031         Call pedwarn_init with loc instead of with input_location.
4032         (digest_init): Pass init_loc to maybe_warn_string_init.
4033         (pop_init_level): Call pedwarn_init with loc instead of with
4034         input_location.
4035         (set_init_index): Likewise.
4036         (process_init_element): Likewise.
4038 2014-05-09  Marek Polacek  <polacek@redhat.com>
4040         PR c/61096
4041         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4042         (c_parser_initelt): Pass location to set_init_label.  Pass array index
4043         location to set_init_index.
4044         * c-tree.h (push_init_level): Update declaration.
4045         (pop_init_level): Likewise.
4046         (set_init_index): Likewise.
4047         (set_init_label): Likewise.
4048         * c-typeck.c (error_init): Add location parameter.  Call error_at
4049         instead of error.
4050         (digest_init): Pass init_loc to error_init.
4051         (really_start_incremental_init):
4052         (push_init_level): Add location parameter.  Pass loc to pop_init_level
4053         and error_init.
4054         (pop_init_level): Likewise.
4055         (set_designator): Add location parameter.  Pass loc to pop_init_level,
4056         push_init_level, and error_init.
4057         (set_init_index): Add location parameter.  Pass loc to error_init and
4058         set_designator.
4059         (set_init_label): Likewise.
4060         (output_init_element): Pass loc to error_init.
4061         (process_init_element): Pass loc to error_init, pop_init_level,
4062         pedwarn_init, and push_init_level.
4064 2014-05-09  Marek Polacek  <polacek@redhat.com>
4066         PR c/50459
4067         * c-parser.c (c_parser_attributes): Parse the arguments as an
4068         expression-list if the attribute takes identifier.
4070 2014-05-08  Marek Polacek  <polacek@redhat.com>
4072         PR c/61053
4073         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4074         TYPE_ALIGN_UNIT.
4076 2014-05-08  Marek Polacek  <polacek@redhat.com>
4078         PR c/61077
4079         * c-decl.c (start_function): Warn for _Atomic-qualified return type
4080         of main.
4082 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
4083             Mike Stump  <mikestump@comcast.net>
4084             Richard Sandiford  <rdsandiford@googlemail.com>
4086         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4087         (finish_enum): Use wide-int interfaces.
4088         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4089         * c-typeck.c (build_c_cast): Likewise.
4090         (set_nonincremental_init_from_string): Likewise.
4091         (c_tree_equal): Likewise.
4093 2014-05-02  Marek Polacek  <polacek@redhat.com>
4095         PR c/25801
4096         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
4097         Return size_one_node when the type is not complete.
4098         (pointer_diff): Remove comment.
4099         (build_unary_op): Improve error messages.
4101 2014-05-02  Marek Polacek  <polacek@redhat.com>
4103         * c-typeck.c (c_finish_return): Separate warning_at calls.
4105 2014-05-02  Marek Polacek  <polacek@redhat.com>
4107         * c-tree.h (error_init): Remove declaration.
4108         (pedwarn_init): Likewise.
4109         * c-typeck.c (error_init): Make static and move above.
4110         (pedwarn_init): Likewise.
4111         (warning_init): Move above.
4112         (maybe_warn_string_init): Likewise.
4114 2014-05-01  Jeff Law  <law@redhat.com>
4116         Revert:
4118         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4119         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4120         avoid goto.
4122 2014-05-02  Marek Polacek  <polacek@redhat.com>
4124         PR c/60784
4125         * c-typeck.c (push_init_level): Set constructor_designated to
4126         p->designated for structures.
4128 2014-05-01  Marek Polacek  <polacek@redhat.com>
4130         PR c/60915
4131         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4132         function-definition has an attribute after the declarator.
4134 2014-05-01  Marek Polacek  <polacek@redhat.com>
4136         PR c/60257
4137         * c-typeck.c (warning_init): Add location_t parameter.  Call
4138         warning_at instead of warning.
4139         (push_init_level): Pass input_location to warning_init.
4140         (add_pending_init): Add location_t parameter.  Pass loc to
4141         warning_init.
4142         (set_nonincremental_init): Pass input_location to add_pending_init.
4143         (set_nonincremental_init_from_string): Likewise.
4144         (output_init_element): Pass loc to warning_init and to
4145         add_pending_init.
4147 2014-05-01  Marek Polacek  <polacek@redhat.com>
4149         PR c/43395
4150         * c-typeck.c (c_finish_return): Distinguish between label and variable
4151         when warning about returning local address.
4153 2014-05-01  Marek Polacek  <polacek@redhat.com>
4155         PR c/29467
4156         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4157         in C89 mode.
4159 2014-05-01  Marek Polacek  <polacek@redhat.com>
4161         PR c/43245
4162         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4163         instead of 0 to WARN_FOR_QUALIFIERS.
4165 2014-05-01  Marek Polacek  <polacek@redhat.com>
4167         PR c/56989
4168         * c-typeck.c (default_conversion): Use better location for
4169         error call.
4171 2014-04-30  Marek Polacek  <polacek@redhat.com>
4173         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4174         also when SANITIZE_FLOAT_DIVIDE is on.
4176 2014-04-30  Marek Polacek  <polacek@redhat.com>
4178         PR c/60139
4179         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4180         and pedwarn_init.  Use loc insted of input_location.
4182 2014-04-30  Marek Polacek  <polacek@redhat.com>
4184         PR c/60351
4185         * c-typeck.c (build_binary_op): Use location when warning about
4186         shift count.
4188 2014-04-25  Marek Polacek  <polacek@redhat.com>
4190         PR c/18079
4191         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4192         always_inline/noinline and hot/cold attributes.
4194 2014-04-25  Marek Polacek  <polacek@redhat.com>
4196         PR c/60114
4197         * c-parser.c (c_parser_initelt): Pass input_location to
4198         process_init_element.
4199         (c_parser_initval): Pass loc to process_init_element.
4200         * c-tree.h (process_init_element): Adjust declaration.
4201         * c-typeck.c (push_init_level): Pass input_location to
4202         process_init_element.
4203         (pop_init_level): Likewise.
4204         (set_designator): Likewise.
4205         (output_init_element): Add location_t parameter.  Pass loc to
4206         digest_init.
4207         (output_pending_init_elements): Pass input_location to
4208         output_init_element.
4209         (process_init_element): Add location_t parameter.  Pass loc to
4210         output_init_element.
4212 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
4214         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4215         atomic-clause, allow comma in between atomic-clause and
4216         seq_cst.
4218 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
4220         PR c/59073
4221         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4222         fails, don't set OM_PARALLEL_COMBINED and return NULL.
4224 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
4226         PR middle-end/60469
4227         * c-array-notation.c (fix_builtin_array_notation_fn): Use
4228         create_tmp_var instead build_decl for creating temps.
4229         (build_array_notation_expr): Likewise.
4230         (fix_conditional_array_notations_1): Likewise.
4231         (fix_array_notation_expr): Likewise.
4232         (fix_array_notation_call_expr): Likewise.
4234 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
4236         PR c++/60689
4237         * c-tree.h (c_build_function_call_vec): New prototype.
4238         * c-typeck.c (build_function_call_vec): Don't call
4239         resolve_overloaded_builtin here.
4240         (c_build_function_call_vec): New wrapper function around
4241         build_function_call_vec.  Call resolve_overloaded_builtin here.
4242         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4243         Call c_build_function_call_vec instead of build_function_call_vec.
4244         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4245         * c-decl.c (finish_decl): Likewise.
4247 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4249         PR c/55383
4250         * c-typeck.c: Use correct format string in cast-qual warning
4252 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
4254         * c-decl.c (c_decl_attributes): Use
4255         lang_hooks.types.omp_mappable_type.
4256         * c-typeck.c (c_finish_omp_clauses): Likewise.
4258 2014-03-06  Marek Polacek  <polacek@redhat.com>
4260         PR c/60197
4261         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4262         of checking tree code.
4264 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4266         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4267         (c_parser_parameter_declaration): Likewise.
4269 2014-02-19  Marek Polacek  <polacek@redhat.com>
4271         PR c/60195
4272         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4273         Call mark_exp_read on exp.value.
4274         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
4275         TREE_ADDRESSABLE on old instead of val.
4276         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4278 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4280         * c-parser.c (c_parser_get_builtin_args): Replace calls to
4281         C_EXPR_APPEND by vec_safe_push.
4282         * c-tree.h (C_EXPR_APPEND): Remove.
4284 2014-01-31  Marek Polacek  <polacek@redhat.com>
4286         PR c/59963
4287         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4288         build_function_call_vec.
4289         (build_function_call): Likewise.
4290         (build_atomic_assign): Likewise.
4291         (build_function_call_vec): Add arg_loc parameter.  Use it.
4292         (convert_arguments): Likewise.
4293         (convert_for_assignment): Rename rhs_loc to expr_loc.
4294         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4295         (c_parser_objc_keywordexpr): Likewise.
4296         (c_parser_postfix_expression_after_primary): Call
4297         build_function_call_vec with expr_loc rather than op_loc.
4298         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
4299         build_function_call_vec.
4300         (c_parser_expr_list): Add locations parameter.  Fill it with locations
4301         of function arguments.
4302         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4304 2014-01-30  Marek Polacek  <polacek@redhat.com>
4306         PR c/59940
4307         * c-typeck.c (build_function_call_vec): Use loc parameter.
4308         (convert_arguments): Add location parameter.  Use it.
4309         (ep_convert_and_check): Likewise.
4310         (build_atomic_assign): Adjust convert_for_assignment call.
4311         (build_modify_expr): Likewise.
4312         (digest_init): Likewise.
4313         (c_finish_return): Likewise.
4314         (build_conditional_expr): Adjust ep_convert_and_check calls.
4315         (convert_for_assignment): Add rhs_loc parameter.  Use it.
4316         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4317         calls.
4319 2014-01-30  Richard Biener  <rguenther@suse.de>
4321         PR c/59905
4322         * c-typeck.c (build_function_call_vec): Do not replace calls
4323         to a function via an incompatible type with a runtime abort.
4325 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4327         * c-parser.c (c_parser_declaration_or_fndef): Replaced
4328         flag_enable_cilkplus with flag_cilkplus.
4329         (c_parser_direct_declarator_inner): Likewise.
4330         (c_parser_attribute_any_word): Likewise.
4331         (c_parser_attributes): Likewise.
4332         (c_parser_compound_statement): Likewise.
4333         (c_parser_statement_after_labels): Likewise.
4334         (c_parser_if_statement): Likewise.
4335         (c_parser_switch_statement): Likewise.
4336         (c_parser_do_statement): Likewise.
4337         (c_parser_for_statement): Likewise.
4338         (c_parser_unary_expression): Likewise.
4339         (c_parser_postfix_expression): Likewise.
4340         (c_parser_postfix_expression_after_primary): Likewise.
4341         (c_parser_postfix_expression_after_primary): Likewise.
4342         (c_parser_omp_clause_name): Likewise.
4343         (c_finish_omp_declare_simd): Likewise.
4344         (c_parser_cilk_verify_simd): Likewise.
4345         * c-typeck.c (build_array_ref): Likewise.
4346         (build_function_call_vec): Likewise.
4347         (convert_arguments): Likewise.
4348         (build_compound_expr): Likewise.
4349         (c_finish_return): Likewise.
4350         (c_finish_if_stmt): Likewise.
4351         (c_finish_loop): Likewise.
4352         (build_binary_op): Likewise.
4354 2014-01-23  Marek Polacek  <polacek@redhat.com>
4356         PR c/59846
4357         * c-typeck.c (parser_build_binary_op): Use location instead of
4358         input_location.
4359         (build_binary_op): Pass location to shorten_compare.
4361 2014-01-23  Marek Polacek  <polacek@redhat.com>
4363         PR c/58346
4364         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4365         an empty aggregate.
4367 2014-01-23  Marek Polacek  <polacek@redhat.com>
4369         PR c/59871
4370         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4371         of a comma expression.
4372         (emit_side_effect_warnings): Likewise.
4374 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4376         PR c/59825
4377         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4378         function to use walk_tree and moved a lot of its functionality to
4379         expand_array_notations.
4380         (expand_array_notations): New function.
4382 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4384         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4385         attribute an attribute without value.
4387 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
4389         PR middle-end/58809
4390         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4391         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4393 2014-01-22  Marek Polacek  <polacek@redhat.com>
4395         PR c/59891
4396         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4397         of remove_c_maybe_const_expr on op1 and op2.
4399 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
4401         PR c/58943
4402         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4403         effects, preevaluate rhs using SAVE_EXPR first.
4405 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4407         PR c++/59631
4408         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4409         statements with if-elseif statements.
4411 2014-01-06  Marek Polacek  <polacek@redhat.com>
4413         PR c/57773
4414         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4415         defined bit-field types only in ISO C.
4417 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4419         Update copyright years
4421 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4423         * c-array-notation.c: Use the standard form for the copyright notice.
4425 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4427         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4428         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4429         field in parser is not empty.  If not-empty, call the function
4430         c_parser_finish_omp_declare_simd.
4431         (c_parser_cilk_clause_vectorlength): Modified function to be shared
4432         between SIMD-enabled functions and #pragma simd.  Added new parameter.
4433         (c_parser_cilk_all_clauses): Modified the usage of the function
4434         c_parser_cilk_clause_vectorlength as mentioned above.
4435         (c_parser_cilk_simd_fn_vector_attrs): New function.
4436         (c_finish_cilk_simd_fn_tokens): Likewise.
4437         (is_cilkplus_vector_p): Likewise.
4438         (c_parser_omp_clause_name): Added checking for "vectorlength,"
4439         "nomask," and "mask" strings in clause name.
4440         (c_parser_omp_all_clauses): Added 3 new case statements:
4441         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4442         PRAGMA_CILK_CLAUSE_NOMASK.
4443         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
4444         check for vector attribute and if so call the function
4445         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
4446         called the function c_finish_cilk_simd_fn_tokens.
4447         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4448         parser field is non-empty.  If so, parse them as you would parse
4449         the omp declare simd pragma.
4450         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4451         Added a check when step is a parameter and flag it as error.
4452         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4453         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4454         pragma_omp_clause.
4456 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
4458         * c-parser.c (c_parser_omp_parallel): Fix description.
4460 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4462         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4463         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4464         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4465         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4467 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
4469         PR c/52023
4470         * c-parser.c (c_parser_alignas_specifier): Use
4471         c_sizeof_or_alignof_type instead of c_alignof.
4472         (c_parser_alignof_expression): Likewise, with min_alignof
4473         parameter depending on alignof spelling used.
4475 2013-12-04  Marek Polacek  <polacek@redhat.com>
4477         PR c/54113
4478         * c-decl.c (start_function): Don't warn for missing prototype for
4479         inline functions.
4481 2013-12-03  Marek Polacek  <polacek@redhat.com>
4483         PR c/59351
4484         * c-decl.c (build_compound_literal): Allow compound literals with
4485         empty initial value.
4487 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
4489         PR c/58235
4490         * c-typeck.c (build_modify_expr): Diagnose assignment to
4491         expression with array type.
4493 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
4495         PR c/42262
4496         * c-typeck.c (process_init_element): Do not treat a string as
4497         initializing a whole array when used with a designator for an
4498         individual element.
4500 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
4502         PR c/57574
4503         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4504         an inline function following a static declaration.
4506 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
4508         PR c/59310
4509         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4510         to p_name before calling c_parser_omp_teams instead of after.
4511         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4512         argument.  Remove unused p_name variable.
4514 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
4515             Jakub Jelinek  <jakub@redhat.com>
4517         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4518         external_scope is NULL.
4520 2013-11-27  Tom de Vries  <tom@codesourcery.com>
4521             Marc Glisse  <marc.glisse@inria.fr>
4523         PR c++/59032
4524         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4526 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
4528         * c-typeck.c: Add required include files from gimple.h.
4530 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
4532         * c-decl.c (define_label, shadow_tag_warned)
4533         (check_bitfield_type_and_width, grokdeclarator, grokparms,
4534         store_parm_decls_newstyle, store_parm_decls_oldstyle)
4535         (declspecs_add_type): Remove use of in_system_header macro.
4536         * c-parser.c (c_parser_unary_expression): Likewise.
4537         * c-typeck.c (store_init_value, process_init_element)
4538         (c_start_case): Likewise.
4540         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4541         macro.
4543         * c-parser.c (c_parser_set_source_position_from_token): Remove
4544         reference to in_system_header from comment.
4546 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4548         * c-decl.c (grokdeclarator): Update comment to refer to
4549         tree_to_[su]hwi rather than tree_low_cst.
4551 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4553         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4554         tree_to_uhwi throughout.
4556 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4558         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4559         throughout.
4561 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4563         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4564         throughout.
4566 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
4568         * c-parser.c (c_parser_cilk_simd): New.
4569         (c_parser_cilk_verify_simd): New.
4570         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4571         (c_parser_omp_for_loop): Add case for NE_EXPR.
4572         Set c_break_label for CILK_SIMD.
4573         (c_parser_cilk_clause_vectorlength): New.
4574         (c_parser_cilk_clause_linear): New.
4575         (c_parser_cilk_clause_name): New.
4576         (c_parser_cilk_all_clauses): New.
4577         * c-typeck.c (build_unary_op): Pass location argument to
4578         readonly_error.
4579         (build_modify_expr): Same.
4580         (build_asm_expr): Same.
4581         (c_finish_bc_stmt): Error on break/continue in loops.
4583 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
4585         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4587 2013-11-14  Diego Novillo  <dnovillo@google.com>
4589         * c-decl.c: Include print-tree.h.
4590         Include stor-layout.h.
4591         Include varasm.h.
4592         Include attribs.h.
4593         Include stringpool.h.
4594         * c-lang.c: Include fold-const.h.
4595         * c-parser.c: Include stringpool.h.
4596         Include attribs.h.
4597         Include stor-layout.h.
4598         Include varasm.h.
4599         Include trans-mem.h.
4600         * c-typeck.c: Include stor-layout.h.
4601         Include trans-mem.h.
4602         Include varasm.h.
4603         Include stmt.h.
4605 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
4607         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4608         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4609         __auto_type.
4610         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4611         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4612         RID_AUTO_TYPE.
4613         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4614         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4615         (c_parser_declarator, c_parser_direct_declarator_inner)
4616         (c_parser_parameter_declaration, c_parser_type_name): All callers
4617         changed.
4618         (c_parser_declaration_or_fndef): Handle declarations with type
4619         determined from the initializer.
4621 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
4623         * c-typeck.c: Include gimplify.h.
4625 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
4627         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4628         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4629         comment.
4630         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4631         or _Thread_local as appropriate in diagnostics.
4632         (build_null_declspecs): Initialize ret->thread_gnu_p.
4633         (declspecs_add_scspec): Handle either __thread or _Thread_local
4634         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
4635         pedantic.  Do not disallow _Thread_local extern and _Thread_local
4636         static.
4638 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
4639             Andrew MacLeod  <amacleod@redhat.com>
4641         * c-aux-info.c (gen_type): Handle atomic qualifier.
4642         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4643         qualifiers when compating types.
4644         (shadow_tag_warned): Handle atomic_p in declspecs.
4645         (quals_from_declspecs): Likewise.
4646         (start_decl): Use c_type_promotes_to when promoting argument
4647         types.
4648         (grokdeclarator): Handle _Atomic.
4649         (get_parm_info): Diagnose any qualifier on "void" as only
4650         parameter.
4651         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4652         comparing types.  Use c_type_promotes_to when promoting argument
4653         types.
4654         (finish_function): Use c_type_promotes_to when promoting argument
4655         types.
4656         (build_null_declspecs): Handle atomic_p in declspecs.
4657         (declspecs_add_qual): Handle RID_ATOMIC.
4658         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4659         (c_token_starts_declspecs): Handle RID_ATOMIC.
4660         (c_parser_declspecs): Handle atomic type specifiers and
4661         qualifiers.
4662         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4663         from types of expressions with atomic type.
4664         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4665         (c_parser_attribute_any_word): Handle RID_ATOMIC.
4666         (c_parser_initializer, c_parser_initelt, c_parser_initval)
4667         (c_parser_statement_after_labels, c_parser_switch_statement)
4668         (c_parser_for_statement, c_parser_expr_no_commas)
4669         (c_parser_conditional_expression, c_parser_binary_expression)
4670         (c_parser_cast_expression, c_parser_unary_expression)
4671         (c_parser_postfix_expression)
4672         (c_parser_postfix_expression_after_primary, c_parser_expression):
4673         Use convert_lvalue_to_rvalue.
4674         (c_parser_expression_conv, c_parser_expr_list): Document
4675         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
4676         (c_parser_objc_synchronized_statement): Use
4677         convert_lvalue_to_rvalue.
4678         (c_parser_objc_selector): Handle RID_ATOMIC.
4679         (c_parser_objc_receiver, c_parser_array_notation): Use
4680         convert_lvalue_to_rvalue.
4681         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4682         _Atomic (type-name).
4683         (struct c_declspecs): Add atomic_p field.
4684         (convert_lvalue_to_rvalue): Declare.
4685         * c-typeck.c (c_type_promotes_to): Promote atomic types to
4686         corresponding atomic types.
4687         (qualify_type): Don't add _Atomic qualifiers from second argument.
4688         (comp_target_types): Do not allow _Atomic mismatches.
4689         (type_lists_compatible_p): Do not remove atomic qualifiers when
4690         comparing types.
4691         (really_atomic_lvalue, convert_lvalue_to_rvalue)
4692         (build_atomic_assign): New functions.
4693         (build_unary_op): Use build_atomic_assign for atomic increment and
4694         decrement.
4695         (build_conditional_expr): Do not treat _Atomic void as a qualified
4696         version of void.
4697         (build_modify_expr): Use build_atomic_assign for atomic LHS.
4698         (find_anonymous_field_with_type, convert_to_anonymous_field)
4699         (convert_for_assignment): Do not remove atomic qualifiers when
4700         comparing types.
4701         (digest_init): Do not accept initialization of arrays of atomic
4702         elements by string constants.
4703         (build_asm_expr): Use convert_lvalue_to_rvalue.
4704         (build_binary_op): Do not treat _Atomic void as a qualified
4705         version of void.
4707 2013-11-06  DJ Delorie  <dj@redhat.com>
4709         * c-decl.c (locate_old_decl): If a previous conflicting decl is
4710         both explicit and builtin, print the location of the explicit one.
4712 2013-11-05  Tobias Burnus  <burnus@net-b.de>
4714         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4715         c_parser_omp_distribute, c_parser_omp_teams,
4716         c_parser_omp_target, c_parser_omp_declare): Handle
4717         -fopenmp-simd.
4719 2013-11-03  Marek Polacek  <polacek@redhat.com>
4721         * c-decl.c (grokdeclarator): Add VLA instrumentation.
4723 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
4725         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4726         check_dup_generic at the end, unless remove is true.
4727         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4728         remove = true;.
4729         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4731 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
4733         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4734         with decl that is not pointer nor array.
4736 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4738         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4739         a spawning function is found.
4740         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4741         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4742         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4743         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4744         case.
4745         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4746         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4747         expr.
4748         (c_finish_return): Added a check to reject _Cilk_spawn in return
4749         expression.
4750         (build_cilk_spawn): New function.
4751         (build_cilk_sync): Likewise.
4752         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4753         
4754 2013-10-27  Tobias Burnus  <burnus@net-b.de>
4756         PR other/33426
4757         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4758         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4759         (c_parser_statement_after_labels): Update calls.
4761 2013-10-24  Tobias Burnus  <burnus@net-b.de>
4763         PR other/33426
4764         * c-parser.c (c_parser_pragma, c_parser_for_statement):
4765         Handle PRAGMA_IVDEP.
4766         (c_parser_statement_after_labels): Update call.
4768 2013-10-24  Marek Polacek  <polacek@redhat.com>
4770         * c-parser.c (c_parser_struct_declaration): Add a comment.
4771         (c_parser_declarator): Don't allow _Alignas here.
4773 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
4775         * c-parser.c: Include omp-low.h.
4776         * c-typeck.c: Likewise.
4778 2013-10-17  Marek Polacek  <polacek@redhat.com>
4780         PR c/58267
4781         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4782         Document syntax of the array-declarator.
4783         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4784         are not permitted.
4785         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4786         (c_parser_struct_declaration): Likewise.
4787         (c_parser_declarator): Likewise.
4788         (c_parser_direct_declarator_inner): Likewise.
4789         (c_parser_parameter_declaration): Likewise.
4790         (c_parser_type_name): Likewise.
4792 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
4794         * c-lang.h (current_omp_declare_target_attribute): New extern
4795         decl.
4796         * c-parser.c: Include c-lang.h.
4797         (struct c_parser): Change tokens to c_token *.
4798         Add tokens_buf field.  Change tokens_avail type to unsigned int.
4799         (c_parser_consume_token): If parser->tokens isn't
4800         &parser->tokens_buf[0], increment parser->tokens.
4801         (c_parser_consume_pragma): Likewise.
4802         (enum pragma_context): Add pragma_struct and pragma_param.
4803         (c_parser_external_declaration): Adjust
4804         c_parser_declaration_or_fndef caller.
4805         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4806         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4807         Adjust recursive call.
4808         (c_parser_struct_or_union_specifier): Use pragma_struct instead
4809         of pragma_external.
4810         (c_parser_parameter_declaration): Use pragma_param instead of
4811         pragma_external.
4812         (c_parser_compound_statement_nostart, c_parser_label,
4813         c_parser_for_statement): Adjust
4814         c_parser_declaration_or_fndef callers.
4815         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4816         it through to c_parser_conditional_expression.
4817         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4818         pass it through to c_parser_binary_expression.  Adjust recursive
4819         call.
4820         (c_parser_binary_expression): Remove prec argument, add
4821         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
4822         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4823         binop matches it, use build2 instead of parser_build_binary_op.
4824         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4825         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4826         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4827         Handle pragma_struct and pragma_param the same as pragma_external.
4828         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4829         (c_parser_omp_variable_list): Parse array sections for
4830         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4831         (c_parser_omp_clause_collapse): Fully fold collapse expression.
4832         (c_parser_omp_clause_reduction): Handle user defined reductions.
4833         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4834         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4835         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4836         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4837         c_parser_omp_clause_depend, c_parser_omp_clause_map,
4838         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4839         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4840         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4841         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
4842         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
4843         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4844         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
4845         (c_parser_omp_for_loop): Add CODE argument, pass it through
4846         to c_finish_omp_for.  Change last argument to cclauses,
4847         and adjust uses to grab parallel clauses from the array of all
4848         the split clauses.  Adjust c_parser_binary_expression,
4849         c_parser_declaration_or_fndef and c_finish_omp_for callers.
4850         (omp_split_clauses): New function.
4851         (c_parser_omp_simd): New function.
4852         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4853         Allow the function to be called also when parsing combined constructs,
4854         and call c_parser_omp_simd when parsing for simd.
4855         (c_parser_omp_sections_scope): If section-sequence doesn't start with
4856         #pragma omp section, require exactly one structured-block instead of
4857         sequence of statements.
4858         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4859         Allow the function to be called also when parsing combined constructs.
4860         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4861         Allow the function to be called also when parsing combined
4862         constructs.
4863         (c_parser_omp_taskgroup, c_parser_omp_cancel,
4864         c_parser_omp_cancellation_point, c_parser_omp_distribute,
4865         c_parser_omp_teams, c_parser_omp_target_data,
4866         c_parser_omp_target_update, c_parser_omp_target,
4867         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4868         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4869         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4870         (c_parser_omp_construct): Add p_name and mask vars.  Handle
4871         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4872         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
4873         and c_parser_omp_sections callers.
4874         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4875         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4876         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4877         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
4878         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
4879         OMP_CLAUSE_DEPEND.
4880         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4881         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4882         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4883         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4884         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4885         * c-typeck.c: Include tree-inline.h.
4886         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4887         handle_omp_array_sections_1, handle_omp_array_sections,
4888         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4889         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4890         user defined reductions.
4891         (c_tree_equal): New function.
4892         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4893         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4894         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4895         c_check_omp_declare_reduction_r): New prototypes.
4896         * c-decl.c (current_omp_declare_target_attribute): New variable.
4897         (c_decl_attributes): New function.
4898         (start_decl, start_function): Use it instead of decl_attributes.
4899         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4900         c_omp_reduction_decl, c_omp_reduction_lookup,
4901         c_check_omp_declare_reduction_r): New functions.
4903 2013-09-25  Tom Tromey  <tromey@redhat.com>
4905         * Make-lang.in (c/gccspec.o): Remove.
4906         (CFLAGS-c/gccspec.o): New variable.
4907         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4908         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4909         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4911 2013-09-25  Tom Tromey  <tromey@redhat.com>
4913         * Make-lang.in (c/gccspec.o): Don't use subshell.
4915 2013-09-18  Marek Polacek  <polacek@redhat.com>
4917         PR sanitize/58443
4918         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4919         Remove unnecessary check.
4921 2013-09-18  Marek Polacek  <polacek@redhat.com>
4923         PR sanitizer/58411
4924         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4925         no_sanitize_undefined attribute.
4927 2013-09-13  Kai Tietz  <ktietz@redhat.com>
4929         PR target/57848
4930         * c-decl.c (c_builtin_function_ext_scope): Remove
4931         wrong assumption that it is never called on prexisting
4932         symbol.
4934 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
4936         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4938 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4940         * c-objc-common.c (c_tree_printer): Tidy.
4942 2013-08-30  Marek Polacek  <polacek@redhat.com>
4944         * c-typeck.c (build_binary_op): Add division by zero and shift
4945         instrumentation.
4947 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
4948             Joseph Myers  <joseph@codesourcery.com>
4950         PR c/35649
4951         * c-typeck.c (c_common_type): Prefer double_type_node over
4952         other REAL_TYPE types with the same precision.
4953         (convert_arguments): Likewise.
4955 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4957         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4958         (c_initialize_diagnostics): Call a destructor for the early printer.
4960 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4962         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4963         printer initialization.
4965 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4967         PR c/57490
4968         * c-array-notation.c (fix_conditional_array_notations_1): Added a
4969         check for truth values.
4970         (expand_array_notation_exprs): Added truth values case.  Removed an
4971         unwanted else.  Added for-loop to walk through subtrees in default
4972         case.
4974 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4976         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4978 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
4980         * c-parser.c (struct c_generic_association): Fix typo.
4982 2013-07-23  Tom Tromey  <tromey@redhat.com>
4983             Joseph Myers  <joseph@codesourcery.com>
4985         * c-parser.c (struct c_generic_association): New.
4986         (c_generic_association_d): New typedef.
4987         (c_parser_generic_selection): New function.
4988         (c_parser_postfix_expression): Handle RID_GENERIC.
4990 2013-07-13  Jason Merrill  <jason@redhat.com>
4992         PR c++/57793
4993         * c-decl.c (finish_struct): Check for too-large class.
4995 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
4997         PR c/57821
4998         * c-typeck.c (set_init_index): When folding, check for index overflow.
5000 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5002         * c-parser.c (c_parser_array_notation): Removed rejection of array
5003         notations in an array of function pointers.
5005 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5007         * c-array-notation.c (make_triplet_val_inv): New function.
5008         (create_cmp_incr): Likewise.
5009         (create_array_refs): Likewise.
5010         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5011         Also modularized common parts between functions and called the function.
5012         (build_array_notation_expr): Likewise.
5013         (fix_conditional_array_notations_1): Likewise.
5014         (fix_array_notation_expr): Likewise.
5015         (fix_array_notation_call_expr): Likewise.
5017 2013-06-18  Marek Polacek  <polacek@redhat.com>
5019         PR c/57630
5020         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5022 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5024         * c-array-notation.c (build_array_notation_expr): Reject array notation
5025         mismatch between LHS and RHS even inside a call_expr.  Also, removed
5026         a couple while statements that were dead code.
5028 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5030         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5031         excessive precision expressions in function parameters.  Also removed
5032         couple unwanted while statements.
5034 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5036         * c-array-notation.c (expand_array_notation_exprs): Added
5037         ARRAY_NOTATION_REF case.
5038         
5039 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5041         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5042         function to c-family/array-notation-common.c.
5043         (is_cilkplus_reduce_builtin): Likewise.
5044         (find_rank): Likewise.
5045         (extract_array_notation_exprs): Likewise.
5046         (replace_array_notations): Likewise.
5047         (find_inv_trees): Likewise.
5048         (replace_inv_trees): Likewise.
5049         (contains_array_notation_expr): Likewise.
5050         (find_correct_array_notation_type): Likewise.
5051         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5052         (struct inv_list): Moved this to c-family/array-notation-common.c.
5053         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5054         
5055 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5057         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5058         reduction functions outside the for-loop.  Added a check if the fundecl
5059         is non-NULL.  Finally, removed an unwanted if-statement, and made the
5060         body unconditional.
5062 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5064         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5065         condition of the if-statement matches the rank of else-block and then-
5066         block when array notations are used.
5067         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5068         expression after the entire function body is parsed.
5069         (c_parser_expr_no_commas): Delayed creating array notation expressions
5070         to the end of function parsing.
5071         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5072         whole if-statement instead of just the condition.
5073         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
5075 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5077         PR c/57474
5078         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5079         array to NULL_TREE if they are unused.  Also added a check for the
5080         field to be NULL before its fields are used in future.
5081         
5082 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5084         PR bootstrap/57450
5085         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5086         (build_array_notation_expr): Likewise.
5088 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5090         * c-typeck.c (build_array_ref): Added a check to see if array's
5091         index is greater than one.  If true, then emit an error.
5092         (build_function_call_vec): Exclude error reporting and checking
5093         for builtin array-notation functions.
5094         (convert_arguments): Likewise.
5095         (c_finish_return): Added a check for array notations as a return
5096         expression.  If true, then emit an error.
5097         (c_finish_loop): Added a check for array notations in a loop
5098         condition.  If true then emit an error.
5099         (lvalue_p): Added a ARRAY_NOTATION_REF case.
5100         (build_binary_op): Added a check for array notation expr inside
5101         op1 and op0.  If present, we call another function to find correct
5102         type.
5103         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5104         * c-parser.c (c_parser_compound_statement): Check if array
5105         notation code is used in tree, if so, then transform them into
5106         appropriate C code.
5107         (c_parser_expr_no_commas): Check if array notation is used in LHS
5108         or RHS, if so, then build array notation expression instead of
5109         regular modify.
5110         (c_parser_postfix_expression_after_primary): Added a check for
5111         colon(s) after square braces, if so then handle it like an array
5112         notation.  Also, break up array notations in unary op if found.
5113         (c_parser_direct_declarator_inner): Added a check for array
5114         notation.
5115         (c_parser_compound_statement): Added a check for array notation in
5116         a stmt.  If one is present, then expand array notation expr.
5117         (c_parser_if_statement): Likewise.
5118         (c_parser_switch_statement): Added a check for array notations in
5119         a switch statement's condition.  If true, then output an error.
5120         (c_parser_while_statement): Similarly, but for a while.
5121         (c_parser_do_statement): Similarly, but for a do-while.
5122         (c_parser_for_statement): Similarly, but for a for-loop.
5123         (c_parser_unary_expression): Check if array notation is used in a
5124         pre-increment or pre-decrement expression.  If true, then expand
5125         them.
5126         (c_parser_array_notation): New function.
5127         * c-array-notation.c: New file.
5128         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5129         
5130 2013-05-23  Mike Stump  <mikestump@comcast.net>
5132         * c-typeck.c (convert_for_assignment): Handle references to memory
5133         spaces better.
5135 2013-05-16  Jason Merrill  <jason@redhat.com>
5137         * Make-lang.in (cc1$(exeext)): Use link mutex.
5139 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
5141         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5142         to simply use OPT_Wpointer_arith.
5143         (build_unary_op): Likewise.
5145 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
5147         PR c/19449
5148         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5149         argument.  If set, or it temporarily for parsing of the first
5150         argument into force_folding_builtin_constant_p.
5151         (c_parser_postfix_expression): Adjust callers.
5153 2013-03-21  Richard Biener  <rguenther@suse.de>
5155         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5156         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
5158 2013-02-12  Marek Polacek  <polacek@redhat.com>
5160         PR c/44938
5161         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5162         origtypes to NULL.
5164 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
5166         PR c/56078
5167         * c-typeck.c (set_nonincremental_init_from_string): If
5168         constructor_max_index is NULL, treat it as if tree_int_cst_lt
5169         returned false.
5170         (process_init_element): Likewise.
5172 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
5174         PR c++/55619
5175         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5176         argument, don't call default_function_array_conversion
5177         nor c_fully_fold here.
5178         (c_parser_asm_statement): Adjust callers.
5179         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5180         and outputs here, and call default_function_array_conversion
5181         on inputs that don't need to be addressable.
5183 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
5185         PR c/39464
5186         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5187         warning require that both c_common_unsigned_type as well as
5188         c_common_signed_type is the same for both mvl and mvr types.
5190 2012-11-16  Diego Novillo  <dnovillo@google.com>
5192         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5194         * c-common.c: Use new vec API in vec.h.
5195         * c-common.h: Likewise.
5196         * c-gimplify.c: Likewise.
5197         * c-pragma.c: Likewise.
5198         * c-pretty-print.c: Likewise.
5199         * c-pretty-print.h: Likewise.
5200         * c-semantics.c: Likewise.
5201         * c-decl.c: Likewise.
5202         * c-parser.c: Likewise.
5203         * c-tree.h: Likewise.
5204         * c-typeck.c: Likewise.
5206 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
5208         PR c++/54930
5209         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5211 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5213         PR c/53066
5214         * c-decl.c (warn_if_shadowing): Do not warn if a variable
5215         shadows a function, unless the variable is a function or a
5216         pointer-to-function.
5218 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
5220         PR c/54381
5221         * c-parser.c (struct c_tree_loc_pair): Removed.
5222         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5223         add location_t * and tree * arguments, fill in array of 3
5224         sizeof_arg trees and corresponding locs.
5225         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5226         c_parser_expr_list callers.
5227         (c_parser_postfix_expression_after_primary): Likewise.  Pass
5228         array of 3 sizeof_arg trees and locs (corresponding to first
5229         3 arguments) to sizeof_pointer_memaccess_warning.
5231 2012-10-09  Lawrence Crowl  <crowl@google.com>
5233         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5234         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5235         hash table.
5237 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
5239         PR c++/54194
5240         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5241         call.
5243 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
5245         PR c++/54427
5246         * c-typeck.c: Include c-common.h.
5247         (enum stv_conv): Moved to c-common.h.
5248         (scalar_to_vector): Moved to c-common.c.
5249         (build_binary_op): Adapt to scalar_to_vector's new prototype.
5250         * Make-lang.in: c-typeck.c depends on c-common.h.
5252 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
5254         * c-decl.c (c_write_global_declarations): Fix handling of
5255         -fdump-ada-spec*.
5257 2012-09-30  Sharad Singhai  <singhai@google.com>
5259         * c-decl.c (c_write_global_declarations): Use a different method
5260         to determine if the dump has ben initialized.
5262 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
5264         PR c/54552
5265         * c-typeck.c (c_cast_expr): When casting to a type requiring
5266         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5267         c_fully_fold first.
5269 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
5271         PR c/54103
5272         * c-typeck.c (build_unary_op): Pass original argument of
5273         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5274         any C_MAYBE_CONST_EXPR, if it has integer operands.
5275         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5276         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5277         to c_objc_common_truthvalue_conversion, then remove any
5278         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
5279         c_objc_common_truthvalue_conversion not
5280         c_common_truthvalue_conversion.
5281         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5282         call note_integer_operands for arguments with integer operands
5283         that are not integer constants.
5285 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
5287         PR c/54559
5288         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5289         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5291 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
5293         PR c/54428
5294         * c-convert.c (convert): Don't call fold_convert_loc if
5295         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5296         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
5297         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5299 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
5301         PR c/54355
5302         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5303         for nested and empty_ok arguments in the call to
5304         c_parser_declaration_or_fndef.
5306 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
5308         * c-tree.h (c_last_sizeof_arg): Declare.
5309         * c-parser.c (struct c_tree_loc_pair): New type.
5310         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
5311         non-NULL.
5312         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5313         (c_parser_postfix_expression_after_primary): Likewise.  Call
5314         sizeof_pointer_memaccess_warning if needed.
5315         (sizeof_ptr_memacc_comptypes): New function.
5316         * c-typeck.c (c_last_sizeof_arg): New global variable.
5317         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5319 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
5321         * c-lang.h (lang_decl): Add variable_size GTY option.
5323 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
5325         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5326         * Make-lang.in: Fix dependencies.
5328 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
5330         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5331         and add language Makefile hooks.
5332         * config-lang.in: New file.
5333         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5334         add the required "normal" config-lang.in rules.
5335         * c-lang.h: Moved from gcc/ to here.
5336         * c-tree.h: Likewise.
5337         * c-objc-common.c: Likewise.
5338         * c-objc-common.h: Likewise.
5339         * c-typeck.c: Likewise.
5340         * c-convert.c: Likewise.
5341         * c-lang.c: Likewise.
5342         * c-aux-info.c: Likewise.
5343         * c-errors.c: Likewise.
5344         * gccspec.c: Likewise.
5345         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
5346         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
5348 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5350 Copying and distribution of this file, with or without modification,
5351 are permitted in any medium without royalty provided the copyright
5352 notice and this notice are preserved.