Less verbose fix-it hints for missing header files (PR 87091)
[official-gcc.git] / gcc / c / ChangeLog
blobd459dc465a18748213ce7a99e01d5615b8a20559
1 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3         PR 87091
4         * c-decl.c (implicitly_declare): Update call to
5         maybe_add_include_fixit to suggest overriding the location, as it
6         is for a note.
7         * c-objc-common.c (c_tree_printer): Update for conversion of
8         show_caret_p to a tri-state.
10 2018-08-27  Martin Liska  <mliska@suse.cz>
12         * c-decl.c (locate_old_decl): Use new function
13         fndecl_built_in_p and remove check for FUNCTION_DECL if
14         possible.
15         (diagnose_mismatched_decls): Likewise.
16         (merge_decls): Likewise.
17         (warn_if_shadowing): Likewise.
18         (pushdecl): Likewise.
19         (implicitly_declare): Likewise.
20         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
21         * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
22         * c-typeck.c (build_function_call_vec): Likewise.
23         (convert_arguments): Likewise.
25 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
27         PR other/84889
28         * c-decl.c (pushtag): Add auto_diagnostic_group instance.
29         (diagnose_mismatched_decls): Likewise, in various places.
30         (warn_if_shadowing): Likewise.
31         (implicit_decl_warning): Likewise.
32         (implicitly_declare): Likewise.
33         (undeclared_variable): Likewise.
34         (declare_label): Likewise.
35         (grokdeclarator): Likewise.
36         (start_function): Likewise.
37         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
38         (c_parser_parameter_declaration): Likewise.
39         (c_parser_binary_expression): Likewise.
40         * c-typeck.c (c_expr_sizeof_expr): Likewise.
41         (parser_build_binary_op): Likewise.
42         (build_unary_op): Likewise.
43         (error_init): Likewise.
44         (pedwarn_init): Likewise.
45         (warning_init): Likewise.
46         (convert_for_assignment): Likewise.
48 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
50         * c-objc-common.c: Include "gcc-rich-location.h".
51         (c_tree_printer): Move implemenation of '%T' to...
52         (print_type): ...this new function.
53         (range_label_for_type_mismatch::get_text): New function.
54         * c-typeck.c (convert_for_assignment): Add type labels to the rhs
55         range for the various ic_argpass cases.
56         (class maybe_range_label_for_tree_type_mismatch): New class.
57         (build_binary_op): Use it when calling binary_op_error.
59 2018-08-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
60         
61         * c-decl.c (start_decl): Do not warn if variables is named as main
62         and is a local variable.
64 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
66         PR c/19315
67         * c-decl.c (finish_decl): Don't add the 'extern' storage class to
68         objects of unknown size.
70 2018-08-13  Martin Sebor  <msebor@redhat.com>
72         PR tree-optimization/71625
73         * c-parser.c (c_parser_declaration_or_fndef): Call
74         braced_list_to_string.
76 2018-08-03  Bogdan Harjoc  <harjoc@gmail.com>
78         PR c/86690
79         * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
80         errors.
82 2018-08-01  Martin Sebor  <msebor@redhat.com>
84         PR tree-optimization/86650
85         * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
86         and TREE_BLOCK (t) from within percent_K_format to this callsite.
88 2018-08-01  Jakub Jelinek  <jakub@redhat.com>
90         PR c/85704
91         * c-typeck.c (init_field_decl_cmp): New function.
92         (output_pending_init_elements): Use it for field comparisons
93         instead of pure bit_position comparisons.
95 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
97         * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
98         type here, instead add "omp declare target implicit" attribute.
99         (finish_decl): Diagnose vars without mappable type here.
101 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
102             Thomas Schwinge <thomas@codesourcery.com>
103             Cesar Philippidis  <cesar@codesourcery.com>
105         * c-parser.c (c_parser_omp_clause_name): Add support for finalize
106         and if_present. Make present_or_{copy,copyin,copyout,create} aliases
107         to their non-present_or_* counterparts. Make 'self' an alias to
108         PRAGMA_OACC_CLAUSE_HOST.
109         (c_parser_oacc_data_clause): Update GOMP mappings for
110         PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
111         PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
112         (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
113         Remove support for present_or_* clauses.
114         (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
115         (OACC_PARALLEL_CLAUSE_MASK): Likewise.
116         (OACC_DECLARE_CLAUSE_MASK): Likewise.
117         (OACC_DATA_CLAUSE_MASK): Likewise.
118         (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
119         (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
120         (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
121         (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
122         * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
124 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
126         * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
127         * gimple-parser.c (c_parser_gimple_statement): Likewise.
128         (c_parser_gimple_unary_expression): Likewise.
130 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
132         PR c/86093
133         * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
134         before doing POINTER_DIFF_EXPR.
136 2018-06-07  Marek Polacek  <polacek@redhat.com>
138         PR c/85318
139         * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
140         for loop initial declarations.
142 2018-05-30  David Pagan  <dave.pagan@oracle.com>
144         PR c/55976
145         * c-decl.c (grokdeclarator): Update check for return type warnings.
146         (start_function): Likewise.
147         (finish_function): Likewise.
148         * c-typeck.c (c_finish_return): Update check for return type warnings.
149         Pass OPT_Wreturn_type to pedwarn when appropriate.
151 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
153         * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
154         __FMA_EXPR handlng.
156 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
158         * gimple-parser.c: Include internal-fn.h.
159         (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
160         (c_parser_gimple_call_internal): New function.
161         (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
162         Fix typos in comment.
164 2018-05-10  Jakub Jelinek  <jakub@redhat.com>
166         PR c++/85662
167         * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
168         fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
169         fold_convert_loc.
170         * c-typeck.c (build_unary_op): Use fold_offsetof rather than
171         fold_offsetof_1, pass argtype as TYPE to it and drop the
172         fold_convert_loc.
174 2018-05-02  David Pagan  <dave.pagan@oracle.com>
176         PR c/30552
177         * c-decl.c (old_style_parameter_scope): New function.
178         * c-parser.c (c_parser_postfix_expression): Check for statement
179         expressions in old-style function parameter list declarations.
180         * c-parser.h (old_style_parameter_scope): New extern declaration.
182 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
184         PR sanitizer/84307
185         * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
186         it is not TREE_STATIC.
187         * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
188         not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
189         its COMPOUND_LITERAL_EXPR_DECL.
191 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
193         * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
194         where all functions return the same _FloatN or _FloatNx type,
195         treat integer types as _Float64 instead of double.
197 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
199         PR c/84999
200         * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
201         building vector comparison, diagnose it and return error_mark_node.
203 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
205         PR c/84853
206         * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
207         If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
208         INTEGER_TYPE element type.
210 2018-03-13  David Pagan  <dave.pagan@oracle.com>
212         PR c/46921
213         * c-typeck.c (output_init_element): Ensure field initializer
214         expression is always evaluated if there are side effects.
216 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
218         PR c/84721
219         * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
220         !building_stmt_list_p ().
222 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
224         PR c/84305
225         * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
226         in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
227         and include the BIND_EXPR in the list of things that need to be
228         pre-evaluated.
230 2018-02-09  Nathan Sidwell  <nathan@acm.org>
232         PR c/84293
233         * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
234         to strict_aliasing_warning.
236 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
238         * c-typeck.c (really_start_incremental_init, push_init_level,
239         set_nonincremental_init, output_init_element, process_init_element):
240         Use DECL_UNNAMED_BIT_FIELD.
242 2018-01-31  Marek Polacek  <polacek@redhat.com>
244         PR c/81779
245         * c-parser.c (c_parser_compound_statement_nostart): Call
246         expansion_point_location_if_in_system_header.
248 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
250         PR c++/83814
251         * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
252         the C part.
254 2018-01-13  Jakub Jelinek  <jakub@redhat.com>
256         PR c/83801
257         * c-tree.h (decl_constant_value_1): Add a bool argument.
258         * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
259         returning a CONSTRUCTOR if it is true.  Use error_operand_p.
260         (decl_constant_value): Adjust caller.
261         * c-fold.c (c_fully_fold_internal): If in_init, pass true to
262         decl_constant_value_1 as IN_INIT.  Otherwise, punt if
263         decl_constant_value returns initializer that has BLKmode or
264         array type.
265         (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
267 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
268             Alan Hayward  <alan.hayward@arm.com>
269             David Sherwood  <david.sherwood@arm.com>
271         * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
272         TYPE_VECTOR_SUBPARTS.
274 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
276         Update copyright years.
278 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
280         PR c/83595
281         * c-parser.c (c_parser_braced_init, c_parser_initelt,
282         c_parser_conditional_expression, c_parser_cast_expression,
283         c_parser_sizeof_expression, c_parser_alignof_expression,
284         c_parser_postfix_expression, c_parser_omp_declare_reduction,
285         c_parser_transaction_expression): Use set_error () method instead
286         of setting value member to error_mark_node.
288 2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
290         * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
291         and _Float<N>X built-in functions.
293 2017-12-22  Jakub Jelinek  <jakub@redhat.com>
295         PR debug/83550
296         * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
297         TYPE_STUB_DECL and call rest_of_type_compilation before processing
298         incomplete vars rather than after it.
300         PR debug/83547
301         * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
302         indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
303         and consider empty ones if there are no other stmts.  For
304         -Wunused-value walk all statements before the one only followed by
305         DEBUG_BEGIN_STMTs.
307 2017-12-22  Mike Stump  <mikestump@comcast.net>
308             Eric Botcazou  <ebotcazou@adacore.com>
310         * c-parser.c (c_parser_while_statement): Add unroll parameter and
311         build ANNOTATE_EXPR if present.  Add 3rd operand to ANNOTATE_EXPR.
312         (c_parser_do_statement): Likewise.
313         (c_parser_for_statement): Likewise.
314         (c_parser_statement_after_labels): Adjust calls to above.
315         (c_parse_pragma_ivdep): New static function.
316         (c_parser_pragma_unroll): Likewise.
317         (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
318         <PRAGMA_UNROLL>: New case.
320 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
322         * c-typeck.c (comptypes_internal, function_types_compatible_p,
323         perform_integral_promotions, digest_init): Replace Yoda conditions
324         with typical order conditions.
325         * c-decl.c (check_bitfield_type_and_width): Likewise.
327 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
329         * c-typeck.c (c_safe_arg_type_equiv_p,
330         c_safe_function_type_cast_p): New function.
331         (build_c_cast): Implement -Wcast-function-type.
333 2017-12-14  Richard Biener  <rguenther@suse.de>
335         PR c/83415
336         * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
337         like REALPART_EXPR for the behavior of whether its operand
338         is an lvalue.
340 2017-12-12  Marek Polacek  <polacek@redhat.com>
342         PR c/82679
343         * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
345 2017-12-12  Alexandre Oliva <aoliva@redhat.com>
347         * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
348         * c-parser.c (add_debug_begin_stmt): New.
349         (c_parser_declaration_or_fndef): Call it.
350         (c_parser_compound_statement_nostart): Likewise.
351         (c_parser_statement_after_labels): Likewise.
352         * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
354 2017-12-07  Joseph Myers  <joseph@codesourcery.com>
356         * c-decl.c (build_compound_literal): Add parameter alignas_align
357         and set alignment of decl if nonzero.
358         * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
359         (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
360         qualifier.
361         (c_parser_struct_declaration): Update syntax comment.
362         (c_parser_type_name): Add alignas_ok argument and pass it to
363         c_parser_declspecs.
364         (c_parser_cast_expression): Pass true to c_parser_type_name and
365         give error if a cast used an _Alignas specifier.
366         (c_parser_sizeof_expression): Pass true to c_parser_type_name and
367         give error if sizeof (type-name) used an _Alignas specifier.
368         (c_parser_alignof_expression): Pass true to c_parser_type_name and
369         give error if _Alignof (type-name) used an _Alignas specifier.
370         (c_parser_postfix_expression_after_paren_type): Check specified
371         alignment for a compound literal and pass it to
372         build_compound_literal.
373         * c-parser.h (c_parser_type_name): Update prototype.
374         * c-tree.h (build_compound_literal): Update prototype.
376 2017-12-07  Martin Sebor  <msebor@redhat.com>
378         PR c/81544
379         * c-decl.c (c_decl_attributes): Look up existing declaration and
380         pass it to decl_attributes.
382 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
384         PR c/83236
385         * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
386         reserved for use by the implementation.
388 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
390         * c-decl.c: Include "c-family/c-spellcheck.h".
392 2017-12-05  Martin Liska  <mliska@suse.cz>
393             Jakub Jelinek  <jakub@redhat.com>
395         * c-typeck.c (pointer_diff): Add new argument and instrument
396         pointer subtraction.
397         (build_binary_op): Similar for pointer comparison.
399 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
401         PR c/79153
402         * c-parser.c: Include tree-iterator.h.
403         (c_parser_switch_statement): Emit LABEL_EXPR for the break label
404         into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
405         on it.
407         PR c/83222
408         * c-tree.h (decl_constant_value_1): Declare.
409         * c-typeck.c (decl_constant_value_1): New function.
410         (decl_constant_value): Use it.
411         * c-fold.c (c_fully_fold_internal): If in_init, use
412         decl_constant_value_1 instead of decl_constant_value.
414 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
416         * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
418 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
420         PR sanitizer/81275
421         * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
422         c_switch_covers_all_cases_p returns true.
424 2017-11-28  Julia Koval  <julia.koval@intel.com>
425             Sebastian Peryt  <sebastian.peryt@intel.com>
427         * Make-lang.in (c/c-array-notation.o): Remove.
428         * c-array-notation.c: Delete.
429         * c-decl.c: Remove cilkplus condition.
430         * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
431         c_parser_cilk_verify_simd, c_parser_array_notation,
432         c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
433         c_parser_cilk_simd_fn_vector_attrs,
434         c_finish_cilk_simd_fn_tokens): Delete.
435         (c_parser_declaration_or_fndef): Remove cilkplus condition.
436         (c_parser_direct_declarator_inner): Ditto.
437         (CILK_SIMD_FN_CLAUSE_MASK): Delete.
438         (c_parser_attributes, c_parser_compound_statement,
439         c_parser_statement_after_labels, c_parser_if_statement,
440         c_parser_switch_statement, c_parser_while_statement,
441         c_parser_do_statement, c_parser_for_statement,
442         c_parser_unary_expression, c_parser_postfix_expression,
443         c_parser_postfix_expression_after_primary,
444         c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
445         c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
446         support.
447         * c-typeck.c (build_array_ref, build_function_call_vec,
448         convert_arguments,
449         lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
450         c_finish_loop, build_binary_op): Remove cilkplus support.
452 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
454         * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
455         of build3.
457 2017-11-14 Boris Kolpackov  <boris@codesynthesis.com>
459         * Make-lang.in (c.install-plugin): Install backend import library.
461 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
463         * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
464         pragma_stmt context.
466 2017-11-23  Mike Stump  <mikestump@comcast.net>
467             Eric Botcazou  <ebotcazou@adacore.com>
469         * c-parser.c (c_parser_while_statement): Pass 3rd operand to
470         ANNOTATE_EXPR.
471         (c_parser_do_statement): Likewise.
472         (c_parser_for_statement): Likewise.
474 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
476         PR c++/62170
477         * c-objc-common.c (c_tree_printer): Convert penultimate param from
478         bool to bool *.  Within '%T' handling, if showing an "aka", use
479         "quoted" param to add appropriate quoting.
481 2017-11-22  Marek Polacek  <polacek@redhat.com>
483         PR c++/60336
484         PR middle-end/67239
485         PR target/68355
486         * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
488 2017-11-21  David Malcolm  <dmalcolm@redhat.com>
490         PR c/83056
491         * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
492         earlier failed lookups.
494 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
496         * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
497         * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
499 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
501         PR c/81404
502         * c-decl.c: Include "c-family/known-headers.h".
503         (get_c_name_hint): Rename to get_stdlib_header_for_name and move
504         to known-headers.cc.
505         (class suggest_missing_header): Move to known-header.h.
506         (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
507         than get_c_name_hint.
509 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
511         * c-decl.c (get_c_name_hint): New function.
512         (class suggest_missing_header): New class.
513         (lookup_name_fuzzy): Call get_c_name_hint and use it to
514         suggest missing headers to the user.
516 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
518         * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
519         Include "c-family/name-hint.h"
520         (implicit_decl_warning): Convert "hint" from
521         const char * to name_hint.  Pass location to
522         lookup_name_fuzzy.  Suppress any deferred diagnostic if the
523         warning was not printed.
524         (undeclared_variable): Likewise for "guessed_id".
525         (lookup_name_fuzzy): Convert return type from const char *
526         to name_hint.  Add location_t param.
527         * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
528         Include "c-family/name-hint.h"
529         (c_parser_declaration_or_fndef): Convert "hint" from
530         const char * to name_hint.  Pass location to lookup_name_fuzzy.
531         (c_parser_parameter_declaration): Likewise.
533 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
535         PR c/66618
536         PR c/69960
537         * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
538         where needed.
539         * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
540         handle_omp_array_sections): Likewise.
541         (digest_init): Don't call decl_constant_value_for_optimization.
542         * c-tree.h (decl_constant_value_for_optimization): Removed.
543         * c-fold.c (c_fold_array_ref): New function.
544         (c_fully_fold_internal): Add LVAL argument, propagate it through
545         recursive calls.  For VAR_P call decl_constant_value and
546         unshare if not LVAL and either optimizing or IN_INIT.  Remove
547         decl_constant_value_for_optimization calls.  If IN_INIT and not LVAL,
548         fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
549         (c_fully_fold): Add LVAL argument, pass it through to
550         c_fully_fold_internal.
551         (decl_constant_value_for_optimization): Removed.
553 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
555         PR c/81156
556         * c-parser.c (check_tgmath_function): New function.
557         (enum tgmath_parm_kind): New enum.
558         (c_parser_postfix_expression): Handle __builtin_tgmath.
560 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
562         * c-decl.c (implicit_decl_warning): Update for renaming of
563         pedwarn_at_rich_loc and warning_at_rich_loc.
564         (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
565         (undeclared_variable): Likewise for renaming of error_at_rich_loc.
566         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
567         (c_parser_struct_or_union_specifier): Likewise for renaming of
568         pedwarn_at_rich_loc.
569         (c_parser_parameter_declaration): Likewise for renaming of
570         error_at_rich_loc.
571         * c-typeck.c (build_component_ref): Likewise.
572         (build_unary_op): Likewise for renaming of inform_at_rich_loc.
573         (pop_init_level): Likewise for renaming of warning_at_rich_loc.
574         (set_init_label): Likewise for renaming of error_at_rich_loc.
576 2017-10-30  Richard Biener  <rguenther@suse.de>
578         * gimple-parser.c (c_parser_gimple_statement): Parse conditional
579         stmts.
581 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
583         * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
584         fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
586 2017-10-25  David Malcolm  <dmalcolm@redhat.com>
588         PR c/7356
589         * c-parser.c (c_parser_declaration_or_fndef): Detect missing
590         semicolons.
592 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
594         PR libstdc++/81706
595         * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
596         newdecl to corresponding __builtin_ if any.
598 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
600         PR c++/82466
601         * c-decl.c (diagnose_mismatched_decls): Use
602         OPT_Wbuiltin_declaration_mismatch.
604 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
606         * c-parser.c (c_parser_require): Add "type_is_unique" param and
607         use it to guard calls to maybe_suggest_missing_token_insertion.
608         (c_parser_parms_list_declarator): Override default value of new
609         "type_is_unique" param to c_parser_require.
610         (c_parser_asm_statement): Likewise.
611         * c-parser.h (c_parser_require): Add "type_is_unique" param,
612         defaulting to true.
614 2017-10-11  Nathan Sidwell  <nathan@acm.org>
616         * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
618 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
620         * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
621         operating on trees as wide_ints.
622         * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
623         (c_tree_equal): Likewise.
625 2017-10-04  David Malcolm  <dmalcolm@redhat.com>
627         * c-decl.c (push_parm_decl): Store c_parm's location into the
628         PARAM_DECL.
629         (build_c_parm): Add "loc" param and store it within the c_parm.
630         * c-parser.c (struct c_parser): Add "last_token_location" field.
631         (c_parser_consume_token): Store location of the token into the
632         new field.
633         (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
634         when handling a FUNCTION_DECL, if it doesn't already have them.
635         (c_parser_parameter_declaration): Generate a location for the
636         parameter, and pass it to the call to build_c_parm.
637         * c-tree.h (struct c_parm): Add field "loc".
638         (build_c_parm): Add location_t param.
639         * c-typeck.c (get_fndecl_argument_location): New function.
640         (inform_for_arg): New function.
641         (convert_for_assignment): Use inform_for_arg when dealing with
642         ic_argpass.
644 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
646         * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
647         width is non-NULL.
648         (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
649         don't SET_DECL_C_BIT_FIELD here.
651         PR c/82340
652         * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
653         instead of trying to set just TREE_READONLY manually.
655 2017-09-16  Tom de Vries  <tom@codesourcery.com>
657         PR c/81875
658         * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
659         cond itself.
661 2017-09-15  Joseph Myers  <joseph@codesourcery.com>
663         PR c/82071
664         * c-typeck.c (ep_convert_and_check): Just call convert_and_check
665         for C11.
666         (build_conditional_expr): For C11, generate result with excess
667         precision when one argument is an integer and the other is of a
668         type using excess precision.
670 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
672         * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
674 2017-09-13  Marek Polacek  <polacek@redhat.com>
676         PR c/82167
677         * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
678         than expr.original_type.
680 2017-09-12  Nathan Sidwell  <nathan@acm.org>
682         * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
683         resort_sorted_fields): Moved from c-family/c-common.c.
684         * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
686 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
688         PR c/82071
689         * c-typeck.c (build_atomic_assign): Handle argument with excess
690         precision.  Ensure any EXCESS_PRECISION_EXPR is present in
691         argument passed to build_binary_op and convert_for_assignment but
692         not for call to c_fully_fold.
693         (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
694         Ensure build_binary_op is called with argument with original
695         semantic type.  Avoid calling c_fully_fold with an
696         EXCESS_PRECISION_EXPR from build_binary_op.
698 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
700         PR c/81887
701         * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
703 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
704             Alan Hayward  <alan.hayward@arm.com>
705             David Sherwood  <david.sherwood@arm.com>
707         * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
708         (c_common_type): Likewise.  Use as_a <scalar_mode> when setting
709         m1 and m2 to the signed equivalent of a fixed-point
710         SCALAR_TYPE_MODE.
712 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
714         * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
715         than CAN_HAVE_LOCATION_P when determining whether to use the
716         location_t value within "value".
718 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
720         * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
721         rather than peeking the location of the first token.
722         * c-tree.h (c_expr::get_location): New method.
724 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
726         * c-typeck.c (build_function_call_vec): Pass arg_loc to call
727         to check_function_arguments.
729 2017-08-18  Marek Polacek  <polacek@redhat.com>
731         * c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
732         commentary.
734 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
736         PR c/53037
737         * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
738         (check_bitfield_type_and_width): Don't allow bit-field with
739         warn_if_not_aligned type.
741 2017-08-14  Martin Sebor  <msebor@redhat.com>
743         PR c/81117
744         * c-objc-common.c (c_objc_common_init): Handle 'G'.
746 2017-08-11  Marek Polacek  <polacek@redhat.com>
748         PR c/81795
749         * c-decl.c (pushtag): Only print inform if the warning was printed.
750         (grokdeclarator): Likewise.
752 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
754         * c-parser.c (c_parser_error): Rename to...
755         (c_parser_error_richloc): ...this, making static, and adding
756         "richloc" parameter, passing it to the c_parse_error call,
757         rather than calling c_parser_set_source_position_from_token.
758         (c_parser_error): Reintroduce, reimplementing in terms of the
759         above, converting return type from void to bool.
760         (class token_pair): New class.
761         (struct matching_paren_traits): New struct.
762         (matching_parens): New typedef.
763         (struct matching_brace_traits): New struct.
764         (matching_braces): New typedef.
765         (get_matching_symbol): New function.
766         (c_parser_require): Add param MATCHING_LOCATION, using it to
767         highlight matching "opening" tokens for missing "closing" tokens.
768         (c_parser_skip_until_found): Likewise.
769         (c_parser_static_assert_declaration_no_semi): Convert explicit
770         parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
771         class matching_parens, so that the pertinent open parenthesis is
772         highlighted when there are problems locating the close
773         parenthesis.
774         (c_parser_struct_or_union_specifier): Likewise.
775         (c_parser_typeof_specifier): Likewise.
776         (c_parser_alignas_specifier): Likewise.
777         (c_parser_simple_asm_expr): Likewise.
778         (c_parser_braced_init): Likewise, for matching_braces.
779         (c_parser_paren_condition): Likewise, for matching_parens.
780         (c_parser_switch_statement): Likewise.
781         (c_parser_for_statement): Likewise.
782         (c_parser_asm_statement): Likewise.
783         (c_parser_asm_operands): Likewise.
784         (c_parser_cast_expression): Likewise.
785         (c_parser_sizeof_expression): Likewise.
786         (c_parser_alignof_expression): Likewise.
787         (c_parser_generic_selection): Likewise.
788         (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
789         RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
790         RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
791         In case CPP_OPEN_PAREN, pass loc_open_paren to the
792         c_parser_skip_until_found call.
793         (c_parser_objc_class_definition): Use class matching_parens as
794         above.
795         (c_parser_objc_method_decl): Likewise.
796         (c_parser_objc_try_catch_finally_statement): Likewise.
797         (c_parser_objc_synchronized_statement): Likewise.
798         (c_parser_objc_at_property_declaration): Likewise.
799         (c_parser_oacc_wait_list): Likewise.
800         (c_parser_omp_var_list_parens): Likewise.
801         (c_parser_omp_clause_collapse): Likewise.
802         (c_parser_omp_clause_default): Likewise.
803         (c_parser_omp_clause_if): Likewise.
804         (c_parser_omp_clause_num_threads): Likewise.
805         (c_parser_omp_clause_num_tasks): Likewise.
806         (c_parser_omp_clause_grainsize): Likewise.
807         (c_parser_omp_clause_priority): Likewise.
808         (c_parser_omp_clause_hint): Likewise.
809         (c_parser_omp_clause_defaultmap): Likewise.
810         (c_parser_oacc_single_int_clause): Likewise.
811         (c_parser_omp_clause_ordered): Likewise.
812         (c_parser_omp_clause_reduction): Likewise.
813         (c_parser_omp_clause_schedule): Likewise.
814         (c_parser_omp_clause_num_teams): Likewise.
815         (c_parser_omp_clause_thread_limit): Likewise.
816         (c_parser_omp_clause_aligned): Likewise.
817         (c_parser_omp_clause_linear): Likewise.
818         (c_parser_omp_clause_safelen): Likewise.
819         (c_parser_omp_clause_simdlen): Likewise.
820         (c_parser_omp_clause_depend): Likewise.
821         (c_parser_omp_clause_map): Likewise.
822         (c_parser_omp_clause_device): Likewise.
823         (c_parser_omp_clause_dist_schedule): Likewise.
824         (c_parser_omp_clause_proc_bind): Likewise.
825         (c_parser_omp_clause_uniform): Likewise.
826         (c_parser_omp_for_loop): Likewise.
827         (c_parser_cilk_clause_vectorlength): Likewise.
828         (c_parser_cilk_clause_linear): Likewise.
829         (c_parser_transaction_expression): Likewise.
830         * c-parser.h (c_parser_require): Add param matching_location with
831         default UNKNOWN_LOCATION.
832         (c_parser_error): Convert return type from void to bool.
833         (c_parser_skip_until_found): Add param matching_location with
834         default UNKNOWN_LOCATION.
836 2017-08-09  Marek Polacek  <polacek@redhat.com>
838         * c-decl.c (build_enumerator): Use true/false instead of 1/0.
839         * c-tree.h (build_external_ref): Update declaration.
840         * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
841         (build_external_ref): Change the type of a parameter to bool.
842         (parser_build_binary_op): Use true/false instead of 1/0.
843         (pointer_diff): Likewise.
844         (build_modify_expr): Likewise.
845         (set_designator): Change the type of a parameter to bool.
846         (set_init_index): Use true/false instead of 1/0.
847         (set_init_label): Likewise.
848         (output_init_element): Change the type of a parameter to bool.
849         (output_pending_init_elements): Use true/false instead of 1/0.
850         (process_init_element): Likewise.
851         (build_binary_op): Change the type of a parameter to bool.
853 2017-08-09  Marek Polacek  <polacek@redhat.com>
855         PR c/81233
856         * c-typeck.c (pedwarn_init): Make the function take a variable list.
857         Call emit_diagnostic_valist instead of pedwarn.
858         (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
859         Print the relevant types in diagnostics.
861 2017-08-09  Marek Polacek  <polacek@redhat.com>
863         PR c/81417
864         * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
865         build_conditional_expr. 
866         * c-parser.c (c_parser_conditional_expression): Create locations for
867         EXP1 and EXP2 from their source ranges.  Pass the locations down to
868         build_conditional_expr.
869         * c-tree.h (build_conditional_expr): Update declaration.
870         * c-typeck.c (build_conditional_expr): Add location_t parameters.
871         For -Wsign-compare, also print the types.
873 2017-08-08  Martin Liska  <mliska@suse.cz>
875         * c-convert.c: Include header files.
876         * c-typeck.c: Likewise.
878 2017-08-07  Martin Liska  <mliska@suse.cz>
880         * c-parser.c (c_parser_attributes): Canonicalize name of an
881         attribute.
883 2017-08-02  Marek Polacek  <polacek@redhat.com>
885         PR c/81289
886         * c-parser.c (c_parser_unary_expression): Use set_error.
888         PR c/81448
889         PR c/81306
890         * c-warn.c (warn_for_multistatement_macros): Prevent bogus
891         warnings.  Avoid walking MACRO_MAP_LOCATIONS.
893 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
894             Martin Liska  <mliska@suse.cz>
896         * c-typeck.c (c_finish_goto_label): Build gimple predict
897         statement.
899 2017-07-31  Martin Liska  <mliska@suse.cz>
901         PR sanitize/81530
902         * c-convert.c (convert): Guard condition with flag_sanitize_p
903         also with current_function_decl non-null equality.
904         * c-decl.c (grokdeclarator): Likewise.
905         * c-typeck.c (build_binary_op): Likewise.
907 2017-07-25  Marek Polacek  <polacek@redhat.com>
909         * c-decl.c (grokfield): Remove local variable.
911 2017-07-25  Marek Polacek  <polacek@redhat.com>
913         PR c/81364
914         * c-parser.c (c_parser_else_body): Don't warn about multistatement
915         macro expansion if the body is in { }.
916         (c_parser_while_statement): Likewise.
917         (c_parser_for_statement): Likewise.
919 2017-07-18  Nathan Sidwell  <nathan@acm.org>
921         * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
923 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
925         * c-decl.c (implicitly_declare): When suggesting a missing
926         #include, provide a fix-it hint.
928 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
930         * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
931         and call that instead.
932         * c-tree.h (selftest::run_c_tests): New decl.
934 2017-06-26  Marek Polacek  <polacek@redhat.com>
936         PR c/80116
937         * c-parser.c (c_parser_if_body): Set the location of the
938         body of the conditional after parsing all the labels.  Call
939         warn_for_multistatement_macros.
940         (c_parser_else_body): Likewise.
941         (c_parser_switch_statement): Likewise.
942         (c_parser_while_statement): Likewise.
943         (c_parser_for_statement): Likewise.
944         (c_parser_statement): Add a default argument.  Save the location
945         after labels have been parsed.
946         (c_parser_c99_block_statement): Likewise.
948 2017-06-19  Richard Biener  <rguenther@suse.de>
950         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
951         negated _Literals to parse _Literal (int) -1.
953 2017-06-13  Martin Liska  <mliska@suse.cz>
955         PR sanitize/78204
956         * c-convert.c (convert): Use sanitize_flags_p.
957         * c-decl.c (grokdeclarator): Likewise.
958         * c-typeck.c (convert_for_assignment): Likewise.
959         (c_finish_return): Likewise.
960         (build_binary_op): Likewise.
962 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
964         PR c/81006
965         * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
966         to sizetype before size_binop.
968 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
970         * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
971         of TDI_generic.
973 2017-06-06  Marek Polacek  <polacek@redhat.com>
975         PR c/79983
976         * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
977         ref.
978         (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
980 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
982         * c-parser.c (c_parser_binary_expression): Implement the
983         -Wsizeof_pointer_div warning.
984         (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
985         from a parenthesized expression.
986         (c_parser_expr_list): Use c_last_sizeof_loc.
987         * c-tree.h (c_last_sizeof_loc): New external.
988         * c-typeck.c (c_last_sizeof_loc): New variable.
989         (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
991 2017-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
993         PR testsuite/80580
994         * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
996 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
998         * c-objc-common.c (c_tree_printer): Gain bool and const char **
999         parameters.
1001 2017-05-24  Martin Sebor  <msebor@redhat.com>
1003         PR c/80731
1004         * c-fold.c (c_fully_fold_internal): Adjust.
1005         * c-typeck.c (parser_build_unary_op): Adjust.
1007 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
1009         * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1010         "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1011         "VECTOR_LENGTH".
1013 2017-05-23  Marek Polacek  <polacek@redhat.com>
1015         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1016         quotes.
1018 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
1020         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1021         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1022         it returned invariant.  Call tree_invariant_p unconditionally
1023         afterwards to decide whether to return expr or op0.
1025 2017-05-22  Nathan Sidwell  <nathan@acm.org>
1027         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1029 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
1031         * c-parser.c (c_parser_omp_clause_default): Handle
1032         "OMP_CLAUSE_DEFAULT_PRESENT".
1034 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1036         * config-lang.in (gtfiles): Add c-family/c-format.c.
1038 2017-05-18  Nathan Sidwell  <nathan@acm.org>
1040         * c-decl.c (pushdecl_top_level): Delete unused function.
1042 2017-05-18  Marek Polacek  <polacek@redhat.com>
1044         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1045         (check_earlier_gotos): Likewise.
1046         (define_label): Likewise.
1047         (pending_xref_error): Likewise.
1048         (smallest_type_quals_location): Likewise.
1049         (grokdeclarator): Likewise.
1050         (grokparms): Likewise.
1051         (identifier_global_value): Likewise.
1052         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1053         (find_init_member): Likewise.
1055 2017-05-18  Marek Polacek  <polacek@redhat.com>
1057         * c-decl.c (start_decl): Use false/true instead of 0/1.
1058         (grokdeclarator): Likewise.
1059         (finish_struct): Likewise.
1060         (start_function): Change the return type to bool.  Use false/true
1061         instead of 0/1.
1062         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1063         * c-tree.h (start_function): Update.
1064         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1065         (set_designator): Change the return type to bool.  Use false/true
1066         instead of 0/1.
1068 2017-05-17  Marek Polacek  <polacek@redhat.com>
1070         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1071         * c-typeck.c: Likewise.
1073 2017-05-17  Marek Polacek  <polacek@redhat.com>
1075         PR sanitizer/80659
1076         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1077         DECL_IGNORED_P even for non-static compound literals.
1079 2017-05-17  Martin Liska  <mliska@suse.cz>
1081         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1082         use it instead of int type.
1084 2017-05-17  Marek Polacek  <polacek@redhat.com>
1086         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
1087         call c_fully_fold.
1088         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1089         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr. 
1090         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1091         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1092         save_expr.
1093         (c_parser_conditional_expression): Likewise.
1094         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1095         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1096         (process_init_element): Likewise.
1097         (build_binary_op): Likewise.
1098         (handle_omp_array_sections_1): Likewise.
1100 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
1102         * c-parser.c (c_parser_omp_clause_num_gangs)
1103         (c_parser_omp_clause_num_workers)
1104         (c_parser_omp_clause_vector_length): Merge functions into...
1105         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
1106         all users.
1108 2017-05-11  Nathan Sidwell  <nathan@acm.org>
1110         * gimple-parser.c: Don't #include tree-dump.h.
1112 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1114         PR testsuite/80580
1115         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1117 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1119         PR testsuite/80580
1120         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1121         incorrect __MEM syntax.
1123 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
1125         PR testsuite/80580
1126         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1127         type of unary '*'.
1129 2017-05-09  Nathan Sidwell  <nathan@acm.org>
1131         * c-tree.h (pushdecl): Declare.
1133 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
1135         * c-decl.c (warn_defaults_to): Replace report_diagnostic
1136         with diagnostic_report_diagnostic.
1137         * c-errors.c (pedwarn_c99): Likewise.
1138         (pedwarn_c90): Likewise.
1140 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
1142         PR c++/80038
1143         * c-gimplify.c (c_gimplify_expr): Remove calls to
1144         cilk_gimplifY_call_params_in_spawned_fn.
1146 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
1148         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1149         hint for removing extra semicolon.
1151 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
1153         PR c/80468
1154         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1155         enabled, set specs->type to integer_type_node.
1157 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
1159         * c-array-notation.c: Fix typo in comment.
1161 2017-03-29  Marek Polacek  <polacek@redhat.com>
1163         PR c/79730
1164         * c-decl.c (finish_decl): Check VAR_P.
1166 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
1168         PR middle-end/80162
1169         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1170         * c-typeck.c (c_mark_addressable): Likewise.  Look through
1171         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1172         to ARRAY_TYPE.
1173         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1175 2017-03-23  Marek Polacek  <polacek@redhat.com>
1177         * c-tree.h: Remove a C_RID_YYCODE reference.
1179 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
1181         PR c/80097
1182         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1183         optional COMPOUND_EXPR with ubsan instrumentation.
1185 2017-03-17  Marek Polacek  <polacek@redhat.com>
1187         * c-parser.c: Add C11 references.
1189 2017-03-15  Marek Polacek  <polacek@redhat.com>
1191         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1193 2017-03-11  Marek Polacek  <polacek@redhat.com>
1195         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
1197 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
1199         PR translation/79848
1200         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1201         "%qs".
1202         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1204 2017-03-09  Marek Polacek  <polacek@redhat.com>
1206         PR sanitizer/79757
1207         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1208         parameter declarations with initializers.
1210 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
1212         PR c/79969
1213         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1214         TYPE_STUB_DECL.
1216 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
1218         PR c/79834
1219         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1220         for "may only be used in compound statements" diagnostics, change it
1221         such that the same translatable string is used for all pragmas.  For
1222         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1223         diagnostics.
1224         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1225         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1226         "may only be used in compound statements" diagnostics, such that the
1227         same translatable string is used for all pragmas.
1229 2017-03-04  Marek Polacek  <polacek@redhat.com>
1231         PR c/79847
1232         * c-decl.c (implicit_decl_warning): Add missing space.
1234 2017-03-03  Marek Polacek  <polacek@redhat.com>
1236         PR c/79758
1237         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1238         current_function_prototype_arg_types is error_mark_node.  Fix
1239         formatting.  Use TREE_VALUE instead of TREE_TYPE.
1241 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
1243         PR c/79837
1244         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1245         %<min%> or %<max%> in the diagnostics, instead mention identifier.
1246         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1247         diagnostics.
1249         PR c/79836
1250         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1251         instead of %<_Generic>.
1252         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1253         (c_parser_omp_target_exit_data): Use %<release%> instead of
1254         %<release>.
1256 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
1258         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1259         instead of just cond ? "..." : "...".
1260         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1261         for "enter"/"exit" keyword.
1262         (c_finish_oacc_routine): Don't use %s to supply portions of the
1263         message.
1265 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
1267         PR c++/79588
1268         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1269         handle -Wrestrict here.
1270         * c-typeck.c (build_function_call_vec): Adjust
1271         check_function_arguments caller.
1273 2017-02-23  Richard Biener  <rguenther@suse.de>
1275         PR c/79684
1276         * gimple-parser.c (c_parser_gimple_statement): Use set_error
1277         to initialize c_exprs to return.
1278         (c_parser_gimple_binary_expression): Likewise.
1279         (c_parser_gimple_unary_expression): Likewise.
1280         (c_parser_gimple_postfix_expression): Likewise.
1282 2017-02-22  Marek Polacek  <polacek@redhat.com>
1284         PR c/79662
1285         * c-typeck.c (convert_arguments): Handle error_mark_node.
1287 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1289         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1290         value of c_parser_parse_ssa_name against error_mark_node and emit
1291         error if ssa name is anonymous and written as default definition.
1293 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1295         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1296         FMA_EXPR.
1298 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
1300         PR c++/79512
1301         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1302         ignore #pragma omp target even when not followed by identifier.
1304 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1306         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1307         (c_parser_gimple_unary_expression): Likewise.
1309 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
1311         * c-parser.c (c_parser_oacc_declare): Add missing space in
1312         diagnostics.
1314 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1316         PR c/79478
1317         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1318         set_c_expr_source_range when parsing ssa-name.
1320 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
1321         Richard Biener  <rguenther@suse.de>
1323         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1324         building IL when arguments are error_mark_node.
1325         (c_parser_gimple_unary_expression): Likewise.
1326         (c_parser_gimple_if_stmt): Likewise.
1327         (c_parser_gimple_switch_stmt): Likewise.
1328         (c_parser_gimple_return_stmt): Likewise.
1329         (c_parser_parse_ssa_name): When name lookup fails do not build
1330         an SSA name.  Use undeclared rather than not declared in error
1331         reporting.
1333 2017-02-09  Marek Polacek  <polacek@redhat.com>
1335         PR c/79428
1336         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1337         instead of c_parser_skip_until_found.
1339 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
1341         PR c/79431
1342         * c-parser.c (c_parser_omp_declare_target): Don't invoke
1343         symtab_node::get on automatic variables.
1345 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
1346             Chung-Lin Tang  <cltang@codesourcery.com>
1348         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1349         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1350         semantic checking.
1351         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1353 2017-02-07  Richard Biener  <rguenther@suse.de>
1355         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1356         (c_parser_gimple_postfix_expression_after_primary):
1357         Do not use c_build_function_call_vec to avoid folding and promotion.
1358         Simplify.
1360 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
1362         PR lto/79061
1363         * c-decl.c (pop_scope): Pass main_input_filename to
1364         build_translation_unit_decl.
1366 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
1368         * c-parser.c: Include "read-rtl-function.h" and
1369         "run-rtl-passes.h".
1370         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1371         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
1372         production.  Update for renaming of field "gimple_pass" to
1373         "gimple_or_rtl_pass".  If __RTL was seen, call
1374         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
1375         to an auto_timevar, to cope with early exit.
1376         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1377         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1378         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1379         Handle RID_RTL.
1380         (c_parser_parse_rtl_body): New function.
1381         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1382         (struct c_declspecs): Rename field "gimple_pass" to
1383         "gimple_or_rtl_pass".  Add field "rtl_p".
1384         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1385         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1386         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1387         (c_parser_gimple_or_rtl_pass_list): ...this.
1389 2017-01-20  Marek Polacek  <polacek@redhat.com>
1391         PR c/64279
1392         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1394 2017-01-13  Richard Biener  <rguenther@suse.de>
1396         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1397         nops.
1399 2017-01-13  Richard Biener  <rguenther@suse.de>
1401         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1402         _Literal ( type-name ) number.
1404 2017-01-12  Richard Biener  <rguenther@suse.de>
1406         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1407         __MEM.
1409 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
1411         PR c++/72813
1412         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1413         PCH file.
1415 2017-01-11  Richard Biener  <rguenther@suse.de>
1417         PR bootstrap/79052
1418         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1419         returns on parse errors.
1421 2017-01-04  Marek Polacek  <polacek@redhat.com>
1423         PR c++/64767
1424         * c-parser.c (c_parser_postfix_expression): Mark zero character
1425         constants by setting original_type in c_expr.
1426         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1427         with a zero character constant.
1428         (char_type_p): New function.
1430 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
1432         * c-parser.c (c_parser_declaration_or_fndef): Create a
1433         rich_location at init_loc and parse it to start_init.
1434         (last_init_list_comma): New global.
1435         (c_parser_braced_init): Update last_init_list_comma when parsing
1436         commas.  Pass it to pop_init_level.  Pass location of closing
1437         brace to pop_init_level.
1438         (c_parser_postfix_expression_after_paren_type): Create a
1439         rich_location at type_loc and parse it to start_init.
1440         (c_parser_omp_declare_reduction): Likewise for loc.
1441         * c-tree.h (start_init): Add rich_location * param.
1442         (pop_init_level): Add location_t param.
1443         * c-typeck.c (struct initializer_stack): Add field
1444         "missing_brace_richloc".
1445         (start_init): Add richloc param, use it to initialize
1446         the stack node's missing_brace_richloc.
1447         (last_init_list_comma): New decl.
1448         (finish_implicit_inits): Pass last_init_list_comma to
1449         pop_init_level.
1450         (push_init_level): When finding missing open braces, add fix-it
1451         hints to the richloc.
1452         (pop_init_level): Add "insert_before" param and pass it
1453         when calling pop_init_level.  Add fixits about missing
1454         close braces to any richloc.  Use the richloc for the
1455         -Wmissing-braces warning.
1456         (set_designator): Pass last_init_list_comma to pop_init_level.
1457         (process_init_element): Likewise.
1459 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1461         Update copyright years.
1463 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
1465         PR bootstrap/78817
1466         * c-typeck.c (build_function_call_vec): If check_function_arguments
1467         returns true, set TREE_NO_WARNING on CALL_EXPR.
1469         PR c/77767
1470         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1471         to *expr instead of overwriting it.
1473 2016-12-20  Richard Biener  <rguenther@suse.de>
1475         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1476         error recovery.
1477         (c_parser_gimple_statement): Only build assigns for non-error
1478         stmts.
1479         (c_parser_gimple_postfix_expression_after): Improve error recovery.
1481 2016-12-14  Martin Jambor  <mjambor@suse.cz>
1483         * c-parser.c: Include omp-general.h and omp-offload.h instead of
1484         omp-low.h.
1485         (c_finish_oacc_routine): Adjusted call to
1486         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1487         to use their new names.
1488         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1489         use its new name.
1490         (c_parser_oacc_update): Likewise.
1491         (c_parser_omp_simd): Likewise.
1492         (c_parser_omp_target_update): Likewise.
1493         * c-typeck.c: Include omp-general.h instead of omp-low.h.
1494         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1495         name.
1496         (c_finish_omp_cancellation_point): Likewise.
1497         * gimple-parser.c: Do not include omp-low.h
1499 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
1500             James Norris  <jnorris@codesourcery.com>
1502         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1503         EXIT_DATA,WAIT} are not used in compound statements.
1504         (c_parser_oacc_enter_exit_data): Update diagnostics.
1506 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1508         PR c++/71973
1509         * c-decl.c (diagnose_mismatched_decls): Use
1510         OPT_Wbuiltin_declaration_mismatch here too.
1512 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
1513             Alan Hayward  <alan.hayward@arm.com>
1514             David Sherwood  <david.sherwood@arm.com>
1516         * c-decl.c (merge_decls): Use SET_DECL_MODE.
1517         (make_label, finish_struct): Likewise.
1519 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
1520             Richard Biener  <rguenther@suse.de>
1522         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1523         * config-lang.in (gtfiles): Add c/c-parser.h.
1524         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1525         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1526         * c-parser.c (enum c_id_kind, struct c_token,
1527         c_parser_next_token_is, c_parser_next_token_is_not,
1528         c_parser_next_token_is_keyword,
1529         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1530         Split out to ...
1531         * c-parser.h: ... new header.
1532         * c-parser.c: Include c-parser.h and gimple-parser.h.
1533         (c_parser_peek_token, c_parser_peek_2nd_token,
1534         c_token_starts_typename, c_parser_next_token_starts_declspecs,
1535         c_parser_next_tokens_start_declaration, c_parser_consume_token,
1536         c_parser_error, c_parser_require, c_parser_skip_until_found,
1537         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1538         c_parser_type_name): Export.
1539         (c_parser_tokens_buf): New function.
1540         (c_parser_error): Likewise.
1541         (c_parser_set_error): Likewise.
1542         (c_parser_declspecs): Handle RID_GIMPLE.
1543         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1544         via c_parser_parse_gimple_body.
1545         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1546         c_token_starts_typename, c_parser_next_token_starts_declspecs,
1547         c_parser_next_tokens_start_declaration, c_parser_consume_token,
1548         c_parser_error, c_parser_require, c_parser_skip_until_found,
1549         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1550         c_parser_type_name): Declare.
1551         (struct c_parser): Declare forward.
1552         (c_parser_tokens_buf): Declare.
1553         (c_parser_error): Likewise.
1554         (c_parser_set_error): Likewise.
1555         * gimple-parser.c: New file.
1556         * gimple-parser.h: Likewise.
1558 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1560         PR c/35503
1561         * c-parser.c (c_parser_postfix_expression_after_primary): Call
1562         warn_for_restrict.
1564 2016-09-11  Le-Chun Wu  <lcwu@google.com>
1565             Mark Wielaard  <mjw@redhat.com>
1567         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1568         to the given -Wshadow= variant.
1570 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1572         * c-typeck.c: Include memmodel.h.
1574 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
1576         PR target/77957
1577         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1578         instead of lhd_return_null_tree_v.
1580 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
1582         PR c++/69733
1583         * c-decl.c (smallest_type_quals_location): New static function.
1584         (grokdeclarator): Try to find the correct location for an ignored
1585         qualifier.
1587 2016-09-26  Marek Polacek  <polacek@redhat.com>
1589         PR c/7652
1590         * c-decl.c (pop_scope): Add gcc_fallthrough.
1592 2016-09-26  Marek Polacek  <polacek@redhat.com>
1594         PR c/7652
1595         * c-parser.c (struct c_token): Add flags field.
1596         (c_lex_one_token): Pass it to c_lex_with_flags.
1597         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1598         into IFN_FALLTHROUGH.
1599         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
1600         attribute fallthrough after a case label or default label.
1601         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1603 2016-09-24  Marek Polacek  <polacek@redhat.com>
1605         PR c/77490
1606         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1607         have boolean value.  Warn about ++/-- on booleans.
1609 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
1611         * c-parser.c (incomplete_record_decls): Remove unnecessary
1612         = vNULL initialization of file scope vec.
1614 2016-09-16  Marek Polacek  <polacek@redhat.com>
1616         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1618 2016-09-14  Marek Polacek  <polacek@redhat.com>
1620         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1621         (fix_array_notation_expr): Likewise.
1622         * c-decl.c (finish_decl): Likewise.
1623         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1624         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1625         (function_to_pointer_conversion): Use false instead of 0.
1626         (convert_lvalue_to_rvalue): Likewise.
1627         (parser_build_unary_op): Likewise.
1628         (build_atomic_assign): Likewise.
1629         (build_unary_op): Change nonconvert parameter type to bool, use
1630         true/false instead of 1/0.
1631         (build_binary_op): Use true instead of 1.
1633 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
1635         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1636         of add_fixit_insert to add_fixit_insert_before.
1638 2016-09-13  Marek Polacek  <polacek@redhat.com>
1640         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
1641         it.
1643 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1645         PR c++/77496
1646         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1647         COMPOUND_EXPR to warn_for_omitted_condop.
1649 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
1651         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1652         c_get_substring_location for this new langhook.
1654 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
1656         PR c/65467
1657         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1658         flag_openmp.
1659         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1660         instead of mark_exp_read on low_bound/length expression.
1661         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1662         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1663         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1664         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1665         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1666         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1667         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1668         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1669         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1670         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1671         instead of mark_expr_read.
1672         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1673         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1674         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1675         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1676         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1677         array section bases outside of depend clause, for depend clause
1678         use convert_lvalue_to_rvalue on the base.
1679         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1680         linear, aligned, map, to and from clauses.
1681         (c_omp_clause_copy_ctor): New function.
1683 2016-09-01  Marek Polacek  <polacek@redhat.com>
1685         PR c/7652
1686         * c-typeck.c (composite_type): Add FALLTHRU comment.
1688 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
1690         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1691         to the insertion fixits for "struct", "union", and "enum".
1693 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
1695         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1696         rather than add_fixit_misspelled_id.
1697         (undeclared_variable): Likewise.
1698         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
1699         now-redundant "here" params from add_fixit_insert method calls.
1700         (c_parser_parameter_declaration): Likewise.
1701         * c-typeck.c (build_component_ref): Remove now-redundant range
1702         param from add_fixit_replace method calls.
1704 2016-08-25  Marek Polacek  <polacek@redhat.com>
1706         * c-typeck.c (parser_build_binary_op): Pass LHS to
1707         warn_logical_not_parentheses.
1709 2016-08-25  Marek Polacek  <polacek@redhat.com>
1711         PR c/77323
1712         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1713         or _FloatN or _FloatNx is not supported.
1714         (finish_declspecs): Set type to integer_type_node when _FloatN or
1715         _FloatNx is not supported.
1717 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
1719         PR c/32187
1720         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1721         (struct c_declspecs): Add field floatn_nx_idx.
1722         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1723         and _FloatNx type specifiers.
1724         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1725         (c_parser_declspecs, c_parser_attribute_any_word)
1726         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1727         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1728         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1729         narrower than double.
1731 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
1732             Martin Liska  <mliska@suse.cz>
1734         PR c/67410
1735         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1736         % to determine val element to change.  Assert that
1737         wchar_bytes * charwidth fits into val array.
1739 2016-08-12  Marek Polacek  <polacek@redhat.com>
1741         PR c/7652
1742         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1743         (c_parser_postfix_expression): Likewise.
1744         * c-typeck.c (build_unary_op): Adjust fall through comment.
1745         (c_mark_addressable): Likewise.
1747 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
1749         PR c/72816
1750         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1751         array member through typedef, for orig_qual_indirect == 0 clear
1752         orig_qual_type.
1754 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
1756         PR c/64955
1757         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1758         this up to selftest::run_c_tests.
1759         (selftest::run_c_tests): New function.
1761 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
1763         * c-parser.c (struct oacc_routine_data): Add error_seen and
1764         fndecl_seen members.
1765         (c_finish_oacc_routine): Use these.
1766         (c_parser_declaration_or_fndef): Adjust.
1767         (c_parser_oacc_routine): Likewise.  Support more C language
1768         constructs, and improve diagnostics.  Move pragma context
1769         checking...
1770         (c_parser_pragma): ... here.
1772         * c-parser.c (struct oacc_routine_data): New.
1773         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1774         Simplify code.
1775         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
1776         declare target" attribute.
1778 2016-08-01  Jan Beulich  <jbeulich@suse.com>
1780         * c-fold.c (c_fully_fold_internal): Also emit shift count
1781         warnings for vector types.
1782         * c-typeck.c (build_binary_op): Likewise.
1784 2016-07-29  Marek Polacek  <polacek@redhat.com>
1786         PR c/71742
1787         * c-decl.c (finish_struct): Rephrase an error message.
1789         PR c/71853
1790         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1791         to error node for invalid code.
1793         PR c/71573
1794         * c-decl.c (implicitly_declare): Return decl early not only for
1795         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1797 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
1799         PR c/71969
1800         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1801         on GNU extern inline functions.
1803 2016-07-29  Marek Polacek  <polacek@redhat.com>
1805         PR c/71583
1806         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1807         check expr.value.
1809 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
1811         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1813 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
1815         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1816         spellcheck-tree.h
1817         (best_macro_match): Likewise, converting from a typedef to a
1818         subclass.
1819         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1820         (lookup_name_fuzzy): Update for change of best_macro_match to a
1821         subclass with a ctor that calls cpp_forall_identifiers.
1823 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
1825         * c-decl.c (implicit_decl_warning): Update for conversion of
1826         return type of lookup_name_fuzzy to const char *.
1827         (undeclared_variable): Likewise.
1828         (lookup_name_fuzzy): Convert return type from tree to
1829         const char *.
1830         * c-parser.c (c_parser_declaration_or_fndef): Update for
1831         conversion of return type of lookup_name_fuzzy to const char *.
1832         (c_parser_parameter_declaration): Likewise.
1834 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
1836         * c-parser.c (c_parser_oacc_declare): Don't scan for
1837         GOMP_MAP_POINTER.
1838         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1839         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1840         zero-length subarrays.
1842 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
1844         PR c/71858
1845         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1846         instead of FUZZY_LOOKUP_NAME.
1847         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1848         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1850 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
1852         PR c/71858
1853         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1855 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1857         * c-parser.c (c_parser_generic_selection): Make type of variable
1858         auto_vec.
1859         (c_parser_omp_declare_simd): Likewise.
1861 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1863         * c-decl.c (struct c_struct_parse_info): Change member types
1864         from vec to auto_vec.
1865         (start_struct): Adjust.
1866         (finish_struct): Likewise.
1868 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
1870         PR c/71719
1871         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1873 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
1875         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1876         Move pragma context checking into...
1877         (c_parser_omp_cancellation_point): ... here, and improve
1878         diagnostic messages.
1879         * c-typeck.c (c_finish_omp_cancel)
1880         (c_finish_omp_cancellation_point): Improve diagnostic messages.
1882 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
1884         PR c/71685
1885         * c-typeck.c (c_build_qualified_type): Don't clear
1886         C_TYPE_INCOMPLETE_VARS for the main variant.
1888 2016-06-28  Martin Sebor  <msebor@redhat.com>
1890         PR c/71552
1891         * c-typeck.c (output_init_element): Diagnose incompatible types
1892         before non-constant initializers.
1894 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
1896         * Make-lang.in: Don't cat ../stage_current if it does not exist.
1898 2016-06-23  Andi Kleen  <ak@linux.intel.com>
1900         * Make-lang.in: Add support for autofdo.
1902 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
1904         PR c/70339
1905         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1906         (implicit_decl_warning): When issuing warnings for implicit
1907         declarations, attempt to provide a suggestion via
1908         lookup_name_fuzzy.
1909         (undeclared_variable): Likewise when issuing errors.
1910         (lookup_name_in_scope): Likewise.
1911         (struct edit_distance_traits<cpp_hashnode *>): New struct.
1912         (best_macro_match): New typedef.
1913         (find_closest_macro_cpp_cb): New function.
1914         (lookup_name_fuzzy): New function.
1915         * c-parser.c: Include gcc-rich-location.h.
1916         (c_token_starts_typename): Split out case CPP_KEYWORD into...
1917         (c_keyword_starts_typename): ...this new function.
1918         (c_parser_declaration_or_fndef): When issuing errors about
1919         missing "struct" etc, add a fixit.  For other kinds of errors,
1920         attempt to provide a suggestion via lookup_name_fuzzy.
1921         (c_parser_parms_declarator): When looking ahead to detect typos in
1922         type names, also reject CPP_KEYWORD.
1923         (c_parser_parameter_declaration): When issuing errors about
1924         unknown type names, attempt to provide a suggestion via
1925         lookup_name_fuzzy.
1926         * c-tree.h (c_keyword_starts_typename): New prototype.
1928 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
1930         PR c/71601
1931         * c-typeck.c (build_conditional_expr): Return error_mark_node if
1932         c_common_type returns error_mark_node.
1934 2016-06-19  Martin Sebor  <msebor@redhat.com>
1936         PR c/69507
1937         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1938         __alignof__ (expression).
1940 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
1942         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1944 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
1946         * c-typeck.c (build_component_ref): Simplify fixit code by
1947         using gcc_rich_location::add_fixit_misspelled_id.
1948         (set_init_label): Likewise.
1950 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
1952         * c-parser.c (c_parser_initelt): Provide location of name for new
1953         location_t param of set_init_label.
1954         * c-tree.h (set_init_label): Add location_t param.
1955         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1956         param and use it when issuing error messages about unrecognized
1957         field names.  Attempt to provide a fixit hint if appropriate,
1958         otherwise update the error message to provide the type name.
1960 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
1962         PR c/71381
1963         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1964         Loosen checking.
1966 2016-06-08  Martin Sebor  <msebor@redhat.com>
1967             Jakub Jelinek  <jakub@redhat.com>
1969         PR c++/70507
1970         PR c/68120
1971         * c-typeck.c (convert_arguments): Don't promote last argument
1972         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1974 2016-06-08  Marek Polacek  <polacek@redhat.com>
1976         PR c/71418
1977         * c-decl.c (grokdeclarator): Check TYPE_P.
1979         PR c/71426
1980         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1981         code.
1983 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
1985         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1986         and structure element reference, capture the location of the
1987         element name token and pass it to build_component_ref.
1988         (c_parser_postfix_expression_after_primary): Likewise for
1989         structure element dereference.
1990         (c_parser_omp_variable_list): Likewise for
1991         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1992         * c-tree.h (build_component_ref): Add location_t param.
1993         * c-typeck.c (build_component_ref): Add location_t param
1994         COMPONENT_LOC.  Use it, if available, when issuing hints about
1995         mispelled member names to provide a fixit replacement hint.
1997 2016-06-06  Marek Polacek  <polacek@redhat.com>
1999         PR c/71362
2000         * c-parser.c (c_parser_direct_declarator): Set location.
2002 2016-06-06  Marek Polacek  <polacek@redhat.com>
2004         * c-typeck.c (comptypes_internal): Handle comparisons of
2005         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
2006         TYPE_REF_CAN_ALIAS_ALL.
2008 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
2010         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2011         arguments as addressable when async clause exists.
2013 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
2015         PR c++/71349
2016         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2017         when combined with target construct.
2019 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
2021         * c-parser.c (c_parser_omp_clause_schedule): Warn if
2022         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2024 2016-05-25  Marek Polacek  <polacek@redhat.com>
2026         PR c/71265
2027         * c-decl.c (c_make_fname_decl): Don't check seen_error.
2029         PR c/71266
2030         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2032 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
2034         * c-parser.c (c_parser_oacc_declare): Add support for
2035         GOMP_MAP_FIRSTPRIVATE_POINTER.
2036         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2037         argument with enum c_omp_region_type ort.
2038         (handle_omp_array_sections): Likewise.  Update call to
2039         handle_omp_array_sections_1.
2040         (c_finish_omp_clauses): Add specific errors and warning messages for
2041         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
2042         call to handle_omp_array_sections.
2044 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
2046         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2048 2016-05-24  Richard Biener  <rguenther@suse.de>
2050         PR middle-end/70434
2051         PR c/69504
2052         * c-typeck.c (build_array_ref): Do not complain about indexing
2053         non-lvalue vectors.  Adjust for function name change.
2055 2016-05-20  Martin Sebor  <msebor@redhat.com>
2057         PR c/71115
2058         * c-typeck.c (error_init): Use
2059         expansion_point_location_if_in_system_header.
2060         (warning_init): Same.
2062 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
2064         PR c/71171
2065         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2066         in error-handling.
2067         (c_parser_postfix_expression): Likewise.
2068         * c-tree.h (c_expr::set_error): New method.
2069         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2070         that result's range is initialized.
2072 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
2074         * c-typeck.c (parser_build_unary_op): Fix formatting.
2076 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
2078         * c-decl.c (grokdeclarator): Remove errmsg and use of
2079         targetm.invalid_return_type.
2080         (grokparms): Remove errmsg and use of
2081         targetm.invalid_parameter_type.
2083 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
2085         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2086         function return type.
2088 2016-05-12  Marek Polacek  <polacek@redhat.com>
2090         PR c/70756
2091         * c-decl.c (build_compound_literal): Pass LOC down to
2092         c_incomplete_type_error.
2093         * c-tree.h (require_complete_type): Adjust declaration.
2094         (c_incomplete_type_error): Likewise.
2095         * c-typeck.c (require_complete_type): Add location parameter, pass it
2096         down to c_incomplete_type_error.
2097         (c_incomplete_type_error): Add location parameter, pass it down to
2098         error_at.
2099         (build_component_ref): Pass location down to c_incomplete_type_error.
2100         (default_conversion): Pass location down to require_complete_type.
2101         (build_array_ref): Likewise.
2102         (build_function_call_vec): Likewise.
2103         (convert_arguments): Likewise.
2104         (build_unary_op): Likewise.
2105         (build_c_cast): Likewise.
2106         (build_modify_expr): Likewise.
2107         (convert_for_assignment): Likewise.
2108         (c_finish_omp_clauses): Likewise.
2110 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
2112         PR c/43651
2113         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2114         is enabled.
2115         * c-errors.c (pedwarn_c90): Return true if warned.
2116         * c-tree.h (pedwarn_c90): Change return type to bool.
2117         (enum c_declspec_word): Add new enumerator cdw_atomic.
2119 2016-05-11  Marek Polacek  <polacek@redhat.com>
2121         PR c++/71024
2122         * c-decl.c (diagnose_mismatched_decls): Factor out code to
2123         diagnose_mismatched_attributes and call it.
2125 2016-05-10  Marek Polacek  <polacek@redhat.com>
2127         PR c/70255
2128         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2129         on a declaration following the definition.
2131 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
2133         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2134         parse it through to c_parser_c99_block_statement.
2135         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2136         caller.
2138 2016-05-04  Marek Polacek  <polacek@redhat.com>
2140         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2141         OPT_Wdangling_else.
2143 2016-05-04  Marek Polacek  <polacek@redhat.com>
2145         PR c/48778
2146         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2147         for macro expansions.
2149 2016-05-03  Marek Polacek  <polacek@redhat.com>
2151         PR c/70859
2152         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2153         check_builtin_function_arguments.
2155 2016-05-03  Richard Biener  <rguenther@suse.de>
2157         * Make-lang.in (cc1-checksum.c): For stage-final re-use
2158         the checksum from the previous stage.
2160 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
2162         * c-parser.c (c_parser_oacc_all_clauses): Update call to
2163         c_finish_omp_clauses.
2164         (c_parser_omp_all_clauses): Likewise.
2165         (c_parser_oacc_cache): Likewise.
2166         (c_parser_oacc_loop): Likewise.
2167         (omp_split_clauses): Likewise.
2168         (c_parser_omp_declare_target): Likewise.
2169         (c_parser_cilk_all_clauses): Likewise.
2170         (c_parser_cilk_for): Likewise.
2171         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2172         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2174 2016-05-02  Marek Polacek  <polacek@redhat.com>
2176         PR c/70851
2177         * c-decl.c (grokdeclarator): Diagnose when array's size has an
2178         incomplete type.
2180 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
2182         PR middle-end/70626
2183         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2184         OACC_LOOP_CLAUSE_MASK.
2185         (c_parser_oacc_kernels_parallel): Update call to
2186         c_oacc_split_loop_clauses.
2188 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
2190         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2191         argument to build_modify_expr in two cases.
2193 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
2195         * c-parser.c (c_parser_postfix_expression_after_primary): Call
2196         warn_for_memset instead of warning directly here.
2198 2016-04-26  Marek Polacek  <polacek@redhat.com>
2200         PR c/67784
2201         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2202         out of ...
2203         (c_parser_for_statement): ... here.
2204         (c_parser_if_statement): Use it.
2205         (c_parser_switch_statement): Use it.
2206         (c_parser_while_statement): Use it.
2208         PR c/70791
2209         * c-decl.c (pushdecl): Pass LOCUS down to warning.
2211 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
2213         PR c++/69363
2214         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2215         instead of c_finish_cilk_clauses.
2216         * c-tree.h (c_finish_omp_clauses): Add new default argument.
2217         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
2218         floating-point variables in the linear clause for Cilk Plus.
2220 2016-04-18  Michael Matz  <matz@suse.de>
2222         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2223         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2225 2016-04-15  Marek Polacek  <polacek@redhat.com>
2227         PR c/70671
2228         * c-typeck.c (build_unary_op): Pass location down to error and
2229         warning call.
2231 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
2233         PR c/70436
2234         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2235         where needed.
2236         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2237         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2238         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2239         Adjust c_parser_pragma callers.
2240         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
2241         caller.
2242         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2243         c_parser_statement.
2244         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2245         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2246         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2247         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2248         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2249         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2250         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2251         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2252         down where needed.
2253         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
2254         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2255         calls.
2257 2016-04-13  Marek Polacek  <polacek@redhat.com>
2259         PR c/70436
2260         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2261         adjust callers.
2262         (c_parser_statement): Likewise.
2263         (c_parser_c99_block_statement): Likewise.
2264         (c_parser_while_statement): Likewise.
2265         (c_parser_for_statement): Likewise.
2266         (c_parser_if_body): Don't set IF_P here.
2267         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
2268         about dangling else here.
2269         * c-tree.h (c_finish_if_stmt): Adjust declaration.
2270         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
2271         warn about dangling else here.
2273 2016-04-04  Marek Polacek  <polacek@redhat.com>
2275         PR c/70307
2276         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2278 2016-03-31  Marek Polacek  <polacek@redhat.com>
2280         PR c/70297
2281         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2283 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
2285         PR c/70281
2286         * c-parser.c (c_parser_postfix_expression): Set the source range
2287         for uses of "__builtin_types_compatible_p".
2289 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
2291         PR c/70280
2292         * c-typeck.c (composite_type): Don't count void_list_node
2293         into len, if the list is terminated by void_list_node, start
2294         with void_list_node instead of NULL for newargs.  Stop
2295         at void_list_node.
2297 2016-03-16  Marek Polacek  <polacek@redhat.com>
2299         PR c/70093
2300         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2301         nested functions returning VM types.
2303 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
2305         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2306         when calling c_finish_omp_clauses.
2308 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
2310         PR c/69824
2311         * c-decl.c (get_parm_info): Don't queue implicit function declarations
2312         for later.
2314 2016-03-04  Marek Polacek  <polacek@redhat.com>
2316         PR c/69798
2317         * c-parser.c (c_parser_postfix_expression): Call
2318         c_parser_cast_expression rather than c_parser_postfix_expression.
2320 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
2322         PR c/69796
2323         PR c/69974
2324         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2325         of incomplete decls to error_mark_node.
2327 2016-02-24  Marek Polacek  <polacek@redhat.com>
2329         PR c/69819
2330         * c-decl.c (finish_decl): Don't update the copy of the type of a
2331         different decl type.
2333 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
2335         PR objc/69844
2336         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2337         in id_kind reclassification.
2339 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
2341         PR c/69835
2342         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2344 2016-02-16  James Norris  <jnorris@codesourcery.com>
2346         PR c/64748
2347         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2349 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
2351         * c-decl.c (build_null_declspecs): Zero the entire struct.
2353         PR c/69522
2354         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
2355         callers changed.  If nested_p is true, use it to call
2356         finish_implicit_inits.
2357         * c-tree.h (finish_implicit_inits): Declare.
2358         * c-typeck.c (finish_implicit_inits): New function.  Move code
2359         from ...
2360         (push_init_level): ... here.
2361         (set_designator, process_init_element): Call finish_implicit_inits.
2363 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
2365         PR c/69768
2366         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2367         arguments for -Waddress warning.
2369 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
2371         PR c/69669
2372         * c-decl.c (finish_enum): When honoring mode attribute,
2373         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2375 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
2377         PR debug/69518
2378         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2379         all type variants, not just TYPE_MAIN_VARIANT.
2381 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
2383         PR debug/66869
2384         * c-decl.c (c_write_global_declarations_1): Warn with
2385         warn_unused_function if static prototype without definition
2386         is not C_DECL_USED.
2388 2016-01-27  Marek Polacek  <polacek@redhat.com>
2390         PR c/68062
2391         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2392         to unsigned, if needed.  Add -Wsign-compare warning.
2394 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
2396         PR tree-optimization/69483
2397         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2399 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2401         PR c/24293
2402         * c-tree.h (incomplete_record_decls): Declare.
2403         * c-parser.c (incomplete_record_decls): Define.
2404         (c_parser_translation_unit): Iterate through incomplete_record_decls and
2405         report error if any decl has zero size.
2406         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2407         or enum type to incomplete_record_decls.
2409 2016-01-14  Tom de Vries  <tom@codesourcery.com>
2411         PR tree-optimization/68773
2412         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2413         set force_output.
2415 2016-01-14  Marek Polacek  <polacek@redhat.com>
2417         PR c/69262
2418         * c-decl.c (grokdeclarator): Provide more information for invalid
2419         array declarations.
2421 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
2423         * c-parser.c (c_parser_unary_expression): For dereferences, build
2424         a combined location before calling build_indirect_ref, so that
2425         error reports cover the full range, manually updating the c_expr
2426         src_range.
2428 2016-01-06  Marek Polacek  <polacek@redhat.com>
2430         PR sanitizer/69099
2431         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
2432         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
2433         NULL.
2435 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
2437         Update copyright years.
2439 2016-01-04  Marek Polacek  <polacek@redhat.com>
2441         PR c/68908
2442         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
2443         optimization to use __atomic_fetch_* built-in if possible.
2445 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
2447         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2448         into...
2449         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
2450         all users.
2452 2015-12-22  Marek Polacek  <polacek@redhat.com>
2454         PR c/69002
2455         * c-typeck.c (build_component_ref): Warn when acessing elements of
2456         atomic structures or unions.
2458 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
2460         * c-typeck.c: Include "gcc-rich-location.h".
2461         (build_binary_op): In the two places that call binary_op_error,
2462         create a gcc_rich_location and populate it with the location of
2463         the binary op and its two operands.
2465 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2467         * c-parser.c (c_parser_statement_after_labels): When calling
2468         c_finish_return, Use the return expression's location if it has
2469         one, falling back to the location of the first token within it.
2470         * c-typeck.c (c_finish_return): When issuing warnings about
2471         the incorrect presence/absence of a return value, issue a note
2472         showing the declaration of the function.
2474 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2476         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2477         to 4.
2478         (c_parser_peek_nth_token): New function.
2479         (c_parser_peek_conflict_marker): New function.
2480         (c_parser_error): Detect conflict markers and report them as such.
2482 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2484         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2485         to preserve range information for the primary expression
2486         in the call to c_parser_postfix_expression_after_primary.
2488 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2490         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2491         expression location, falling back on the first token location,
2492         rather than always using the latter.
2494 2015-12-16  Marek Polacek  <polacek@redhat.com>
2496         PR c/64637
2497         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2498         available.
2500 2015-12-15  Marek Polacek  <polacek@redhat.com>
2502         PR c/68907
2503         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2504         artificial decl.
2506 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
2508         * c-parser.c (c_parser_alignof_expression): Capture location of
2509         closing parenthesis (if any), or of end of unary expression, and
2510         use it to build a src_range for the expression.
2512 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
2514         PR c/68757
2515         * c-parser.c (c_parser_get_builtin_args): Add
2516         "out_close_paren_loc" param, and write back to it.
2517         (c_parser_postfix_expression): Capture the closing
2518         parenthesis location for RID_CHOOSE_EXPR,
2519         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2520         RID_BUILTIN_SHUFFLE and use it to set the source range
2521         for such expressions; within RID_BUILTIN_COMPLEX set
2522         the underlying location.
2524 2015-12-07  Marek Polacek  <polacek@redhat.com>
2526         PR c/68668
2527         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2528         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2530 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
2532         * c-tree.h (c_build_va_arg): Adjust prototype.
2533         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2534         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2535         parameter, adjust throughout and issue an error if EXPR is a component
2536         with reverse storage order.
2538 2015-12-02  Jason Merrill  <jason@redhat.com>
2540         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2541         (c_fully_fold_internal, decl_constant_value_for_optimization):
2542         Move from c-common.c.
2543         * c-tree.h: Declare decl_constant_value_for_optimization.
2544         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2546 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
2548         PR c/68162
2549         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2550         following link from declarator to next declarator.  Track original
2551         qualified type and pass it to c_build_qualified_type.
2552         * c-typeck.c (c_build_qualified_type): Add arguments
2553         orig_qual_type and orig_qual_indirect.
2555 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
2557         * c-parser.c (c_parser_omp_clause_name)
2558         (c_parser_oacc_all_clauses): Alphabetical sorting.
2560 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
2562         PR c/68533
2563         * c-decl.c (get_parm_info): Use b->locus instead of input_location
2564         for diagnostics.
2566 2015-12-01  Julian Brown  <julian@codesourcery.com>
2567             Cesar Philippidis  <cesar@codesourcery.com>
2568             James Norris  <James_Norris@mentor.com>
2570         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2571         (c_parser_oacc_clause_use_device): New function.
2572         (c_parser_oacc_all_clauses): Add use_device support.
2573         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2574         (c_parser_oacc_host_data): New function.
2575         (c_parser_omp_construct): Add host_data support.
2576         * c-tree.h (c_finish_oacc_host_data): Add prototype.
2577         * c-typeck.c (c_finish_oacc_host_data): New function.
2578         (c_finish_omp_clauses): Add use_device support.
2580 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
2582         PR c/67106
2583         * c-decl.c: Set TYPE_PACKED in variants.
2585 2015-11-27  Martin Liska  <mliska@suse.cz>
2587         PR c++/68312
2588         * c-array-notation.c (fix_builtin_array_notation_fn):
2589         Use release_vec_vec instead of vec::release.
2590         (build_array_notation_expr): Likewise.
2591         (fix_conditional_array_notations_1): Likewise.
2592         (fix_array_notation_expr): Likewise.
2593         (fix_array_notation_call_expr): Likewise.
2595 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
2597         PR c/63326
2598         * c-parser.c (c_parser_compound_statement_nostart): If
2599         last_label is true, use pragma_stmt instead of pragma_compound
2600         as second c_parser_pragma argument.
2601         (c_parser_omp_ordered, c_parser_omp_target_update,
2602         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2603         false as second argument to c_parser_skip_to_pragma_eol after
2604         diagnosing standalone directives used in pragma_stmt context.
2606 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
2608         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2609         with "if (ENABLE_OFFLOADING)".
2611 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
2613         PR objc/68438
2614         * c-parser.c (c_parser_postfix_expression): Set up source ranges
2615         for various Objective-C constructs: Class.name syntax,
2616         @selector(), @protocol(), @encode(), and [] message syntax.
2618 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
2620         PR 62314
2621         * c-typeck.c (should_suggest_deref_p): New function.
2622         (build_component_ref): Special-case POINTER_TYPE when
2623         generating a "not a structure of union"  error message, and
2624         suggest a "->" rather than a ".", providing a fix-it hint.
2626 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
2628         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2629         candidate into a new function, find_closest_identifier.
2631 2015-11-19  Marek Polacek  <polacek@redhat.com>
2633         PR c/68412
2634         * c-typeck.c (parser_build_binary_op): Properly handle
2635         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2637 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
2639         * c-parser.c (set_c_expr_source_range): Bulletproof both
2640         overloaded implementations against NULL expr->value.
2641         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2642         values.
2643         (c_parser_unary_expression): Likewise when handling addresses of
2644         labels.
2645         (c_parser_postfix_expression): Likewise for statement expressions,
2646         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2647         __builtin_va_arg, and for __builtin_offset_of.
2648         (c_parser_postfix_expression_after_paren_type): Initialize expr's
2649         src_range using the range of the braced initializer.
2650         (c_parser_transaction_expression): Set src_range for "ret" to a
2651         sane pair of values.
2653 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
2655         * c-parser.c (c_finish_omp_declare_simd): Look for
2656         "simd" attribute as well. Update error message.
2658 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
2660         * c-parser.c (c_parser_omp_declare_target): Adjust.
2662 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
2664         * c-typeck.c (c_finish_omp_clauses): Don't mark
2665         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2667 2015-11-14  Marek Polacek  <polacek@redhat.com>
2669         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2670         * c-typeck.c: Likewise.
2672 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
2674         * c-decl.c (warn_defaults_to): Pass line_table to
2675         rich_location ctor.
2676         * c-errors.c (pedwarn_c99): Likewise.
2677         (pedwarn_c90): Likewise.
2678         * c-parser.c (set_c_expr_source_range): New functions.
2679         (c_token::get_range): New method.
2680         (c_token::get_finish): New method.
2681         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2682         based on the range from the start of the LHS to the end of the
2683         RHS.
2684         (c_parser_conditional_expression): Likewise, based on the range
2685         from the start of the cond.value to the end of exp2.value.
2686         (c_parser_binary_expression): Call set_c_expr_source_range on
2687         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2688         (c_parser_cast_expression): Call set_c_expr_source_range on ret
2689         based on the cast_loc through to the end of the expr.
2690         (c_parser_unary_expression): Likewise, based on the
2691         op_loc through to the end of op.
2692         (c_parser_sizeof_expression) Likewise, based on the start of the
2693         sizeof token through to either the closing paren or the end of
2694         expr.
2695         (c_parser_postfix_expression): Likewise, using the token range,
2696         or from the open paren through to the close paren for
2697         parenthesized expressions.
2698         (c_parser_postfix_expression_after_primary): Likewise, for
2699         various kinds of expression.
2700         * c-tree.h (struct c_expr): Add field "src_range".
2701         (c_expr::get_start): New method.
2702         (c_expr::get_finish): New method.
2703         (set_c_expr_source_range): New decls.
2704         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2705         on ret for prefix unary ops.
2706         (parser_build_binary_op): Likewise, running from the start of
2707         arg1.value through to the end of arg2.value.
2709 2015-11-13  Marek Polacek  <polacek@redhat.com>
2711         PR c/68320
2712         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2714 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
2716         * c-typeck.c: Include spellcheck.h.
2717         (lookup_field_fuzzy_find_candidates): New function.
2718         (lookup_field_fuzzy): New function.
2719         (build_component_ref): If the field was not found, try using
2720         lookup_field_fuzzy and potentially offer a suggestion.
2722 2015-11-12  James Norris  <jnorris@codesourcery.com>
2723             Joseph Myers  <joseph@codesourcery.com>
2725         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2726         (c_parser_omp_clause_name): Handle 'device_resident' clause.
2727         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2728         and PRAGMA_OMP_CLAUSE_LINK.
2729         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2730         and PRAGMA_OACC_CLAUSE_LINK.
2731         (OACC_DECLARE_CLAUSE_MASK): New definition.
2732         (c_parser_oacc_declare): New function.
2734 2015-11-12  Marek Polacek  <polacek@redhat.com>
2736         PR c/67784
2737         * c-parser.c (c_parser_for_statement): Reclassify the token in
2738         a correct scope.
2740 2015-11-11  Marek Polacek  <polacek@redhat.com>
2742         PR c/68107
2743         PR c++/68266
2744         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
2745         checking the size of an array.
2747 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
2749         * c-array-notation.c: Remove unused header files.
2750         * c-aux-info.c: Likewise.
2751         * c-convert.c: Likewise.
2752         * c-decl.c: Likewise.
2753         * c-errors.c: Likewise.
2754         * c-lang.c: Likewise.
2755         * c-objc-common.c: Likewise.
2756         * c-parser.c: Likewise.
2757         * c-typeck.c: Likewise.
2758         * gccspec.c: Likewise.
2760 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
2761             Cesar Philippidis  <cesar@codesourcery.com>
2762             James Norris  <jnorris@codesourcery.com>
2763             Julian Brown  <julian@codesourcery.com>
2764             Nathan Sidwell  <nathan@codesourcery.com>
2766         c/
2767         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2768         routine arg.
2769         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2770         (c_parser_pragma): Parse 'acc routine'.
2771         (OACC_ROUTINE_CLAUSE_MARK): Define.
2772         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2774 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2776         PR debug/67192
2777         * c-typeck.c (c_finish_loop): For unconditional loops, set the
2778         location of the backward-goto to the start of the loop body.
2780 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2782         PR debug/67192
2783         * c-parser.c (c_parser_while_statement): Finish the loop before
2784         parsing ahead for misleading indentation.
2785         (c_parser_for_statement): Likewise.
2787 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
2789         * c-decl.c (finish_struct): If the structure has reverse storage
2790         order, rewrite the type of array fields with scalar component.  Call
2791         maybe_apply_pragma_scalar_storage_order on entry.
2792         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
2793         errors on bit-fields and reverse SSO here and not...
2794         (c_mark_addressable): ...here.
2795         (output_init_element): Adjust call to initializer_constant_valid_p.
2796         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2798 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
2800         * c-decl.c (warn_defaults_to): Update for change in signature
2801         of diagnostic_set_info.
2802         * c-errors.c (pedwarn_c99): Likewise.
2803         (pedwarn_c90): Likewise.
2804         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2805         for textinfo::set_location.
2807 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
2808             Thomas Schwinge  <thomas@codesourcery.com>
2809             James Norris  <jnorris@codesourcery.com>
2811         * c-parser.c (c_parser_omp_clause_name): Add support for
2812         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2813         (c_parser_omp_clause_default): Add is_oacc argument. Handle
2814         default(none) in OpenACC.
2815         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2816         arguments.
2817         (c_parser_oacc_clause_tile): New function.
2818         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2819         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2820         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2821         TILE}.
2822         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2823         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2824         FIRSTPRIVATE}.
2825         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2826         (c_parser_oacc_update): Update the error message for missing clauses.
2827         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2828         and OMP_CLAUSE_INDEPENDENT.
2830 2015-11-05  Marek Polacek  <polacek@redhat.com>
2832         PR c/68090
2833         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2834         deal with pre-evaluation on invalid types.
2836 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
2837             Ilya Verbin  <ilya.verbin@intel.com>
2839         * c-parser.c: Include context.h and gimple-expr.h.
2840         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2841         monotonic together with nonmonotonic.
2842         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
2843         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2844         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2845         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2846         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
2847         expressions on combined target teams before the target.
2848         (c_parser_omp_declare_target): If decl has "omp declare target" or
2849         "omp declare target link" attribute, and cgraph or varpool node already
2850         exists, then set corresponding flags.  Call c_finish_omp_clauses
2851         in the parenthesized extended-list syntax case.
2852         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2853         declare target.
2854         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2855         on OMP_CLAUSE_REDUCTION array sections.
2856         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2857         into the constant offset, or for variable low-bound using
2858         POINTER_PLUS_EXPR.  For structure element based array sections use
2859         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2860         (c_finish_omp_clauses): Drop generic_field_head, structure
2861         elements are now always mapped even as array section bases,
2862         diagnose same var in data sharing and mapping clauses.  Diagnose if
2863         linear step on declare simd is neither a constant nor a uniform
2864         parameter.  Look through POINTER_PLUS_EXPR for array section
2865         reductions.  Diagnose the same var or function appearing multiple
2866         times on the same directive.  Fix up wording for the to clause if t
2867         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
2868         modifier on kinds other than dynamic or guided or nonmonotonic
2869         modifier together with ordered clause.
2871 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
2872             Chung-Lin Tang  <cltang@codesourcery.com>
2874         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2876 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
2878         * c-array-notation.c: Reorder #include's and remove duplicates.
2879         * c-aux-info.c: Likewise.
2880         * c-convert.c: Likewise.
2881         * c-decl.c: Likewise.
2882         * c-errors.c: Likewise.
2883         * c-lang.c: Likewise.
2884         * c-objc-common.c: Likewise.
2885         * c-parser.c: Likewise.
2886         * c-typeck.c: Likewise.
2888 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
2890         PR debug/66068
2891         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2892         after calling build_qualified_type.
2894 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
2895             Thomas Schwinge  <thomas@codesourcery.com>
2896             James Norris  <jnorris@codesourcery.com>
2897             Joseph Myers  <joseph@codesourcery.com>
2898             Julian Brown  <julian@codesourcery.com>
2899             Bernd Schmidt  <bschmidt@redhat.com>
2901         * c-parser.c (c_parser_oacc_shape_clause): New.
2902         (c_parser_oacc_simple_clause): New.
2903         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2904         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2906 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
2907             James Norris  <jnorris@codesourcery.com>
2908             Cesar Philippidis  <cesar@codesourcery.com>
2910         PR c/64765
2911         PR c/64880
2912         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2913         parameters, and handle these.  Adjust all users.
2914         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2915         into...
2916         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
2917         all users.
2918         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2919         declare functions.
2920         (c_finish_omp_construct): Declare function.
2921         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2922         Merge functions into...
2923         (c_finish_omp_construct): ... this new function.
2925 2015-10-22  Richard Biener  <rguenther@suse.de>
2927         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2928         before folding a MINUS_EXPR.
2930 2015-10-21  Marek Polacek  <polacek@redhat.com>
2932         PR c/68024
2933         * c-decl.c (start_function): Warn about vararg functions without
2934         a prototype.
2936 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
2938         * c-typeck.c (build_conditional_expr): Use boolean vector
2939         type for vector comparison.
2940         (build_vec_cmp): New.
2941         (build_binary_op): Use build_vec_cmp for comparison.
2943 2015-10-20  Marek Polacek  <polacek@redhat.com>
2945         * c-parser.c (is_cilkplus_vector_p): Don't define here.
2947 2015-10-20  Marek Polacek  <polacek@redhat.com>
2949         PR c/67964
2950         * c-parser.c (c_parser_attributes): Break out of the loop if the
2951         token after an attribute isn't a comma.
2953 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
2954             Aldy Hernandez  <aldyh@redhat.com>
2956         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2957         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2958         (c_parser_omp_variable_list): Handle structure elements for
2959         map, to and from clauses.  Handle array sections in reduction
2960         clause.  Formatting fixes.
2961         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2962         if clause modifiers.
2963         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2964         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2965         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2966         c_parser_omp_clause_is_device_ptr): New functions.
2967         (c_parser_omp_clause_ordered): Parse optional parameter.
2968         (c_parser_omp_clause_reduction): Handle array reductions.
2969         (c_parser_omp_clause_schedule): Parse optional simd modifier.
2970         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2971         functions.
2972         (c_parser_omp_clause_linear): Parse linear clause modifiers.
2973         (c_parser_omp_clause_depend_sink): New function.
2974         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2975         (c_parser_omp_clause_map): Parse release/delete map kinds and
2976         optional always modifier.
2977         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2978         and c_finish_omp_clauses callers.
2979         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
2980         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2981         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2982         (OMP_CRITICAL_CLAUSE_MASK): Define.
2983         (c_parser_omp_critical): Parse critical clauses.
2984         (c_parser_omp_for_loop): Handle doacross loops, adjust
2985         c_finish_omp_for and c_finish_omp_clauses callers.
2986         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2987         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2988         (OMP_FOR_CLAUSE_MASK): Add linear clause.
2989         (c_parser_omp_for): Disallow ordered clause when combined with
2990         distribute.  Disallow linear clause when combined with distribute
2991         and not combined with simd.
2992         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2993         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2994         parse clauses and if depend clause is found, don't parse a body.
2995         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2996         Allow target parallel without for after it.
2997         (OMP_TASK_CLAUSE_MASK): Add priority clause.
2998         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2999         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3000         invalid kinds.
3001         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3002         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3003         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3004         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3005         functions.
3006         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3007         defaultmap and is_device_ptr clauses.
3008         (c_parser_omp_target): Parse target parallel and target simd.  Set
3009         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
3010         and target exit data.  Diagnose invalid map kinds.
3011         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3012         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3013         construct.
3014         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3015         &omp_priv.
3016         (OMP_TASKLOOP_CLAUSE_MASK): Define.
3017         (c_parser_omp_taskloop): New function.
3018         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3019         handle PRAGMA_OMP_TASKLOOP.
3020         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3021         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3022         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3023         Add IS_OMP argument, handle structure element bases, diagnose
3024         bitfields, pass IS_OMP recursively, diagnose known zero length
3025         array sections in depend clauses, handle array sections in reduction
3026         clause, diagnose negative length even for pointers.
3027         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3028         types, pass IS_OMP down to handle_omp_array_sections_1, handle
3029         array sections in reduction clause, set
3030         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3031         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3032         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3033         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3035 2015-10-06  Marek Polacek  <polacek@redhat.com>
3037         * c-parser.c (c_parser_statement_after_labels): Use
3038         protected_set_expr_location.
3039         (c_parser_omp_clause_num_gangs): Likewise.
3040         (c_parser_omp_clause_num_threads): Likewise.
3041         (c_parser_omp_clause_num_workers): Likewise.
3042         (c_parser_omp_clause_vector_length): Likewise.
3043         (c_parser_omp_clause_num_teams): Likewise.
3044         (c_parser_omp_clause_thread_limit): Likewise.
3045         * c-typeck.c (build_c_cast): Likewise.
3046         (c_cast_expr): Likewise.
3048 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
3050         * c-typeck.c (c_tree_equal): Use real_equal instead of
3051         REAL_VALUES_EQUAL.
3053 2015-10-04  Jason Merrill  <jason@redhat.com>
3055         * c-parser.c (c_lex_one_token): Handle @synchronized.
3056         * c-decl.c (match_builtin_function_types): A declaration of a built-in
3057         can change whether the function is transaction_safe.
3059 2015-10-02  Marek Polacek  <polacek@redhat.com>
3061         PR c/67730
3062         * c-typeck.c (convert_for_assignment): Use the expansion point
3063         location throughout.
3065 2015-10-02  Marek Polacek  <polacek@redhat.com>
3067         PR c/64249
3068         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3069         and pass it down to c_parser_if_statement.
3070         (c_parser_else_body): Add CHAIN parameter and pass it down to
3071         c_parser_statement_after_labels.
3072         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
3073         duplicated if-else-if conditions.
3075 2015-10-01  Marek Polacek  <polacek@redhat.com>
3077         * c-typeck.c (convert_for_assignment): Improve commentary.
3079 2015-09-30  Marek Polacek  <polacek@redhat.com>
3081         PR c/67730
3082         * c-typeck.c (c_finish_return): Use the expansion point location for
3083         certain "return with value" warnings.
3085 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3087         * c-parser.c (pragma_lex): Add loc argument.
3089 2015-09-15  Marek Polacek  <polacek@redhat.com>
3091         PR c/67580
3092         * c-decl.c (tag_exists_p): New function.
3093         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3094         struct/union/enum keywords are missing.
3095         * c-tree.h (tag_exists_p): Declare.
3097 2015-09-15  Marek Polacek  <polacek@redhat.com>
3099         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3100         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3101         Return NULL_TREE instead of 0.
3102         (lookup_name): Return NULL_TREE instead of 0.
3103         (lookup_name_in_scope): Likewise.
3104         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3105         (parser_xref_tag): Use false instead of 0.
3106         (start_struct): Use true instead of 1.
3107         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3109 2015-09-14  Marek Polacek  <polacek@redhat.com>
3111         * c-typeck.c (set_nonincremental_init_from_string): Use
3112         HOST_WIDE_INT_M1U when shifting a negative value.
3114 2015-09-09  Mark Wielaard  <mjw@redhat.com>
3116         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3117         parm against NULL.
3119 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
3121         PR c/67502
3122         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3123         into OMP_FOR_PRE_BODY rather than before the loop.
3125 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
3127         PR c/67501
3128         * c-parser.c (c_parser_oacc_all_clauses,
3129         c_parser_omp_all_clauses): Remove invalid clause from
3130         list of clauses even if parser->error is set.
3132         PR c/67500
3133         * c-parser.c (c_parser_omp_clause_aligned,
3134         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3135         test for errors.
3136         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3137         error_mark_node.
3139         PR c/67495
3140         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3141         instead of c_parser_unary_expression.  If the result is !lvalue_p,
3142         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3144 2015-09-04  Marek Polacek  <polacek@redhat.com>
3146         PR sanitizer/67279
3147         * c-typeck.c (build_binary_op): Don't instrument static initializers.
3149 2015-09-03  Martin Sebor  <msebor@redhat.com>
3151         PR c/66516
3152         * c-typeck.c (convert_arguments, parser_build_unary_op,
3153         build_conditional_expr, c_cast_expr, convert_for_assignment,
3154         build_binary_op, _objc_common_truthvalue_conversion): Call
3155         reject_gcc_builtin.
3156         (c_decl_implicit): Define.
3158 2015-09-02  Marek Polacek  <polacek@redhat.com>
3160         PR c/67432
3161         * c-parser.c (c_parser_enum_specifier): Give a better error for
3162         an empty enum.
3164 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
3166         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3168 2015-08-12  Marek Polacek  <polacek@redhat.com>
3170         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3171         LOC to it.
3173 2015-08-03  Marek Polacek  <polacek@redhat.com>
3175         PR c/67088
3176         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3177         Use it.
3178         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3180 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
3182         * c-parser.c (c_parser_if_body): Take token_indent_info
3183         argument. Call warn_for_misleading_indentation even when the
3184         body is a semicolon.  Extract token_indent_infos corresponding
3185         to the guard, body and next tokens.  Adjust call to
3186         warn_for_misleading_indentation accordingly.
3187         (c_parser_else_body): Likewise.
3188         (c_parser_if_statement): Likewise.
3189         (c_parser_while_statement): Likewise.
3190         (c_parser_for_statement): Likewise.
3192 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
3193             Manuel López-Ibáñez  <manu@gcc.gnu.org>
3195         * c-decl.c (get_parm_info): Remove static var. Update warning
3196         message.
3198 2015-07-27  Marek Polacek  <polacek@redhat.com>
3200         PR c++/66555
3201         PR c/54979
3202         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3204 2015-07-20  Marek Polacek  <polacek@redhat.com>
3206         PR c++/55095
3207         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3208         (build_binary_op): Warn about left shift overflows.
3210 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
3212         * c-array-notation.c: Adjust includes for flags.h changes.
3213         * c-objc-common.c: Likewise.
3215 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
3217         * c-array-notation.c: Adjust includes.
3218         * c-aux-info.c: Likewise.
3219         * c-convert.c: Likewise.
3220         * c-decl.c: Likewise.
3221         * c-errors.c: Likewise.
3222         * c-lang.c: Likewise.
3223         * c-objc-common.c: Likewise.
3224         * c-parser.c: Likewise.
3225         * c-typeck.c: Likewise.
3227 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3229         PR fortran/66605
3230         * c-decl.c (finish_function): Call do_warn_unused_parameter.
3232 2015-06-29  Marek Polacek  <polacek@redhat.com>
3234         PR c/66322
3235         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3236         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
3237         about -Wswitch-bool here.
3238         (do_case): Update c_add_case_label call.
3239         (c_finish_case): Update c_do_switch_warnings call.
3241 2015-06-27  Marek Polacek  <polacek@redhat.com>
3243         * c-typeck.c: Use VECTOR_TYPE_P throughout.
3245 2015-06-26  Marek Polacek  <polacek@redhat.com>
3247         * c-array-notation.c (fix_builtin_array_notation_fn): Use
3248         INDIRECT_REF_P.
3249         * c-typeck.c (array_to_pointer_conversion): Likewise.
3250         (build_unary_op): Likewise.
3251         (c_finish_return): Likewise.
3253 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
3255         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3256         * c-parser.c: Likewise.
3258 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
3260         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3261         instead of pointer_hash.
3262         (detect_field_duplicates): Likewise.
3264 2015-06-25  Marek Polacek  <polacek@redhat.com>
3266         * c-array-notation.c: Use VAR_P throughout.
3267         * c-decl.c: Likewise.
3268         * c-objc-common.c: Likewise.
3269         * c-parser.c: Likewise.
3270         * c-typeck.c: Likewise.
3272 2015-06-25  Marek Polacek  <polacek@redhat.com>
3274         * c-decl.c: Use is_global_var throughout.
3275         * c-parser.c: Likewise.
3276         * c-typeck.c: Likewise.
3278 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
3280         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3281         * c-aux-info.c: Likewise.
3282         * c-convert.c: Likewise.
3283         * c-decl.c: Likewise.
3284         * c-errors.c: Likewise.
3285         * c-lang.c: Likewise.
3286         * c-objc-common.c: Likewise.
3287         * c-parser.c: Likewise.
3288         * c-typeck.c: Likewise.
3290 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
3292         PR middle-end/66325
3293         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3294         variants.
3296 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
3298         * c-decl.c (pop_scope): Register the main translation unit
3299         through the new debug hook.
3301 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
3303         * c-array-notation.c : Adjust include files.
3304         * c-aux-info.c : Likewise.
3305         * c-convert.c : Likewise.
3306         * c-decl.c : Likewise.
3307         * c-errors.c : Likewise.
3308         * c-lang.c : Likewise.
3309         * c-lang.h : Likewise.
3310         * c-objc-common.c : Likewise.
3311         * c-parser.c : Likewise.
3312         * c-typeck.c : Likewise.
3314 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
3316         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3317         immediately clobber it.
3318         (c_write_global_declarations_1): Remove call to
3319         check_global_declaration_1.
3320         (c_write_global_declarations_2): Remove.
3321         (c_write_final_cleanups): Rename from c_write_global_declarations.
3322         Remove call to finalize_compilation_unit.
3323         Remove calls to debugging hooks.
3324         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3325         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3326         * c-tree.h: Remove c_write_global_declarations.
3328 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
3330         * c-array-notation.c: Adjust includes for restructured coretypes.h.
3331         * c-aux-info.c: Likewise.
3332         * c-convert.c: Likewise.
3333         * c-decl.c: Likewise.
3334         * c-errors.c: Likewise.
3335         * c-lang.c: Likewise.
3336         * c-objc-common.c: Likewise.
3337         * c-parser.c: Likewise.
3338         * c-typeck.c: Likewise.
3340 2015-06-04  Marek Polacek  <polacek@redhat.com>
3342         PR c/66341
3343         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3344         it is a lvalue.
3346 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3348         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3349         Warn for empty struct.
3350         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3352 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
3354         * c-decl.c (start_function): Call plugin before parsing.
3355         (finish_function): Call plugin after parsing.
3357 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3359         PR c/49551
3360         * c-decl.c (merge_decls): Merge DECL_COMMON.
3362 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
3364         * Make-lang.in (check_gcc_pallelize): Define.
3366 2015-05-22  Marek Polacek  <polacek@redhat.com>
3368         PR c/47043
3369         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3370         attributes.
3372 2015-05-21  Marek Polacek  <polacek@redhat.com>
3374         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3375         DECL_BUILT_IN.
3377 2015-05-20  Marek Polacek  <polacek@redhat.com>
3379         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3380         * c-typeck.c: Likewise.
3382 2015-05-19  Marek Polacek  <polacek@redhat.com>
3384         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3386 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
3388         PR middle-end/66199
3389         * c-parser.c (c_parser_omp_for_loop): Don't add
3390         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3391         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3392         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3393         constructs.
3395 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
3397         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3398         swaps.
3400 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3402         PR fortran/44054
3403         * c-objc-common.c (c_tree_printer): Replace locus pointer with
3404         accessor function.
3406 2015-05-14  Marek Polacek  <polacek@redhat.com>
3408         PR c/66066
3409         PR c/66127
3410         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3411         rather than with 0.
3413 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
3415         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3416         to add a call to warn_for_misleading_indentation.
3417         (c_parser_else_body): Likewise, adding param "else_loc".
3418         (c_parser_if_statement): Check for misleading indentation.
3419         (c_parser_while_statement): Likewise.
3420         (c_parser_for_statement): Likewise.
3422 2015-05-08  Marek Polacek  <polacek@redhat.com>
3424         PR c/64918
3425         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3426         (output_init_element): Likewise.
3428 2015-05-07  Marek Polacek  <polacek@redhat.com>
3430         PR c/65179
3431         * c-typeck.c (build_binary_op): Warn when left shifting a negative
3432         value.
3434 2015-04-30  Marek Polacek  <polacek@redhat.com>
3436         * c-typeck.c (set_init_label): Call error_at instead of error and
3437         pass LOC to it.
3439         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
3440         the type of a decl.
3442         * c-typeck.c (c_build_va_arg): Clarify the error message.
3444 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
3446         * c-parser.c (c_parser_oacc_enter_exit_data): Use
3447         OMP_STANDALONE_CLAUSES.
3449 2015-04-28  Marek Polacek  <polacek@redhat.com>
3451         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3453 2015-04-28  Marek Polacek  <polacek@redhat.com>
3455         PR c/65901
3456         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3458 2015-04-25  Marek Polacek  <polacek@redhat.com>
3460         PR c/52085
3461         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
3462         attribute.
3464 2015-04-23  Marek Polacek  <polacek@redhat.com>
3466         PR c/65345
3467         * c-decl.c (set_labels_context_r): New function.
3468         (store_parm_decls): Call it via walk_tree_without_duplicates.
3469         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3470         instead of create_tmp_var.  Build TARGET_EXPR instead of
3471         COMPOUND_EXPR.
3472         (build_atomic_assign): Use create_tmp_var_raw instead of
3473         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
3475 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
3477         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3478         (c_parser_omp_target_update): Add missed %> to error_at ().
3480 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
3482         PR target/55143
3483         * c-decl.c (c_default_pointer_mode): Remove definition.
3484         * c-tree.h (c_default_pointer_mode): Remove declaration.
3486 2015-03-27  Tobias Burnus  <burnus@net-b.de>
3488         PR c/65586
3489         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3490         error out.
3491         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3492         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3493         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3495 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
3497         * c-decl.c (c_decl_attributes): Also add "omp declare target"
3498         attribute for DECL_EXTERNAL VAR_DECLs.
3500 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
3502         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3503         argument.
3505 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
3507         PR c/65120
3508         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3509         before preparing arguments to warn_logical_not_parentheses.
3511 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
3513         PR c/65120
3514         * c-typeck.c (parser_build_binary_op): Don't warn for
3515         !!x == y or !b == y where b is _Bool.
3517 2015-03-09  Marek Polacek  <polacek@redhat.com>
3519         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3520         * c-decl.c (grokdeclarator): Likewise.
3521         * c-typeck.c (build_binary_op): Likewise.
3523 2015-02-27  Marek Polacek  <polacek@redhat.com>
3525         PR c/65228
3526         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3528 2015-02-14  Marek Polacek  <polacek@redhat.com>
3530         PR c/64768
3531         * c-decl.c (grokdeclarator): Set the range of a flexible array member
3532         declared through a typedef name.
3534 2015-02-13  Marek Polacek  <polacek@redhat.com>
3536         PR c/65050
3537         * c-decl.c (grokdeclarator): Print also the type when giving
3538         the error message about array's incomplete element type.
3540 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
3542         PR c/64824
3543         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3544         check in the POP macro.
3546 2015-02-09  Marek Polacek  <polacek@redhat.com>
3548         PR c/64856
3549         * c-typeck.c (process_init_element): Don't always wrap
3550         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3551         initializing a range of elements.
3553 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
3555         PR c/64824
3556         PR c/64868
3557         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3559 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
3561         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3562         processing enum declaration.
3564 2015-01-29  Marek Polacek  <polacek@redhat.com>
3566         PR c/64709
3567         * c-typeck.c (pop_init_level): If constructor_elements has
3568         exactly one element with integer_zerop value, set constructor_zeroinit
3569         to 1.  Remove braces around warning_init call.
3571 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
3573         PR c/64766
3574         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3575         of FUNCTION_DECLs with error_mark_node.
3577 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
3579         PR c/64778
3580         * c-typeck.c (convert_arguments): Return -1 if there are
3581         error_args, even if we've diagnosed too many arguments.
3583 2015-01-21  Richard Biener  <rguenther@suse.de>
3585         PR middle-end/64313
3586         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3587         for builtins the user declared correctly.
3589 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
3590             Bernd Schmidt  <bernds@codesourcery.com>
3591             Cesar Philippidis  <cesar@codesourcery.com>
3592             James Norris  <jnorris@codesourcery.com>
3593             Jakub Jelinek  <jakub@redhat.com>
3594             Ilmir Usmanov  <i.usmanov@samsung.com>
3596         * c-parser.c: Include "gomp-constants.h".
3597         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3598         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3599         Use OMP_CLAUSE_SET_MAP_KIND.
3600         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3601         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3602         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3603         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3604         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3605         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3606         "copyout", "create", "delete", "deviceptr", "gang", "host",
3607         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3608         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3609         "present_or_create", "pcreate", "seq", "self", "vector",
3610         "vector_length", "wait", "worker".
3611         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3612         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3613         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3614         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3615         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3616         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3617         (c_parser_oacc_data_clause_deviceptr)
3618         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3619         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3620         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3621         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3622         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3623         (c_parser_oacc_parallel, c_parser_oacc_update)
3624         (c_parser_oacc_wait): New functions.
3625         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3626         (c_finish_oacc_data): New prototypes.
3627         * c-typeck.c: Include "gomp-constants.h".
3628         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
3629         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
3630         OMP_CLAUSE_SET_MAP_KIND.
3631         (c_finish_oacc_parallel, c_finish_oacc_kernels)
3632         (c_finish_oacc_data): New functions.
3633         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3634         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3635         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3636         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3637         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3638         GOMP_MAP_FORCE_DEVICEPTR.
3640 2015-01-09  Michael Collison  <michael.collison@linaro.org>
3642         * c-array-notation.c: Include hash-set.h, machmode.h,
3643         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3644         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3645         * c-aux-info.c: Ditto.
3646         * c-convert.c: Ditto.
3647         * c-decl.c: Ditto.
3648         * c-errors.c: Ditto.
3649         * c-lang.c: Dittoxs.
3650         * c-objc-common.c: Ditto.
3651         * c-parser.c: Ditto.
3652         * c-typeck.c: Include hash-set.h, machmode.h,
3653         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3654         fold-const.h, wide-int.h, inchash.h, real.h and
3655         fixed-value.h due to flattening of tree.h.
3657 2015-01-07  Marek Polacek  <polacek@redhat.com>
3659         PR c/64417
3660         * c-typeck.c (process_init_element): Disallow initialization of
3661         a flexible array member with a string constant if the structure
3662         is in an array.
3664 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
3666         PR sanitizer/64344
3667         * c-typeck.c (convert_for_assignment, c_finish_return): For
3668         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3669         types also set in_late_binary_op around convert call.
3670         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3671         to integral type casts, if not in_late_binary_op, pass c_fully_fold
3672         result on expr as last argument to ubsan_instrument_float_cast,
3673         if in_late_binary_op, don't use c_save_expr but save_expr.
3675         Update copyright years.
3677 2015-01-05  Marek Polacek  <polacek@redhat.com>
3679         PR c/64423
3680         * c-typeck.c (build_array_ref): Pass loc down to
3681         warn_array_subscript_with_type_char.
3683 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
3685         * c-typeck.c: New behavious for pointers to arrays with qualifiers
3686         (common-pointer-type): For pointers to arrays take qualifiers from
3687         element type.
3688         (build_conditional_expr): Add warnings for lost qualifiers.
3689         (comp-target-types): Allow pointers to arrays with different qualifiers.
3690         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3691         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3692         to PEDWARN_FOR_QUALIFIERS.
3694 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
3696         PR sanitizer/64289
3697         * c-convert.c: Include ubsan.h.
3698         (convert): For real -> integral casts and
3699         -fsanitize=float-cast-overflow don't call convert_to_integer, but
3700         instead instrument the float cast directly.
3702 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
3704         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3705         c_finish_stmt_expr): Remove NULL last argument from
3706         create_tmp_var_raw and create_tmp_var calls.
3707         * c-array-notation.c (fix_builtin_array_notation_fn,
3708         build_array_notation_expr, fix_conditional_array_notations_1,
3709         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3711 2014-11-28  Marek Polacek  <polacek@redhat.com>
3713         PR c/63862
3714         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3715         convert the right operand to integer type.
3717 2014-11-25  Marek Polacek  <polacek@redhat.com>
3719         PR c/63877
3720         * c-decl.c (start_function): Disable -Wmissing-declarations warning
3721         for inline functions.
3723 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
3725         PR target/63764
3726         * c-typeck.c (build_array_ref): Adjust
3727         convert_vector_to_pointer_for_subscript caller.  If it returns true,
3728         call non_lvalue_loc on the result.
3730 2014-11-11  Richard Biener  <rguenther@suse.de>
3732         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3733         to true.
3735 2014-11-10  Andi Kleen  <ak@linux.intel.com>
3737         PR c/60804
3738         * c-parser.c (c_parser_statement_after_labels): Call
3739         check_no_cilk.
3740         (c_parser_if_statement): Dito.
3741         (c_parser_switch_statement): Dito.
3742         (c_parser_while_statement): Dito.
3743         (c_parser_do_statement): Dito.
3744         (c_parser_for_statement): Dito.
3745         * c-typeck.c (c_finish_loop): Dito.
3747 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
3749         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3750         OPT_Wshift_count_overflow in the warnings.
3752 2014-10-30  Marek Polacek  <polacek@redhat.com>
3754         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3755         print the stripped version as well, if they're not the same.
3757 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
3759         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3760         machine_mode.
3762 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
3764         * c-decl.c: Adjust include files.
3765         * c-parser.c: Ditto.
3767 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
3768             Tom Tromey  <tromey@redhat.com>
3770         * c-tree.h (enum c_oracle_request): New.
3771         (c_binding_oracle_function): New typedef.
3772         (c_binding_oracle, c_pushtag, c_bind): Declare.
3773         * c-decl.c (c_binding_oracle): New global.
3774         (I_SYMBOL_CHECKED): New macro.
3775         (i_symbol_binding): New function.
3776         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3777         (I_TAG_CHECKED): New macro.
3778         (i_tag_binding): New function.
3779         (I_TAG_BINDING, I_TAG_DECL): Redefine.
3780         (I_LABEL_CHECKED): New macro.
3781         (i_label_binding): New function.
3782         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3783         (c_print_identifier): Save and restore c_binding_oracle.
3784         (c_pushtag, c_bind): New functions.
3786 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
3788         * c-typeck.c: Adjust include files.
3790 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3792         PR c++/53061
3793         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3794         initialization here...
3795         (c_initialize_diagnostics): ... but here. Set defaults after
3796         building pretty-printer.
3798 2014-10-23  Marek Polacek  <polacek@redhat.com>
3800         PR c/63626
3801         * c-decl.c (pop_scope): Don't print warning in external_scope.
3803 2014-10-19  Marek Polacek  <polacek@redhat.com>
3805         PR c/63567
3806         * c-typeck.c (output_init_element): Allow initializing objects with
3807         static storage duration with compound literals even in C99 and add
3808         pedwarn for it.
3810 2014-10-17  Marek Polacek  <polacek@redhat.com>
3812         PR c/63567
3813         * c-typeck.c (digest_init): Allow initializing objects with static
3814         storage duration with compound literals even in C99 and add pedwarn
3815         for it.
3817 2014-10-17  Marek Polacek  <polacek@redhat.com>
3819         PR c/63543
3820         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3821         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3822         error multiple times.  Print the type.
3824 2014-10-17  Marek Polacek  <polacek@redhat.com>
3826         PR c/63549
3827         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3828         type.
3830 2014-10-17  Marek Polacek  <polacek@redhat.com>
3832         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3833         (start_function): Use OPT_Wimplicit_int instead of 0.
3834         (store_parm_decls_oldstyle): Likewise.
3836 2014-10-17  Alan Modra  <amodra@gmail.com>
3838         PR middle-end/61848
3839         * c-decl.c (merge_decls): Don't merge section name or tls model
3840         to newdecl symtab node, instead merge to olddecl.  Override
3841         existing olddecl section name.  Set tls_model for all thread-local
3842         vars, not just OMP thread-private ones.  Remove incorrect comment.
3844 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
3846         * c-decl.c: Adjust include files.
3848 2014-10-14  DJ Delorie  <dj@redhat.com>
3850         * c-parser.c (c_parse_init): Add RID entries for each __intN.
3851         (c_token_starts_typename): Check all __intN, not just __int128.
3852         (c_token_starts_declspecs): Likewise.
3853         (c_parser_declspecs): Likewise.
3854         (c_parser_attribute_any_word): Likewise.
3855         (c_parser_objc_selector): Likewise.
3856         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3857         (struct c_declspecs): Add int_n_idx field to record *which* __intN
3858         is specified.
3859         * c-decl.c (declspecs_add_type): Check for all __intN, not just
3860         __int128.
3861         (finish_declspecs): Likewise.
3863 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
3865         * c-parser.c (c_parser_all_labels): New function to replace
3866         the duplicate code.
3867         (c_parser_statement): Call the new function.
3869 2014-10-09  Marek Polacek  <polacek@redhat.com>
3871         PR c/63480
3872         * c-typeck.c (pop_init_level): Don't warn about initializing
3873         with { }.
3875 2014-10-07  Marek Polacek  <polacek@redhat.com>
3877         PR c/59717
3878         * c-decl.c (header_for_builtin_fn): New function.
3879         (implicitly_declare): Suggest which header to include.
3881 2014-10-07  Marek Polacek  <polacek@redhat.com>
3883         * c-convert.c (convert): Use error_operand_p.
3884         * c-typeck.c (require_complete_type): Likewise.
3885         (really_atomic_lvalue): Likewise.
3886         (digest_init): Likewise.
3887         (handle_omp_array_sections_1): Likewise.
3889 2014-10-03  Marek Polacek  <polacek@redhat.com>
3891         PR c/63453
3892         * c-decl.c (pop_scope): Don't warn about "inline function declared
3893         but never defined" for functions marked with gnu_inline attribute.
3895 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
3897         PR c++/63249
3898         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3899         on low_bound and length.
3901 2014-09-24  Marek Polacek  <polacek@redhat.com>
3903         PR c/61405
3904         PR c/53874
3905         * c-parser.c: Don't define CPP_KEYWORD.
3906         (c_parser_switch_statement): Pass original type to c_finish_case.
3907         * c-tree.h (c_finish_case): Update declaration.
3908         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
3909         conditionally to c_do_switch_warnings.
3911 2014-09-03  Marek Polacek  <polacek@redhat.com>
3913         PR c/62024
3914         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3915         conversions.
3917 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
3918             Balaji V. Iyer  <balaji.v.iyer@intel.com>
3919             Igor Zamyatin  <igor.zamyatin@intel.com>
3921         * c-parser.c (c_parser_cilk_for): New function.
3922         (c_parser_cilk_grainsize): Likewise.
3923         (c_get_temp_regvar): Likewise.
3924         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3925         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3926         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3927         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3928         case.
3930 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
3932         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3933         with using HOST_WIDE_INT without truncation to 'int'
3935 2014-08-22  Marek Polacek  <polacek@redhat.com>
3937         PR c++/62199
3938         * c-typeck.c (parser_build_binary_op): Adjust call to
3939         warn_logical_not_parentheses.
3941 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
3943         PR other/62008
3944         * c-parser.c (c_parser_array_notation): Check for correct
3945         type of an array added.
3947 2014-08-19  Marek Polacek  <polacek@redhat.com>
3949         PR c++/62153
3950         * c-typeck.c (build_binary_op): If either operand of a comparison
3951         is a boolean expression, call maybe_warn_bool_compare.
3953 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
3955         PR c/45584
3956         * c-typeck.c (build_c_cast): Do a conversion even when the
3957         TYPE_MAIN_VARIANTs are the same.
3959 2014-08-19  Marek Polacek  <polacek@redhat.com>
3961         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3962         pedwarn_c99 instead of pedwarn.
3963         (grokfield): Likewise.
3964         (warn_defaults_to): New function.
3965         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3966         Unconditionally call pedwarn_c99 instead of pedwarn.
3967         (start_function): Call warn_defaults_to instead of pedwarn_c99.
3968         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3969         check flag_isoc11 before.
3970         * c-errors.c (pedwarn_c99): Change the return type to bool.
3971         Handle -Wc99-c11-compat.
3972         * c-parser.c (disable_extension_diagnostics): Handle
3973         warn_c99_c11_compat.
3974         (restore_extension_diagnostics): Likewise.
3975         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3976         instead of pedwarn, don't check flag_isoc11 before.
3977         (c_parser_declspecs): Likewise.
3978         (c_parser_alignas_specifier): Likewise.
3979         (c_parser_alignof_expression): Likewise.
3980         (c_parser_generic_selection): Likewise.
3981         * c-tree.h (pedwarn_c99): Update declaration.
3982         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3983         of pedwarn_c99.
3985 2014-08-19  Marek Polacek  <polacek@redhat.com>
3987         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3988         to pedwarn_c90.
3989         * c-errors.c: Include "opts.h".
3990         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3991         * c-parser.c (disable_extension_diagnostics): Handle negative value
3992         of warn_c90_c99_compat, too.
3993         (restore_extension_diagnostics): Likewise.
3994         (c_parser_compound_statement_nostart): Pass
3995         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3997 2014-08-12  Marek Polacek  <polacek@redhat.com>
3999         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4000         Add pedwarn.
4001         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4002         Likewise.
4003         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4005 2014-08-10  Marek Polacek  <polacek@redhat.com>
4007         PR c/51849
4008         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4009         Call pedwarn_c90 instead of pedwarn.
4010         (check_bitfield_type_and_width): Likewise.
4011         (declspecs_add_qual): Likewise.
4012         (declspecs_add_type): Likewise.
4013         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4014         Adjust to only call pedwarn_c90.
4015         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
4016         pedwarn_c90 instead of pedwarn.
4017         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4018         * c-parser.c (disable_extension_diagnostics): Handle
4019         warn_c90_c99_compat.
4020         (restore_extension_diagnostics): Likewise.
4021         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
4022         pedwarn_c90 instead of pedwarn.
4023         (c_parser_initelt): Likewise.
4024         (c_parser_postfix_expression): Likewise.
4025         (c_parser_postfix_expression_after_paren_type): Likewise.
4026         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4027         * c-tree.h: Fix formatting.
4028         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
4029         pedwarn_c90 instead of pedwarn.
4031 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
4033         * c-typeck.c: Remove include of pointer-set.h.
4035 2014-08-07  Marek Polacek  <polacek@redhat.com>
4037         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4039 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
4041         * c-typeck.c: Use hash_map instead of pointer_map.
4043 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
4045         * c-decl.c: Use hash_set instead of pointer_set.
4047 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
4049         PR middle-end/61455
4050         * c-array-notation.c (expand_array_notations): Handling
4051         of DECL_EXPR added.
4053 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
4055         PR c++/60517
4056         * c-typeck.c (c_finish_return): Return 0 instead of the address of
4057         a local variable.
4059 2014-07-30  Tom Tromey  <tromey@redhat.com>
4061         * c-typeck.c (struct constructor_stack) <designator_depth>: New
4062         field.
4063         (really_start_incremental_init, push_init_level): Initialize
4064         designator_depth.
4065         (pop_init_level): Set global designator_depth.
4066         (process_init_element): Check for designated_init attribute.
4068 2014-07-20  Marek Polacek  <polacek@redhat.com>
4070         PR c/61852
4071         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
4072         (implicitly_declare): Pass location to implicit_decl_warning.
4074 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
4076         PR middle-end/61294
4077         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4078         If non-NULL, call c_parser_check_literal_zero.
4079         (c_parser_check_literal_zero): New function.
4080         (c_parser_postfix_expression_after_primary): Adjust
4081         c_parser_expr_list caller, handle -Wmemset-transposed-args.
4083 2014-07-06  Marek Polacek  <polacek@redhat.com>
4085         PR c/6940
4086         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4087         * c-tree.h (C_ARRAY_PARAMETER): Define.
4088         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4089         function parameter.
4091 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
4092             Chen Gang  <gang.chen.5i5j@gmail.com>
4094         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4095         releasing symbol.
4097 2014-07-01  Marek Polacek  <polacek@redhat.com>
4099         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4100         instead of 0 to WARN_FOR_ASSIGNMENT.
4102 2014-07-01  Marek Polacek  <polacek@redhat.com>
4104         PR c/58286
4105         * c-typeck.c (convert_for_assignment): Pass
4106         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4108 2014-06-30  Marek Polacek  <polacek@redhat.com>
4110         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4111         has no_sanitize_undefined attribute.
4113 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
4115         PR middle-end/57541
4116         * c-array-notation.c (fix_builtin_array_notation_fn):
4117         Check for 0 arguments in builtin call. Check that bultin argument is
4118         correct.
4119         * c-parser.c (c_parser_array_notation): Check for incorrect initial
4120         index.
4122 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4124         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4125         qualifiers in __auto_type for atomic types.
4126         (c_parser_typeof_specifier): Discard all type qualifiers in
4127         __typeof__ for atomic types.
4129 2014-06-25  Marek Polacek  <polacek@redhat.com>
4131         PR c/61162
4132         * c-parser.c (c_parser_statement_after_labels): Pass the location of
4133         the return expression to c_finish_return.
4135 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
4137         * c-typeck.c (c_finish_omp_clauses): Make sure
4138         OMP_CLAUSE_LINEAR_STEP has correct type.
4140 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
4142         * c-decl.c: Adjust.
4144 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
4146         * c-parser.c (c_parser_omp_for_loop): For
4147         #pragma omp parallel for simd move lastprivate clause from parallel
4148         to for rather than simd.
4150 2014-06-23  Marek Polacek  <polacek@redhat.com>
4152         * c-typeck.c (parser_build_binary_op): Don't call
4153         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4155 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
4157         * c-parser.c (c_parser_omp_threadprivate): Likewise.
4158         * c-decl.c (merge_decls): Likewise.
4160 2014-06-09  Marek Polacek  <polacek@redhat.com>
4162         PR c/36446
4163         * c-typeck.c (error_init): Call inform instead of error_at.
4164         (pedwarn_init): Call inform instead of pedwarn.
4165         (warning_init): Call inform instead of warning_at.
4167 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
4169         * c-decl.c (merge_decls): Use set_decl_section_name.
4170         (duplicate_decls): Remove node if it exists.
4172 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
4174         PR c/53119
4175         * c-typeck.c (push_init_level, process_init_element,
4176         pop_init_level): Correct check for zero initialization, move
4177         missing brace warning to respect zero initialization.
4179 2014-06-05  Marek Polacek  <polacek@redhat.com>
4181         PR c/56724
4182         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4184 2014-06-05  Marek Polacek  <polacek@redhat.com>
4186         PR c/49706
4187         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4188         on the left hand side operand of a comparison. 
4190 2014-06-05  Marek Polacek  <polacek@redhat.com>
4192         PR c/48062
4193         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4194         Print note only if the warning was printed.
4196 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
4198         PR c/58942
4199         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4200         with a pointer.
4202 2014-06-03  Marek Polacek  <polacek@redhat.com>
4204         PR c/60439
4205         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4206         c_start_case.
4207         * c-tree.h (c_start_case): Update.
4208         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
4209         switch condition has boolean value.
4211 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
4213         * c-decl.c: Include builtins.h.
4214         * c-parser.c: Likewise.
4216 2014-05-27  Marek Polacek  <polacek@redhat.com>
4218         PR c/56724
4219         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
4220         error and warning calls to error_at and warning_at.  Pass location of
4221         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
4222         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4223         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
4225 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
4227         PR c/61191
4228         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4229         function parameters.
4231 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
4233         * c-decl.c (merge_decls): Preserve symtab node pointers.
4234         (duplicate_decls): Free new decl.
4236 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
4238         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4239         initialization.
4241         * c-parser.c (c_parser_omp_target): Return bool values.
4243 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
4245         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4246         num_teams_loc variable to num_thread_limit_loc.
4248 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
4250         * c-array-notation.c (expand_array_notations): Use void_node
4251         instead of void_zero_node.
4253 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
4255         * c-decl.c (finish_struct): Adjust.
4256         (finish_enum): Likewise.
4257         (bind): Adjust.
4258         (record_inline_static): Likewise.
4259         (push_scope): Likewise.
4260         (make_label): Likewise.
4261         (lookup_label_for_goto): Likewise.
4262         (finish_struct): Likewise.
4263         (finish_enum): Likewise.
4264         (store_parm_decls): Likewise.
4265         (c_push_function_context): Likewise.
4266         * c-lang.h: Remove usage of variable_size gty attribute.
4267         * c-parser.c (c_parse_init): Adjust.
4268         (c_parse_file): Likewise.
4270 2014-05-13  Marek Polacek  <polacek@redhat.com>
4272         PR c/61162
4273         * c-typeck.c (convert_for_assignment): Pass location to
4274         WARN_FOR_ASSIGNMENT instead of input_location.
4276 2014-05-10  Marek Polacek  <polacek@redhat.com>
4278         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4279         maybe_warn_string_init.
4280         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4281         maybe_warn_string_init.
4282         * c-tree.h (maybe_warn_string_init): Update declaration.
4283         * c-typeck.c (maybe_warn_string_init): Add location parameter.
4284         Call pedwarn_init with loc instead of with input_location.
4285         (digest_init): Pass init_loc to maybe_warn_string_init.
4286         (pop_init_level): Call pedwarn_init with loc instead of with
4287         input_location.
4288         (set_init_index): Likewise.
4289         (process_init_element): Likewise.
4291 2014-05-09  Marek Polacek  <polacek@redhat.com>
4293         PR c/61096
4294         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4295         (c_parser_initelt): Pass location to set_init_label.  Pass array index
4296         location to set_init_index.
4297         * c-tree.h (push_init_level): Update declaration.
4298         (pop_init_level): Likewise.
4299         (set_init_index): Likewise.
4300         (set_init_label): Likewise.
4301         * c-typeck.c (error_init): Add location parameter.  Call error_at
4302         instead of error.
4303         (digest_init): Pass init_loc to error_init.
4304         (really_start_incremental_init):
4305         (push_init_level): Add location parameter.  Pass loc to pop_init_level
4306         and error_init.
4307         (pop_init_level): Likewise.
4308         (set_designator): Add location parameter.  Pass loc to pop_init_level,
4309         push_init_level, and error_init.
4310         (set_init_index): Add location parameter.  Pass loc to error_init and
4311         set_designator.
4312         (set_init_label): Likewise.
4313         (output_init_element): Pass loc to error_init.
4314         (process_init_element): Pass loc to error_init, pop_init_level,
4315         pedwarn_init, and push_init_level.
4317 2014-05-09  Marek Polacek  <polacek@redhat.com>
4319         PR c/50459
4320         * c-parser.c (c_parser_attributes): Parse the arguments as an
4321         expression-list if the attribute takes identifier.
4323 2014-05-08  Marek Polacek  <polacek@redhat.com>
4325         PR c/61053
4326         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4327         TYPE_ALIGN_UNIT.
4329 2014-05-08  Marek Polacek  <polacek@redhat.com>
4331         PR c/61077
4332         * c-decl.c (start_function): Warn for _Atomic-qualified return type
4333         of main.
4335 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
4336             Mike Stump  <mikestump@comcast.net>
4337             Richard Sandiford  <rdsandiford@googlemail.com>
4339         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4340         (finish_enum): Use wide-int interfaces.
4341         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4342         * c-typeck.c (build_c_cast): Likewise.
4343         (set_nonincremental_init_from_string): Likewise.
4344         (c_tree_equal): Likewise.
4346 2014-05-02  Marek Polacek  <polacek@redhat.com>
4348         PR c/25801
4349         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
4350         Return size_one_node when the type is not complete.
4351         (pointer_diff): Remove comment.
4352         (build_unary_op): Improve error messages.
4354 2014-05-02  Marek Polacek  <polacek@redhat.com>
4356         * c-typeck.c (c_finish_return): Separate warning_at calls.
4358 2014-05-02  Marek Polacek  <polacek@redhat.com>
4360         * c-tree.h (error_init): Remove declaration.
4361         (pedwarn_init): Likewise.
4362         * c-typeck.c (error_init): Make static and move above.
4363         (pedwarn_init): Likewise.
4364         (warning_init): Move above.
4365         (maybe_warn_string_init): Likewise.
4367 2014-05-01  Jeff Law  <law@redhat.com>
4369         Revert:
4371         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4372         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4373         avoid goto.
4375 2014-05-02  Marek Polacek  <polacek@redhat.com>
4377         PR c/60784
4378         * c-typeck.c (push_init_level): Set constructor_designated to
4379         p->designated for structures.
4381 2014-05-01  Marek Polacek  <polacek@redhat.com>
4383         PR c/60915
4384         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4385         function-definition has an attribute after the declarator.
4387 2014-05-01  Marek Polacek  <polacek@redhat.com>
4389         PR c/60257
4390         * c-typeck.c (warning_init): Add location_t parameter.  Call
4391         warning_at instead of warning.
4392         (push_init_level): Pass input_location to warning_init.
4393         (add_pending_init): Add location_t parameter.  Pass loc to
4394         warning_init.
4395         (set_nonincremental_init): Pass input_location to add_pending_init.
4396         (set_nonincremental_init_from_string): Likewise.
4397         (output_init_element): Pass loc to warning_init and to
4398         add_pending_init.
4400 2014-05-01  Marek Polacek  <polacek@redhat.com>
4402         PR c/43395
4403         * c-typeck.c (c_finish_return): Distinguish between label and variable
4404         when warning about returning local address.
4406 2014-05-01  Marek Polacek  <polacek@redhat.com>
4408         PR c/29467
4409         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4410         in C89 mode.
4412 2014-05-01  Marek Polacek  <polacek@redhat.com>
4414         PR c/43245
4415         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4416         instead of 0 to WARN_FOR_QUALIFIERS.
4418 2014-05-01  Marek Polacek  <polacek@redhat.com>
4420         PR c/56989
4421         * c-typeck.c (default_conversion): Use better location for
4422         error call.
4424 2014-04-30  Marek Polacek  <polacek@redhat.com>
4426         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4427         also when SANITIZE_FLOAT_DIVIDE is on.
4429 2014-04-30  Marek Polacek  <polacek@redhat.com>
4431         PR c/60139
4432         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4433         and pedwarn_init.  Use loc insted of input_location.
4435 2014-04-30  Marek Polacek  <polacek@redhat.com>
4437         PR c/60351
4438         * c-typeck.c (build_binary_op): Use location when warning about
4439         shift count.
4441 2014-04-25  Marek Polacek  <polacek@redhat.com>
4443         PR c/18079
4444         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4445         always_inline/noinline and hot/cold attributes.
4447 2014-04-25  Marek Polacek  <polacek@redhat.com>
4449         PR c/60114
4450         * c-parser.c (c_parser_initelt): Pass input_location to
4451         process_init_element.
4452         (c_parser_initval): Pass loc to process_init_element.
4453         * c-tree.h (process_init_element): Adjust declaration.
4454         * c-typeck.c (push_init_level): Pass input_location to
4455         process_init_element.
4456         (pop_init_level): Likewise.
4457         (set_designator): Likewise.
4458         (output_init_element): Add location_t parameter.  Pass loc to
4459         digest_init.
4460         (output_pending_init_elements): Pass input_location to
4461         output_init_element.
4462         (process_init_element): Add location_t parameter.  Pass loc to
4463         output_init_element.
4465 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
4467         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4468         atomic-clause, allow comma in between atomic-clause and
4469         seq_cst.
4471 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
4473         PR c/59073
4474         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4475         fails, don't set OM_PARALLEL_COMBINED and return NULL.
4477 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
4479         PR middle-end/60469
4480         * c-array-notation.c (fix_builtin_array_notation_fn): Use
4481         create_tmp_var instead build_decl for creating temps.
4482         (build_array_notation_expr): Likewise.
4483         (fix_conditional_array_notations_1): Likewise.
4484         (fix_array_notation_expr): Likewise.
4485         (fix_array_notation_call_expr): Likewise.
4487 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
4489         PR c++/60689
4490         * c-tree.h (c_build_function_call_vec): New prototype.
4491         * c-typeck.c (build_function_call_vec): Don't call
4492         resolve_overloaded_builtin here.
4493         (c_build_function_call_vec): New wrapper function around
4494         build_function_call_vec.  Call resolve_overloaded_builtin here.
4495         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4496         Call c_build_function_call_vec instead of build_function_call_vec.
4497         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4498         * c-decl.c (finish_decl): Likewise.
4500 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4502         PR c/55383
4503         * c-typeck.c: Use correct format string in cast-qual warning
4505 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
4507         * c-decl.c (c_decl_attributes): Use
4508         lang_hooks.types.omp_mappable_type.
4509         * c-typeck.c (c_finish_omp_clauses): Likewise.
4511 2014-03-06  Marek Polacek  <polacek@redhat.com>
4513         PR c/60197
4514         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4515         of checking tree code.
4517 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4519         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4520         (c_parser_parameter_declaration): Likewise.
4522 2014-02-19  Marek Polacek  <polacek@redhat.com>
4524         PR c/60195
4525         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4526         Call mark_exp_read on exp.value.
4527         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
4528         TREE_ADDRESSABLE on old instead of val.
4529         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4531 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
4533         * c-parser.c (c_parser_get_builtin_args): Replace calls to
4534         C_EXPR_APPEND by vec_safe_push.
4535         * c-tree.h (C_EXPR_APPEND): Remove.
4537 2014-01-31  Marek Polacek  <polacek@redhat.com>
4539         PR c/59963
4540         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4541         build_function_call_vec.
4542         (build_function_call): Likewise.
4543         (build_atomic_assign): Likewise.
4544         (build_function_call_vec): Add arg_loc parameter.  Use it.
4545         (convert_arguments): Likewise.
4546         (convert_for_assignment): Rename rhs_loc to expr_loc.
4547         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4548         (c_parser_objc_keywordexpr): Likewise.
4549         (c_parser_postfix_expression_after_primary): Call
4550         build_function_call_vec with expr_loc rather than op_loc.
4551         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
4552         build_function_call_vec.
4553         (c_parser_expr_list): Add locations parameter.  Fill it with locations
4554         of function arguments.
4555         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4557 2014-01-30  Marek Polacek  <polacek@redhat.com>
4559         PR c/59940
4560         * c-typeck.c (build_function_call_vec): Use loc parameter.
4561         (convert_arguments): Add location parameter.  Use it.
4562         (ep_convert_and_check): Likewise.
4563         (build_atomic_assign): Adjust convert_for_assignment call.
4564         (build_modify_expr): Likewise.
4565         (digest_init): Likewise.
4566         (c_finish_return): Likewise.
4567         (build_conditional_expr): Adjust ep_convert_and_check calls.
4568         (convert_for_assignment): Add rhs_loc parameter.  Use it.
4569         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4570         calls.
4572 2014-01-30  Richard Biener  <rguenther@suse.de>
4574         PR c/59905
4575         * c-typeck.c (build_function_call_vec): Do not replace calls
4576         to a function via an incompatible type with a runtime abort.
4578 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4580         * c-parser.c (c_parser_declaration_or_fndef): Replaced
4581         flag_enable_cilkplus with flag_cilkplus.
4582         (c_parser_direct_declarator_inner): Likewise.
4583         (c_parser_attribute_any_word): Likewise.
4584         (c_parser_attributes): Likewise.
4585         (c_parser_compound_statement): Likewise.
4586         (c_parser_statement_after_labels): Likewise.
4587         (c_parser_if_statement): Likewise.
4588         (c_parser_switch_statement): Likewise.
4589         (c_parser_do_statement): Likewise.
4590         (c_parser_for_statement): Likewise.
4591         (c_parser_unary_expression): Likewise.
4592         (c_parser_postfix_expression): Likewise.
4593         (c_parser_postfix_expression_after_primary): Likewise.
4594         (c_parser_postfix_expression_after_primary): Likewise.
4595         (c_parser_omp_clause_name): Likewise.
4596         (c_finish_omp_declare_simd): Likewise.
4597         (c_parser_cilk_verify_simd): Likewise.
4598         * c-typeck.c (build_array_ref): Likewise.
4599         (build_function_call_vec): Likewise.
4600         (convert_arguments): Likewise.
4601         (build_compound_expr): Likewise.
4602         (c_finish_return): Likewise.
4603         (c_finish_if_stmt): Likewise.
4604         (c_finish_loop): Likewise.
4605         (build_binary_op): Likewise.
4607 2014-01-23  Marek Polacek  <polacek@redhat.com>
4609         PR c/59846
4610         * c-typeck.c (parser_build_binary_op): Use location instead of
4611         input_location.
4612         (build_binary_op): Pass location to shorten_compare.
4614 2014-01-23  Marek Polacek  <polacek@redhat.com>
4616         PR c/58346
4617         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4618         an empty aggregate.
4620 2014-01-23  Marek Polacek  <polacek@redhat.com>
4622         PR c/59871
4623         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4624         of a comma expression.
4625         (emit_side_effect_warnings): Likewise.
4627 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4629         PR c/59825
4630         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4631         function to use walk_tree and moved a lot of its functionality to
4632         expand_array_notations.
4633         (expand_array_notations): New function.
4635 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4637         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4638         attribute an attribute without value.
4640 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
4642         PR middle-end/58809
4643         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4644         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4646 2014-01-22  Marek Polacek  <polacek@redhat.com>
4648         PR c/59891
4649         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4650         of remove_c_maybe_const_expr on op1 and op2.
4652 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
4654         PR c/58943
4655         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4656         effects, preevaluate rhs using SAVE_EXPR first.
4658 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4660         PR c++/59631
4661         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4662         statements with if-elseif statements.
4664 2014-01-06  Marek Polacek  <polacek@redhat.com>
4666         PR c/57773
4667         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4668         defined bit-field types only in ISO C.
4670 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4672         Update copyright years
4674 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
4676         * c-array-notation.c: Use the standard form for the copyright notice.
4678 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4680         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4681         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4682         field in parser is not empty.  If not-empty, call the function
4683         c_parser_finish_omp_declare_simd.
4684         (c_parser_cilk_clause_vectorlength): Modified function to be shared
4685         between SIMD-enabled functions and #pragma simd.  Added new parameter.
4686         (c_parser_cilk_all_clauses): Modified the usage of the function
4687         c_parser_cilk_clause_vectorlength as mentioned above.
4688         (c_parser_cilk_simd_fn_vector_attrs): New function.
4689         (c_finish_cilk_simd_fn_tokens): Likewise.
4690         (is_cilkplus_vector_p): Likewise.
4691         (c_parser_omp_clause_name): Added checking for "vectorlength,"
4692         "nomask," and "mask" strings in clause name.
4693         (c_parser_omp_all_clauses): Added 3 new case statements:
4694         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4695         PRAGMA_CILK_CLAUSE_NOMASK.
4696         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
4697         check for vector attribute and if so call the function
4698         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
4699         called the function c_finish_cilk_simd_fn_tokens.
4700         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4701         parser field is non-empty.  If so, parse them as you would parse
4702         the omp declare simd pragma.
4703         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4704         Added a check when step is a parameter and flag it as error.
4705         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4706         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4707         pragma_omp_clause.
4709 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
4711         * c-parser.c (c_parser_omp_parallel): Fix description.
4713 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4715         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4716         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4717         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4718         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4720 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
4722         PR c/52023
4723         * c-parser.c (c_parser_alignas_specifier): Use
4724         c_sizeof_or_alignof_type instead of c_alignof.
4725         (c_parser_alignof_expression): Likewise, with min_alignof
4726         parameter depending on alignof spelling used.
4728 2013-12-04  Marek Polacek  <polacek@redhat.com>
4730         PR c/54113
4731         * c-decl.c (start_function): Don't warn for missing prototype for
4732         inline functions.
4734 2013-12-03  Marek Polacek  <polacek@redhat.com>
4736         PR c/59351
4737         * c-decl.c (build_compound_literal): Allow compound literals with
4738         empty initial value.
4740 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
4742         PR c/58235
4743         * c-typeck.c (build_modify_expr): Diagnose assignment to
4744         expression with array type.
4746 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
4748         PR c/42262
4749         * c-typeck.c (process_init_element): Do not treat a string as
4750         initializing a whole array when used with a designator for an
4751         individual element.
4753 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
4755         PR c/57574
4756         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4757         an inline function following a static declaration.
4759 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
4761         PR c/59310
4762         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4763         to p_name before calling c_parser_omp_teams instead of after.
4764         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4765         argument.  Remove unused p_name variable.
4767 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
4768             Jakub Jelinek  <jakub@redhat.com>
4770         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4771         external_scope is NULL.
4773 2013-11-27  Tom de Vries  <tom@codesourcery.com>
4774             Marc Glisse  <marc.glisse@inria.fr>
4776         PR c++/59032
4777         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4779 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
4781         * c-typeck.c: Add required include files from gimple.h.
4783 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
4785         * c-decl.c (define_label, shadow_tag_warned)
4786         (check_bitfield_type_and_width, grokdeclarator, grokparms,
4787         store_parm_decls_newstyle, store_parm_decls_oldstyle)
4788         (declspecs_add_type): Remove use of in_system_header macro.
4789         * c-parser.c (c_parser_unary_expression): Likewise.
4790         * c-typeck.c (store_init_value, process_init_element)
4791         (c_start_case): Likewise.
4793         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4794         macro.
4796         * c-parser.c (c_parser_set_source_position_from_token): Remove
4797         reference to in_system_header from comment.
4799 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4801         * c-decl.c (grokdeclarator): Update comment to refer to
4802         tree_to_[su]hwi rather than tree_low_cst.
4804 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4806         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4807         tree_to_uhwi throughout.
4809 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4811         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4812         throughout.
4814 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
4816         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4817         throughout.
4819 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
4821         * c-parser.c (c_parser_cilk_simd): New.
4822         (c_parser_cilk_verify_simd): New.
4823         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4824         (c_parser_omp_for_loop): Add case for NE_EXPR.
4825         Set c_break_label for CILK_SIMD.
4826         (c_parser_cilk_clause_vectorlength): New.
4827         (c_parser_cilk_clause_linear): New.
4828         (c_parser_cilk_clause_name): New.
4829         (c_parser_cilk_all_clauses): New.
4830         * c-typeck.c (build_unary_op): Pass location argument to
4831         readonly_error.
4832         (build_modify_expr): Same.
4833         (build_asm_expr): Same.
4834         (c_finish_bc_stmt): Error on break/continue in loops.
4836 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
4838         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4840 2013-11-14  Diego Novillo  <dnovillo@google.com>
4842         * c-decl.c: Include print-tree.h.
4843         Include stor-layout.h.
4844         Include varasm.h.
4845         Include attribs.h.
4846         Include stringpool.h.
4847         * c-lang.c: Include fold-const.h.
4848         * c-parser.c: Include stringpool.h.
4849         Include attribs.h.
4850         Include stor-layout.h.
4851         Include varasm.h.
4852         Include trans-mem.h.
4853         * c-typeck.c: Include stor-layout.h.
4854         Include trans-mem.h.
4855         Include varasm.h.
4856         Include stmt.h.
4858 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
4860         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4861         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4862         __auto_type.
4863         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4864         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4865         RID_AUTO_TYPE.
4866         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4867         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4868         (c_parser_declarator, c_parser_direct_declarator_inner)
4869         (c_parser_parameter_declaration, c_parser_type_name): All callers
4870         changed.
4871         (c_parser_declaration_or_fndef): Handle declarations with type
4872         determined from the initializer.
4874 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
4876         * c-typeck.c: Include gimplify.h.
4878 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
4880         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4881         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4882         comment.
4883         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4884         or _Thread_local as appropriate in diagnostics.
4885         (build_null_declspecs): Initialize ret->thread_gnu_p.
4886         (declspecs_add_scspec): Handle either __thread or _Thread_local
4887         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
4888         pedantic.  Do not disallow _Thread_local extern and _Thread_local
4889         static.
4891 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
4892             Andrew MacLeod  <amacleod@redhat.com>
4894         * c-aux-info.c (gen_type): Handle atomic qualifier.
4895         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4896         qualifiers when compating types.
4897         (shadow_tag_warned): Handle atomic_p in declspecs.
4898         (quals_from_declspecs): Likewise.
4899         (start_decl): Use c_type_promotes_to when promoting argument
4900         types.
4901         (grokdeclarator): Handle _Atomic.
4902         (get_parm_info): Diagnose any qualifier on "void" as only
4903         parameter.
4904         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4905         comparing types.  Use c_type_promotes_to when promoting argument
4906         types.
4907         (finish_function): Use c_type_promotes_to when promoting argument
4908         types.
4909         (build_null_declspecs): Handle atomic_p in declspecs.
4910         (declspecs_add_qual): Handle RID_ATOMIC.
4911         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4912         (c_token_starts_declspecs): Handle RID_ATOMIC.
4913         (c_parser_declspecs): Handle atomic type specifiers and
4914         qualifiers.
4915         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4916         from types of expressions with atomic type.
4917         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4918         (c_parser_attribute_any_word): Handle RID_ATOMIC.
4919         (c_parser_initializer, c_parser_initelt, c_parser_initval)
4920         (c_parser_statement_after_labels, c_parser_switch_statement)
4921         (c_parser_for_statement, c_parser_expr_no_commas)
4922         (c_parser_conditional_expression, c_parser_binary_expression)
4923         (c_parser_cast_expression, c_parser_unary_expression)
4924         (c_parser_postfix_expression)
4925         (c_parser_postfix_expression_after_primary, c_parser_expression):
4926         Use convert_lvalue_to_rvalue.
4927         (c_parser_expression_conv, c_parser_expr_list): Document
4928         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
4929         (c_parser_objc_synchronized_statement): Use
4930         convert_lvalue_to_rvalue.
4931         (c_parser_objc_selector): Handle RID_ATOMIC.
4932         (c_parser_objc_receiver, c_parser_array_notation): Use
4933         convert_lvalue_to_rvalue.
4934         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4935         _Atomic (type-name).
4936         (struct c_declspecs): Add atomic_p field.
4937         (convert_lvalue_to_rvalue): Declare.
4938         * c-typeck.c (c_type_promotes_to): Promote atomic types to
4939         corresponding atomic types.
4940         (qualify_type): Don't add _Atomic qualifiers from second argument.
4941         (comp_target_types): Do not allow _Atomic mismatches.
4942         (type_lists_compatible_p): Do not remove atomic qualifiers when
4943         comparing types.
4944         (really_atomic_lvalue, convert_lvalue_to_rvalue)
4945         (build_atomic_assign): New functions.
4946         (build_unary_op): Use build_atomic_assign for atomic increment and
4947         decrement.
4948         (build_conditional_expr): Do not treat _Atomic void as a qualified
4949         version of void.
4950         (build_modify_expr): Use build_atomic_assign for atomic LHS.
4951         (find_anonymous_field_with_type, convert_to_anonymous_field)
4952         (convert_for_assignment): Do not remove atomic qualifiers when
4953         comparing types.
4954         (digest_init): Do not accept initialization of arrays of atomic
4955         elements by string constants.
4956         (build_asm_expr): Use convert_lvalue_to_rvalue.
4957         (build_binary_op): Do not treat _Atomic void as a qualified
4958         version of void.
4960 2013-11-06  DJ Delorie  <dj@redhat.com>
4962         * c-decl.c (locate_old_decl): If a previous conflicting decl is
4963         both explicit and builtin, print the location of the explicit one.
4965 2013-11-05  Tobias Burnus  <burnus@net-b.de>
4967         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4968         c_parser_omp_distribute, c_parser_omp_teams,
4969         c_parser_omp_target, c_parser_omp_declare): Handle
4970         -fopenmp-simd.
4972 2013-11-03  Marek Polacek  <polacek@redhat.com>
4974         * c-decl.c (grokdeclarator): Add VLA instrumentation.
4976 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
4978         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4979         check_dup_generic at the end, unless remove is true.
4980         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4981         remove = true;.
4982         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4984 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
4986         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4987         with decl that is not pointer nor array.
4989 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
4991         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4992         a spawning function is found.
4993         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4994         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4995         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4996         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4997         case.
4998         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4999         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5000         expr.
5001         (c_finish_return): Added a check to reject _Cilk_spawn in return
5002         expression.
5003         (build_cilk_spawn): New function.
5004         (build_cilk_sync): Likewise.
5005         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5006         
5007 2013-10-27  Tobias Burnus  <burnus@net-b.de>
5009         PR other/33426
5010         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5011         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5012         (c_parser_statement_after_labels): Update calls.
5014 2013-10-24  Tobias Burnus  <burnus@net-b.de>
5016         PR other/33426
5017         * c-parser.c (c_parser_pragma, c_parser_for_statement):
5018         Handle PRAGMA_IVDEP.
5019         (c_parser_statement_after_labels): Update call.
5021 2013-10-24  Marek Polacek  <polacek@redhat.com>
5023         * c-parser.c (c_parser_struct_declaration): Add a comment.
5024         (c_parser_declarator): Don't allow _Alignas here.
5026 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
5028         * c-parser.c: Include omp-low.h.
5029         * c-typeck.c: Likewise.
5031 2013-10-17  Marek Polacek  <polacek@redhat.com>
5033         PR c/58267
5034         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5035         Document syntax of the array-declarator.
5036         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5037         are not permitted.
5038         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5039         (c_parser_struct_declaration): Likewise.
5040         (c_parser_declarator): Likewise.
5041         (c_parser_direct_declarator_inner): Likewise.
5042         (c_parser_parameter_declaration): Likewise.
5043         (c_parser_type_name): Likewise.
5045 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
5047         * c-lang.h (current_omp_declare_target_attribute): New extern
5048         decl.
5049         * c-parser.c: Include c-lang.h.
5050         (struct c_parser): Change tokens to c_token *.
5051         Add tokens_buf field.  Change tokens_avail type to unsigned int.
5052         (c_parser_consume_token): If parser->tokens isn't
5053         &parser->tokens_buf[0], increment parser->tokens.
5054         (c_parser_consume_pragma): Likewise.
5055         (enum pragma_context): Add pragma_struct and pragma_param.
5056         (c_parser_external_declaration): Adjust
5057         c_parser_declaration_or_fndef caller.
5058         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5059         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5060         Adjust recursive call.
5061         (c_parser_struct_or_union_specifier): Use pragma_struct instead
5062         of pragma_external.
5063         (c_parser_parameter_declaration): Use pragma_param instead of
5064         pragma_external.
5065         (c_parser_compound_statement_nostart, c_parser_label,
5066         c_parser_for_statement): Adjust
5067         c_parser_declaration_or_fndef callers.
5068         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5069         it through to c_parser_conditional_expression.
5070         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5071         pass it through to c_parser_binary_expression.  Adjust recursive
5072         call.
5073         (c_parser_binary_expression): Remove prec argument, add
5074         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
5075         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5076         binop matches it, use build2 instead of parser_build_binary_op.
5077         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5078         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5079         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5080         Handle pragma_struct and pragma_param the same as pragma_external.
5081         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5082         (c_parser_omp_variable_list): Parse array sections for
5083         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5084         (c_parser_omp_clause_collapse): Fully fold collapse expression.
5085         (c_parser_omp_clause_reduction): Handle user defined reductions.
5086         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5087         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5088         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5089         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5090         c_parser_omp_clause_depend, c_parser_omp_clause_map,
5091         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5092         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5093         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5094         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
5095         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
5096         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5097         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
5098         (c_parser_omp_for_loop): Add CODE argument, pass it through
5099         to c_finish_omp_for.  Change last argument to cclauses,
5100         and adjust uses to grab parallel clauses from the array of all
5101         the split clauses.  Adjust c_parser_binary_expression,
5102         c_parser_declaration_or_fndef and c_finish_omp_for callers.
5103         (omp_split_clauses): New function.
5104         (c_parser_omp_simd): New function.
5105         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5106         Allow the function to be called also when parsing combined constructs,
5107         and call c_parser_omp_simd when parsing for simd.
5108         (c_parser_omp_sections_scope): If section-sequence doesn't start with
5109         #pragma omp section, require exactly one structured-block instead of
5110         sequence of statements.
5111         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5112         Allow the function to be called also when parsing combined constructs.
5113         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5114         Allow the function to be called also when parsing combined
5115         constructs.
5116         (c_parser_omp_taskgroup, c_parser_omp_cancel,
5117         c_parser_omp_cancellation_point, c_parser_omp_distribute,
5118         c_parser_omp_teams, c_parser_omp_target_data,
5119         c_parser_omp_target_update, c_parser_omp_target,
5120         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5121         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5122         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5123         (c_parser_omp_construct): Add p_name and mask vars.  Handle
5124         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5125         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
5126         and c_parser_omp_sections callers.
5127         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5128         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5129         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5130         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
5131         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
5132         OMP_CLAUSE_DEPEND.
5133         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5134         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5135         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5136         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5137         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5138         * c-typeck.c: Include tree-inline.h.
5139         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5140         handle_omp_array_sections_1, handle_omp_array_sections,
5141         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5142         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5143         user defined reductions.
5144         (c_tree_equal): New function.
5145         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5146         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5147         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5148         c_check_omp_declare_reduction_r): New prototypes.
5149         * c-decl.c (current_omp_declare_target_attribute): New variable.
5150         (c_decl_attributes): New function.
5151         (start_decl, start_function): Use it instead of decl_attributes.
5152         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5153         c_omp_reduction_decl, c_omp_reduction_lookup,
5154         c_check_omp_declare_reduction_r): New functions.
5156 2013-09-25  Tom Tromey  <tromey@redhat.com>
5158         * Make-lang.in (c/gccspec.o): Remove.
5159         (CFLAGS-c/gccspec.o): New variable.
5160         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5161         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5162         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5164 2013-09-25  Tom Tromey  <tromey@redhat.com>
5166         * Make-lang.in (c/gccspec.o): Don't use subshell.
5168 2013-09-18  Marek Polacek  <polacek@redhat.com>
5170         PR sanitize/58443
5171         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5172         Remove unnecessary check.
5174 2013-09-18  Marek Polacek  <polacek@redhat.com>
5176         PR sanitizer/58411
5177         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5178         no_sanitize_undefined attribute.
5180 2013-09-13  Kai Tietz  <ktietz@redhat.com>
5182         PR target/57848
5183         * c-decl.c (c_builtin_function_ext_scope): Remove
5184         wrong assumption that it is never called on prexisting
5185         symbol.
5187 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
5189         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5191 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5193         * c-objc-common.c (c_tree_printer): Tidy.
5195 2013-08-30  Marek Polacek  <polacek@redhat.com>
5197         * c-typeck.c (build_binary_op): Add division by zero and shift
5198         instrumentation.
5200 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
5201             Joseph Myers  <joseph@codesourcery.com>
5203         PR c/35649
5204         * c-typeck.c (c_common_type): Prefer double_type_node over
5205         other REAL_TYPE types with the same precision.
5206         (convert_arguments): Likewise.
5208 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5210         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5211         (c_initialize_diagnostics): Call a destructor for the early printer.
5213 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5215         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5216         printer initialization.
5218 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5220         PR c/57490
5221         * c-array-notation.c (fix_conditional_array_notations_1): Added a
5222         check for truth values.
5223         (expand_array_notation_exprs): Added truth values case.  Removed an
5224         unwanted else.  Added for-loop to walk through subtrees in default
5225         case.
5227 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5229         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5231 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
5233         * c-parser.c (struct c_generic_association): Fix typo.
5235 2013-07-23  Tom Tromey  <tromey@redhat.com>
5236             Joseph Myers  <joseph@codesourcery.com>
5238         * c-parser.c (struct c_generic_association): New.
5239         (c_generic_association_d): New typedef.
5240         (c_parser_generic_selection): New function.
5241         (c_parser_postfix_expression): Handle RID_GENERIC.
5243 2013-07-13  Jason Merrill  <jason@redhat.com>
5245         PR c++/57793
5246         * c-decl.c (finish_struct): Check for too-large class.
5248 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
5250         PR c/57821
5251         * c-typeck.c (set_init_index): When folding, check for index overflow.
5253 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5255         * c-parser.c (c_parser_array_notation): Removed rejection of array
5256         notations in an array of function pointers.
5258 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5260         * c-array-notation.c (make_triplet_val_inv): New function.
5261         (create_cmp_incr): Likewise.
5262         (create_array_refs): Likewise.
5263         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5264         Also modularized common parts between functions and called the function.
5265         (build_array_notation_expr): Likewise.
5266         (fix_conditional_array_notations_1): Likewise.
5267         (fix_array_notation_expr): Likewise.
5268         (fix_array_notation_call_expr): Likewise.
5270 2013-06-18  Marek Polacek  <polacek@redhat.com>
5272         PR c/57630
5273         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5275 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5277         * c-array-notation.c (build_array_notation_expr): Reject array notation
5278         mismatch between LHS and RHS even inside a call_expr.  Also, removed
5279         a couple while statements that were dead code.
5281 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5283         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5284         excessive precision expressions in function parameters.  Also removed
5285         couple unwanted while statements.
5287 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5289         * c-array-notation.c (expand_array_notation_exprs): Added
5290         ARRAY_NOTATION_REF case.
5291         
5292 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5294         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5295         function to c-family/array-notation-common.c.
5296         (is_cilkplus_reduce_builtin): Likewise.
5297         (find_rank): Likewise.
5298         (extract_array_notation_exprs): Likewise.
5299         (replace_array_notations): Likewise.
5300         (find_inv_trees): Likewise.
5301         (replace_inv_trees): Likewise.
5302         (contains_array_notation_expr): Likewise.
5303         (find_correct_array_notation_type): Likewise.
5304         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5305         (struct inv_list): Moved this to c-family/array-notation-common.c.
5306         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5307         
5308 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5310         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5311         reduction functions outside the for-loop.  Added a check if the fundecl
5312         is non-NULL.  Finally, removed an unwanted if-statement, and made the
5313         body unconditional.
5315 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5317         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5318         condition of the if-statement matches the rank of else-block and then-
5319         block when array notations are used.
5320         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5321         expression after the entire function body is parsed.
5322         (c_parser_expr_no_commas): Delayed creating array notation expressions
5323         to the end of function parsing.
5324         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5325         whole if-statement instead of just the condition.
5326         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
5328 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5330         PR c/57474
5331         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5332         array to NULL_TREE if they are unused.  Also added a check for the
5333         field to be NULL before its fields are used in future.
5334         
5335 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5337         PR bootstrap/57450
5338         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5339         (build_array_notation_expr): Likewise.
5341 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5343         * c-typeck.c (build_array_ref): Added a check to see if array's
5344         index is greater than one.  If true, then emit an error.
5345         (build_function_call_vec): Exclude error reporting and checking
5346         for builtin array-notation functions.
5347         (convert_arguments): Likewise.
5348         (c_finish_return): Added a check for array notations as a return
5349         expression.  If true, then emit an error.
5350         (c_finish_loop): Added a check for array notations in a loop
5351         condition.  If true then emit an error.
5352         (lvalue_p): Added a ARRAY_NOTATION_REF case.
5353         (build_binary_op): Added a check for array notation expr inside
5354         op1 and op0.  If present, we call another function to find correct
5355         type.
5356         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5357         * c-parser.c (c_parser_compound_statement): Check if array
5358         notation code is used in tree, if so, then transform them into
5359         appropriate C code.
5360         (c_parser_expr_no_commas): Check if array notation is used in LHS
5361         or RHS, if so, then build array notation expression instead of
5362         regular modify.
5363         (c_parser_postfix_expression_after_primary): Added a check for
5364         colon(s) after square braces, if so then handle it like an array
5365         notation.  Also, break up array notations in unary op if found.
5366         (c_parser_direct_declarator_inner): Added a check for array
5367         notation.
5368         (c_parser_compound_statement): Added a check for array notation in
5369         a stmt.  If one is present, then expand array notation expr.
5370         (c_parser_if_statement): Likewise.
5371         (c_parser_switch_statement): Added a check for array notations in
5372         a switch statement's condition.  If true, then output an error.
5373         (c_parser_while_statement): Similarly, but for a while.
5374         (c_parser_do_statement): Similarly, but for a do-while.
5375         (c_parser_for_statement): Similarly, but for a for-loop.
5376         (c_parser_unary_expression): Check if array notation is used in a
5377         pre-increment or pre-decrement expression.  If true, then expand
5378         them.
5379         (c_parser_array_notation): New function.
5380         * c-array-notation.c: New file.
5381         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5382         
5383 2013-05-23  Mike Stump  <mikestump@comcast.net>
5385         * c-typeck.c (convert_for_assignment): Handle references to memory
5386         spaces better.
5388 2013-05-16  Jason Merrill  <jason@redhat.com>
5390         * Make-lang.in (cc1$(exeext)): Use link mutex.
5392 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
5394         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5395         to simply use OPT_Wpointer_arith.
5396         (build_unary_op): Likewise.
5398 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
5400         PR c/19449
5401         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5402         argument.  If set, or it temporarily for parsing of the first
5403         argument into force_folding_builtin_constant_p.
5404         (c_parser_postfix_expression): Adjust callers.
5406 2013-03-21  Richard Biener  <rguenther@suse.de>
5408         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5409         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
5411 2013-02-12  Marek Polacek  <polacek@redhat.com>
5413         PR c/44938
5414         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5415         origtypes to NULL.
5417 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
5419         PR c/56078
5420         * c-typeck.c (set_nonincremental_init_from_string): If
5421         constructor_max_index is NULL, treat it as if tree_int_cst_lt
5422         returned false.
5423         (process_init_element): Likewise.
5425 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
5427         PR c++/55619
5428         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5429         argument, don't call default_function_array_conversion
5430         nor c_fully_fold here.
5431         (c_parser_asm_statement): Adjust callers.
5432         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5433         and outputs here, and call default_function_array_conversion
5434         on inputs that don't need to be addressable.
5436 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
5438         PR c/39464
5439         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5440         warning require that both c_common_unsigned_type as well as
5441         c_common_signed_type is the same for both mvl and mvr types.
5443 2012-11-16  Diego Novillo  <dnovillo@google.com>
5445         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5447         * c-common.c: Use new vec API in vec.h.
5448         * c-common.h: Likewise.
5449         * c-gimplify.c: Likewise.
5450         * c-pragma.c: Likewise.
5451         * c-pretty-print.c: Likewise.
5452         * c-pretty-print.h: Likewise.
5453         * c-semantics.c: Likewise.
5454         * c-decl.c: Likewise.
5455         * c-parser.c: Likewise.
5456         * c-tree.h: Likewise.
5457         * c-typeck.c: Likewise.
5459 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
5461         PR c++/54930
5462         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5464 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5466         PR c/53066
5467         * c-decl.c (warn_if_shadowing): Do not warn if a variable
5468         shadows a function, unless the variable is a function or a
5469         pointer-to-function.
5471 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
5473         PR c/54381
5474         * c-parser.c (struct c_tree_loc_pair): Removed.
5475         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5476         add location_t * and tree * arguments, fill in array of 3
5477         sizeof_arg trees and corresponding locs.
5478         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5479         c_parser_expr_list callers.
5480         (c_parser_postfix_expression_after_primary): Likewise.  Pass
5481         array of 3 sizeof_arg trees and locs (corresponding to first
5482         3 arguments) to sizeof_pointer_memaccess_warning.
5484 2012-10-09  Lawrence Crowl  <crowl@google.com>
5486         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5487         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5488         hash table.
5490 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
5492         PR c++/54194
5493         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5494         call.
5496 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
5498         PR c++/54427
5499         * c-typeck.c: Include c-common.h.
5500         (enum stv_conv): Moved to c-common.h.
5501         (scalar_to_vector): Moved to c-common.c.
5502         (build_binary_op): Adapt to scalar_to_vector's new prototype.
5503         * Make-lang.in: c-typeck.c depends on c-common.h.
5505 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
5507         * c-decl.c (c_write_global_declarations): Fix handling of
5508         -fdump-ada-spec*.
5510 2012-09-30  Sharad Singhai  <singhai@google.com>
5512         * c-decl.c (c_write_global_declarations): Use a different method
5513         to determine if the dump has ben initialized.
5515 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
5517         PR c/54552
5518         * c-typeck.c (c_cast_expr): When casting to a type requiring
5519         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5520         c_fully_fold first.
5522 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
5524         PR c/54103
5525         * c-typeck.c (build_unary_op): Pass original argument of
5526         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5527         any C_MAYBE_CONST_EXPR, if it has integer operands.
5528         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5529         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5530         to c_objc_common_truthvalue_conversion, then remove any
5531         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
5532         c_objc_common_truthvalue_conversion not
5533         c_common_truthvalue_conversion.
5534         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5535         call note_integer_operands for arguments with integer operands
5536         that are not integer constants.
5538 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
5540         PR c/54559
5541         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5542         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5544 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
5546         PR c/54428
5547         * c-convert.c (convert): Don't call fold_convert_loc if
5548         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5549         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
5550         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5552 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
5554         PR c/54355
5555         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5556         for nested and empty_ok arguments in the call to
5557         c_parser_declaration_or_fndef.
5559 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
5561         * c-tree.h (c_last_sizeof_arg): Declare.
5562         * c-parser.c (struct c_tree_loc_pair): New type.
5563         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
5564         non-NULL.
5565         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5566         (c_parser_postfix_expression_after_primary): Likewise.  Call
5567         sizeof_pointer_memaccess_warning if needed.
5568         (sizeof_ptr_memacc_comptypes): New function.
5569         * c-typeck.c (c_last_sizeof_arg): New global variable.
5570         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5572 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
5574         * c-lang.h (lang_decl): Add variable_size GTY option.
5576 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
5578         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5579         * Make-lang.in: Fix dependencies.
5581 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
5583         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5584         and add language Makefile hooks.
5585         * config-lang.in: New file.
5586         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5587         add the required "normal" config-lang.in rules.
5588         * c-lang.h: Moved from gcc/ to here.
5589         * c-tree.h: Likewise.
5590         * c-objc-common.c: Likewise.
5591         * c-objc-common.h: Likewise.
5592         * c-typeck.c: Likewise.
5593         * c-convert.c: Likewise.
5594         * c-lang.c: Likewise.
5595         * c-aux-info.c: Likewise.
5596         * c-errors.c: Likewise.
5597         * gccspec.c: Likewise.
5598         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
5599         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
5601 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5603 Copying and distribution of this file, with or without modification,
5604 are permitted in any medium without royalty provided the copyright
5605 notice and this notice are preserved.