* doc/extend.texi (Loop-Specific Pragmas): Document pragma GCC unroll.
[official-gcc.git] / gcc / c / ChangeLog
blobf4756c800a17463c03c34c32684f45494d16de2e
1 2017-12-22  Mike Stump  <mikestump@comcast.net>
2             Eric Botcazou  <ebotcazou@adacore.com>
4         * c-parser.c (c_parser_while_statement): Add unroll parameter and
5         build ANNOTATE_EXPR if present.  Add 3rd operand to ANNOTATE_EXPR.
6         (c_parser_do_statement): Likewise.
7         (c_parser_for_statement): Likewise.
8         (c_parser_statement_after_labels): Adjust calls to above.
9         (c_parse_pragma_ivdep): New static function.
10         (c_parser_pragma_unroll): Likewise.
11         (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
12         <PRAGMA_UNROLL>: New case.
14 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
16         * c-typeck.c (comptypes_internal, function_types_compatible_p,
17         perform_integral_promotions, digest_init): Replace Yoda conditions
18         with typical order conditions.
19         * c-decl.c (check_bitfield_type_and_width): Likewise.
21 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23         * c-typeck.c (c_safe_arg_type_equiv_p,
24         c_safe_function_type_cast_p): New function.
25         (build_c_cast): Implement -Wcast-function-type.
27 2017-12-14  Richard Biener  <rguenther@suse.de>
29         PR c/83415
30         * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
31         like REALPART_EXPR for the behavior of whether its operand
32         is an lvalue.
34 2017-12-12  Marek Polacek  <polacek@redhat.com>
36         PR c/82679
37         * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
39 2017-12-12  Alexandre Oliva <aoliva@redhat.com>
41         * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
42         * c-parser.c (add_debug_begin_stmt): New.
43         (c_parser_declaration_or_fndef): Call it.
44         (c_parser_compound_statement_nostart): Likewise.
45         (c_parser_statement_after_labels): Likewise.
46         * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
48 2017-12-07  Joseph Myers  <joseph@codesourcery.com>
50         * c-decl.c (build_compound_literal): Add parameter alignas_align
51         and set alignment of decl if nonzero.
52         * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
53         (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
54         qualifier.
55         (c_parser_struct_declaration): Update syntax comment.
56         (c_parser_type_name): Add alignas_ok argument and pass it to
57         c_parser_declspecs.
58         (c_parser_cast_expression): Pass true to c_parser_type_name and
59         give error if a cast used an _Alignas specifier.
60         (c_parser_sizeof_expression): Pass true to c_parser_type_name and
61         give error if sizeof (type-name) used an _Alignas specifier.
62         (c_parser_alignof_expression): Pass true to c_parser_type_name and
63         give error if _Alignof (type-name) used an _Alignas specifier.
64         (c_parser_postfix_expression_after_paren_type): Check specified
65         alignment for a compound literal and pass it to
66         build_compound_literal.
67         * c-parser.h (c_parser_type_name): Update prototype.
68         * c-tree.h (build_compound_literal): Update prototype.
70 2017-12-07  Martin Sebor  <msebor@redhat.com>
72         PR c/81544
73         * c-decl.c (c_decl_attributes): Look up existing declaration and
74         pass it to decl_attributes.
76 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
78         PR c/83236
79         * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
80         reserved for use by the implementation.
82 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
84         * c-decl.c: Include "c-family/c-spellcheck.h".
86 2017-12-05  Martin Liska  <mliska@suse.cz>
87             Jakub Jelinek  <jakub@redhat.com>
89         * c-typeck.c (pointer_diff): Add new argument and instrument
90         pointer subtraction.
91         (build_binary_op): Similar for pointer comparison.
93 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
95         PR c/79153
96         * c-parser.c: Include tree-iterator.h.
97         (c_parser_switch_statement): Emit LABEL_EXPR for the break label
98         into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
99         on it.
101         PR c/83222
102         * c-tree.h (decl_constant_value_1): Declare.
103         * c-typeck.c (decl_constant_value_1): New function.
104         (decl_constant_value): Use it.
105         * c-fold.c (c_fully_fold_internal): If in_init, use
106         decl_constant_value_1 instead of decl_constant_value.
108 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
110         * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
112 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
114         PR sanitizer/81275
115         * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
116         c_switch_covers_all_cases_p returns true.
118 2017-11-28  Julia Koval  <julia.koval@intel.com>
119             Sebastian Peryt  <sebastian.peryt@intel.com>
121         * Make-lang.in (c/c-array-notation.o): Remove.
122         * c-array-notation.c: Delete.
123         * c-decl.c: Remove cilkplus condition.
124         * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
125         c_parser_cilk_verify_simd, c_parser_array_notation,
126         c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
127         c_parser_cilk_simd_fn_vector_attrs,
128         c_finish_cilk_simd_fn_tokens): Delete.
129         (c_parser_declaration_or_fndef): Remove cilkplus condition.
130         (c_parser_direct_declarator_inner): Ditto.
131         (CILK_SIMD_FN_CLAUSE_MASK): Delete.
132         (c_parser_attributes, c_parser_compound_statement,
133         c_parser_statement_after_labels, c_parser_if_statement,
134         c_parser_switch_statement, c_parser_while_statement,
135         c_parser_do_statement, c_parser_for_statement,
136         c_parser_unary_expression, c_parser_postfix_expression,
137         c_parser_postfix_expression_after_primary,
138         c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
139         c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
140         support.
141         * c-typeck.c (build_array_ref, build_function_call_vec,
142         convert_arguments,
143         lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
144         c_finish_loop, build_binary_op): Remove cilkplus support.
146 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
148         * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
149         of build3.
151 2017-11-14 Boris Kolpackov  <boris@codesynthesis.com>
153         * Make-lang.in (c.install-plugin): Install backend import library.
155 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
157         * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
158         pragma_stmt context.
160 2017-11-23  Mike Stump  <mikestump@comcast.net>
161             Eric Botcazou  <ebotcazou@adacore.com>
163         * c-parser.c (c_parser_while_statement): Pass 3rd operand to
164         ANNOTATE_EXPR.
165         (c_parser_do_statement): Likewise.
166         (c_parser_for_statement): Likewise.
168 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
170         PR c++/62170
171         * c-objc-common.c (c_tree_printer): Convert penultimate param from
172         bool to bool *.  Within '%T' handling, if showing an "aka", use
173         "quoted" param to add appropriate quoting.
175 2017-11-22  Marek Polacek  <polacek@redhat.com>
177         PR c++/60336
178         PR middle-end/67239
179         PR target/68355
180         * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
182 2017-11-21  David Malcolm  <dmalcolm@redhat.com>
184         PR c/83056
185         * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
186         earlier failed lookups.
188 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
190         * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
191         * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
193 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
195         PR c/81404
196         * c-decl.c: Include "c-family/known-headers.h".
197         (get_c_name_hint): Rename to get_stdlib_header_for_name and move
198         to known-headers.cc.
199         (class suggest_missing_header): Move to known-header.h.
200         (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
201         than get_c_name_hint.
203 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
205         * c-decl.c (get_c_name_hint): New function.
206         (class suggest_missing_header): New class.
207         (lookup_name_fuzzy): Call get_c_name_hint and use it to
208         suggest missing headers to the user.
210 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
212         * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
213         Include "c-family/name-hint.h"
214         (implicit_decl_warning): Convert "hint" from
215         const char * to name_hint.  Pass location to
216         lookup_name_fuzzy.  Suppress any deferred diagnostic if the
217         warning was not printed.
218         (undeclared_variable): Likewise for "guessed_id".
219         (lookup_name_fuzzy): Convert return type from const char *
220         to name_hint.  Add location_t param.
221         * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
222         Include "c-family/name-hint.h"
223         (c_parser_declaration_or_fndef): Convert "hint" from
224         const char * to name_hint.  Pass location to lookup_name_fuzzy.
225         (c_parser_parameter_declaration): Likewise.
227 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
229         PR c/66618
230         PR c/69960
231         * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
232         where needed.
233         * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
234         handle_omp_array_sections): Likewise.
235         (digest_init): Don't call decl_constant_value_for_optimization.
236         * c-tree.h (decl_constant_value_for_optimization): Removed.
237         * c-fold.c (c_fold_array_ref): New function.
238         (c_fully_fold_internal): Add LVAL argument, propagate it through
239         recursive calls.  For VAR_P call decl_constant_value and
240         unshare if not LVAL and either optimizing or IN_INIT.  Remove
241         decl_constant_value_for_optimization calls.  If IN_INIT and not LVAL,
242         fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
243         (c_fully_fold): Add LVAL argument, pass it through to
244         c_fully_fold_internal.
245         (decl_constant_value_for_optimization): Removed.
247 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
249         PR c/81156
250         * c-parser.c (check_tgmath_function): New function.
251         (enum tgmath_parm_kind): New enum.
252         (c_parser_postfix_expression): Handle __builtin_tgmath.
254 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
256         * c-decl.c (implicit_decl_warning): Update for renaming of
257         pedwarn_at_rich_loc and warning_at_rich_loc.
258         (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
259         (undeclared_variable): Likewise for renaming of error_at_rich_loc.
260         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
261         (c_parser_struct_or_union_specifier): Likewise for renaming of
262         pedwarn_at_rich_loc.
263         (c_parser_parameter_declaration): Likewise for renaming of
264         error_at_rich_loc.
265         * c-typeck.c (build_component_ref): Likewise.
266         (build_unary_op): Likewise for renaming of inform_at_rich_loc.
267         (pop_init_level): Likewise for renaming of warning_at_rich_loc.
268         (set_init_label): Likewise for renaming of error_at_rich_loc.
270 2017-10-30  Richard Biener  <rguenther@suse.de>
272         * gimple-parser.c (c_parser_gimple_statement): Parse conditional
273         stmts.
275 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
277         * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
278         fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
280 2017-10-25  David Malcolm  <dmalcolm@redhat.com>
282         PR c/7356
283         * c-parser.c (c_parser_declaration_or_fndef): Detect missing
284         semicolons.
286 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
288         PR libstdc++/81706
289         * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
290         newdecl to corresponding __builtin_ if any.
292 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
294         PR c++/82466
295         * c-decl.c (diagnose_mismatched_decls): Use
296         OPT_Wbuiltin_declaration_mismatch.
298 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
300         * c-parser.c (c_parser_require): Add "type_is_unique" param and
301         use it to guard calls to maybe_suggest_missing_token_insertion.
302         (c_parser_parms_list_declarator): Override default value of new
303         "type_is_unique" param to c_parser_require.
304         (c_parser_asm_statement): Likewise.
305         * c-parser.h (c_parser_require): Add "type_is_unique" param,
306         defaulting to true.
308 2017-10-11  Nathan Sidwell  <nathan@acm.org>
310         * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
312 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
314         * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
315         operating on trees as wide_ints.
316         * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
317         (c_tree_equal): Likewise.
319 2017-10-04  David Malcolm  <dmalcolm@redhat.com>
321         * c-decl.c (push_parm_decl): Store c_parm's location into the
322         PARAM_DECL.
323         (build_c_parm): Add "loc" param and store it within the c_parm.
324         * c-parser.c (struct c_parser): Add "last_token_location" field.
325         (c_parser_consume_token): Store location of the token into the
326         new field.
327         (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
328         when handling a FUNCTION_DECL, if it doesn't already have them.
329         (c_parser_parameter_declaration): Generate a location for the
330         parameter, and pass it to the call to build_c_parm.
331         * c-tree.h (struct c_parm): Add field "loc".
332         (build_c_parm): Add location_t param.
333         * c-typeck.c (get_fndecl_argument_location): New function.
334         (inform_for_arg): New function.
335         (convert_for_assignment): Use inform_for_arg when dealing with
336         ic_argpass.
338 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
340         * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
341         width is non-NULL.
342         (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
343         don't SET_DECL_C_BIT_FIELD here.
345         PR c/82340
346         * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
347         instead of trying to set just TREE_READONLY manually.
349 2017-09-16  Tom de Vries  <tom@codesourcery.com>
351         PR c/81875
352         * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
353         cond itself.
355 2017-09-15  Joseph Myers  <joseph@codesourcery.com>
357         PR c/82071
358         * c-typeck.c (ep_convert_and_check): Just call convert_and_check
359         for C11.
360         (build_conditional_expr): For C11, generate result with excess
361         precision when one argument is an integer and the other is of a
362         type using excess precision.
364 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
366         * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
368 2017-09-13  Marek Polacek  <polacek@redhat.com>
370         PR c/82167
371         * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
372         than expr.original_type.
374 2017-09-12  Nathan Sidwell  <nathan@acm.org>
376         * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
377         resort_sorted_fields): Moved from c-family/c-common.c.
378         * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
380 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
382         PR c/82071
383         * c-typeck.c (build_atomic_assign): Handle argument with excess
384         precision.  Ensure any EXCESS_PRECISION_EXPR is present in
385         argument passed to build_binary_op and convert_for_assignment but
386         not for call to c_fully_fold.
387         (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
388         Ensure build_binary_op is called with argument with original
389         semantic type.  Avoid calling c_fully_fold with an
390         EXCESS_PRECISION_EXPR from build_binary_op.
392 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
394         PR c/81887
395         * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
397 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
398             Alan Hayward  <alan.hayward@arm.com>
399             David Sherwood  <david.sherwood@arm.com>
401         * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
402         (c_common_type): Likewise.  Use as_a <scalar_mode> when setting
403         m1 and m2 to the signed equivalent of a fixed-point
404         SCALAR_TYPE_MODE.
406 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
408         * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
409         than CAN_HAVE_LOCATION_P when determining whether to use the
410         location_t value within "value".
412 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
414         * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
415         rather than peeking the location of the first token.
416         * c-tree.h (c_expr::get_location): New method.
418 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
420         * c-typeck.c (build_function_call_vec): Pass arg_loc to call
421         to check_function_arguments.
423 2017-08-18  Marek Polacek  <polacek@redhat.com>
425         * c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
426         commentary.
428 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
430         PR c/53037
431         * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
432         (check_bitfield_type_and_width): Don't allow bit-field with
433         warn_if_not_aligned type.
435 2017-08-14  Martin Sebor  <msebor@redhat.com>
437         PR c/81117
438         * c-objc-common.c (c_objc_common_init): Handle 'G'.
440 2017-08-11  Marek Polacek  <polacek@redhat.com>
442         PR c/81795
443         * c-decl.c (pushtag): Only print inform if the warning was printed.
444         (grokdeclarator): Likewise.
446 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
448         * c-parser.c (c_parser_error): Rename to...
449         (c_parser_error_richloc): ...this, making static, and adding
450         "richloc" parameter, passing it to the c_parse_error call,
451         rather than calling c_parser_set_source_position_from_token.
452         (c_parser_error): Reintroduce, reimplementing in terms of the
453         above, converting return type from void to bool.
454         (class token_pair): New class.
455         (struct matching_paren_traits): New struct.
456         (matching_parens): New typedef.
457         (struct matching_brace_traits): New struct.
458         (matching_braces): New typedef.
459         (get_matching_symbol): New function.
460         (c_parser_require): Add param MATCHING_LOCATION, using it to
461         highlight matching "opening" tokens for missing "closing" tokens.
462         (c_parser_skip_until_found): Likewise.
463         (c_parser_static_assert_declaration_no_semi): Convert explicit
464         parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
465         class matching_parens, so that the pertinent open parenthesis is
466         highlighted when there are problems locating the close
467         parenthesis.
468         (c_parser_struct_or_union_specifier): Likewise.
469         (c_parser_typeof_specifier): Likewise.
470         (c_parser_alignas_specifier): Likewise.
471         (c_parser_simple_asm_expr): Likewise.
472         (c_parser_braced_init): Likewise, for matching_braces.
473         (c_parser_paren_condition): Likewise, for matching_parens.
474         (c_parser_switch_statement): Likewise.
475         (c_parser_for_statement): Likewise.
476         (c_parser_asm_statement): Likewise.
477         (c_parser_asm_operands): Likewise.
478         (c_parser_cast_expression): Likewise.
479         (c_parser_sizeof_expression): Likewise.
480         (c_parser_alignof_expression): Likewise.
481         (c_parser_generic_selection): Likewise.
482         (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
483         RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
484         RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
485         In case CPP_OPEN_PAREN, pass loc_open_paren to the
486         c_parser_skip_until_found call.
487         (c_parser_objc_class_definition): Use class matching_parens as
488         above.
489         (c_parser_objc_method_decl): Likewise.
490         (c_parser_objc_try_catch_finally_statement): Likewise.
491         (c_parser_objc_synchronized_statement): Likewise.
492         (c_parser_objc_at_property_declaration): Likewise.
493         (c_parser_oacc_wait_list): Likewise.
494         (c_parser_omp_var_list_parens): Likewise.
495         (c_parser_omp_clause_collapse): Likewise.
496         (c_parser_omp_clause_default): Likewise.
497         (c_parser_omp_clause_if): Likewise.
498         (c_parser_omp_clause_num_threads): Likewise.
499         (c_parser_omp_clause_num_tasks): Likewise.
500         (c_parser_omp_clause_grainsize): Likewise.
501         (c_parser_omp_clause_priority): Likewise.
502         (c_parser_omp_clause_hint): Likewise.
503         (c_parser_omp_clause_defaultmap): Likewise.
504         (c_parser_oacc_single_int_clause): Likewise.
505         (c_parser_omp_clause_ordered): Likewise.
506         (c_parser_omp_clause_reduction): Likewise.
507         (c_parser_omp_clause_schedule): Likewise.
508         (c_parser_omp_clause_num_teams): Likewise.
509         (c_parser_omp_clause_thread_limit): Likewise.
510         (c_parser_omp_clause_aligned): Likewise.
511         (c_parser_omp_clause_linear): Likewise.
512         (c_parser_omp_clause_safelen): Likewise.
513         (c_parser_omp_clause_simdlen): Likewise.
514         (c_parser_omp_clause_depend): Likewise.
515         (c_parser_omp_clause_map): Likewise.
516         (c_parser_omp_clause_device): Likewise.
517         (c_parser_omp_clause_dist_schedule): Likewise.
518         (c_parser_omp_clause_proc_bind): Likewise.
519         (c_parser_omp_clause_uniform): Likewise.
520         (c_parser_omp_for_loop): Likewise.
521         (c_parser_cilk_clause_vectorlength): Likewise.
522         (c_parser_cilk_clause_linear): Likewise.
523         (c_parser_transaction_expression): Likewise.
524         * c-parser.h (c_parser_require): Add param matching_location with
525         default UNKNOWN_LOCATION.
526         (c_parser_error): Convert return type from void to bool.
527         (c_parser_skip_until_found): Add param matching_location with
528         default UNKNOWN_LOCATION.
530 2017-08-09  Marek Polacek  <polacek@redhat.com>
532         * c-decl.c (build_enumerator): Use true/false instead of 1/0.
533         * c-tree.h (build_external_ref): Update declaration.
534         * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
535         (build_external_ref): Change the type of a parameter to bool.
536         (parser_build_binary_op): Use true/false instead of 1/0.
537         (pointer_diff): Likewise.
538         (build_modify_expr): Likewise.
539         (set_designator): Change the type of a parameter to bool.
540         (set_init_index): Use true/false instead of 1/0.
541         (set_init_label): Likewise.
542         (output_init_element): Change the type of a parameter to bool.
543         (output_pending_init_elements): Use true/false instead of 1/0.
544         (process_init_element): Likewise.
545         (build_binary_op): Change the type of a parameter to bool.
547 2017-08-09  Marek Polacek  <polacek@redhat.com>
549         PR c/81233
550         * c-typeck.c (pedwarn_init): Make the function take a variable list.
551         Call emit_diagnostic_valist instead of pedwarn.
552         (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
553         Print the relevant types in diagnostics.
555 2017-08-09  Marek Polacek  <polacek@redhat.com>
557         PR c/81417
558         * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
559         build_conditional_expr. 
560         * c-parser.c (c_parser_conditional_expression): Create locations for
561         EXP1 and EXP2 from their source ranges.  Pass the locations down to
562         build_conditional_expr.
563         * c-tree.h (build_conditional_expr): Update declaration.
564         * c-typeck.c (build_conditional_expr): Add location_t parameters.
565         For -Wsign-compare, also print the types.
567 2017-08-08  Martin Liska  <mliska@suse.cz>
569         * c-convert.c: Include header files.
570         * c-typeck.c: Likewise.
572 2017-08-07  Martin Liska  <mliska@suse.cz>
574         * c-parser.c (c_parser_attributes): Canonicalize name of an
575         attribute.
577 2017-08-02  Marek Polacek  <polacek@redhat.com>
579         PR c/81289
580         * c-parser.c (c_parser_unary_expression): Use set_error.
582         PR c/81448
583         PR c/81306
584         * c-warn.c (warn_for_multistatement_macros): Prevent bogus
585         warnings.  Avoid walking MACRO_MAP_LOCATIONS.
587 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
588             Martin Liska  <mliska@suse.cz>
590         * c-typeck.c (c_finish_goto_label): Build gimple predict
591         statement.
593 2017-07-31  Martin Liska  <mliska@suse.cz>
595         PR sanitize/81530
596         * c-convert.c (convert): Guard condition with flag_sanitize_p
597         also with current_function_decl non-null equality.
598         * c-decl.c (grokdeclarator): Likewise.
599         * c-typeck.c (build_binary_op): Likewise.
601 2017-07-25  Marek Polacek  <polacek@redhat.com>
603         * c-decl.c (grokfield): Remove local variable.
605 2017-07-25  Marek Polacek  <polacek@redhat.com>
607         PR c/81364
608         * c-parser.c (c_parser_else_body): Don't warn about multistatement
609         macro expansion if the body is in { }.
610         (c_parser_while_statement): Likewise.
611         (c_parser_for_statement): Likewise.
613 2017-07-18  Nathan Sidwell  <nathan@acm.org>
615         * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
617 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
619         * c-decl.c (implicitly_declare): When suggesting a missing
620         #include, provide a fix-it hint.
622 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
624         * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
625         and call that instead.
626         * c-tree.h (selftest::run_c_tests): New decl.
628 2017-06-26  Marek Polacek  <polacek@redhat.com>
630         PR c/80116
631         * c-parser.c (c_parser_if_body): Set the location of the
632         body of the conditional after parsing all the labels.  Call
633         warn_for_multistatement_macros.
634         (c_parser_else_body): Likewise.
635         (c_parser_switch_statement): Likewise.
636         (c_parser_while_statement): Likewise.
637         (c_parser_for_statement): Likewise.
638         (c_parser_statement): Add a default argument.  Save the location
639         after labels have been parsed.
640         (c_parser_c99_block_statement): Likewise.
642 2017-06-19  Richard Biener  <rguenther@suse.de>
644         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
645         negated _Literals to parse _Literal (int) -1.
647 2017-06-13  Martin Liska  <mliska@suse.cz>
649         PR sanitize/78204
650         * c-convert.c (convert): Use sanitize_flags_p.
651         * c-decl.c (grokdeclarator): Likewise.
652         * c-typeck.c (convert_for_assignment): Likewise.
653         (c_finish_return): Likewise.
654         (build_binary_op): Likewise.
656 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
658         PR c/81006
659         * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
660         to sizetype before size_binop.
662 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
664         * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
665         of TDI_generic.
667 2017-06-06  Marek Polacek  <polacek@redhat.com>
669         PR c/79983
670         * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
671         ref.
672         (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
674 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
676         * c-parser.c (c_parser_binary_expression): Implement the
677         -Wsizeof_pointer_div warning.
678         (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
679         from a parenthesized expression.
680         (c_parser_expr_list): Use c_last_sizeof_loc.
681         * c-tree.h (c_last_sizeof_loc): New external.
682         * c-typeck.c (c_last_sizeof_loc): New variable.
683         (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
685 2017-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
687         PR testsuite/80580
688         * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
690 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
692         * c-objc-common.c (c_tree_printer): Gain bool and const char **
693         parameters.
695 2017-05-24  Martin Sebor  <msebor@redhat.com>
697         PR c/80731
698         * c-fold.c (c_fully_fold_internal): Adjust.
699         * c-typeck.c (parser_build_unary_op): Adjust.
701 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
703         * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
704         "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
705         "VECTOR_LENGTH".
707 2017-05-23  Marek Polacek  <polacek@redhat.com>
709         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
710         quotes.
712 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
714         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
715         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
716         it returned invariant.  Call tree_invariant_p unconditionally
717         afterwards to decide whether to return expr or op0.
719 2017-05-22  Nathan Sidwell  <nathan@acm.org>
721         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
723 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
725         * c-parser.c (c_parser_omp_clause_default): Handle
726         "OMP_CLAUSE_DEFAULT_PRESENT".
728 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
730         * config-lang.in (gtfiles): Add c-family/c-format.c.
732 2017-05-18  Nathan Sidwell  <nathan@acm.org>
734         * c-decl.c (pushdecl_top_level): Delete unused function.
736 2017-05-18  Marek Polacek  <polacek@redhat.com>
738         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
739         (check_earlier_gotos): Likewise.
740         (define_label): Likewise.
741         (pending_xref_error): Likewise.
742         (smallest_type_quals_location): Likewise.
743         (grokdeclarator): Likewise.
744         (grokparms): Likewise.
745         (identifier_global_value): Likewise.
746         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
747         (find_init_member): Likewise.
749 2017-05-18  Marek Polacek  <polacek@redhat.com>
751         * c-decl.c (start_decl): Use false/true instead of 0/1.
752         (grokdeclarator): Likewise.
753         (finish_struct): Likewise.
754         (start_function): Change the return type to bool.  Use false/true
755         instead of 0/1.
756         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
757         * c-tree.h (start_function): Update.
758         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
759         (set_designator): Change the return type to bool.  Use false/true
760         instead of 0/1.
762 2017-05-17  Marek Polacek  <polacek@redhat.com>
764         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
765         * c-typeck.c: Likewise.
767 2017-05-17  Marek Polacek  <polacek@redhat.com>
769         PR sanitizer/80659
770         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
771         DECL_IGNORED_P even for non-static compound literals.
773 2017-05-17  Martin Liska  <mliska@suse.cz>
775         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
776         use it instead of int type.
778 2017-05-17  Marek Polacek  <polacek@redhat.com>
780         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
781         call c_fully_fold.
782         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
783         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr. 
784         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
785         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
786         save_expr.
787         (c_parser_conditional_expression): Likewise.
788         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
789         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
790         (process_init_element): Likewise.
791         (build_binary_op): Likewise.
792         (handle_omp_array_sections_1): Likewise.
794 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
796         * c-parser.c (c_parser_omp_clause_num_gangs)
797         (c_parser_omp_clause_num_workers)
798         (c_parser_omp_clause_vector_length): Merge functions into...
799         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
800         all users.
802 2017-05-11  Nathan Sidwell  <nathan@acm.org>
804         * gimple-parser.c: Don't #include tree-dump.h.
806 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
808         PR testsuite/80580
809         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
811 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
813         PR testsuite/80580
814         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
815         incorrect __MEM syntax.
817 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
819         PR testsuite/80580
820         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
821         type of unary '*'.
823 2017-05-09  Nathan Sidwell  <nathan@acm.org>
825         * c-tree.h (pushdecl): Declare.
827 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
829         * c-decl.c (warn_defaults_to): Replace report_diagnostic
830         with diagnostic_report_diagnostic.
831         * c-errors.c (pedwarn_c99): Likewise.
832         (pedwarn_c90): Likewise.
834 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
836         PR c++/80038
837         * c-gimplify.c (c_gimplify_expr): Remove calls to
838         cilk_gimplifY_call_params_in_spawned_fn.
840 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
842         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
843         hint for removing extra semicolon.
845 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
847         PR c/80468
848         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
849         enabled, set specs->type to integer_type_node.
851 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
853         * c-array-notation.c: Fix typo in comment.
855 2017-03-29  Marek Polacek  <polacek@redhat.com>
857         PR c/79730
858         * c-decl.c (finish_decl): Check VAR_P.
860 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
862         PR middle-end/80162
863         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
864         * c-typeck.c (c_mark_addressable): Likewise.  Look through
865         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
866         to ARRAY_TYPE.
867         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
869 2017-03-23  Marek Polacek  <polacek@redhat.com>
871         * c-tree.h: Remove a C_RID_YYCODE reference.
873 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
875         PR c/80097
876         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
877         optional COMPOUND_EXPR with ubsan instrumentation.
879 2017-03-17  Marek Polacek  <polacek@redhat.com>
881         * c-parser.c: Add C11 references.
883 2017-03-15  Marek Polacek  <polacek@redhat.com>
885         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
887 2017-03-11  Marek Polacek  <polacek@redhat.com>
889         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
891 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
893         PR translation/79848
894         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
895         "%qs".
896         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
898 2017-03-09  Marek Polacek  <polacek@redhat.com>
900         PR sanitizer/79757
901         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
902         parameter declarations with initializers.
904 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
906         PR c/79969
907         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
908         TYPE_STUB_DECL.
910 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
912         PR c/79834
913         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
914         for "may only be used in compound statements" diagnostics, change it
915         such that the same translatable string is used for all pragmas.  For
916         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
917         diagnostics.
918         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
919         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
920         "may only be used in compound statements" diagnostics, such that the
921         same translatable string is used for all pragmas.
923 2017-03-04  Marek Polacek  <polacek@redhat.com>
925         PR c/79847
926         * c-decl.c (implicit_decl_warning): Add missing space.
928 2017-03-03  Marek Polacek  <polacek@redhat.com>
930         PR c/79758
931         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
932         current_function_prototype_arg_types is error_mark_node.  Fix
933         formatting.  Use TREE_VALUE instead of TREE_TYPE.
935 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
937         PR c/79837
938         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
939         %<min%> or %<max%> in the diagnostics, instead mention identifier.
940         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
941         diagnostics.
943         PR c/79836
944         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
945         instead of %<_Generic>.
946         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
947         (c_parser_omp_target_exit_data): Use %<release%> instead of
948         %<release>.
950 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
952         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
953         instead of just cond ? "..." : "...".
954         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
955         for "enter"/"exit" keyword.
956         (c_finish_oacc_routine): Don't use %s to supply portions of the
957         message.
959 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
961         PR c++/79588
962         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
963         handle -Wrestrict here.
964         * c-typeck.c (build_function_call_vec): Adjust
965         check_function_arguments caller.
967 2017-02-23  Richard Biener  <rguenther@suse.de>
969         PR c/79684
970         * gimple-parser.c (c_parser_gimple_statement): Use set_error
971         to initialize c_exprs to return.
972         (c_parser_gimple_binary_expression): Likewise.
973         (c_parser_gimple_unary_expression): Likewise.
974         (c_parser_gimple_postfix_expression): Likewise.
976 2017-02-22  Marek Polacek  <polacek@redhat.com>
978         PR c/79662
979         * c-typeck.c (convert_arguments): Handle error_mark_node.
981 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
983         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
984         value of c_parser_parse_ssa_name against error_mark_node and emit
985         error if ssa name is anonymous and written as default definition.
987 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
989         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
990         FMA_EXPR.
992 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
994         PR c++/79512
995         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
996         ignore #pragma omp target even when not followed by identifier.
998 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1000         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1001         (c_parser_gimple_unary_expression): Likewise.
1003 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
1005         * c-parser.c (c_parser_oacc_declare): Add missing space in
1006         diagnostics.
1008 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1010         PR c/79478
1011         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1012         set_c_expr_source_range when parsing ssa-name.
1014 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
1015         Richard Biener  <rguenther@suse.de>
1017         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1018         building IL when arguments are error_mark_node.
1019         (c_parser_gimple_unary_expression): Likewise.
1020         (c_parser_gimple_if_stmt): Likewise.
1021         (c_parser_gimple_switch_stmt): Likewise.
1022         (c_parser_gimple_return_stmt): Likewise.
1023         (c_parser_parse_ssa_name): When name lookup fails do not build
1024         an SSA name.  Use undeclared rather than not declared in error
1025         reporting.
1027 2017-02-09  Marek Polacek  <polacek@redhat.com>
1029         PR c/79428
1030         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1031         instead of c_parser_skip_until_found.
1033 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
1035         PR c/79431
1036         * c-parser.c (c_parser_omp_declare_target): Don't invoke
1037         symtab_node::get on automatic variables.
1039 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
1040             Chung-Lin Tang  <cltang@codesourcery.com>
1042         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1043         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1044         semantic checking.
1045         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1047 2017-02-07  Richard Biener  <rguenther@suse.de>
1049         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1050         (c_parser_gimple_postfix_expression_after_primary):
1051         Do not use c_build_function_call_vec to avoid folding and promotion.
1052         Simplify.
1054 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
1056         PR lto/79061
1057         * c-decl.c (pop_scope): Pass main_input_filename to
1058         build_translation_unit_decl.
1060 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
1062         * c-parser.c: Include "read-rtl-function.h" and
1063         "run-rtl-passes.h".
1064         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1065         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
1066         production.  Update for renaming of field "gimple_pass" to
1067         "gimple_or_rtl_pass".  If __RTL was seen, call
1068         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
1069         to an auto_timevar, to cope with early exit.
1070         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1071         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1072         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1073         Handle RID_RTL.
1074         (c_parser_parse_rtl_body): New function.
1075         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1076         (struct c_declspecs): Rename field "gimple_pass" to
1077         "gimple_or_rtl_pass".  Add field "rtl_p".
1078         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1079         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1080         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1081         (c_parser_gimple_or_rtl_pass_list): ...this.
1083 2017-01-20  Marek Polacek  <polacek@redhat.com>
1085         PR c/64279
1086         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1088 2017-01-13  Richard Biener  <rguenther@suse.de>
1090         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1091         nops.
1093 2017-01-13  Richard Biener  <rguenther@suse.de>
1095         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1096         _Literal ( type-name ) number.
1098 2017-01-12  Richard Biener  <rguenther@suse.de>
1100         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1101         __MEM.
1103 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
1105         PR c++/72813
1106         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1107         PCH file.
1109 2017-01-11  Richard Biener  <rguenther@suse.de>
1111         PR bootstrap/79052
1112         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1113         returns on parse errors.
1115 2017-01-04  Marek Polacek  <polacek@redhat.com>
1117         PR c++/64767
1118         * c-parser.c (c_parser_postfix_expression): Mark zero character
1119         constants by setting original_type in c_expr.
1120         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1121         with a zero character constant.
1122         (char_type_p): New function.
1124 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
1126         * c-parser.c (c_parser_declaration_or_fndef): Create a
1127         rich_location at init_loc and parse it to start_init.
1128         (last_init_list_comma): New global.
1129         (c_parser_braced_init): Update last_init_list_comma when parsing
1130         commas.  Pass it to pop_init_level.  Pass location of closing
1131         brace to pop_init_level.
1132         (c_parser_postfix_expression_after_paren_type): Create a
1133         rich_location at type_loc and parse it to start_init.
1134         (c_parser_omp_declare_reduction): Likewise for loc.
1135         * c-tree.h (start_init): Add rich_location * param.
1136         (pop_init_level): Add location_t param.
1137         * c-typeck.c (struct initializer_stack): Add field
1138         "missing_brace_richloc".
1139         (start_init): Add richloc param, use it to initialize
1140         the stack node's missing_brace_richloc.
1141         (last_init_list_comma): New decl.
1142         (finish_implicit_inits): Pass last_init_list_comma to
1143         pop_init_level.
1144         (push_init_level): When finding missing open braces, add fix-it
1145         hints to the richloc.
1146         (pop_init_level): Add "insert_before" param and pass it
1147         when calling pop_init_level.  Add fixits about missing
1148         close braces to any richloc.  Use the richloc for the
1149         -Wmissing-braces warning.
1150         (set_designator): Pass last_init_list_comma to pop_init_level.
1151         (process_init_element): Likewise.
1153 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1155         Update copyright years.
1157 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
1159         PR bootstrap/78817
1160         * c-typeck.c (build_function_call_vec): If check_function_arguments
1161         returns true, set TREE_NO_WARNING on CALL_EXPR.
1163         PR c/77767
1164         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1165         to *expr instead of overwriting it.
1167 2016-12-20  Richard Biener  <rguenther@suse.de>
1169         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1170         error recovery.
1171         (c_parser_gimple_statement): Only build assigns for non-error
1172         stmts.
1173         (c_parser_gimple_postfix_expression_after): Improve error recovery.
1175 2016-12-14  Martin Jambor  <mjambor@suse.cz>
1177         * c-parser.c: Include omp-general.h and omp-offload.h instead of
1178         omp-low.h.
1179         (c_finish_oacc_routine): Adjusted call to
1180         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1181         to use their new names.
1182         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1183         use its new name.
1184         (c_parser_oacc_update): Likewise.
1185         (c_parser_omp_simd): Likewise.
1186         (c_parser_omp_target_update): Likewise.
1187         * c-typeck.c: Include omp-general.h instead of omp-low.h.
1188         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1189         name.
1190         (c_finish_omp_cancellation_point): Likewise.
1191         * gimple-parser.c: Do not include omp-low.h
1193 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
1194             James Norris  <jnorris@codesourcery.com>
1196         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1197         EXIT_DATA,WAIT} are not used in compound statements.
1198         (c_parser_oacc_enter_exit_data): Update diagnostics.
1200 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1202         PR c++/71973
1203         * c-decl.c (diagnose_mismatched_decls): Use
1204         OPT_Wbuiltin_declaration_mismatch here too.
1206 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
1207             Alan Hayward  <alan.hayward@arm.com>
1208             David Sherwood  <david.sherwood@arm.com>
1210         * c-decl.c (merge_decls): Use SET_DECL_MODE.
1211         (make_label, finish_struct): Likewise.
1213 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
1214             Richard Biener  <rguenther@suse.de>
1216         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1217         * config-lang.in (gtfiles): Add c/c-parser.h.
1218         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1219         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1220         * c-parser.c (enum c_id_kind, struct c_token,
1221         c_parser_next_token_is, c_parser_next_token_is_not,
1222         c_parser_next_token_is_keyword,
1223         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1224         Split out to ...
1225         * c-parser.h: ... new header.
1226         * c-parser.c: Include c-parser.h and gimple-parser.h.
1227         (c_parser_peek_token, c_parser_peek_2nd_token,
1228         c_token_starts_typename, c_parser_next_token_starts_declspecs,
1229         c_parser_next_tokens_start_declaration, c_parser_consume_token,
1230         c_parser_error, c_parser_require, c_parser_skip_until_found,
1231         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1232         c_parser_type_name): Export.
1233         (c_parser_tokens_buf): New function.
1234         (c_parser_error): Likewise.
1235         (c_parser_set_error): Likewise.
1236         (c_parser_declspecs): Handle RID_GIMPLE.
1237         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1238         via c_parser_parse_gimple_body.
1239         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1240         c_token_starts_typename, c_parser_next_token_starts_declspecs,
1241         c_parser_next_tokens_start_declaration, c_parser_consume_token,
1242         c_parser_error, c_parser_require, c_parser_skip_until_found,
1243         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1244         c_parser_type_name): Declare.
1245         (struct c_parser): Declare forward.
1246         (c_parser_tokens_buf): Declare.
1247         (c_parser_error): Likewise.
1248         (c_parser_set_error): Likewise.
1249         * gimple-parser.c: New file.
1250         * gimple-parser.h: Likewise.
1252 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1254         PR c/35503
1255         * c-parser.c (c_parser_postfix_expression_after_primary): Call
1256         warn_for_restrict.
1258 2016-09-11  Le-Chun Wu  <lcwu@google.com>
1259             Mark Wielaard  <mjw@redhat.com>
1261         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1262         to the given -Wshadow= variant.
1264 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1266         * c-typeck.c: Include memmodel.h.
1268 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
1270         PR target/77957
1271         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1272         instead of lhd_return_null_tree_v.
1274 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
1276         PR c++/69733
1277         * c-decl.c (smallest_type_quals_location): New static function.
1278         (grokdeclarator): Try to find the correct location for an ignored
1279         qualifier.
1281 2016-09-26  Marek Polacek  <polacek@redhat.com>
1283         PR c/7652
1284         * c-decl.c (pop_scope): Add gcc_fallthrough.
1286 2016-09-26  Marek Polacek  <polacek@redhat.com>
1288         PR c/7652
1289         * c-parser.c (struct c_token): Add flags field.
1290         (c_lex_one_token): Pass it to c_lex_with_flags.
1291         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1292         into IFN_FALLTHROUGH.
1293         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
1294         attribute fallthrough after a case label or default label.
1295         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1297 2016-09-24  Marek Polacek  <polacek@redhat.com>
1299         PR c/77490
1300         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1301         have boolean value.  Warn about ++/-- on booleans.
1303 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
1305         * c-parser.c (incomplete_record_decls): Remove unnecessary
1306         = vNULL initialization of file scope vec.
1308 2016-09-16  Marek Polacek  <polacek@redhat.com>
1310         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1312 2016-09-14  Marek Polacek  <polacek@redhat.com>
1314         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1315         (fix_array_notation_expr): Likewise.
1316         * c-decl.c (finish_decl): Likewise.
1317         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1318         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1319         (function_to_pointer_conversion): Use false instead of 0.
1320         (convert_lvalue_to_rvalue): Likewise.
1321         (parser_build_unary_op): Likewise.
1322         (build_atomic_assign): Likewise.
1323         (build_unary_op): Change nonconvert parameter type to bool, use
1324         true/false instead of 1/0.
1325         (build_binary_op): Use true instead of 1.
1327 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
1329         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1330         of add_fixit_insert to add_fixit_insert_before.
1332 2016-09-13  Marek Polacek  <polacek@redhat.com>
1334         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
1335         it.
1337 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1339         PR c++/77496
1340         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1341         COMPOUND_EXPR to warn_for_omitted_condop.
1343 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
1345         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1346         c_get_substring_location for this new langhook.
1348 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
1350         PR c/65467
1351         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1352         flag_openmp.
1353         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1354         instead of mark_exp_read on low_bound/length expression.
1355         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1356         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1357         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1358         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1359         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1360         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1361         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1362         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1363         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1364         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1365         instead of mark_expr_read.
1366         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1367         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1368         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1369         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1370         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1371         array section bases outside of depend clause, for depend clause
1372         use convert_lvalue_to_rvalue on the base.
1373         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1374         linear, aligned, map, to and from clauses.
1375         (c_omp_clause_copy_ctor): New function.
1377 2016-09-01  Marek Polacek  <polacek@redhat.com>
1379         PR c/7652
1380         * c-typeck.c (composite_type): Add FALLTHRU comment.
1382 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
1384         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1385         to the insertion fixits for "struct", "union", and "enum".
1387 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
1389         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1390         rather than add_fixit_misspelled_id.
1391         (undeclared_variable): Likewise.
1392         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
1393         now-redundant "here" params from add_fixit_insert method calls.
1394         (c_parser_parameter_declaration): Likewise.
1395         * c-typeck.c (build_component_ref): Remove now-redundant range
1396         param from add_fixit_replace method calls.
1398 2016-08-25  Marek Polacek  <polacek@redhat.com>
1400         * c-typeck.c (parser_build_binary_op): Pass LHS to
1401         warn_logical_not_parentheses.
1403 2016-08-25  Marek Polacek  <polacek@redhat.com>
1405         PR c/77323
1406         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1407         or _FloatN or _FloatNx is not supported.
1408         (finish_declspecs): Set type to integer_type_node when _FloatN or
1409         _FloatNx is not supported.
1411 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
1413         PR c/32187
1414         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1415         (struct c_declspecs): Add field floatn_nx_idx.
1416         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1417         and _FloatNx type specifiers.
1418         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1419         (c_parser_declspecs, c_parser_attribute_any_word)
1420         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1421         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1422         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1423         narrower than double.
1425 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
1426             Martin Liska  <mliska@suse.cz>
1428         PR c/67410
1429         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1430         % to determine val element to change.  Assert that
1431         wchar_bytes * charwidth fits into val array.
1433 2016-08-12  Marek Polacek  <polacek@redhat.com>
1435         PR c/7652
1436         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1437         (c_parser_postfix_expression): Likewise.
1438         * c-typeck.c (build_unary_op): Adjust fall through comment.
1439         (c_mark_addressable): Likewise.
1441 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
1443         PR c/72816
1444         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1445         array member through typedef, for orig_qual_indirect == 0 clear
1446         orig_qual_type.
1448 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
1450         PR c/64955
1451         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1452         this up to selftest::run_c_tests.
1453         (selftest::run_c_tests): New function.
1455 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
1457         * c-parser.c (struct oacc_routine_data): Add error_seen and
1458         fndecl_seen members.
1459         (c_finish_oacc_routine): Use these.
1460         (c_parser_declaration_or_fndef): Adjust.
1461         (c_parser_oacc_routine): Likewise.  Support more C language
1462         constructs, and improve diagnostics.  Move pragma context
1463         checking...
1464         (c_parser_pragma): ... here.
1466         * c-parser.c (struct oacc_routine_data): New.
1467         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1468         Simplify code.
1469         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
1470         declare target" attribute.
1472 2016-08-01  Jan Beulich  <jbeulich@suse.com>
1474         * c-fold.c (c_fully_fold_internal): Also emit shift count
1475         warnings for vector types.
1476         * c-typeck.c (build_binary_op): Likewise.
1478 2016-07-29  Marek Polacek  <polacek@redhat.com>
1480         PR c/71742
1481         * c-decl.c (finish_struct): Rephrase an error message.
1483         PR c/71853
1484         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1485         to error node for invalid code.
1487         PR c/71573
1488         * c-decl.c (implicitly_declare): Return decl early not only for
1489         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1491 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
1493         PR c/71969
1494         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1495         on GNU extern inline functions.
1497 2016-07-29  Marek Polacek  <polacek@redhat.com>
1499         PR c/71583
1500         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1501         check expr.value.
1503 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
1505         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1507 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
1509         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1510         spellcheck-tree.h
1511         (best_macro_match): Likewise, converting from a typedef to a
1512         subclass.
1513         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1514         (lookup_name_fuzzy): Update for change of best_macro_match to a
1515         subclass with a ctor that calls cpp_forall_identifiers.
1517 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
1519         * c-decl.c (implicit_decl_warning): Update for conversion of
1520         return type of lookup_name_fuzzy to const char *.
1521         (undeclared_variable): Likewise.
1522         (lookup_name_fuzzy): Convert return type from tree to
1523         const char *.
1524         * c-parser.c (c_parser_declaration_or_fndef): Update for
1525         conversion of return type of lookup_name_fuzzy to const char *.
1526         (c_parser_parameter_declaration): Likewise.
1528 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
1530         * c-parser.c (c_parser_oacc_declare): Don't scan for
1531         GOMP_MAP_POINTER.
1532         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1533         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1534         zero-length subarrays.
1536 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
1538         PR c/71858
1539         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1540         instead of FUZZY_LOOKUP_NAME.
1541         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1542         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1544 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
1546         PR c/71858
1547         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1549 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1551         * c-parser.c (c_parser_generic_selection): Make type of variable
1552         auto_vec.
1553         (c_parser_omp_declare_simd): Likewise.
1555 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1557         * c-decl.c (struct c_struct_parse_info): Change member types
1558         from vec to auto_vec.
1559         (start_struct): Adjust.
1560         (finish_struct): Likewise.
1562 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
1564         PR c/71719
1565         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1567 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
1569         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1570         Move pragma context checking into...
1571         (c_parser_omp_cancellation_point): ... here, and improve
1572         diagnostic messages.
1573         * c-typeck.c (c_finish_omp_cancel)
1574         (c_finish_omp_cancellation_point): Improve diagnostic messages.
1576 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
1578         PR c/71685
1579         * c-typeck.c (c_build_qualified_type): Don't clear
1580         C_TYPE_INCOMPLETE_VARS for the main variant.
1582 2016-06-28  Martin Sebor  <msebor@redhat.com>
1584         PR c/71552
1585         * c-typeck.c (output_init_element): Diagnose incompatible types
1586         before non-constant initializers.
1588 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
1590         * Make-lang.in: Don't cat ../stage_current if it does not exist.
1592 2016-06-23  Andi Kleen  <ak@linux.intel.com>
1594         * Make-lang.in: Add support for autofdo.
1596 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
1598         PR c/70339
1599         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1600         (implicit_decl_warning): When issuing warnings for implicit
1601         declarations, attempt to provide a suggestion via
1602         lookup_name_fuzzy.
1603         (undeclared_variable): Likewise when issuing errors.
1604         (lookup_name_in_scope): Likewise.
1605         (struct edit_distance_traits<cpp_hashnode *>): New struct.
1606         (best_macro_match): New typedef.
1607         (find_closest_macro_cpp_cb): New function.
1608         (lookup_name_fuzzy): New function.
1609         * c-parser.c: Include gcc-rich-location.h.
1610         (c_token_starts_typename): Split out case CPP_KEYWORD into...
1611         (c_keyword_starts_typename): ...this new function.
1612         (c_parser_declaration_or_fndef): When issuing errors about
1613         missing "struct" etc, add a fixit.  For other kinds of errors,
1614         attempt to provide a suggestion via lookup_name_fuzzy.
1615         (c_parser_parms_declarator): When looking ahead to detect typos in
1616         type names, also reject CPP_KEYWORD.
1617         (c_parser_parameter_declaration): When issuing errors about
1618         unknown type names, attempt to provide a suggestion via
1619         lookup_name_fuzzy.
1620         * c-tree.h (c_keyword_starts_typename): New prototype.
1622 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
1624         PR c/71601
1625         * c-typeck.c (build_conditional_expr): Return error_mark_node if
1626         c_common_type returns error_mark_node.
1628 2016-06-19  Martin Sebor  <msebor@redhat.com>
1630         PR c/69507
1631         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1632         __alignof__ (expression).
1634 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
1636         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1638 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
1640         * c-typeck.c (build_component_ref): Simplify fixit code by
1641         using gcc_rich_location::add_fixit_misspelled_id.
1642         (set_init_label): Likewise.
1644 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
1646         * c-parser.c (c_parser_initelt): Provide location of name for new
1647         location_t param of set_init_label.
1648         * c-tree.h (set_init_label): Add location_t param.
1649         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1650         param and use it when issuing error messages about unrecognized
1651         field names.  Attempt to provide a fixit hint if appropriate,
1652         otherwise update the error message to provide the type name.
1654 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
1656         PR c/71381
1657         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1658         Loosen checking.
1660 2016-06-08  Martin Sebor  <msebor@redhat.com>
1661             Jakub Jelinek  <jakub@redhat.com>
1663         PR c++/70507
1664         PR c/68120
1665         * c-typeck.c (convert_arguments): Don't promote last argument
1666         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1668 2016-06-08  Marek Polacek  <polacek@redhat.com>
1670         PR c/71418
1671         * c-decl.c (grokdeclarator): Check TYPE_P.
1673         PR c/71426
1674         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1675         code.
1677 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
1679         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1680         and structure element reference, capture the location of the
1681         element name token and pass it to build_component_ref.
1682         (c_parser_postfix_expression_after_primary): Likewise for
1683         structure element dereference.
1684         (c_parser_omp_variable_list): Likewise for
1685         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1686         * c-tree.h (build_component_ref): Add location_t param.
1687         * c-typeck.c (build_component_ref): Add location_t param
1688         COMPONENT_LOC.  Use it, if available, when issuing hints about
1689         mispelled member names to provide a fixit replacement hint.
1691 2016-06-06  Marek Polacek  <polacek@redhat.com>
1693         PR c/71362
1694         * c-parser.c (c_parser_direct_declarator): Set location.
1696 2016-06-06  Marek Polacek  <polacek@redhat.com>
1698         * c-typeck.c (comptypes_internal): Handle comparisons of
1699         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
1700         TYPE_REF_CAN_ALIAS_ALL.
1702 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
1704         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1705         arguments as addressable when async clause exists.
1707 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
1709         PR c++/71349
1710         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1711         when combined with target construct.
1713 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
1715         * c-parser.c (c_parser_omp_clause_schedule): Warn if
1716         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1718 2016-05-25  Marek Polacek  <polacek@redhat.com>
1720         PR c/71265
1721         * c-decl.c (c_make_fname_decl): Don't check seen_error.
1723         PR c/71266
1724         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1726 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
1728         * c-parser.c (c_parser_oacc_declare): Add support for
1729         GOMP_MAP_FIRSTPRIVATE_POINTER.
1730         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1731         argument with enum c_omp_region_type ort.
1732         (handle_omp_array_sections): Likewise.  Update call to
1733         handle_omp_array_sections_1.
1734         (c_finish_omp_clauses): Add specific errors and warning messages for
1735         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
1736         call to handle_omp_array_sections.
1738 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
1740         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1742 2016-05-24  Richard Biener  <rguenther@suse.de>
1744         PR middle-end/70434
1745         PR c/69504
1746         * c-typeck.c (build_array_ref): Do not complain about indexing
1747         non-lvalue vectors.  Adjust for function name change.
1749 2016-05-20  Martin Sebor  <msebor@redhat.com>
1751         PR c/71115
1752         * c-typeck.c (error_init): Use
1753         expansion_point_location_if_in_system_header.
1754         (warning_init): Same.
1756 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
1758         PR c/71171
1759         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1760         in error-handling.
1761         (c_parser_postfix_expression): Likewise.
1762         * c-tree.h (c_expr::set_error): New method.
1763         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1764         that result's range is initialized.
1766 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1768         * c-typeck.c (parser_build_unary_op): Fix formatting.
1770 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
1772         * c-decl.c (grokdeclarator): Remove errmsg and use of
1773         targetm.invalid_return_type.
1774         (grokparms): Remove errmsg and use of
1775         targetm.invalid_parameter_type.
1777 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
1779         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1780         function return type.
1782 2016-05-12  Marek Polacek  <polacek@redhat.com>
1784         PR c/70756
1785         * c-decl.c (build_compound_literal): Pass LOC down to
1786         c_incomplete_type_error.
1787         * c-tree.h (require_complete_type): Adjust declaration.
1788         (c_incomplete_type_error): Likewise.
1789         * c-typeck.c (require_complete_type): Add location parameter, pass it
1790         down to c_incomplete_type_error.
1791         (c_incomplete_type_error): Add location parameter, pass it down to
1792         error_at.
1793         (build_component_ref): Pass location down to c_incomplete_type_error.
1794         (default_conversion): Pass location down to require_complete_type.
1795         (build_array_ref): Likewise.
1796         (build_function_call_vec): Likewise.
1797         (convert_arguments): Likewise.
1798         (build_unary_op): Likewise.
1799         (build_c_cast): Likewise.
1800         (build_modify_expr): Likewise.
1801         (convert_for_assignment): Likewise.
1802         (c_finish_omp_clauses): Likewise.
1804 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1806         PR c/43651
1807         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1808         is enabled.
1809         * c-errors.c (pedwarn_c90): Return true if warned.
1810         * c-tree.h (pedwarn_c90): Change return type to bool.
1811         (enum c_declspec_word): Add new enumerator cdw_atomic.
1813 2016-05-11  Marek Polacek  <polacek@redhat.com>
1815         PR c++/71024
1816         * c-decl.c (diagnose_mismatched_decls): Factor out code to
1817         diagnose_mismatched_attributes and call it.
1819 2016-05-10  Marek Polacek  <polacek@redhat.com>
1821         PR c/70255
1822         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1823         on a declaration following the definition.
1825 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
1827         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1828         parse it through to c_parser_c99_block_statement.
1829         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1830         caller.
1832 2016-05-04  Marek Polacek  <polacek@redhat.com>
1834         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1835         OPT_Wdangling_else.
1837 2016-05-04  Marek Polacek  <polacek@redhat.com>
1839         PR c/48778
1840         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1841         for macro expansions.
1843 2016-05-03  Marek Polacek  <polacek@redhat.com>
1845         PR c/70859
1846         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1847         check_builtin_function_arguments.
1849 2016-05-03  Richard Biener  <rguenther@suse.de>
1851         * Make-lang.in (cc1-checksum.c): For stage-final re-use
1852         the checksum from the previous stage.
1854 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
1856         * c-parser.c (c_parser_oacc_all_clauses): Update call to
1857         c_finish_omp_clauses.
1858         (c_parser_omp_all_clauses): Likewise.
1859         (c_parser_oacc_cache): Likewise.
1860         (c_parser_oacc_loop): Likewise.
1861         (omp_split_clauses): Likewise.
1862         (c_parser_omp_declare_target): Likewise.
1863         (c_parser_cilk_all_clauses): Likewise.
1864         (c_parser_cilk_for): Likewise.
1865         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1866         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1868 2016-05-02  Marek Polacek  <polacek@redhat.com>
1870         PR c/70851
1871         * c-decl.c (grokdeclarator): Diagnose when array's size has an
1872         incomplete type.
1874 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
1876         PR middle-end/70626
1877         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1878         OACC_LOOP_CLAUSE_MASK.
1879         (c_parser_oacc_kernels_parallel): Update call to
1880         c_oacc_split_loop_clauses.
1882 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
1884         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1885         argument to build_modify_expr in two cases.
1887 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
1889         * c-parser.c (c_parser_postfix_expression_after_primary): Call
1890         warn_for_memset instead of warning directly here.
1892 2016-04-26  Marek Polacek  <polacek@redhat.com>
1894         PR c/67784
1895         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1896         out of ...
1897         (c_parser_for_statement): ... here.
1898         (c_parser_if_statement): Use it.
1899         (c_parser_switch_statement): Use it.
1900         (c_parser_while_statement): Use it.
1902         PR c/70791
1903         * c-decl.c (pushdecl): Pass LOCUS down to warning.
1905 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1907         PR c++/69363
1908         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1909         instead of c_finish_cilk_clauses.
1910         * c-tree.h (c_finish_omp_clauses): Add new default argument.
1911         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
1912         floating-point variables in the linear clause for Cilk Plus.
1914 2016-04-18  Michael Matz  <matz@suse.de>
1916         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1917         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1919 2016-04-15  Marek Polacek  <polacek@redhat.com>
1921         PR c/70671
1922         * c-typeck.c (build_unary_op): Pass location down to error and
1923         warning call.
1925 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
1927         PR c/70436
1928         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1929         where needed.
1930         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1931         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1932         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1933         Adjust c_parser_pragma callers.
1934         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
1935         caller.
1936         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1937         c_parser_statement.
1938         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1939         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1940         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1941         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1942         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1943         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1944         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1945         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1946         down where needed.
1947         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
1948         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1949         calls.
1951 2016-04-13  Marek Polacek  <polacek@redhat.com>
1953         PR c/70436
1954         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1955         adjust callers.
1956         (c_parser_statement): Likewise.
1957         (c_parser_c99_block_statement): Likewise.
1958         (c_parser_while_statement): Likewise.
1959         (c_parser_for_statement): Likewise.
1960         (c_parser_if_body): Don't set IF_P here.
1961         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
1962         about dangling else here.
1963         * c-tree.h (c_finish_if_stmt): Adjust declaration.
1964         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
1965         warn about dangling else here.
1967 2016-04-04  Marek Polacek  <polacek@redhat.com>
1969         PR c/70307
1970         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1972 2016-03-31  Marek Polacek  <polacek@redhat.com>
1974         PR c/70297
1975         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1977 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
1979         PR c/70281
1980         * c-parser.c (c_parser_postfix_expression): Set the source range
1981         for uses of "__builtin_types_compatible_p".
1983 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
1985         PR c/70280
1986         * c-typeck.c (composite_type): Don't count void_list_node
1987         into len, if the list is terminated by void_list_node, start
1988         with void_list_node instead of NULL for newargs.  Stop
1989         at void_list_node.
1991 2016-03-16  Marek Polacek  <polacek@redhat.com>
1993         PR c/70093
1994         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1995         nested functions returning VM types.
1997 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
1999         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2000         when calling c_finish_omp_clauses.
2002 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
2004         PR c/69824
2005         * c-decl.c (get_parm_info): Don't queue implicit function declarations
2006         for later.
2008 2016-03-04  Marek Polacek  <polacek@redhat.com>
2010         PR c/69798
2011         * c-parser.c (c_parser_postfix_expression): Call
2012         c_parser_cast_expression rather than c_parser_postfix_expression.
2014 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
2016         PR c/69796
2017         PR c/69974
2018         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2019         of incomplete decls to error_mark_node.
2021 2016-02-24  Marek Polacek  <polacek@redhat.com>
2023         PR c/69819
2024         * c-decl.c (finish_decl): Don't update the copy of the type of a
2025         different decl type.
2027 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
2029         PR objc/69844
2030         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2031         in id_kind reclassification.
2033 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
2035         PR c/69835
2036         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2038 2016-02-16  James Norris  <jnorris@codesourcery.com>
2040         PR c/64748
2041         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2043 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
2045         * c-decl.c (build_null_declspecs): Zero the entire struct.
2047         PR c/69522
2048         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
2049         callers changed.  If nested_p is true, use it to call
2050         finish_implicit_inits.
2051         * c-tree.h (finish_implicit_inits): Declare.
2052         * c-typeck.c (finish_implicit_inits): New function.  Move code
2053         from ...
2054         (push_init_level): ... here.
2055         (set_designator, process_init_element): Call finish_implicit_inits.
2057 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
2059         PR c/69768
2060         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2061         arguments for -Waddress warning.
2063 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
2065         PR c/69669
2066         * c-decl.c (finish_enum): When honoring mode attribute,
2067         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2069 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
2071         PR debug/69518
2072         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2073         all type variants, not just TYPE_MAIN_VARIANT.
2075 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
2077         PR debug/66869
2078         * c-decl.c (c_write_global_declarations_1): Warn with
2079         warn_unused_function if static prototype without definition
2080         is not C_DECL_USED.
2082 2016-01-27  Marek Polacek  <polacek@redhat.com>
2084         PR c/68062
2085         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2086         to unsigned, if needed.  Add -Wsign-compare warning.
2088 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
2090         PR tree-optimization/69483
2091         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2093 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2095         PR c/24293
2096         * c-tree.h (incomplete_record_decls): Declare.
2097         * c-parser.c (incomplete_record_decls): Define.
2098         (c_parser_translation_unit): Iterate through incomplete_record_decls and
2099         report error if any decl has zero size.
2100         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2101         or enum type to incomplete_record_decls.
2103 2016-01-14  Tom de Vries  <tom@codesourcery.com>
2105         PR tree-optimization/68773
2106         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2107         set force_output.
2109 2016-01-14  Marek Polacek  <polacek@redhat.com>
2111         PR c/69262
2112         * c-decl.c (grokdeclarator): Provide more information for invalid
2113         array declarations.
2115 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
2117         * c-parser.c (c_parser_unary_expression): For dereferences, build
2118         a combined location before calling build_indirect_ref, so that
2119         error reports cover the full range, manually updating the c_expr
2120         src_range.
2122 2016-01-06  Marek Polacek  <polacek@redhat.com>
2124         PR sanitizer/69099
2125         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
2126         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
2127         NULL.
2129 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
2131         Update copyright years.
2133 2016-01-04  Marek Polacek  <polacek@redhat.com>
2135         PR c/68908
2136         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
2137         optimization to use __atomic_fetch_* built-in if possible.
2139 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
2141         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2142         into...
2143         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
2144         all users.
2146 2015-12-22  Marek Polacek  <polacek@redhat.com>
2148         PR c/69002
2149         * c-typeck.c (build_component_ref): Warn when acessing elements of
2150         atomic structures or unions.
2152 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
2154         * c-typeck.c: Include "gcc-rich-location.h".
2155         (build_binary_op): In the two places that call binary_op_error,
2156         create a gcc_rich_location and populate it with the location of
2157         the binary op and its two operands.
2159 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2161         * c-parser.c (c_parser_statement_after_labels): When calling
2162         c_finish_return, Use the return expression's location if it has
2163         one, falling back to the location of the first token within it.
2164         * c-typeck.c (c_finish_return): When issuing warnings about
2165         the incorrect presence/absence of a return value, issue a note
2166         showing the declaration of the function.
2168 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2170         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2171         to 4.
2172         (c_parser_peek_nth_token): New function.
2173         (c_parser_peek_conflict_marker): New function.
2174         (c_parser_error): Detect conflict markers and report them as such.
2176 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2178         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2179         to preserve range information for the primary expression
2180         in the call to c_parser_postfix_expression_after_primary.
2182 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2184         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2185         expression location, falling back on the first token location,
2186         rather than always using the latter.
2188 2015-12-16  Marek Polacek  <polacek@redhat.com>
2190         PR c/64637
2191         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2192         available.
2194 2015-12-15  Marek Polacek  <polacek@redhat.com>
2196         PR c/68907
2197         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2198         artificial decl.
2200 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
2202         * c-parser.c (c_parser_alignof_expression): Capture location of
2203         closing parenthesis (if any), or of end of unary expression, and
2204         use it to build a src_range for the expression.
2206 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
2208         PR c/68757
2209         * c-parser.c (c_parser_get_builtin_args): Add
2210         "out_close_paren_loc" param, and write back to it.
2211         (c_parser_postfix_expression): Capture the closing
2212         parenthesis location for RID_CHOOSE_EXPR,
2213         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2214         RID_BUILTIN_SHUFFLE and use it to set the source range
2215         for such expressions; within RID_BUILTIN_COMPLEX set
2216         the underlying location.
2218 2015-12-07  Marek Polacek  <polacek@redhat.com>
2220         PR c/68668
2221         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2222         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2224 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
2226         * c-tree.h (c_build_va_arg): Adjust prototype.
2227         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2228         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2229         parameter, adjust throughout and issue an error if EXPR is a component
2230         with reverse storage order.
2232 2015-12-02  Jason Merrill  <jason@redhat.com>
2234         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2235         (c_fully_fold_internal, decl_constant_value_for_optimization):
2236         Move from c-common.c.
2237         * c-tree.h: Declare decl_constant_value_for_optimization.
2238         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2240 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
2242         PR c/68162
2243         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2244         following link from declarator to next declarator.  Track original
2245         qualified type and pass it to c_build_qualified_type.
2246         * c-typeck.c (c_build_qualified_type): Add arguments
2247         orig_qual_type and orig_qual_indirect.
2249 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
2251         * c-parser.c (c_parser_omp_clause_name)
2252         (c_parser_oacc_all_clauses): Alphabetical sorting.
2254 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
2256         PR c/68533
2257         * c-decl.c (get_parm_info): Use b->locus instead of input_location
2258         for diagnostics.
2260 2015-12-01  Julian Brown  <julian@codesourcery.com>
2261             Cesar Philippidis  <cesar@codesourcery.com>
2262             James Norris  <James_Norris@mentor.com>
2264         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2265         (c_parser_oacc_clause_use_device): New function.
2266         (c_parser_oacc_all_clauses): Add use_device support.
2267         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2268         (c_parser_oacc_host_data): New function.
2269         (c_parser_omp_construct): Add host_data support.
2270         * c-tree.h (c_finish_oacc_host_data): Add prototype.
2271         * c-typeck.c (c_finish_oacc_host_data): New function.
2272         (c_finish_omp_clauses): Add use_device support.
2274 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
2276         PR c/67106
2277         * c-decl.c: Set TYPE_PACKED in variants.
2279 2015-11-27  Martin Liska  <mliska@suse.cz>
2281         PR c++/68312
2282         * c-array-notation.c (fix_builtin_array_notation_fn):
2283         Use release_vec_vec instead of vec::release.
2284         (build_array_notation_expr): Likewise.
2285         (fix_conditional_array_notations_1): Likewise.
2286         (fix_array_notation_expr): Likewise.
2287         (fix_array_notation_call_expr): Likewise.
2289 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
2291         PR c/63326
2292         * c-parser.c (c_parser_compound_statement_nostart): If
2293         last_label is true, use pragma_stmt instead of pragma_compound
2294         as second c_parser_pragma argument.
2295         (c_parser_omp_ordered, c_parser_omp_target_update,
2296         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2297         false as second argument to c_parser_skip_to_pragma_eol after
2298         diagnosing standalone directives used in pragma_stmt context.
2300 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
2302         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2303         with "if (ENABLE_OFFLOADING)".
2305 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
2307         PR objc/68438
2308         * c-parser.c (c_parser_postfix_expression): Set up source ranges
2309         for various Objective-C constructs: Class.name syntax,
2310         @selector(), @protocol(), @encode(), and [] message syntax.
2312 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
2314         PR 62314
2315         * c-typeck.c (should_suggest_deref_p): New function.
2316         (build_component_ref): Special-case POINTER_TYPE when
2317         generating a "not a structure of union"  error message, and
2318         suggest a "->" rather than a ".", providing a fix-it hint.
2320 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
2322         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2323         candidate into a new function, find_closest_identifier.
2325 2015-11-19  Marek Polacek  <polacek@redhat.com>
2327         PR c/68412
2328         * c-typeck.c (parser_build_binary_op): Properly handle
2329         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2331 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
2333         * c-parser.c (set_c_expr_source_range): Bulletproof both
2334         overloaded implementations against NULL expr->value.
2335         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2336         values.
2337         (c_parser_unary_expression): Likewise when handling addresses of
2338         labels.
2339         (c_parser_postfix_expression): Likewise for statement expressions,
2340         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2341         __builtin_va_arg, and for __builtin_offset_of.
2342         (c_parser_postfix_expression_after_paren_type): Initialize expr's
2343         src_range using the range of the braced initializer.
2344         (c_parser_transaction_expression): Set src_range for "ret" to a
2345         sane pair of values.
2347 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
2349         * c-parser.c (c_finish_omp_declare_simd): Look for
2350         "simd" attribute as well. Update error message.
2352 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
2354         * c-parser.c (c_parser_omp_declare_target): Adjust.
2356 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
2358         * c-typeck.c (c_finish_omp_clauses): Don't mark
2359         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2361 2015-11-14  Marek Polacek  <polacek@redhat.com>
2363         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2364         * c-typeck.c: Likewise.
2366 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
2368         * c-decl.c (warn_defaults_to): Pass line_table to
2369         rich_location ctor.
2370         * c-errors.c (pedwarn_c99): Likewise.
2371         (pedwarn_c90): Likewise.
2372         * c-parser.c (set_c_expr_source_range): New functions.
2373         (c_token::get_range): New method.
2374         (c_token::get_finish): New method.
2375         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2376         based on the range from the start of the LHS to the end of the
2377         RHS.
2378         (c_parser_conditional_expression): Likewise, based on the range
2379         from the start of the cond.value to the end of exp2.value.
2380         (c_parser_binary_expression): Call set_c_expr_source_range on
2381         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2382         (c_parser_cast_expression): Call set_c_expr_source_range on ret
2383         based on the cast_loc through to the end of the expr.
2384         (c_parser_unary_expression): Likewise, based on the
2385         op_loc through to the end of op.
2386         (c_parser_sizeof_expression) Likewise, based on the start of the
2387         sizeof token through to either the closing paren or the end of
2388         expr.
2389         (c_parser_postfix_expression): Likewise, using the token range,
2390         or from the open paren through to the close paren for
2391         parenthesized expressions.
2392         (c_parser_postfix_expression_after_primary): Likewise, for
2393         various kinds of expression.
2394         * c-tree.h (struct c_expr): Add field "src_range".
2395         (c_expr::get_start): New method.
2396         (c_expr::get_finish): New method.
2397         (set_c_expr_source_range): New decls.
2398         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2399         on ret for prefix unary ops.
2400         (parser_build_binary_op): Likewise, running from the start of
2401         arg1.value through to the end of arg2.value.
2403 2015-11-13  Marek Polacek  <polacek@redhat.com>
2405         PR c/68320
2406         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2408 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
2410         * c-typeck.c: Include spellcheck.h.
2411         (lookup_field_fuzzy_find_candidates): New function.
2412         (lookup_field_fuzzy): New function.
2413         (build_component_ref): If the field was not found, try using
2414         lookup_field_fuzzy and potentially offer a suggestion.
2416 2015-11-12  James Norris  <jnorris@codesourcery.com>
2417             Joseph Myers  <joseph@codesourcery.com>
2419         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2420         (c_parser_omp_clause_name): Handle 'device_resident' clause.
2421         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2422         and PRAGMA_OMP_CLAUSE_LINK.
2423         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2424         and PRAGMA_OACC_CLAUSE_LINK.
2425         (OACC_DECLARE_CLAUSE_MASK): New definition.
2426         (c_parser_oacc_declare): New function.
2428 2015-11-12  Marek Polacek  <polacek@redhat.com>
2430         PR c/67784
2431         * c-parser.c (c_parser_for_statement): Reclassify the token in
2432         a correct scope.
2434 2015-11-11  Marek Polacek  <polacek@redhat.com>
2436         PR c/68107
2437         PR c++/68266
2438         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
2439         checking the size of an array.
2441 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
2443         * c-array-notation.c: Remove unused header files.
2444         * c-aux-info.c: Likewise.
2445         * c-convert.c: Likewise.
2446         * c-decl.c: Likewise.
2447         * c-errors.c: Likewise.
2448         * c-lang.c: Likewise.
2449         * c-objc-common.c: Likewise.
2450         * c-parser.c: Likewise.
2451         * c-typeck.c: Likewise.
2452         * gccspec.c: Likewise.
2454 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
2455             Cesar Philippidis  <cesar@codesourcery.com>
2456             James Norris  <jnorris@codesourcery.com>
2457             Julian Brown  <julian@codesourcery.com>
2458             Nathan Sidwell  <nathan@codesourcery.com>
2460         c/
2461         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2462         routine arg.
2463         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2464         (c_parser_pragma): Parse 'acc routine'.
2465         (OACC_ROUTINE_CLAUSE_MARK): Define.
2466         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2468 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2470         PR debug/67192
2471         * c-typeck.c (c_finish_loop): For unconditional loops, set the
2472         location of the backward-goto to the start of the loop body.
2474 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2476         PR debug/67192
2477         * c-parser.c (c_parser_while_statement): Finish the loop before
2478         parsing ahead for misleading indentation.
2479         (c_parser_for_statement): Likewise.
2481 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
2483         * c-decl.c (finish_struct): If the structure has reverse storage
2484         order, rewrite the type of array fields with scalar component.  Call
2485         maybe_apply_pragma_scalar_storage_order on entry.
2486         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
2487         errors on bit-fields and reverse SSO here and not...
2488         (c_mark_addressable): ...here.
2489         (output_init_element): Adjust call to initializer_constant_valid_p.
2490         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2492 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
2494         * c-decl.c (warn_defaults_to): Update for change in signature
2495         of diagnostic_set_info.
2496         * c-errors.c (pedwarn_c99): Likewise.
2497         (pedwarn_c90): Likewise.
2498         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2499         for textinfo::set_location.
2501 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
2502             Thomas Schwinge  <thomas@codesourcery.com>
2503             James Norris  <jnorris@codesourcery.com>
2505         * c-parser.c (c_parser_omp_clause_name): Add support for
2506         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2507         (c_parser_omp_clause_default): Add is_oacc argument. Handle
2508         default(none) in OpenACC.
2509         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2510         arguments.
2511         (c_parser_oacc_clause_tile): New function.
2512         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2513         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2514         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2515         TILE}.
2516         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2517         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2518         FIRSTPRIVATE}.
2519         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2520         (c_parser_oacc_update): Update the error message for missing clauses.
2521         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2522         and OMP_CLAUSE_INDEPENDENT.
2524 2015-11-05  Marek Polacek  <polacek@redhat.com>
2526         PR c/68090
2527         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2528         deal with pre-evaluation on invalid types.
2530 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
2531             Ilya Verbin  <ilya.verbin@intel.com>
2533         * c-parser.c: Include context.h and gimple-expr.h.
2534         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2535         monotonic together with nonmonotonic.
2536         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
2537         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2538         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2539         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2540         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
2541         expressions on combined target teams before the target.
2542         (c_parser_omp_declare_target): If decl has "omp declare target" or
2543         "omp declare target link" attribute, and cgraph or varpool node already
2544         exists, then set corresponding flags.  Call c_finish_omp_clauses
2545         in the parenthesized extended-list syntax case.
2546         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2547         declare target.
2548         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2549         on OMP_CLAUSE_REDUCTION array sections.
2550         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2551         into the constant offset, or for variable low-bound using
2552         POINTER_PLUS_EXPR.  For structure element based array sections use
2553         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2554         (c_finish_omp_clauses): Drop generic_field_head, structure
2555         elements are now always mapped even as array section bases,
2556         diagnose same var in data sharing and mapping clauses.  Diagnose if
2557         linear step on declare simd is neither a constant nor a uniform
2558         parameter.  Look through POINTER_PLUS_EXPR for array section
2559         reductions.  Diagnose the same var or function appearing multiple
2560         times on the same directive.  Fix up wording for the to clause if t
2561         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
2562         modifier on kinds other than dynamic or guided or nonmonotonic
2563         modifier together with ordered clause.
2565 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
2566             Chung-Lin Tang  <cltang@codesourcery.com>
2568         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2570 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
2572         * c-array-notation.c: Reorder #include's and remove duplicates.
2573         * c-aux-info.c: Likewise.
2574         * c-convert.c: Likewise.
2575         * c-decl.c: Likewise.
2576         * c-errors.c: Likewise.
2577         * c-lang.c: Likewise.
2578         * c-objc-common.c: Likewise.
2579         * c-parser.c: Likewise.
2580         * c-typeck.c: Likewise.
2582 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
2584         PR debug/66068
2585         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2586         after calling build_qualified_type.
2588 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
2589             Thomas Schwinge  <thomas@codesourcery.com>
2590             James Norris  <jnorris@codesourcery.com>
2591             Joseph Myers  <joseph@codesourcery.com>
2592             Julian Brown  <julian@codesourcery.com>
2593             Bernd Schmidt  <bschmidt@redhat.com>
2595         * c-parser.c (c_parser_oacc_shape_clause): New.
2596         (c_parser_oacc_simple_clause): New.
2597         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2598         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2600 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
2601             James Norris  <jnorris@codesourcery.com>
2602             Cesar Philippidis  <cesar@codesourcery.com>
2604         PR c/64765
2605         PR c/64880
2606         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2607         parameters, and handle these.  Adjust all users.
2608         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2609         into...
2610         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
2611         all users.
2612         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2613         declare functions.
2614         (c_finish_omp_construct): Declare function.
2615         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2616         Merge functions into...
2617         (c_finish_omp_construct): ... this new function.
2619 2015-10-22  Richard Biener  <rguenther@suse.de>
2621         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2622         before folding a MINUS_EXPR.
2624 2015-10-21  Marek Polacek  <polacek@redhat.com>
2626         PR c/68024
2627         * c-decl.c (start_function): Warn about vararg functions without
2628         a prototype.
2630 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
2632         * c-typeck.c (build_conditional_expr): Use boolean vector
2633         type for vector comparison.
2634         (build_vec_cmp): New.
2635         (build_binary_op): Use build_vec_cmp for comparison.
2637 2015-10-20  Marek Polacek  <polacek@redhat.com>
2639         * c-parser.c (is_cilkplus_vector_p): Don't define here.
2641 2015-10-20  Marek Polacek  <polacek@redhat.com>
2643         PR c/67964
2644         * c-parser.c (c_parser_attributes): Break out of the loop if the
2645         token after an attribute isn't a comma.
2647 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
2648             Aldy Hernandez  <aldyh@redhat.com>
2650         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2651         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2652         (c_parser_omp_variable_list): Handle structure elements for
2653         map, to and from clauses.  Handle array sections in reduction
2654         clause.  Formatting fixes.
2655         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2656         if clause modifiers.
2657         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2658         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2659         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2660         c_parser_omp_clause_is_device_ptr): New functions.
2661         (c_parser_omp_clause_ordered): Parse optional parameter.
2662         (c_parser_omp_clause_reduction): Handle array reductions.
2663         (c_parser_omp_clause_schedule): Parse optional simd modifier.
2664         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2665         functions.
2666         (c_parser_omp_clause_linear): Parse linear clause modifiers.
2667         (c_parser_omp_clause_depend_sink): New function.
2668         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2669         (c_parser_omp_clause_map): Parse release/delete map kinds and
2670         optional always modifier.
2671         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2672         and c_finish_omp_clauses callers.
2673         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
2674         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2675         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2676         (OMP_CRITICAL_CLAUSE_MASK): Define.
2677         (c_parser_omp_critical): Parse critical clauses.
2678         (c_parser_omp_for_loop): Handle doacross loops, adjust
2679         c_finish_omp_for and c_finish_omp_clauses callers.
2680         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2681         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2682         (OMP_FOR_CLAUSE_MASK): Add linear clause.
2683         (c_parser_omp_for): Disallow ordered clause when combined with
2684         distribute.  Disallow linear clause when combined with distribute
2685         and not combined with simd.
2686         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2687         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2688         parse clauses and if depend clause is found, don't parse a body.
2689         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2690         Allow target parallel without for after it.
2691         (OMP_TASK_CLAUSE_MASK): Add priority clause.
2692         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2693         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2694         invalid kinds.
2695         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2696         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2697         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2698         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2699         functions.
2700         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2701         defaultmap and is_device_ptr clauses.
2702         (c_parser_omp_target): Parse target parallel and target simd.  Set
2703         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
2704         and target exit data.  Diagnose invalid map kinds.
2705         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2706         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2707         construct.
2708         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2709         &omp_priv.
2710         (OMP_TASKLOOP_CLAUSE_MASK): Define.
2711         (c_parser_omp_taskloop): New function.
2712         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2713         handle PRAGMA_OMP_TASKLOOP.
2714         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2715         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2716         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2717         Add IS_OMP argument, handle structure element bases, diagnose
2718         bitfields, pass IS_OMP recursively, diagnose known zero length
2719         array sections in depend clauses, handle array sections in reduction
2720         clause, diagnose negative length even for pointers.
2721         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2722         types, pass IS_OMP down to handle_omp_array_sections_1, handle
2723         array sections in reduction clause, set
2724         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2725         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2726         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2727         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2729 2015-10-06  Marek Polacek  <polacek@redhat.com>
2731         * c-parser.c (c_parser_statement_after_labels): Use
2732         protected_set_expr_location.
2733         (c_parser_omp_clause_num_gangs): Likewise.
2734         (c_parser_omp_clause_num_threads): Likewise.
2735         (c_parser_omp_clause_num_workers): Likewise.
2736         (c_parser_omp_clause_vector_length): Likewise.
2737         (c_parser_omp_clause_num_teams): Likewise.
2738         (c_parser_omp_clause_thread_limit): Likewise.
2739         * c-typeck.c (build_c_cast): Likewise.
2740         (c_cast_expr): Likewise.
2742 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
2744         * c-typeck.c (c_tree_equal): Use real_equal instead of
2745         REAL_VALUES_EQUAL.
2747 2015-10-04  Jason Merrill  <jason@redhat.com>
2749         * c-parser.c (c_lex_one_token): Handle @synchronized.
2750         * c-decl.c (match_builtin_function_types): A declaration of a built-in
2751         can change whether the function is transaction_safe.
2753 2015-10-02  Marek Polacek  <polacek@redhat.com>
2755         PR c/67730
2756         * c-typeck.c (convert_for_assignment): Use the expansion point
2757         location throughout.
2759 2015-10-02  Marek Polacek  <polacek@redhat.com>
2761         PR c/64249
2762         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2763         and pass it down to c_parser_if_statement.
2764         (c_parser_else_body): Add CHAIN parameter and pass it down to
2765         c_parser_statement_after_labels.
2766         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
2767         duplicated if-else-if conditions.
2769 2015-10-01  Marek Polacek  <polacek@redhat.com>
2771         * c-typeck.c (convert_for_assignment): Improve commentary.
2773 2015-09-30  Marek Polacek  <polacek@redhat.com>
2775         PR c/67730
2776         * c-typeck.c (c_finish_return): Use the expansion point location for
2777         certain "return with value" warnings.
2779 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2781         * c-parser.c (pragma_lex): Add loc argument.
2783 2015-09-15  Marek Polacek  <polacek@redhat.com>
2785         PR c/67580
2786         * c-decl.c (tag_exists_p): New function.
2787         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2788         struct/union/enum keywords are missing.
2789         * c-tree.h (tag_exists_p): Declare.
2791 2015-09-15  Marek Polacek  <polacek@redhat.com>
2793         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2794         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2795         Return NULL_TREE instead of 0.
2796         (lookup_name): Return NULL_TREE instead of 0.
2797         (lookup_name_in_scope): Likewise.
2798         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2799         (parser_xref_tag): Use false instead of 0.
2800         (start_struct): Use true instead of 1.
2801         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2803 2015-09-14  Marek Polacek  <polacek@redhat.com>
2805         * c-typeck.c (set_nonincremental_init_from_string): Use
2806         HOST_WIDE_INT_M1U when shifting a negative value.
2808 2015-09-09  Mark Wielaard  <mjw@redhat.com>
2810         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2811         parm against NULL.
2813 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
2815         PR c/67502
2816         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2817         into OMP_FOR_PRE_BODY rather than before the loop.
2819 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
2821         PR c/67501
2822         * c-parser.c (c_parser_oacc_all_clauses,
2823         c_parser_omp_all_clauses): Remove invalid clause from
2824         list of clauses even if parser->error is set.
2826         PR c/67500
2827         * c-parser.c (c_parser_omp_clause_aligned,
2828         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2829         test for errors.
2830         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2831         error_mark_node.
2833         PR c/67495
2834         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2835         instead of c_parser_unary_expression.  If the result is !lvalue_p,
2836         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2838 2015-09-04  Marek Polacek  <polacek@redhat.com>
2840         PR sanitizer/67279
2841         * c-typeck.c (build_binary_op): Don't instrument static initializers.
2843 2015-09-03  Martin Sebor  <msebor@redhat.com>
2845         PR c/66516
2846         * c-typeck.c (convert_arguments, parser_build_unary_op,
2847         build_conditional_expr, c_cast_expr, convert_for_assignment,
2848         build_binary_op, _objc_common_truthvalue_conversion): Call
2849         reject_gcc_builtin.
2850         (c_decl_implicit): Define.
2852 2015-09-02  Marek Polacek  <polacek@redhat.com>
2854         PR c/67432
2855         * c-parser.c (c_parser_enum_specifier): Give a better error for
2856         an empty enum.
2858 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
2860         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2862 2015-08-12  Marek Polacek  <polacek@redhat.com>
2864         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2865         LOC to it.
2867 2015-08-03  Marek Polacek  <polacek@redhat.com>
2869         PR c/67088
2870         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2871         Use it.
2872         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2874 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
2876         * c-parser.c (c_parser_if_body): Take token_indent_info
2877         argument. Call warn_for_misleading_indentation even when the
2878         body is a semicolon.  Extract token_indent_infos corresponding
2879         to the guard, body and next tokens.  Adjust call to
2880         warn_for_misleading_indentation accordingly.
2881         (c_parser_else_body): Likewise.
2882         (c_parser_if_statement): Likewise.
2883         (c_parser_while_statement): Likewise.
2884         (c_parser_for_statement): Likewise.
2886 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
2887             Manuel López-Ibáñez  <manu@gcc.gnu.org>
2889         * c-decl.c (get_parm_info): Remove static var. Update warning
2890         message.
2892 2015-07-27  Marek Polacek  <polacek@redhat.com>
2894         PR c++/66555
2895         PR c/54979
2896         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2898 2015-07-20  Marek Polacek  <polacek@redhat.com>
2900         PR c++/55095
2901         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2902         (build_binary_op): Warn about left shift overflows.
2904 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
2906         * c-array-notation.c: Adjust includes for flags.h changes.
2907         * c-objc-common.c: Likewise.
2909 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
2911         * c-array-notation.c: Adjust includes.
2912         * c-aux-info.c: Likewise.
2913         * c-convert.c: Likewise.
2914         * c-decl.c: Likewise.
2915         * c-errors.c: Likewise.
2916         * c-lang.c: Likewise.
2917         * c-objc-common.c: Likewise.
2918         * c-parser.c: Likewise.
2919         * c-typeck.c: Likewise.
2921 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2923         PR fortran/66605
2924         * c-decl.c (finish_function): Call do_warn_unused_parameter.
2926 2015-06-29  Marek Polacek  <polacek@redhat.com>
2928         PR c/66322
2929         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2930         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
2931         about -Wswitch-bool here.
2932         (do_case): Update c_add_case_label call.
2933         (c_finish_case): Update c_do_switch_warnings call.
2935 2015-06-27  Marek Polacek  <polacek@redhat.com>
2937         * c-typeck.c: Use VECTOR_TYPE_P throughout.
2939 2015-06-26  Marek Polacek  <polacek@redhat.com>
2941         * c-array-notation.c (fix_builtin_array_notation_fn): Use
2942         INDIRECT_REF_P.
2943         * c-typeck.c (array_to_pointer_conversion): Likewise.
2944         (build_unary_op): Likewise.
2945         (c_finish_return): Likewise.
2947 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
2949         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2950         * c-parser.c: Likewise.
2952 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
2954         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2955         instead of pointer_hash.
2956         (detect_field_duplicates): Likewise.
2958 2015-06-25  Marek Polacek  <polacek@redhat.com>
2960         * c-array-notation.c: Use VAR_P throughout.
2961         * c-decl.c: Likewise.
2962         * c-objc-common.c: Likewise.
2963         * c-parser.c: Likewise.
2964         * c-typeck.c: Likewise.
2966 2015-06-25  Marek Polacek  <polacek@redhat.com>
2968         * c-decl.c: Use is_global_var throughout.
2969         * c-parser.c: Likewise.
2970         * c-typeck.c: Likewise.
2972 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
2974         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2975         * c-aux-info.c: Likewise.
2976         * c-convert.c: Likewise.
2977         * c-decl.c: Likewise.
2978         * c-errors.c: Likewise.
2979         * c-lang.c: Likewise.
2980         * c-objc-common.c: Likewise.
2981         * c-parser.c: Likewise.
2982         * c-typeck.c: Likewise.
2984 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
2986         PR middle-end/66325
2987         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2988         variants.
2990 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
2992         * c-decl.c (pop_scope): Register the main translation unit
2993         through the new debug hook.
2995 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
2997         * c-array-notation.c : Adjust include files.
2998         * c-aux-info.c : Likewise.
2999         * c-convert.c : Likewise.
3000         * c-decl.c : Likewise.
3001         * c-errors.c : Likewise.
3002         * c-lang.c : Likewise.
3003         * c-lang.h : Likewise.
3004         * c-objc-common.c : Likewise.
3005         * c-parser.c : Likewise.
3006         * c-typeck.c : Likewise.
3008 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
3010         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3011         immediately clobber it.
3012         (c_write_global_declarations_1): Remove call to
3013         check_global_declaration_1.
3014         (c_write_global_declarations_2): Remove.
3015         (c_write_final_cleanups): Rename from c_write_global_declarations.
3016         Remove call to finalize_compilation_unit.
3017         Remove calls to debugging hooks.
3018         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3019         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3020         * c-tree.h: Remove c_write_global_declarations.
3022 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
3024         * c-array-notation.c: Adjust includes for restructured coretypes.h.
3025         * c-aux-info.c: Likewise.
3026         * c-convert.c: Likewise.
3027         * c-decl.c: Likewise.
3028         * c-errors.c: Likewise.
3029         * c-lang.c: Likewise.
3030         * c-objc-common.c: Likewise.
3031         * c-parser.c: Likewise.
3032         * c-typeck.c: Likewise.
3034 2015-06-04  Marek Polacek  <polacek@redhat.com>
3036         PR c/66341
3037         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3038         it is a lvalue.
3040 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3042         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3043         Warn for empty struct.
3044         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3046 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
3048         * c-decl.c (start_function): Call plugin before parsing.
3049         (finish_function): Call plugin after parsing.
3051 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3053         PR c/49551
3054         * c-decl.c (merge_decls): Merge DECL_COMMON.
3056 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
3058         * Make-lang.in (check_gcc_pallelize): Define.
3060 2015-05-22  Marek Polacek  <polacek@redhat.com>
3062         PR c/47043
3063         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3064         attributes.
3066 2015-05-21  Marek Polacek  <polacek@redhat.com>
3068         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3069         DECL_BUILT_IN.
3071 2015-05-20  Marek Polacek  <polacek@redhat.com>
3073         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3074         * c-typeck.c: Likewise.
3076 2015-05-19  Marek Polacek  <polacek@redhat.com>
3078         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3080 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
3082         PR middle-end/66199
3083         * c-parser.c (c_parser_omp_for_loop): Don't add
3084         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3085         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3086         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3087         constructs.
3089 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
3091         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3092         swaps.
3094 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3096         PR fortran/44054
3097         * c-objc-common.c (c_tree_printer): Replace locus pointer with
3098         accessor function.
3100 2015-05-14  Marek Polacek  <polacek@redhat.com>
3102         PR c/66066
3103         PR c/66127
3104         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3105         rather than with 0.
3107 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
3109         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3110         to add a call to warn_for_misleading_indentation.
3111         (c_parser_else_body): Likewise, adding param "else_loc".
3112         (c_parser_if_statement): Check for misleading indentation.
3113         (c_parser_while_statement): Likewise.
3114         (c_parser_for_statement): Likewise.
3116 2015-05-08  Marek Polacek  <polacek@redhat.com>
3118         PR c/64918
3119         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3120         (output_init_element): Likewise.
3122 2015-05-07  Marek Polacek  <polacek@redhat.com>
3124         PR c/65179
3125         * c-typeck.c (build_binary_op): Warn when left shifting a negative
3126         value.
3128 2015-04-30  Marek Polacek  <polacek@redhat.com>
3130         * c-typeck.c (set_init_label): Call error_at instead of error and
3131         pass LOC to it.
3133         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
3134         the type of a decl.
3136         * c-typeck.c (c_build_va_arg): Clarify the error message.
3138 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
3140         * c-parser.c (c_parser_oacc_enter_exit_data): Use
3141         OMP_STANDALONE_CLAUSES.
3143 2015-04-28  Marek Polacek  <polacek@redhat.com>
3145         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3147 2015-04-28  Marek Polacek  <polacek@redhat.com>
3149         PR c/65901
3150         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3152 2015-04-25  Marek Polacek  <polacek@redhat.com>
3154         PR c/52085
3155         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
3156         attribute.
3158 2015-04-23  Marek Polacek  <polacek@redhat.com>
3160         PR c/65345
3161         * c-decl.c (set_labels_context_r): New function.
3162         (store_parm_decls): Call it via walk_tree_without_duplicates.
3163         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3164         instead of create_tmp_var.  Build TARGET_EXPR instead of
3165         COMPOUND_EXPR.
3166         (build_atomic_assign): Use create_tmp_var_raw instead of
3167         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
3169 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
3171         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3172         (c_parser_omp_target_update): Add missed %> to error_at ().
3174 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
3176         PR target/55143
3177         * c-decl.c (c_default_pointer_mode): Remove definition.
3178         * c-tree.h (c_default_pointer_mode): Remove declaration.
3180 2015-03-27  Tobias Burnus  <burnus@net-b.de>
3182         PR c/65586
3183         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3184         error out.
3185         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3186         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3187         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3189 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
3191         * c-decl.c (c_decl_attributes): Also add "omp declare target"
3192         attribute for DECL_EXTERNAL VAR_DECLs.
3194 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
3196         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3197         argument.
3199 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
3201         PR c/65120
3202         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3203         before preparing arguments to warn_logical_not_parentheses.
3205 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
3207         PR c/65120
3208         * c-typeck.c (parser_build_binary_op): Don't warn for
3209         !!x == y or !b == y where b is _Bool.
3211 2015-03-09  Marek Polacek  <polacek@redhat.com>
3213         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3214         * c-decl.c (grokdeclarator): Likewise.
3215         * c-typeck.c (build_binary_op): Likewise.
3217 2015-02-27  Marek Polacek  <polacek@redhat.com>
3219         PR c/65228
3220         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3222 2015-02-14  Marek Polacek  <polacek@redhat.com>
3224         PR c/64768
3225         * c-decl.c (grokdeclarator): Set the range of a flexible array member
3226         declared through a typedef name.
3228 2015-02-13  Marek Polacek  <polacek@redhat.com>
3230         PR c/65050
3231         * c-decl.c (grokdeclarator): Print also the type when giving
3232         the error message about array's incomplete element type.
3234 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
3236         PR c/64824
3237         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3238         check in the POP macro.
3240 2015-02-09  Marek Polacek  <polacek@redhat.com>
3242         PR c/64856
3243         * c-typeck.c (process_init_element): Don't always wrap
3244         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3245         initializing a range of elements.
3247 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
3249         PR c/64824
3250         PR c/64868
3251         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3253 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
3255         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3256         processing enum declaration.
3258 2015-01-29  Marek Polacek  <polacek@redhat.com>
3260         PR c/64709
3261         * c-typeck.c (pop_init_level): If constructor_elements has
3262         exactly one element with integer_zerop value, set constructor_zeroinit
3263         to 1.  Remove braces around warning_init call.
3265 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
3267         PR c/64766
3268         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3269         of FUNCTION_DECLs with error_mark_node.
3271 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
3273         PR c/64778
3274         * c-typeck.c (convert_arguments): Return -1 if there are
3275         error_args, even if we've diagnosed too many arguments.
3277 2015-01-21  Richard Biener  <rguenther@suse.de>
3279         PR middle-end/64313
3280         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3281         for builtins the user declared correctly.
3283 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
3284             Bernd Schmidt  <bernds@codesourcery.com>
3285             Cesar Philippidis  <cesar@codesourcery.com>
3286             James Norris  <jnorris@codesourcery.com>
3287             Jakub Jelinek  <jakub@redhat.com>
3288             Ilmir Usmanov  <i.usmanov@samsung.com>
3290         * c-parser.c: Include "gomp-constants.h".
3291         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3292         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3293         Use OMP_CLAUSE_SET_MAP_KIND.
3294         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3295         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3296         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3297         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3298         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3299         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3300         "copyout", "create", "delete", "deviceptr", "gang", "host",
3301         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3302         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3303         "present_or_create", "pcreate", "seq", "self", "vector",
3304         "vector_length", "wait", "worker".
3305         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3306         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3307         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3308         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3309         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3310         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3311         (c_parser_oacc_data_clause_deviceptr)
3312         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3313         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3314         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3315         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3316         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3317         (c_parser_oacc_parallel, c_parser_oacc_update)
3318         (c_parser_oacc_wait): New functions.
3319         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3320         (c_finish_oacc_data): New prototypes.
3321         * c-typeck.c: Include "gomp-constants.h".
3322         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
3323         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
3324         OMP_CLAUSE_SET_MAP_KIND.
3325         (c_finish_oacc_parallel, c_finish_oacc_kernels)
3326         (c_finish_oacc_data): New functions.
3327         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3328         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3329         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3330         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3331         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3332         GOMP_MAP_FORCE_DEVICEPTR.
3334 2015-01-09  Michael Collison  <michael.collison@linaro.org>
3336         * c-array-notation.c: Include hash-set.h, machmode.h,
3337         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3338         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3339         * c-aux-info.c: Ditto.
3340         * c-convert.c: Ditto.
3341         * c-decl.c: Ditto.
3342         * c-errors.c: Ditto.
3343         * c-lang.c: Dittoxs.
3344         * c-objc-common.c: Ditto.
3345         * c-parser.c: Ditto.
3346         * c-typeck.c: Include hash-set.h, machmode.h,
3347         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3348         fold-const.h, wide-int.h, inchash.h, real.h and
3349         fixed-value.h due to flattening of tree.h.
3351 2015-01-07  Marek Polacek  <polacek@redhat.com>
3353         PR c/64417
3354         * c-typeck.c (process_init_element): Disallow initialization of
3355         a flexible array member with a string constant if the structure
3356         is in an array.
3358 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
3360         PR sanitizer/64344
3361         * c-typeck.c (convert_for_assignment, c_finish_return): For
3362         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3363         types also set in_late_binary_op around convert call.
3364         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3365         to integral type casts, if not in_late_binary_op, pass c_fully_fold
3366         result on expr as last argument to ubsan_instrument_float_cast,
3367         if in_late_binary_op, don't use c_save_expr but save_expr.
3369         Update copyright years.
3371 2015-01-05  Marek Polacek  <polacek@redhat.com>
3373         PR c/64423
3374         * c-typeck.c (build_array_ref): Pass loc down to
3375         warn_array_subscript_with_type_char.
3377 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
3379         * c-typeck.c: New behavious for pointers to arrays with qualifiers
3380         (common-pointer-type): For pointers to arrays take qualifiers from
3381         element type.
3382         (build_conditional_expr): Add warnings for lost qualifiers.
3383         (comp-target-types): Allow pointers to arrays with different qualifiers.
3384         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3385         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3386         to PEDWARN_FOR_QUALIFIERS.
3388 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
3390         PR sanitizer/64289
3391         * c-convert.c: Include ubsan.h.
3392         (convert): For real -> integral casts and
3393         -fsanitize=float-cast-overflow don't call convert_to_integer, but
3394         instead instrument the float cast directly.
3396 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
3398         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3399         c_finish_stmt_expr): Remove NULL last argument from
3400         create_tmp_var_raw and create_tmp_var calls.
3401         * c-array-notation.c (fix_builtin_array_notation_fn,
3402         build_array_notation_expr, fix_conditional_array_notations_1,
3403         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3405 2014-11-28  Marek Polacek  <polacek@redhat.com>
3407         PR c/63862
3408         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3409         convert the right operand to integer type.
3411 2014-11-25  Marek Polacek  <polacek@redhat.com>
3413         PR c/63877
3414         * c-decl.c (start_function): Disable -Wmissing-declarations warning
3415         for inline functions.
3417 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
3419         PR target/63764
3420         * c-typeck.c (build_array_ref): Adjust
3421         convert_vector_to_pointer_for_subscript caller.  If it returns true,
3422         call non_lvalue_loc on the result.
3424 2014-11-11  Richard Biener  <rguenther@suse.de>
3426         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3427         to true.
3429 2014-11-10  Andi Kleen  <ak@linux.intel.com>
3431         PR c/60804
3432         * c-parser.c (c_parser_statement_after_labels): Call
3433         check_no_cilk.
3434         (c_parser_if_statement): Dito.
3435         (c_parser_switch_statement): Dito.
3436         (c_parser_while_statement): Dito.
3437         (c_parser_do_statement): Dito.
3438         (c_parser_for_statement): Dito.
3439         * c-typeck.c (c_finish_loop): Dito.
3441 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
3443         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3444         OPT_Wshift_count_overflow in the warnings.
3446 2014-10-30  Marek Polacek  <polacek@redhat.com>
3448         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3449         print the stripped version as well, if they're not the same.
3451 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
3453         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3454         machine_mode.
3456 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
3458         * c-decl.c: Adjust include files.
3459         * c-parser.c: Ditto.
3461 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
3462             Tom Tromey  <tromey@redhat.com>
3464         * c-tree.h (enum c_oracle_request): New.
3465         (c_binding_oracle_function): New typedef.
3466         (c_binding_oracle, c_pushtag, c_bind): Declare.
3467         * c-decl.c (c_binding_oracle): New global.
3468         (I_SYMBOL_CHECKED): New macro.
3469         (i_symbol_binding): New function.
3470         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3471         (I_TAG_CHECKED): New macro.
3472         (i_tag_binding): New function.
3473         (I_TAG_BINDING, I_TAG_DECL): Redefine.
3474         (I_LABEL_CHECKED): New macro.
3475         (i_label_binding): New function.
3476         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3477         (c_print_identifier): Save and restore c_binding_oracle.
3478         (c_pushtag, c_bind): New functions.
3480 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
3482         * c-typeck.c: Adjust include files.
3484 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3486         PR c++/53061
3487         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3488         initialization here...
3489         (c_initialize_diagnostics): ... but here. Set defaults after
3490         building pretty-printer.
3492 2014-10-23  Marek Polacek  <polacek@redhat.com>
3494         PR c/63626
3495         * c-decl.c (pop_scope): Don't print warning in external_scope.
3497 2014-10-19  Marek Polacek  <polacek@redhat.com>
3499         PR c/63567
3500         * c-typeck.c (output_init_element): Allow initializing objects with
3501         static storage duration with compound literals even in C99 and add
3502         pedwarn for it.
3504 2014-10-17  Marek Polacek  <polacek@redhat.com>
3506         PR c/63567
3507         * c-typeck.c (digest_init): Allow initializing objects with static
3508         storage duration with compound literals even in C99 and add pedwarn
3509         for it.
3511 2014-10-17  Marek Polacek  <polacek@redhat.com>
3513         PR c/63543
3514         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3515         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3516         error multiple times.  Print the type.
3518 2014-10-17  Marek Polacek  <polacek@redhat.com>
3520         PR c/63549
3521         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3522         type.
3524 2014-10-17  Marek Polacek  <polacek@redhat.com>
3526         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3527         (start_function): Use OPT_Wimplicit_int instead of 0.
3528         (store_parm_decls_oldstyle): Likewise.
3530 2014-10-17  Alan Modra  <amodra@gmail.com>
3532         PR middle-end/61848
3533         * c-decl.c (merge_decls): Don't merge section name or tls model
3534         to newdecl symtab node, instead merge to olddecl.  Override
3535         existing olddecl section name.  Set tls_model for all thread-local
3536         vars, not just OMP thread-private ones.  Remove incorrect comment.
3538 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
3540         * c-decl.c: Adjust include files.
3542 2014-10-14  DJ Delorie  <dj@redhat.com>
3544         * c-parser.c (c_parse_init): Add RID entries for each __intN.
3545         (c_token_starts_typename): Check all __intN, not just __int128.
3546         (c_token_starts_declspecs): Likewise.
3547         (c_parser_declspecs): Likewise.
3548         (c_parser_attribute_any_word): Likewise.
3549         (c_parser_objc_selector): Likewise.
3550         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3551         (struct c_declspecs): Add int_n_idx field to record *which* __intN
3552         is specified.
3553         * c-decl.c (declspecs_add_type): Check for all __intN, not just
3554         __int128.
3555         (finish_declspecs): Likewise.
3557 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
3559         * c-parser.c (c_parser_all_labels): New function to replace
3560         the duplicate code.
3561         (c_parser_statement): Call the new function.
3563 2014-10-09  Marek Polacek  <polacek@redhat.com>
3565         PR c/63480
3566         * c-typeck.c (pop_init_level): Don't warn about initializing
3567         with { }.
3569 2014-10-07  Marek Polacek  <polacek@redhat.com>
3571         PR c/59717
3572         * c-decl.c (header_for_builtin_fn): New function.
3573         (implicitly_declare): Suggest which header to include.
3575 2014-10-07  Marek Polacek  <polacek@redhat.com>
3577         * c-convert.c (convert): Use error_operand_p.
3578         * c-typeck.c (require_complete_type): Likewise.
3579         (really_atomic_lvalue): Likewise.
3580         (digest_init): Likewise.
3581         (handle_omp_array_sections_1): Likewise.
3583 2014-10-03  Marek Polacek  <polacek@redhat.com>
3585         PR c/63453
3586         * c-decl.c (pop_scope): Don't warn about "inline function declared
3587         but never defined" for functions marked with gnu_inline attribute.
3589 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
3591         PR c++/63249
3592         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3593         on low_bound and length.
3595 2014-09-24  Marek Polacek  <polacek@redhat.com>
3597         PR c/61405
3598         PR c/53874
3599         * c-parser.c: Don't define CPP_KEYWORD.
3600         (c_parser_switch_statement): Pass original type to c_finish_case.
3601         * c-tree.h (c_finish_case): Update declaration.
3602         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
3603         conditionally to c_do_switch_warnings.
3605 2014-09-03  Marek Polacek  <polacek@redhat.com>
3607         PR c/62024
3608         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3609         conversions.
3611 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
3612             Balaji V. Iyer  <balaji.v.iyer@intel.com>
3613             Igor Zamyatin  <igor.zamyatin@intel.com>
3615         * c-parser.c (c_parser_cilk_for): New function.
3616         (c_parser_cilk_grainsize): Likewise.
3617         (c_get_temp_regvar): Likewise.
3618         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3619         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3620         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3621         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3622         case.
3624 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
3626         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3627         with using HOST_WIDE_INT without truncation to 'int'
3629 2014-08-22  Marek Polacek  <polacek@redhat.com>
3631         PR c++/62199
3632         * c-typeck.c (parser_build_binary_op): Adjust call to
3633         warn_logical_not_parentheses.
3635 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
3637         PR other/62008
3638         * c-parser.c (c_parser_array_notation): Check for correct
3639         type of an array added.
3641 2014-08-19  Marek Polacek  <polacek@redhat.com>
3643         PR c++/62153
3644         * c-typeck.c (build_binary_op): If either operand of a comparison
3645         is a boolean expression, call maybe_warn_bool_compare.
3647 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
3649         PR c/45584
3650         * c-typeck.c (build_c_cast): Do a conversion even when the
3651         TYPE_MAIN_VARIANTs are the same.
3653 2014-08-19  Marek Polacek  <polacek@redhat.com>
3655         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3656         pedwarn_c99 instead of pedwarn.
3657         (grokfield): Likewise.
3658         (warn_defaults_to): New function.
3659         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3660         Unconditionally call pedwarn_c99 instead of pedwarn.
3661         (start_function): Call warn_defaults_to instead of pedwarn_c99.
3662         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3663         check flag_isoc11 before.
3664         * c-errors.c (pedwarn_c99): Change the return type to bool.
3665         Handle -Wc99-c11-compat.
3666         * c-parser.c (disable_extension_diagnostics): Handle
3667         warn_c99_c11_compat.
3668         (restore_extension_diagnostics): Likewise.
3669         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3670         instead of pedwarn, don't check flag_isoc11 before.
3671         (c_parser_declspecs): Likewise.
3672         (c_parser_alignas_specifier): Likewise.
3673         (c_parser_alignof_expression): Likewise.
3674         (c_parser_generic_selection): Likewise.
3675         * c-tree.h (pedwarn_c99): Update declaration.
3676         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3677         of pedwarn_c99.
3679 2014-08-19  Marek Polacek  <polacek@redhat.com>
3681         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3682         to pedwarn_c90.
3683         * c-errors.c: Include "opts.h".
3684         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3685         * c-parser.c (disable_extension_diagnostics): Handle negative value
3686         of warn_c90_c99_compat, too.
3687         (restore_extension_diagnostics): Likewise.
3688         (c_parser_compound_statement_nostart): Pass
3689         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3691 2014-08-12  Marek Polacek  <polacek@redhat.com>
3693         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3694         Add pedwarn.
3695         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3696         Likewise.
3697         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3699 2014-08-10  Marek Polacek  <polacek@redhat.com>
3701         PR c/51849
3702         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3703         Call pedwarn_c90 instead of pedwarn.
3704         (check_bitfield_type_and_width): Likewise.
3705         (declspecs_add_qual): Likewise.
3706         (declspecs_add_type): Likewise.
3707         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3708         Adjust to only call pedwarn_c90.
3709         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
3710         pedwarn_c90 instead of pedwarn.
3711         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3712         * c-parser.c (disable_extension_diagnostics): Handle
3713         warn_c90_c99_compat.
3714         (restore_extension_diagnostics): Likewise.
3715         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
3716         pedwarn_c90 instead of pedwarn.
3717         (c_parser_initelt): Likewise.
3718         (c_parser_postfix_expression): Likewise.
3719         (c_parser_postfix_expression_after_paren_type): Likewise.
3720         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3721         * c-tree.h: Fix formatting.
3722         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
3723         pedwarn_c90 instead of pedwarn.
3725 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
3727         * c-typeck.c: Remove include of pointer-set.h.
3729 2014-08-07  Marek Polacek  <polacek@redhat.com>
3731         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3733 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
3735         * c-typeck.c: Use hash_map instead of pointer_map.
3737 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
3739         * c-decl.c: Use hash_set instead of pointer_set.
3741 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
3743         PR middle-end/61455
3744         * c-array-notation.c (expand_array_notations): Handling
3745         of DECL_EXPR added.
3747 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
3749         PR c++/60517
3750         * c-typeck.c (c_finish_return): Return 0 instead of the address of
3751         a local variable.
3753 2014-07-30  Tom Tromey  <tromey@redhat.com>
3755         * c-typeck.c (struct constructor_stack) <designator_depth>: New
3756         field.
3757         (really_start_incremental_init, push_init_level): Initialize
3758         designator_depth.
3759         (pop_init_level): Set global designator_depth.
3760         (process_init_element): Check for designated_init attribute.
3762 2014-07-20  Marek Polacek  <polacek@redhat.com>
3764         PR c/61852
3765         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
3766         (implicitly_declare): Pass location to implicit_decl_warning.
3768 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
3770         PR middle-end/61294
3771         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3772         If non-NULL, call c_parser_check_literal_zero.
3773         (c_parser_check_literal_zero): New function.
3774         (c_parser_postfix_expression_after_primary): Adjust
3775         c_parser_expr_list caller, handle -Wmemset-transposed-args.
3777 2014-07-06  Marek Polacek  <polacek@redhat.com>
3779         PR c/6940
3780         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3781         * c-tree.h (C_ARRAY_PARAMETER): Define.
3782         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3783         function parameter.
3785 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
3786             Chen Gang  <gang.chen.5i5j@gmail.com>
3788         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3789         releasing symbol.
3791 2014-07-01  Marek Polacek  <polacek@redhat.com>
3793         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3794         instead of 0 to WARN_FOR_ASSIGNMENT.
3796 2014-07-01  Marek Polacek  <polacek@redhat.com>
3798         PR c/58286
3799         * c-typeck.c (convert_for_assignment): Pass
3800         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3802 2014-06-30  Marek Polacek  <polacek@redhat.com>
3804         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3805         has no_sanitize_undefined attribute.
3807 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
3809         PR middle-end/57541
3810         * c-array-notation.c (fix_builtin_array_notation_fn):
3811         Check for 0 arguments in builtin call. Check that bultin argument is
3812         correct.
3813         * c-parser.c (c_parser_array_notation): Check for incorrect initial
3814         index.
3816 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3818         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3819         qualifiers in __auto_type for atomic types.
3820         (c_parser_typeof_specifier): Discard all type qualifiers in
3821         __typeof__ for atomic types.
3823 2014-06-25  Marek Polacek  <polacek@redhat.com>
3825         PR c/61162
3826         * c-parser.c (c_parser_statement_after_labels): Pass the location of
3827         the return expression to c_finish_return.
3829 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
3831         * c-typeck.c (c_finish_omp_clauses): Make sure
3832         OMP_CLAUSE_LINEAR_STEP has correct type.
3834 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
3836         * c-decl.c: Adjust.
3838 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
3840         * c-parser.c (c_parser_omp_for_loop): For
3841         #pragma omp parallel for simd move lastprivate clause from parallel
3842         to for rather than simd.
3844 2014-06-23  Marek Polacek  <polacek@redhat.com>
3846         * c-typeck.c (parser_build_binary_op): Don't call
3847         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3849 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
3851         * c-parser.c (c_parser_omp_threadprivate): Likewise.
3852         * c-decl.c (merge_decls): Likewise.
3854 2014-06-09  Marek Polacek  <polacek@redhat.com>
3856         PR c/36446
3857         * c-typeck.c (error_init): Call inform instead of error_at.
3858         (pedwarn_init): Call inform instead of pedwarn.
3859         (warning_init): Call inform instead of warning_at.
3861 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
3863         * c-decl.c (merge_decls): Use set_decl_section_name.
3864         (duplicate_decls): Remove node if it exists.
3866 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
3868         PR c/53119
3869         * c-typeck.c (push_init_level, process_init_element,
3870         pop_init_level): Correct check for zero initialization, move
3871         missing brace warning to respect zero initialization.
3873 2014-06-05  Marek Polacek  <polacek@redhat.com>
3875         PR c/56724
3876         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3878 2014-06-05  Marek Polacek  <polacek@redhat.com>
3880         PR c/49706
3881         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3882         on the left hand side operand of a comparison. 
3884 2014-06-05  Marek Polacek  <polacek@redhat.com>
3886         PR c/48062
3887         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3888         Print note only if the warning was printed.
3890 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
3892         PR c/58942
3893         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3894         with a pointer.
3896 2014-06-03  Marek Polacek  <polacek@redhat.com>
3898         PR c/60439
3899         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3900         c_start_case.
3901         * c-tree.h (c_start_case): Update.
3902         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
3903         switch condition has boolean value.
3905 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
3907         * c-decl.c: Include builtins.h.
3908         * c-parser.c: Likewise.
3910 2014-05-27  Marek Polacek  <polacek@redhat.com>
3912         PR c/56724
3913         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
3914         error and warning calls to error_at and warning_at.  Pass location of
3915         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
3916         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3917         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
3919 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
3921         PR c/61191
3922         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3923         function parameters.
3925 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
3927         * c-decl.c (merge_decls): Preserve symtab node pointers.
3928         (duplicate_decls): Free new decl.
3930 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
3932         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3933         initialization.
3935         * c-parser.c (c_parser_omp_target): Return bool values.
3937 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
3939         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3940         num_teams_loc variable to num_thread_limit_loc.
3942 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
3944         * c-array-notation.c (expand_array_notations): Use void_node
3945         instead of void_zero_node.
3947 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
3949         * c-decl.c (finish_struct): Adjust.
3950         (finish_enum): Likewise.
3951         (bind): Adjust.
3952         (record_inline_static): Likewise.
3953         (push_scope): Likewise.
3954         (make_label): Likewise.
3955         (lookup_label_for_goto): Likewise.
3956         (finish_struct): Likewise.
3957         (finish_enum): Likewise.
3958         (store_parm_decls): Likewise.
3959         (c_push_function_context): Likewise.
3960         * c-lang.h: Remove usage of variable_size gty attribute.
3961         * c-parser.c (c_parse_init): Adjust.
3962         (c_parse_file): Likewise.
3964 2014-05-13  Marek Polacek  <polacek@redhat.com>
3966         PR c/61162
3967         * c-typeck.c (convert_for_assignment): Pass location to
3968         WARN_FOR_ASSIGNMENT instead of input_location.
3970 2014-05-10  Marek Polacek  <polacek@redhat.com>
3972         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3973         maybe_warn_string_init.
3974         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3975         maybe_warn_string_init.
3976         * c-tree.h (maybe_warn_string_init): Update declaration.
3977         * c-typeck.c (maybe_warn_string_init): Add location parameter.
3978         Call pedwarn_init with loc instead of with input_location.
3979         (digest_init): Pass init_loc to maybe_warn_string_init.
3980         (pop_init_level): Call pedwarn_init with loc instead of with
3981         input_location.
3982         (set_init_index): Likewise.
3983         (process_init_element): Likewise.
3985 2014-05-09  Marek Polacek  <polacek@redhat.com>
3987         PR c/61096
3988         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3989         (c_parser_initelt): Pass location to set_init_label.  Pass array index
3990         location to set_init_index.
3991         * c-tree.h (push_init_level): Update declaration.
3992         (pop_init_level): Likewise.
3993         (set_init_index): Likewise.
3994         (set_init_label): Likewise.
3995         * c-typeck.c (error_init): Add location parameter.  Call error_at
3996         instead of error.
3997         (digest_init): Pass init_loc to error_init.
3998         (really_start_incremental_init):
3999         (push_init_level): Add location parameter.  Pass loc to pop_init_level
4000         and error_init.
4001         (pop_init_level): Likewise.
4002         (set_designator): Add location parameter.  Pass loc to pop_init_level,
4003         push_init_level, and error_init.
4004         (set_init_index): Add location parameter.  Pass loc to error_init and
4005         set_designator.
4006         (set_init_label): Likewise.
4007         (output_init_element): Pass loc to error_init.
4008         (process_init_element): Pass loc to error_init, pop_init_level,
4009         pedwarn_init, and push_init_level.
4011 2014-05-09  Marek Polacek  <polacek@redhat.com>
4013         PR c/50459
4014         * c-parser.c (c_parser_attributes): Parse the arguments as an
4015         expression-list if the attribute takes identifier.
4017 2014-05-08  Marek Polacek  <polacek@redhat.com>
4019         PR c/61053
4020         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4021         TYPE_ALIGN_UNIT.
4023 2014-05-08  Marek Polacek  <polacek@redhat.com>
4025         PR c/61077
4026         * c-decl.c (start_function): Warn for _Atomic-qualified return type
4027         of main.
4029 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
4030             Mike Stump  <mikestump@comcast.net>
4031             Richard Sandiford  <rdsandiford@googlemail.com>
4033         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4034         (finish_enum): Use wide-int interfaces.
4035         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4036         * c-typeck.c (build_c_cast): Likewise.
4037         (set_nonincremental_init_from_string): Likewise.
4038         (c_tree_equal): Likewise.
4040 2014-05-02  Marek Polacek  <polacek@redhat.com>
4042         PR c/25801
4043         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
4044         Return size_one_node when the type is not complete.
4045         (pointer_diff): Remove comment.
4046         (build_unary_op): Improve error messages.
4048 2014-05-02  Marek Polacek  <polacek@redhat.com>
4050         * c-typeck.c (c_finish_return): Separate warning_at calls.
4052 2014-05-02  Marek Polacek  <polacek@redhat.com>
4054         * c-tree.h (error_init): Remove declaration.
4055         (pedwarn_init): Likewise.
4056         * c-typeck.c (error_init): Make static and move above.
4057         (pedwarn_init): Likewise.
4058         (warning_init): Move above.
4059         (maybe_warn_string_init): Likewise.
4061 2014-05-01  Jeff Law  <law@redhat.com>
4063         Revert:
4065         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4066         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4067         avoid goto.
4069 2014-05-02  Marek Polacek  <polacek@redhat.com>
4071         PR c/60784
4072         * c-typeck.c (push_init_level): Set constructor_designated to
4073         p->designated for structures.
4075 2014-05-01  Marek Polacek  <polacek@redhat.com>
4077         PR c/60915
4078         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4079         function-definition has an attribute after the declarator.
4081 2014-05-01  Marek Polacek  <polacek@redhat.com>
4083         PR c/60257
4084         * c-typeck.c (warning_init): Add location_t parameter.  Call
4085         warning_at instead of warning.
4086         (push_init_level): Pass input_location to warning_init.
4087         (add_pending_init): Add location_t parameter.  Pass loc to
4088         warning_init.
4089         (set_nonincremental_init): Pass input_location to add_pending_init.
4090         (set_nonincremental_init_from_string): Likewise.
4091         (output_init_element): Pass loc to warning_init and to
4092         add_pending_init.
4094 2014-05-01  Marek Polacek  <polacek@redhat.com>
4096         PR c/43395
4097         * c-typeck.c (c_finish_return): Distinguish between label and variable
4098         when warning about returning local address.
4100 2014-05-01  Marek Polacek  <polacek@redhat.com>
4102         PR c/29467
4103         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4104         in C89 mode.
4106 2014-05-01  Marek Polacek  <polacek@redhat.com>
4108         PR c/43245
4109         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4110         instead of 0 to WARN_FOR_QUALIFIERS.
4112 2014-05-01  Marek Polacek  <polacek@redhat.com>
4114         PR c/56989
4115         * c-typeck.c (default_conversion): Use better location for
4116         error call.
4118 2014-04-30  Marek Polacek  <polacek@redhat.com>
4120         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4121         also when SANITIZE_FLOAT_DIVIDE is on.
4123 2014-04-30  Marek Polacek  <polacek@redhat.com>
4125         PR c/60139
4126         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4127         and pedwarn_init.  Use loc insted of input_location.
4129 2014-04-30  Marek Polacek  <polacek@redhat.com>
4131         PR c/60351
4132         * c-typeck.c (build_binary_op): Use location when warning about
4133         shift count.
4135 2014-04-25  Marek Polacek  <polacek@redhat.com>
4137         PR c/18079
4138         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4139         always_inline/noinline and hot/cold attributes.
4141 2014-04-25  Marek Polacek  <polacek@redhat.com>
4143         PR c/60114
4144         * c-parser.c (c_parser_initelt): Pass input_location to
4145         process_init_element.
4146         (c_parser_initval): Pass loc to process_init_element.
4147         * c-tree.h (process_init_element): Adjust declaration.
4148         * c-typeck.c (push_init_level): Pass input_location to
4149         process_init_element.
4150         (pop_init_level): Likewise.
4151         (set_designator): Likewise.
4152         (output_init_element): Add location_t parameter.  Pass loc to
4153         digest_init.
4154         (output_pending_init_elements): Pass input_location to
4155         output_init_element.
4156         (process_init_element): Add location_t parameter.  Pass loc to
4157         output_init_element.
4159 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
4161         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4162         atomic-clause, allow comma in between atomic-clause and
4163         seq_cst.
4165 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
4167         PR c/59073
4168         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4169         fails, don't set OM_PARALLEL_COMBINED and return NULL.
4171 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
4173         PR middle-end/60469
4174         * c-array-notation.c (fix_builtin_array_notation_fn): Use
4175         create_tmp_var instead build_decl for creating temps.
4176         (build_array_notation_expr): Likewise.
4177         (fix_conditional_array_notations_1): Likewise.
4178         (fix_array_notation_expr): Likewise.
4179         (fix_array_notation_call_expr): Likewise.
4181 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
4183         PR c++/60689
4184         * c-tree.h (c_build_function_call_vec): New prototype.
4185         * c-typeck.c (build_function_call_vec): Don't call
4186         resolve_overloaded_builtin here.
4187         (c_build_function_call_vec): New wrapper function around
4188         build_function_call_vec.  Call resolve_overloaded_builtin here.
4189         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4190         Call c_build_function_call_vec instead of build_function_call_vec.
4191         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4192         * c-decl.c (finish_decl): Likewise.
4194 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4196         PR c/55383
4197         * c-typeck.c: Use correct format string in cast-qual warning
4199 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
4201         * c-decl.c (c_decl_attributes): Use
4202         lang_hooks.types.omp_mappable_type.
4203         * c-typeck.c (c_finish_omp_clauses): Likewise.
4205 2014-03-06  Marek Polacek  <polacek@redhat.com>
4207         PR c/60197
4208         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4209         of checking tree code.
4211 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4213         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4214         (c_parser_parameter_declaration): Likewise.
4216 2014-02-19  Marek Polacek  <polacek@redhat.com>
4218         PR c/60195
4219         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4220         Call mark_exp_read on exp.value.
4221         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
4222         TREE_ADDRESSABLE on old instead of val.
4223         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4225 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4227         * c-parser.c (c_parser_get_builtin_args): Replace calls to
4228         C_EXPR_APPEND by vec_safe_push.
4229         * c-tree.h (C_EXPR_APPEND): Remove.
4231 2014-01-31  Marek Polacek  <polacek@redhat.com>
4233         PR c/59963
4234         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4235         build_function_call_vec.
4236         (build_function_call): Likewise.
4237         (build_atomic_assign): Likewise.
4238         (build_function_call_vec): Add arg_loc parameter.  Use it.
4239         (convert_arguments): Likewise.
4240         (convert_for_assignment): Rename rhs_loc to expr_loc.
4241         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4242         (c_parser_objc_keywordexpr): Likewise.
4243         (c_parser_postfix_expression_after_primary): Call
4244         build_function_call_vec with expr_loc rather than op_loc.
4245         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
4246         build_function_call_vec.
4247         (c_parser_expr_list): Add locations parameter.  Fill it with locations
4248         of function arguments.
4249         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4251 2014-01-30  Marek Polacek  <polacek@redhat.com>
4253         PR c/59940
4254         * c-typeck.c (build_function_call_vec): Use loc parameter.
4255         (convert_arguments): Add location parameter.  Use it.
4256         (ep_convert_and_check): Likewise.
4257         (build_atomic_assign): Adjust convert_for_assignment call.
4258         (build_modify_expr): Likewise.
4259         (digest_init): Likewise.
4260         (c_finish_return): Likewise.
4261         (build_conditional_expr): Adjust ep_convert_and_check calls.
4262         (convert_for_assignment): Add rhs_loc parameter.  Use it.
4263         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4264         calls.
4266 2014-01-30  Richard Biener  <rguenther@suse.de>
4268         PR c/59905
4269         * c-typeck.c (build_function_call_vec): Do not replace calls
4270         to a function via an incompatible type with a runtime abort.
4272 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4274         * c-parser.c (c_parser_declaration_or_fndef): Replaced
4275         flag_enable_cilkplus with flag_cilkplus.
4276         (c_parser_direct_declarator_inner): Likewise.
4277         (c_parser_attribute_any_word): Likewise.
4278         (c_parser_attributes): Likewise.
4279         (c_parser_compound_statement): Likewise.
4280         (c_parser_statement_after_labels): Likewise.
4281         (c_parser_if_statement): Likewise.
4282         (c_parser_switch_statement): Likewise.
4283         (c_parser_do_statement): Likewise.
4284         (c_parser_for_statement): Likewise.
4285         (c_parser_unary_expression): Likewise.
4286         (c_parser_postfix_expression): Likewise.
4287         (c_parser_postfix_expression_after_primary): Likewise.
4288         (c_parser_postfix_expression_after_primary): Likewise.
4289         (c_parser_omp_clause_name): Likewise.
4290         (c_finish_omp_declare_simd): Likewise.
4291         (c_parser_cilk_verify_simd): Likewise.
4292         * c-typeck.c (build_array_ref): Likewise.
4293         (build_function_call_vec): Likewise.
4294         (convert_arguments): Likewise.
4295         (build_compound_expr): Likewise.
4296         (c_finish_return): Likewise.
4297         (c_finish_if_stmt): Likewise.
4298         (c_finish_loop): Likewise.
4299         (build_binary_op): Likewise.
4301 2014-01-23  Marek Polacek  <polacek@redhat.com>
4303         PR c/59846
4304         * c-typeck.c (parser_build_binary_op): Use location instead of
4305         input_location.
4306         (build_binary_op): Pass location to shorten_compare.
4308 2014-01-23  Marek Polacek  <polacek@redhat.com>
4310         PR c/58346
4311         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4312         an empty aggregate.
4314 2014-01-23  Marek Polacek  <polacek@redhat.com>
4316         PR c/59871
4317         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4318         of a comma expression.
4319         (emit_side_effect_warnings): Likewise.
4321 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4323         PR c/59825
4324         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4325         function to use walk_tree and moved a lot of its functionality to
4326         expand_array_notations.
4327         (expand_array_notations): New function.
4329 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4331         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4332         attribute an attribute without value.
4334 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
4336         PR middle-end/58809
4337         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4338         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4340 2014-01-22  Marek Polacek  <polacek@redhat.com>
4342         PR c/59891
4343         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4344         of remove_c_maybe_const_expr on op1 and op2.
4346 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
4348         PR c/58943
4349         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4350         effects, preevaluate rhs using SAVE_EXPR first.
4352 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4354         PR c++/59631
4355         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4356         statements with if-elseif statements.
4358 2014-01-06  Marek Polacek  <polacek@redhat.com>
4360         PR c/57773
4361         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4362         defined bit-field types only in ISO C.
4364 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4366         Update copyright years
4368 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4370         * c-array-notation.c: Use the standard form for the copyright notice.
4372 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4374         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4375         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4376         field in parser is not empty.  If not-empty, call the function
4377         c_parser_finish_omp_declare_simd.
4378         (c_parser_cilk_clause_vectorlength): Modified function to be shared
4379         between SIMD-enabled functions and #pragma simd.  Added new parameter.
4380         (c_parser_cilk_all_clauses): Modified the usage of the function
4381         c_parser_cilk_clause_vectorlength as mentioned above.
4382         (c_parser_cilk_simd_fn_vector_attrs): New function.
4383         (c_finish_cilk_simd_fn_tokens): Likewise.
4384         (is_cilkplus_vector_p): Likewise.
4385         (c_parser_omp_clause_name): Added checking for "vectorlength,"
4386         "nomask," and "mask" strings in clause name.
4387         (c_parser_omp_all_clauses): Added 3 new case statements:
4388         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4389         PRAGMA_CILK_CLAUSE_NOMASK.
4390         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
4391         check for vector attribute and if so call the function
4392         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
4393         called the function c_finish_cilk_simd_fn_tokens.
4394         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4395         parser field is non-empty.  If so, parse them as you would parse
4396         the omp declare simd pragma.
4397         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4398         Added a check when step is a parameter and flag it as error.
4399         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4400         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4401         pragma_omp_clause.
4403 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
4405         * c-parser.c (c_parser_omp_parallel): Fix description.
4407 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4409         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4410         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4411         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4412         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4414 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
4416         PR c/52023
4417         * c-parser.c (c_parser_alignas_specifier): Use
4418         c_sizeof_or_alignof_type instead of c_alignof.
4419         (c_parser_alignof_expression): Likewise, with min_alignof
4420         parameter depending on alignof spelling used.
4422 2013-12-04  Marek Polacek  <polacek@redhat.com>
4424         PR c/54113
4425         * c-decl.c (start_function): Don't warn for missing prototype for
4426         inline functions.
4428 2013-12-03  Marek Polacek  <polacek@redhat.com>
4430         PR c/59351
4431         * c-decl.c (build_compound_literal): Allow compound literals with
4432         empty initial value.
4434 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
4436         PR c/58235
4437         * c-typeck.c (build_modify_expr): Diagnose assignment to
4438         expression with array type.
4440 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
4442         PR c/42262
4443         * c-typeck.c (process_init_element): Do not treat a string as
4444         initializing a whole array when used with a designator for an
4445         individual element.
4447 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
4449         PR c/57574
4450         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4451         an inline function following a static declaration.
4453 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
4455         PR c/59310
4456         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4457         to p_name before calling c_parser_omp_teams instead of after.
4458         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4459         argument.  Remove unused p_name variable.
4461 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
4462             Jakub Jelinek  <jakub@redhat.com>
4464         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4465         external_scope is NULL.
4467 2013-11-27  Tom de Vries  <tom@codesourcery.com>
4468             Marc Glisse  <marc.glisse@inria.fr>
4470         PR c++/59032
4471         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4473 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
4475         * c-typeck.c: Add required include files from gimple.h.
4477 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
4479         * c-decl.c (define_label, shadow_tag_warned)
4480         (check_bitfield_type_and_width, grokdeclarator, grokparms,
4481         store_parm_decls_newstyle, store_parm_decls_oldstyle)
4482         (declspecs_add_type): Remove use of in_system_header macro.
4483         * c-parser.c (c_parser_unary_expression): Likewise.
4484         * c-typeck.c (store_init_value, process_init_element)
4485         (c_start_case): Likewise.
4487         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4488         macro.
4490         * c-parser.c (c_parser_set_source_position_from_token): Remove
4491         reference to in_system_header from comment.
4493 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4495         * c-decl.c (grokdeclarator): Update comment to refer to
4496         tree_to_[su]hwi rather than tree_low_cst.
4498 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4500         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4501         tree_to_uhwi throughout.
4503 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4505         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4506         throughout.
4508 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4510         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4511         throughout.
4513 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
4515         * c-parser.c (c_parser_cilk_simd): New.
4516         (c_parser_cilk_verify_simd): New.
4517         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4518         (c_parser_omp_for_loop): Add case for NE_EXPR.
4519         Set c_break_label for CILK_SIMD.
4520         (c_parser_cilk_clause_vectorlength): New.
4521         (c_parser_cilk_clause_linear): New.
4522         (c_parser_cilk_clause_name): New.
4523         (c_parser_cilk_all_clauses): New.
4524         * c-typeck.c (build_unary_op): Pass location argument to
4525         readonly_error.
4526         (build_modify_expr): Same.
4527         (build_asm_expr): Same.
4528         (c_finish_bc_stmt): Error on break/continue in loops.
4530 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
4532         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4534 2013-11-14  Diego Novillo  <dnovillo@google.com>
4536         * c-decl.c: Include print-tree.h.
4537         Include stor-layout.h.
4538         Include varasm.h.
4539         Include attribs.h.
4540         Include stringpool.h.
4541         * c-lang.c: Include fold-const.h.
4542         * c-parser.c: Include stringpool.h.
4543         Include attribs.h.
4544         Include stor-layout.h.
4545         Include varasm.h.
4546         Include trans-mem.h.
4547         * c-typeck.c: Include stor-layout.h.
4548         Include trans-mem.h.
4549         Include varasm.h.
4550         Include stmt.h.
4552 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
4554         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4555         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4556         __auto_type.
4557         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4558         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4559         RID_AUTO_TYPE.
4560         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4561         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4562         (c_parser_declarator, c_parser_direct_declarator_inner)
4563         (c_parser_parameter_declaration, c_parser_type_name): All callers
4564         changed.
4565         (c_parser_declaration_or_fndef): Handle declarations with type
4566         determined from the initializer.
4568 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
4570         * c-typeck.c: Include gimplify.h.
4572 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
4574         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4575         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4576         comment.
4577         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4578         or _Thread_local as appropriate in diagnostics.
4579         (build_null_declspecs): Initialize ret->thread_gnu_p.
4580         (declspecs_add_scspec): Handle either __thread or _Thread_local
4581         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
4582         pedantic.  Do not disallow _Thread_local extern and _Thread_local
4583         static.
4585 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
4586             Andrew MacLeod  <amacleod@redhat.com>
4588         * c-aux-info.c (gen_type): Handle atomic qualifier.
4589         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4590         qualifiers when compating types.
4591         (shadow_tag_warned): Handle atomic_p in declspecs.
4592         (quals_from_declspecs): Likewise.
4593         (start_decl): Use c_type_promotes_to when promoting argument
4594         types.
4595         (grokdeclarator): Handle _Atomic.
4596         (get_parm_info): Diagnose any qualifier on "void" as only
4597         parameter.
4598         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4599         comparing types.  Use c_type_promotes_to when promoting argument
4600         types.
4601         (finish_function): Use c_type_promotes_to when promoting argument
4602         types.
4603         (build_null_declspecs): Handle atomic_p in declspecs.
4604         (declspecs_add_qual): Handle RID_ATOMIC.
4605         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4606         (c_token_starts_declspecs): Handle RID_ATOMIC.
4607         (c_parser_declspecs): Handle atomic type specifiers and
4608         qualifiers.
4609         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4610         from types of expressions with atomic type.
4611         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4612         (c_parser_attribute_any_word): Handle RID_ATOMIC.
4613         (c_parser_initializer, c_parser_initelt, c_parser_initval)
4614         (c_parser_statement_after_labels, c_parser_switch_statement)
4615         (c_parser_for_statement, c_parser_expr_no_commas)
4616         (c_parser_conditional_expression, c_parser_binary_expression)
4617         (c_parser_cast_expression, c_parser_unary_expression)
4618         (c_parser_postfix_expression)
4619         (c_parser_postfix_expression_after_primary, c_parser_expression):
4620         Use convert_lvalue_to_rvalue.
4621         (c_parser_expression_conv, c_parser_expr_list): Document
4622         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
4623         (c_parser_objc_synchronized_statement): Use
4624         convert_lvalue_to_rvalue.
4625         (c_parser_objc_selector): Handle RID_ATOMIC.
4626         (c_parser_objc_receiver, c_parser_array_notation): Use
4627         convert_lvalue_to_rvalue.
4628         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4629         _Atomic (type-name).
4630         (struct c_declspecs): Add atomic_p field.
4631         (convert_lvalue_to_rvalue): Declare.
4632         * c-typeck.c (c_type_promotes_to): Promote atomic types to
4633         corresponding atomic types.
4634         (qualify_type): Don't add _Atomic qualifiers from second argument.
4635         (comp_target_types): Do not allow _Atomic mismatches.
4636         (type_lists_compatible_p): Do not remove atomic qualifiers when
4637         comparing types.
4638         (really_atomic_lvalue, convert_lvalue_to_rvalue)
4639         (build_atomic_assign): New functions.
4640         (build_unary_op): Use build_atomic_assign for atomic increment and
4641         decrement.
4642         (build_conditional_expr): Do not treat _Atomic void as a qualified
4643         version of void.
4644         (build_modify_expr): Use build_atomic_assign for atomic LHS.
4645         (find_anonymous_field_with_type, convert_to_anonymous_field)
4646         (convert_for_assignment): Do not remove atomic qualifiers when
4647         comparing types.
4648         (digest_init): Do not accept initialization of arrays of atomic
4649         elements by string constants.
4650         (build_asm_expr): Use convert_lvalue_to_rvalue.
4651         (build_binary_op): Do not treat _Atomic void as a qualified
4652         version of void.
4654 2013-11-06  DJ Delorie  <dj@redhat.com>
4656         * c-decl.c (locate_old_decl): If a previous conflicting decl is
4657         both explicit and builtin, print the location of the explicit one.
4659 2013-11-05  Tobias Burnus  <burnus@net-b.de>
4661         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4662         c_parser_omp_distribute, c_parser_omp_teams,
4663         c_parser_omp_target, c_parser_omp_declare): Handle
4664         -fopenmp-simd.
4666 2013-11-03  Marek Polacek  <polacek@redhat.com>
4668         * c-decl.c (grokdeclarator): Add VLA instrumentation.
4670 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
4672         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4673         check_dup_generic at the end, unless remove is true.
4674         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4675         remove = true;.
4676         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4678 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
4680         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4681         with decl that is not pointer nor array.
4683 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4685         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4686         a spawning function is found.
4687         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4688         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4689         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4690         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4691         case.
4692         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4693         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4694         expr.
4695         (c_finish_return): Added a check to reject _Cilk_spawn in return
4696         expression.
4697         (build_cilk_spawn): New function.
4698         (build_cilk_sync): Likewise.
4699         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4700         
4701 2013-10-27  Tobias Burnus  <burnus@net-b.de>
4703         PR other/33426
4704         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4705         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4706         (c_parser_statement_after_labels): Update calls.
4708 2013-10-24  Tobias Burnus  <burnus@net-b.de>
4710         PR other/33426
4711         * c-parser.c (c_parser_pragma, c_parser_for_statement):
4712         Handle PRAGMA_IVDEP.
4713         (c_parser_statement_after_labels): Update call.
4715 2013-10-24  Marek Polacek  <polacek@redhat.com>
4717         * c-parser.c (c_parser_struct_declaration): Add a comment.
4718         (c_parser_declarator): Don't allow _Alignas here.
4720 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
4722         * c-parser.c: Include omp-low.h.
4723         * c-typeck.c: Likewise.
4725 2013-10-17  Marek Polacek  <polacek@redhat.com>
4727         PR c/58267
4728         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4729         Document syntax of the array-declarator.
4730         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4731         are not permitted.
4732         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4733         (c_parser_struct_declaration): Likewise.
4734         (c_parser_declarator): Likewise.
4735         (c_parser_direct_declarator_inner): Likewise.
4736         (c_parser_parameter_declaration): Likewise.
4737         (c_parser_type_name): Likewise.
4739 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
4741         * c-lang.h (current_omp_declare_target_attribute): New extern
4742         decl.
4743         * c-parser.c: Include c-lang.h.
4744         (struct c_parser): Change tokens to c_token *.
4745         Add tokens_buf field.  Change tokens_avail type to unsigned int.
4746         (c_parser_consume_token): If parser->tokens isn't
4747         &parser->tokens_buf[0], increment parser->tokens.
4748         (c_parser_consume_pragma): Likewise.
4749         (enum pragma_context): Add pragma_struct and pragma_param.
4750         (c_parser_external_declaration): Adjust
4751         c_parser_declaration_or_fndef caller.
4752         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4753         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4754         Adjust recursive call.
4755         (c_parser_struct_or_union_specifier): Use pragma_struct instead
4756         of pragma_external.
4757         (c_parser_parameter_declaration): Use pragma_param instead of
4758         pragma_external.
4759         (c_parser_compound_statement_nostart, c_parser_label,
4760         c_parser_for_statement): Adjust
4761         c_parser_declaration_or_fndef callers.
4762         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4763         it through to c_parser_conditional_expression.
4764         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4765         pass it through to c_parser_binary_expression.  Adjust recursive
4766         call.
4767         (c_parser_binary_expression): Remove prec argument, add
4768         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
4769         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4770         binop matches it, use build2 instead of parser_build_binary_op.
4771         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4772         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4773         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4774         Handle pragma_struct and pragma_param the same as pragma_external.
4775         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4776         (c_parser_omp_variable_list): Parse array sections for
4777         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4778         (c_parser_omp_clause_collapse): Fully fold collapse expression.
4779         (c_parser_omp_clause_reduction): Handle user defined reductions.
4780         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4781         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4782         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4783         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4784         c_parser_omp_clause_depend, c_parser_omp_clause_map,
4785         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4786         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4787         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4788         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
4789         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
4790         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4791         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
4792         (c_parser_omp_for_loop): Add CODE argument, pass it through
4793         to c_finish_omp_for.  Change last argument to cclauses,
4794         and adjust uses to grab parallel clauses from the array of all
4795         the split clauses.  Adjust c_parser_binary_expression,
4796         c_parser_declaration_or_fndef and c_finish_omp_for callers.
4797         (omp_split_clauses): New function.
4798         (c_parser_omp_simd): New function.
4799         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4800         Allow the function to be called also when parsing combined constructs,
4801         and call c_parser_omp_simd when parsing for simd.
4802         (c_parser_omp_sections_scope): If section-sequence doesn't start with
4803         #pragma omp section, require exactly one structured-block instead of
4804         sequence of statements.
4805         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4806         Allow the function to be called also when parsing combined constructs.
4807         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4808         Allow the function to be called also when parsing combined
4809         constructs.
4810         (c_parser_omp_taskgroup, c_parser_omp_cancel,
4811         c_parser_omp_cancellation_point, c_parser_omp_distribute,
4812         c_parser_omp_teams, c_parser_omp_target_data,
4813         c_parser_omp_target_update, c_parser_omp_target,
4814         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4815         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4816         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4817         (c_parser_omp_construct): Add p_name and mask vars.  Handle
4818         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4819         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
4820         and c_parser_omp_sections callers.
4821         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4822         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4823         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4824         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
4825         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
4826         OMP_CLAUSE_DEPEND.
4827         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4828         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4829         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4830         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4831         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4832         * c-typeck.c: Include tree-inline.h.
4833         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4834         handle_omp_array_sections_1, handle_omp_array_sections,
4835         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4836         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4837         user defined reductions.
4838         (c_tree_equal): New function.
4839         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4840         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4841         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4842         c_check_omp_declare_reduction_r): New prototypes.
4843         * c-decl.c (current_omp_declare_target_attribute): New variable.
4844         (c_decl_attributes): New function.
4845         (start_decl, start_function): Use it instead of decl_attributes.
4846         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4847         c_omp_reduction_decl, c_omp_reduction_lookup,
4848         c_check_omp_declare_reduction_r): New functions.
4850 2013-09-25  Tom Tromey  <tromey@redhat.com>
4852         * Make-lang.in (c/gccspec.o): Remove.
4853         (CFLAGS-c/gccspec.o): New variable.
4854         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4855         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4856         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4858 2013-09-25  Tom Tromey  <tromey@redhat.com>
4860         * Make-lang.in (c/gccspec.o): Don't use subshell.
4862 2013-09-18  Marek Polacek  <polacek@redhat.com>
4864         PR sanitize/58443
4865         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4866         Remove unnecessary check.
4868 2013-09-18  Marek Polacek  <polacek@redhat.com>
4870         PR sanitizer/58411
4871         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4872         no_sanitize_undefined attribute.
4874 2013-09-13  Kai Tietz  <ktietz@redhat.com>
4876         PR target/57848
4877         * c-decl.c (c_builtin_function_ext_scope): Remove
4878         wrong assumption that it is never called on prexisting
4879         symbol.
4881 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
4883         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4885 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4887         * c-objc-common.c (c_tree_printer): Tidy.
4889 2013-08-30  Marek Polacek  <polacek@redhat.com>
4891         * c-typeck.c (build_binary_op): Add division by zero and shift
4892         instrumentation.
4894 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
4895             Joseph Myers  <joseph@codesourcery.com>
4897         PR c/35649
4898         * c-typeck.c (c_common_type): Prefer double_type_node over
4899         other REAL_TYPE types with the same precision.
4900         (convert_arguments): Likewise.
4902 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4904         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4905         (c_initialize_diagnostics): Call a destructor for the early printer.
4907 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4909         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4910         printer initialization.
4912 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4914         PR c/57490
4915         * c-array-notation.c (fix_conditional_array_notations_1): Added a
4916         check for truth values.
4917         (expand_array_notation_exprs): Added truth values case.  Removed an
4918         unwanted else.  Added for-loop to walk through subtrees in default
4919         case.
4921 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4923         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4925 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
4927         * c-parser.c (struct c_generic_association): Fix typo.
4929 2013-07-23  Tom Tromey  <tromey@redhat.com>
4930             Joseph Myers  <joseph@codesourcery.com>
4932         * c-parser.c (struct c_generic_association): New.
4933         (c_generic_association_d): New typedef.
4934         (c_parser_generic_selection): New function.
4935         (c_parser_postfix_expression): Handle RID_GENERIC.
4937 2013-07-13  Jason Merrill  <jason@redhat.com>
4939         PR c++/57793
4940         * c-decl.c (finish_struct): Check for too-large class.
4942 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
4944         PR c/57821
4945         * c-typeck.c (set_init_index): When folding, check for index overflow.
4947 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4949         * c-parser.c (c_parser_array_notation): Removed rejection of array
4950         notations in an array of function pointers.
4952 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4954         * c-array-notation.c (make_triplet_val_inv): New function.
4955         (create_cmp_incr): Likewise.
4956         (create_array_refs): Likewise.
4957         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4958         Also modularized common parts between functions and called the function.
4959         (build_array_notation_expr): Likewise.
4960         (fix_conditional_array_notations_1): Likewise.
4961         (fix_array_notation_expr): Likewise.
4962         (fix_array_notation_call_expr): Likewise.
4964 2013-06-18  Marek Polacek  <polacek@redhat.com>
4966         PR c/57630
4967         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4969 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4971         * c-array-notation.c (build_array_notation_expr): Reject array notation
4972         mismatch between LHS and RHS even inside a call_expr.  Also, removed
4973         a couple while statements that were dead code.
4975 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4977         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4978         excessive precision expressions in function parameters.  Also removed
4979         couple unwanted while statements.
4981 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4983         * c-array-notation.c (expand_array_notation_exprs): Added
4984         ARRAY_NOTATION_REF case.
4985         
4986 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4988         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4989         function to c-family/array-notation-common.c.
4990         (is_cilkplus_reduce_builtin): Likewise.
4991         (find_rank): Likewise.
4992         (extract_array_notation_exprs): Likewise.
4993         (replace_array_notations): Likewise.
4994         (find_inv_trees): Likewise.
4995         (replace_inv_trees): Likewise.
4996         (contains_array_notation_expr): Likewise.
4997         (find_correct_array_notation_type): Likewise.
4998         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4999         (struct inv_list): Moved this to c-family/array-notation-common.c.
5000         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5001         
5002 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5004         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5005         reduction functions outside the for-loop.  Added a check if the fundecl
5006         is non-NULL.  Finally, removed an unwanted if-statement, and made the
5007         body unconditional.
5009 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5011         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5012         condition of the if-statement matches the rank of else-block and then-
5013         block when array notations are used.
5014         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5015         expression after the entire function body is parsed.
5016         (c_parser_expr_no_commas): Delayed creating array notation expressions
5017         to the end of function parsing.
5018         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5019         whole if-statement instead of just the condition.
5020         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
5022 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5024         PR c/57474
5025         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5026         array to NULL_TREE if they are unused.  Also added a check for the
5027         field to be NULL before its fields are used in future.
5028         
5029 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5031         PR bootstrap/57450
5032         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5033         (build_array_notation_expr): Likewise.
5035 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5037         * c-typeck.c (build_array_ref): Added a check to see if array's
5038         index is greater than one.  If true, then emit an error.
5039         (build_function_call_vec): Exclude error reporting and checking
5040         for builtin array-notation functions.
5041         (convert_arguments): Likewise.
5042         (c_finish_return): Added a check for array notations as a return
5043         expression.  If true, then emit an error.
5044         (c_finish_loop): Added a check for array notations in a loop
5045         condition.  If true then emit an error.
5046         (lvalue_p): Added a ARRAY_NOTATION_REF case.
5047         (build_binary_op): Added a check for array notation expr inside
5048         op1 and op0.  If present, we call another function to find correct
5049         type.
5050         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5051         * c-parser.c (c_parser_compound_statement): Check if array
5052         notation code is used in tree, if so, then transform them into
5053         appropriate C code.
5054         (c_parser_expr_no_commas): Check if array notation is used in LHS
5055         or RHS, if so, then build array notation expression instead of
5056         regular modify.
5057         (c_parser_postfix_expression_after_primary): Added a check for
5058         colon(s) after square braces, if so then handle it like an array
5059         notation.  Also, break up array notations in unary op if found.
5060         (c_parser_direct_declarator_inner): Added a check for array
5061         notation.
5062         (c_parser_compound_statement): Added a check for array notation in
5063         a stmt.  If one is present, then expand array notation expr.
5064         (c_parser_if_statement): Likewise.
5065         (c_parser_switch_statement): Added a check for array notations in
5066         a switch statement's condition.  If true, then output an error.
5067         (c_parser_while_statement): Similarly, but for a while.
5068         (c_parser_do_statement): Similarly, but for a do-while.
5069         (c_parser_for_statement): Similarly, but for a for-loop.
5070         (c_parser_unary_expression): Check if array notation is used in a
5071         pre-increment or pre-decrement expression.  If true, then expand
5072         them.
5073         (c_parser_array_notation): New function.
5074         * c-array-notation.c: New file.
5075         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5076         
5077 2013-05-23  Mike Stump  <mikestump@comcast.net>
5079         * c-typeck.c (convert_for_assignment): Handle references to memory
5080         spaces better.
5082 2013-05-16  Jason Merrill  <jason@redhat.com>
5084         * Make-lang.in (cc1$(exeext)): Use link mutex.
5086 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
5088         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5089         to simply use OPT_Wpointer_arith.
5090         (build_unary_op): Likewise.
5092 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
5094         PR c/19449
5095         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5096         argument.  If set, or it temporarily for parsing of the first
5097         argument into force_folding_builtin_constant_p.
5098         (c_parser_postfix_expression): Adjust callers.
5100 2013-03-21  Richard Biener  <rguenther@suse.de>
5102         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5103         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
5105 2013-02-12  Marek Polacek  <polacek@redhat.com>
5107         PR c/44938
5108         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5109         origtypes to NULL.
5111 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
5113         PR c/56078
5114         * c-typeck.c (set_nonincremental_init_from_string): If
5115         constructor_max_index is NULL, treat it as if tree_int_cst_lt
5116         returned false.
5117         (process_init_element): Likewise.
5119 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
5121         PR c++/55619
5122         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5123         argument, don't call default_function_array_conversion
5124         nor c_fully_fold here.
5125         (c_parser_asm_statement): Adjust callers.
5126         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5127         and outputs here, and call default_function_array_conversion
5128         on inputs that don't need to be addressable.
5130 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
5132         PR c/39464
5133         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5134         warning require that both c_common_unsigned_type as well as
5135         c_common_signed_type is the same for both mvl and mvr types.
5137 2012-11-16  Diego Novillo  <dnovillo@google.com>
5139         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5141         * c-common.c: Use new vec API in vec.h.
5142         * c-common.h: Likewise.
5143         * c-gimplify.c: Likewise.
5144         * c-pragma.c: Likewise.
5145         * c-pretty-print.c: Likewise.
5146         * c-pretty-print.h: Likewise.
5147         * c-semantics.c: Likewise.
5148         * c-decl.c: Likewise.
5149         * c-parser.c: Likewise.
5150         * c-tree.h: Likewise.
5151         * c-typeck.c: Likewise.
5153 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
5155         PR c++/54930
5156         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5158 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5160         PR c/53066
5161         * c-decl.c (warn_if_shadowing): Do not warn if a variable
5162         shadows a function, unless the variable is a function or a
5163         pointer-to-function.
5165 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
5167         PR c/54381
5168         * c-parser.c (struct c_tree_loc_pair): Removed.
5169         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5170         add location_t * and tree * arguments, fill in array of 3
5171         sizeof_arg trees and corresponding locs.
5172         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5173         c_parser_expr_list callers.
5174         (c_parser_postfix_expression_after_primary): Likewise.  Pass
5175         array of 3 sizeof_arg trees and locs (corresponding to first
5176         3 arguments) to sizeof_pointer_memaccess_warning.
5178 2012-10-09  Lawrence Crowl  <crowl@google.com>
5180         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5181         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5182         hash table.
5184 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
5186         PR c++/54194
5187         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5188         call.
5190 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
5192         PR c++/54427
5193         * c-typeck.c: Include c-common.h.
5194         (enum stv_conv): Moved to c-common.h.
5195         (scalar_to_vector): Moved to c-common.c.
5196         (build_binary_op): Adapt to scalar_to_vector's new prototype.
5197         * Make-lang.in: c-typeck.c depends on c-common.h.
5199 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
5201         * c-decl.c (c_write_global_declarations): Fix handling of
5202         -fdump-ada-spec*.
5204 2012-09-30  Sharad Singhai  <singhai@google.com>
5206         * c-decl.c (c_write_global_declarations): Use a different method
5207         to determine if the dump has ben initialized.
5209 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
5211         PR c/54552
5212         * c-typeck.c (c_cast_expr): When casting to a type requiring
5213         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5214         c_fully_fold first.
5216 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
5218         PR c/54103
5219         * c-typeck.c (build_unary_op): Pass original argument of
5220         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5221         any C_MAYBE_CONST_EXPR, if it has integer operands.
5222         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5223         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5224         to c_objc_common_truthvalue_conversion, then remove any
5225         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
5226         c_objc_common_truthvalue_conversion not
5227         c_common_truthvalue_conversion.
5228         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5229         call note_integer_operands for arguments with integer operands
5230         that are not integer constants.
5232 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
5234         PR c/54559
5235         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5236         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5238 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
5240         PR c/54428
5241         * c-convert.c (convert): Don't call fold_convert_loc if
5242         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5243         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
5244         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5246 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
5248         PR c/54355
5249         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5250         for nested and empty_ok arguments in the call to
5251         c_parser_declaration_or_fndef.
5253 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
5255         * c-tree.h (c_last_sizeof_arg): Declare.
5256         * c-parser.c (struct c_tree_loc_pair): New type.
5257         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
5258         non-NULL.
5259         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5260         (c_parser_postfix_expression_after_primary): Likewise.  Call
5261         sizeof_pointer_memaccess_warning if needed.
5262         (sizeof_ptr_memacc_comptypes): New function.
5263         * c-typeck.c (c_last_sizeof_arg): New global variable.
5264         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5266 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
5268         * c-lang.h (lang_decl): Add variable_size GTY option.
5270 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
5272         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5273         * Make-lang.in: Fix dependencies.
5275 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
5277         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5278         and add language Makefile hooks.
5279         * config-lang.in: New file.
5280         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5281         add the required "normal" config-lang.in rules.
5282         * c-lang.h: Moved from gcc/ to here.
5283         * c-tree.h: Likewise.
5284         * c-objc-common.c: Likewise.
5285         * c-objc-common.h: Likewise.
5286         * c-typeck.c: Likewise.
5287         * c-convert.c: Likewise.
5288         * c-lang.c: Likewise.
5289         * c-aux-info.c: Likewise.
5290         * c-errors.c: Likewise.
5291         * gccspec.c: Likewise.
5292         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
5293         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
5295 Copyright (C) 2012-2017 Free Software Foundation, Inc.
5297 Copying and distribution of this file, with or without modification,
5298 are permitted in any medium without royalty provided the copyright
5299 notice and this notice are preserved.