Don't warn when alignment of global common data exceeds maximum alignment.
[official-gcc.git] / gcc / c / ChangeLog
blobe5e12b33f517c1944311fbb3e384374e62e62e36
1 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
3         * c-parser.c (c_parser_omp_error): New function.
4         (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
6 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
8         * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
9         comma at the end of list.
10         (c_parser_omp_requires): Likewise.
12 2021-08-19  Jakub Jelinek  <jakub@redhat.com>
14         * c-parser.c (c_parser_omp_requires): Don't call
15         c_parser_peek_2nd_token and optionally consume token if current
16         token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
18 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
20         * c-parser.c (c_parser_omp_nothing): New function.
21         (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
23 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
25         * c-parser.c (c_parser_statement_after_labels): Add restart label
26         near the start of the function.  If c_parser_pragma returns false,
27         goto restart.
28         (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
29         c_parser_omp_cancellation_point returned.  For PRAGMA_OMP_DECLARE
30         return what c_parser_omp_declare returned.  Return true instead of
31         false after emitting errors that the directive is not allowed in
32         pragma_stmt context.
33         (c_parser_omp_ordered): Return true instead of
34         false after emitting errors that the directive is not allowed in
35         pragma_stmt context.
36         (c_parser_omp_target_update): Likewise.
37         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
38         Change return type from tree to bool, return false if the
39         directive should be ignored in pragma_stmt contexts.
40         (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
41         return their result directly.
42         (c_parser_omp_cancellation_point): Change return type from void to
43         bool, return false if the directive should be ignored in pragma_stmt
44         contexts.
45         (c_parser_omp_declare): Likewise.
47 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
49         * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
50         (c_parser_omp_scope): New function.
51         (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
53 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
55         * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
56         (c_parser_omp_clause_filter): New function.
57         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
58         (OMP_MASKED_CLAUSE_MASK): Define.
59         (c_parser_omp_masked): New function.
60         (c_parser_omp_parallel): Handle parallel masked.
61         (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
62         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
64 2021-08-12  Martin Uecker  <muecker@gwdg.de>
66         PR c/101838
67         PR c/29970
68         * c-typeck.c (c_expr_sizeof_type): Evaluate
69         size expressions for structs of variable size.
71 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
73         * c-parser.c (c_parser_omp_clause_proc_bind): Accept
74         'primary' as alias for 'master'.
76 2021-08-10  Martin Uecker  <muecker@gwdg.de>
78         PR c/29970
79         * c-typeck.c (c_expr_sizeof_expr): Evaluate
80         size expressions for structs of variable size.
82 2021-08-06  Tamar Christina  <tamar.christina@arm.com>
84         * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
85         * c-tree.h (c_simulate_enum_decl): Likewise.
87 2021-08-06  Martin Sebor  <msebor@redhat.com>
89         * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
90         vec arguments to by-reference.
91         (c_finish_omp_declare_simd): Same.
92         (c_parser_compound_statement_nostart): Same.
93         (c_parser_for_statement): Same.
94         (c_parser_objc_methodprotolist): Same.
95         (c_parser_oacc_routine): Same.
96         (c_parser_omp_for_loop): Same.
97         (c_parser_omp_declare_simd): Same.
99 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
100             Joseph Myers  <joseph@codesourcery.com>
101             Cesar Philippidis  <cesar@codesourcery.com>
103         * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
104         (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
105         (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
106         * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
108 2021-07-20  Martin Sebor  <msebor@redhat.com>
110         * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
111         by-const-reference.
112         * c-typeck.c (c_build_function_call_vec): Same.
114 2021-07-15  Martin Sebor  <msebor@redhat.com>
116         PR c/101289
117         PR c/97548
118         * c-decl.c (get_parm_array_spec): Strip nops.
120 2021-07-06  Martin Sebor  <msebor@redhat.com>
122         * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
124 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
126         PR c/101297
127         * c-parser.c (c_parser_omp_atomic): Consume comma only if it
128         appears before a CPP_NAME.
130 2021-06-25  Martin Sebor  <msebor@redhat.com>
132         * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
133         warning_suppressed_p, suppress_warning, and copy_no_warning.
134         (diagnose_mismatched_decls): Same.
135         (duplicate_decls): Same.
136         (grokdeclarator): Same.
137         (finish_function): Same.
138         (c_write_global_declarations_1): Same.
139         * c-fold.c (c_fully_fold_internal): Same.
140         * c-parser.c (c_parser_expr_no_commas): Same.
141         (c_parser_postfix_expression): Same.
142         * c-typeck.c (array_to_pointer_conversion): Same.
143         (function_to_pointer_conversion): Same.
144         (default_function_array_conversion): Same.
145         (convert_lvalue_to_rvalue): Same.
146         (default_conversion): Same.
147         (build_indirect_ref): Same.
148         (build_function_call_vec): Same.
149         (build_atomic_assign): Same.
150         (build_unary_op): Same.
151         (c_finish_return): Same.
152         (emit_side_effect_warnings): Same.
153         (c_finish_stmt_expr): Same.
154         (c_omp_clause_copy_ctor): Same.
156 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
158         PR c/101176
159         * c-parser.c (c_parser_has_attribute_expression): Set source range for
160         the result.
162 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
164         PR c/101171
165         * c-typeck.c (build_c_cast): Don't call note_integer_operands on
166         error_mark_node.
168 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
170         * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
171         C_ORT_OMP for clauses on target construct.
172         (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
173         (c_parser_omp_target): For non-combined target add
174         map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION.  Pass
175         C_ORT_OMP_TARGET to c_finish_omp_clauses.
176         * c-typeck.c (handle_omp_array_sections): Adjust ort handling
177         for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
178         never present on C_ORT_*DECLARE_SIMD.
179         (c_finish_omp_clauses): Likewise.  Handle OMP_CLAUSE_IN_REDUCTION
180         on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
181         corresponding map clauses.
183 2021-06-21  Jakub Jelinek  <jakub@redhat.com>
185         PR inline-asm/100785
186         * c-typeck.c (c_mark_addressable): Diagnose trying to make
187         bit-fields addressable.
189 2021-06-15  Robin Dapp  <rdapp@linux.ibm.com>
191         * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
192         similar.
194 2021-06-14  Tobias Burnus  <tobias@codesourcery.com>
196         PR c/100913
197         * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
198         var in the error case.
200 2021-06-07  Eric Botcazou  <ebotcazou@adacore.com>
202         PR c/100920
203         * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
204         spot built-in functions.
206 2021-06-06  Jakub Jelinek  <jakub@redhat.com>
208         PR c/100902
209         * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
210         even when target is combined with other constructs.
212 2021-06-06  Eric Botcazou  <ebotcazou@adacore.com>
214         PR c/100920
215         * c-decl.c (finish_struct): Fix thinko in previous change.
216         * c-typeck.c (convert_for_assignment): Do not warn on pointer
217         assignment and initialization for storage order purposes if the
218         RHS is a call to a DECL_IS_MALLOC function.
220 2021-06-04  Martin Sebor  <msebor@redhat.com>
222         PR c/100783
223         * c-objc-common.c (print_type): Handle erroneous types.
225 2021-06-03  Jakub Jelinek  <jakub@redhat.com>
227         PR c++/100859
228         * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
229         after depend only cases.
231 2021-05-31  Richard Biener  <rguenther@suse.de>
233         PR c++/88601
234         * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
235         * c-parser.c (c_parser_postfix_expression): Likewise.
237 2021-05-28  Richard Biener   <rguenther@suse.de>
239         PR c/100803
240         * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
241         invalid if conditions.
243 2021-05-28  Jakub Jelinek  <jakub@redhat.com>
245         PR middle-end/99928
246         * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
247         (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
248         marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT.  Add
249         map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
250         maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
251         present too.  For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
252         if present in map_head, map_field_head or map_firstprivate_head
253         bitmaps.
255 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
257         * c-parser.c (c_parser_omp_clause_affinity): New.
258         (c_parser_omp_clause_name, c_parser_omp_variable_list,
259         c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
260         * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
261         c_finish_omp_clauses): Likewise.
263 2021-05-26  Eric Botcazou  <ebotcazou@adacore.com>
265         PR c/100653
266         * c-decl.c (finish_struct): Warn for a union containing an aggregate
267         field with a differing scalar storage order.
269 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
271         PR middle-end/99928
272         * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
273         OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain.  Don't error
274         if a decl is mentioned both in map clause and in such firstprivate
275         clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
277 2021-05-19  Jakub Jelinek  <jakub@redhat.com>
279         PR middle-end/99928
280         * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
281         master when combined with taskloop.
282         (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
283         parallel master when not combined with taskloop.
285 2021-05-18  Richard Biener  <rguenther@suse.de>
287         PR c/100522
288         * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
289         Diagnose calls to non-functions.
290         (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
292 2021-05-17  Richard Biener  <rguenther@suse.de>
294         PR c/100625
295         * gimple-parser.c (c_parser_gimple_label): Avoid building
296         a GIMPLE label with NULL label decl.
298 2021-05-13  Martin Sebor  <msebor@redhat.com>
300         PR c/100550
301         * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
303 2021-05-12  Marcel Vollweiler  <marcel@codesourcery.com>
305         * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
306         'close'.
308 2021-05-10  Martin Liska  <mliska@suse.cz>
310         * c-aux-info.c (affix_data_type): Use startswith
311         function instead of strncmp.
312         * c-typeck.c (build_function_call_vec): Likewise.
313         * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
315 2021-05-07  Eric Botcazou  <ebotcazou@adacore.com>
317         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
318         on the address of a pointer field in a record with reverse SSO.
320 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
322         * c-typeck.c (c_finish_omp_clauses): Accept float + complex
323         for || and && reductions.
325 2021-04-29  Joseph Myers  <joseph@codesourcery.com>
327         * c-typeck.c (function_types_compatible_p): For C2X, treat
328         unprototyped function as compatible with non-variadic prototyped
329         function even if some argument types are changed by the default
330         argument promotions.
332 2021-04-15  Martin Sebor  <msebor@redhat.com>
334         PR c/99420
335         PR c/99972
336         * c-decl.c (pushdecl): Always propagate type attribute.
338 2021-04-15  Richard Sandiford  <richard.sandiford@arm.com>
340         PR c/98852
341         * c-typeck.c (c_common_type): Do not drop attributes that
342         affect type identity.
344 2021-04-10  Jakub Jelinek  <jakub@redhat.com>
346         PR c/99990
347         * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
348         error_mark_node.
350 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
352         PR c++/99565
353         * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
354         to operand_equal_p.
356 2021-03-19  Jakub Jelinek  <jakub@redhat.com>
358         PR c/99588
359         * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
360         with modifycode NOP_EXPR produces and mark the _Atomic var as read
361         if found.
362         (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
363         rather than STATEMENT_LIST.  Otherwise call mark_exp_read on lhs.
364         Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
366 2021-03-15  Tobias Burnus  <tobias@codesourcery.com>
368         PR c++/99509
369         * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
370         ensure that the varpool node is marked as offloadable.
372 2021-03-05  Tobias Burnus  <tobias@codesourcery.com>
374         PR c/99137
375         * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
377 2021-02-24  Martin Sebor  <msebor@redhat.com>
379         PR middle-end/97172
380         * c-decl.c (free_attr_access_data): Clear attribute arg spec.
382 2021-02-18  Jakub Jelinek  <jakub@redhat.com>
384         PR c/99136
385         * c-typeck.c (c_finish_return): Don't wrap retval into
386         EXCESS_PRECISION_EXPR in functions that return void.
388 2021-02-11  Marek Polacek  <polacek@redhat.com>
390         * c-parser.c (c_parser_if_statement): Use vec_free.
392 2021-02-04  Martin Sebor  <msebor@redhat.com>
394         PR c/97882
395         * c-decl.c (locate_old_decl): Add type to diagnostic output.
396         (diagnose_mismatched_decls): Same.
397         (start_function): Introduce temporaries for better readability.
398         * c-typeck.c (comptypes_internal): Only consider complete enum
399         types in comparisons with integers.
401 2021-02-01  Martin Sebor  <msebor@redhat.com>
403         PR middle-end/97172
404         * c-decl.c (free_attr_access_data): New function.
405         (c_parse_final_cleanups): Call free_attr_access_data.
407 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
409         * c-parser.c (c_parser_omp_clause_detach): New.
410         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
411         (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
412         * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
413         clause.  Prevent use of detach with mergeable and overriding the
414         data sharing mode of the event handle.
416 2021-01-15  Jakub Jelinek  <jakub@redhat.com>
418         * c-typeck.c (c_finish_omp_clauses): For reduction build array with
419         unqualified element type and then call c_build_qualified_type on the
420         ARRAY_TYPE.
422 2021-01-07  Richard Biener  <rguenther@suse.de>
424         * gimple-parser.c (c_parser_gimple_compound_statement): Only
425         reallocate loop array if it is too small.
427 2020-12-16  Martin Uecker  <muecker@gwdg.de>
429         PR c/98047
430         * c-typeck.c (build_modify_expr): Drop qualifiers.
432 2020-12-16  Martin Uecker  <muecker@gwdg.de>
434         PR c/98260
435         * c-parser.c (c_parser_expression): Look into
436         nop expression when marking expressions as read.
438 2020-12-14  Martin Liska  <mliska@suse.cz>
440         PR sanitizer/98204
441         * c-typeck.c (pointer_diff): Do not emit a top-level
442         sanitization.
443         (build_binary_op): Likewise.
445 2020-12-09  Tobias Burnus  <tobias@codesourcery.com>
447         * c-parser.c (c_parser_omp_allocate): New.
448         (c_parser_omp_construct): Call it.
450 2020-12-09  Richard Biener  <rguenther@suse.de>
452         PR c/98200
453         * gimple-parser.c (c_parser_gimple_postfix_expression): Return
454         early on error.
456 2020-12-07  Martin Uecker  <muecker@gwdg.de>
458         PR c/97981
459         * c-typeck.c (convert_lvalue_to_rvalue): Move the code
460         that drops qualifiers to the end of the function.
462 2020-11-26  Martin Uecker  <muecker@gwdg.de>
464         PR c/65455
465         PR c/92935
466         * c-parser.c (c_parser_declaration_or_fndef): Remove
467         redundant code to drop qualifiers of _Atomic types for __auto_type.
468         (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
469         types for __typeof__.
471 2020-11-24  Jakub Jelinek  <jakub@redhat.com>
473         PR c/97958
474         * c-parser.c (c_parser_binary_expression): For omp atomic binary
475         expressions, use make_node instead of build2 to avoid checking build2
476         performs.
478 2020-11-23  Joseph Myers  <joseph@codesourcery.com>
480         PR c/95630
481         * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
482         for comparisons of complete and incomplete pointers.
484 2020-11-21  Aaron Sawdey  <acsawdey@linux.ibm.com>
486         * c-aux-info.c (gen_type): Support opaque types.
488 2020-11-20  Martin Sebor  <msebor@redhat.com>
490         PR middle-end/97879
491         * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
493 2020-11-20  Jakub Jelinek  <jakub@redhat.com>
495         PR other/97911
496         * Make-lang.in (c.serial): Change from goal to a variable.
497         (.PHONY): Drop c.serial.
499 2020-11-20  Martin Uecker  <muecker@gwdg.de>
501         * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
503 2020-11-19  Jakub Jelinek  <jakub@redhat.com>
505         PR c/97860
506         * c-decl.c (get_parm_array_spec): Bail out of nelts is
507         error_operand_p.
509 2020-11-18  Jakub Jelinek  <jakub@redhat.com>
511         * Make-lang.in (c.serial): New goal.
512         (.PHONY): Add c.serial c.prev.
513         (cc1$(exeext)): Call LINK_PROGRESS.
515 2020-11-13  Vladimir N. Makarov  <vmakarov@redhat.com>
517         * c-parser.c (c_parser_asm_statement): Parse outputs for asm
518         goto too.
519         * c-typeck.c (build_asm_expr): Remove an assert checking output
520         absence for asm goto.
522 2020-11-13  Jakub Jelinek  <jakub@redhat.com>
524         * c-typeck.c (c_finish_omp_clauses): Don't clear
525         OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
527 2020-11-13  Iain Sandoe  <iain@sandoe.co.uk>
529         PR objc/77404
530         * c-parser.c (c_parser_objc_class_definition): Pass the
531         location of the class name to the interface declaration.
533 2020-11-10  Strager Neds  <strager.nds@gmail.com>
535         * c-decl.c (merge_decls): Use new overload of
536         set_decl_section_name.
538 2020-11-10  Chung-Lin Tang  <cltang@codesourcery.com>
540         * c-parser.c (c_parser_omp_target_data): Add use of
541         new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
542         handled map clause kind.
543         (c_parser_omp_target_enter_data): Likewise.
544         (c_parser_omp_target_exit_data): Likewise.
545         (c_parser_omp_target): Likewise.
546         * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
547         use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
548         (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
549         same struct field access to co-exist on OpenMP construct.
551 2020-11-07  Martin Uecker  <muecker@gwdg.de>
553         * c-parser.c (c_parser_label): Implement mixing of labels and code.
554         (c_parser_all_labels): Likewise.
556 2020-11-06  Iain Sandoe  <iain@sandoe.co.uk>
558         * c-parser.c (c_parser_objc_at_property_declaration):
559         Improve parsing fidelity. Associate better location info
560         with @property attributes.  Clean up the interface to
561         objc_add_property_declaration ().
563 2020-11-06  Nathan Sidwell  <nathan@acm.org>
565         * c-decl.c (diagnose_mismatched_decls): Rename
566         DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
567         (warn_if_shadowing, implicitly_declare, names_builtin_p)
568         (collect_source_refs): Likewise.
569         * c-typeck.c (inform_declaration, inform_for_arg)
570         (convert_for_assignment): Likewise.
572 2020-11-06  Tobias Burnus  <tobias@codesourcery.com>
574         * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
575         OpenACC matching.
576         (c_parser_omp_construct): Update call.
578 2020-11-04  Jakub Jelinek  <jakub@redhat.com>
580         PR c++/97670
581         * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
582         find underlying decl to clear in the aligned_head bitmap.
584 2020-11-04  Joseph Myers  <joseph@codesourcery.com>
586         * c-decl.c (handle_nodiscard_attribute): New.
587         (std_attribute_table): Add nodiscard.
588         * c-parser.c (c_parser_std_attribute): Expect argument to
589         nodiscard attribute to be a string.  Do not special-case ignoring
590         nodiscard.
591         * c-typeck.c (maybe_warn_nodiscard): New.
592         (build_compound_expr, emit_side_effect_warnings): Call
593         maybe_warn_nodiscard.
594         (c_process_expr_stmt, c_finish_stmt_expr): Also call
595         emit_side_effect_warnings if warn_unused_result.
597 2020-10-29  Asher Gordon  <AsDaGo@posteo.net>
599         * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
600         with XDELETE.
601         (finish_init): Likewise.
602         (pop_init_level): Likewise.
604 2020-10-28  Joseph Myers  <joseph@codesourcery.com>
606         * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
607         error_at for omitted parameter name.
609 2020-10-28  Jakub Jelinek  <jakub@redhat.com>
611         * c-parser.c (c_parser_omp_clause_name): Handle allocate.
612         (c_parser_omp_clause_allocate): New function.
613         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
614         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
615         OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
616         OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
617         OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
618         OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
619         PRAGMA_OMP_CLAUSE_ALLOCATE.
620         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
622 2020-10-27  Joseph Myers  <joseph@codesourcery.com>
624         * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
625         standard attributes.
627 2020-10-23  Marek Polacek  <polacek@redhat.com>
629         PR c++/91741
630         * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
631         (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
632         (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
633         * c-tree.h (char_type_p): Declare.
634         * c-typeck.c (char_type_p): No longer static.
636 2020-10-23  Martin Sebor  <msebor@redhat.com>
638         PR middle-end/97552
639         * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
641 2020-09-19  Martin Sebor  <msebor@redhat.com>
643         PR c/50584
644         * c-decl.c (lookup_last_decl): Define new function.
645         (c_decl_attributes): Call it.
646         (start_decl): Add argument and use it.
647         (finish_decl): Call build_attr_access_from_parms and decl_attributes.
648         (get_parm_array_spec): Define new function.
649         (push_parm_decl): Call get_parm_array_spec.
650         (start_function): Call warn_parm_array_mismatch.  Build attribute
651         access and add it to current function.
652         * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
653         in forms of array parameters.
654         * c-tree.h (start_decl): Add argument.
656 2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
658         * c-decl.c (c_break_label, c_cont_label): Delete, and replace
659         with...
660         (in_statement): New.
661         (start_function): Adjust for above change.
662         (c_push_function_context, c_pop_function_context): Likewise.
663         * c-lang.h (struct language_function): Likewise.
664         * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
665         * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
666         New.
667         (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
668         (c_parser_switch_statement): Adjust break/switch context handling
669         and calls to renamed functions.
670         (c_parser_while_statement): Adjust break/switch context handling and
671         build a WHILE_STMT.
672         (c_parser_do_statement): Ditto, with DO_STMT respectively.
673         (c_parser_for_statement): Ditto, with FOR_STMT respectively.
674         (c_parser_omp_for_loop): Adjust break/switch context handling.
675         * c-tree.h (c_break_label, c_cont_label): Delete.
676         (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
677         (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
678         (in_statement, switch_statement_break_seen_p): Declare.
679         (c_start_case, c_finish_case): Renamed to...
680         (c_start_switch, c_finish_switch).
681         (c_finish_bc_stmt): Adjust arguments.
682         * c-typeck.c (build_function_call_vec): Don't try to print
683         statements with %qE format.
684         (struct c_switch):  Rename switch_expr field to switch_stmt.
685         Add break_stmt_seen_p field.
686         (c_start_case): Rename to c_start_switch.  Build a SWITCH_STMT
687         instead of a SWITCH_EXPR.  Update for changes to struct c_switch.
688         (do_case): Update for changes to struct c_switch.
689         (c_finish_case): Rename to c_finish_switch.  Update for changes to
690         struct c_switch and change of representation from SWITCH_EXPR to
691         SWITCH_STMT.
692         (c_finish_loop): Delete.
693         (c_finish_bc_stmt): Update to reflect changes to break/continue
694         state representation.  Build a BREAK_STMT or CONTINUE_STMT instead
695         of a GOTO_EXPR except for objc foreach loops.
697 2020-09-01  Jakub Jelinek  <jakub@redhat.com>
699         PR c++/96867
700         * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
701         only on PARM_DECLs.
703 2020-08-28  Martin Sebor  <msebor@redhat.com>
705         PR c/96596
706         * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
707         argument type.
709 2020-08-27  Martin Liska  <mliska@suse.cz>
711         * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
712         growth function to true.
714 2020-08-25  Tobias Burnus  <tobias@codesourcery.com>
716         PR c/96678
717         * c-typeck.c (handle_omp_array_sections_1): Talk about
718         array function parameter in the error message.
720 2020-08-18  Jakub Jelinek  <jakub@redhat.com>
722         PR c/96571
723         * c-parser.c (c_parser_generic_selection): Change match_found from bool
724         to int, holding index of the match.  Call mark_exp_read on the selector
725         expression and on expressions other than the selected one.
727 2020-08-01  Richard Sandiford  <richard.sandiford@arm.com>
729         PR c/96377
730         * c-typeck.c (process_init_element): Split test for whether to
731         recurse into a record, union or array into...
732         (initialize_elementwise_p): ...this new function.  Don't recurse
733         into a vector type if the initialization value is also a vector.
735 2020-07-31  Richard Biener  <rguenther@suse.de>
737         PR debug/96383
738         * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
739         Define to c_common_finalize_early_debug.
741 2020-07-22  Tobias Burnus  <tobias@codesourcery.com>
743         * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
744         (c_parser_omp_critical): Permit hint(0) clause without named critical.
745         (c_parser_omp_construct): Don't assert if error_mark_node is returned.
747 2020-07-21  Sunil K Pandey  <skpgkp2@gmail.com>
749         PR target/95237
750         * c-decl.c (finish_decl): Call target hook
751         lower_local_decl_alignment to lower local decl alignment.
753 2020-07-09  Julian Brown  <julian@codesourcery.com>
754             Thomas Schwinge  <thomas@codesourcery.com>
756         PR middle-end/95270
757         * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
758         for standalone attach/detach clauses.
760 2020-07-08  Eric Botcazou  <ebotcazou@adacore.com>
762         * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
763         set, warn for conversion between pointers that point to incompatible
764         scalar storage orders.
766 2020-07-07  Kaipeng Zhou  <zhoukaipeng3@huawei.com>
768         * c-parser.c (c_parser_statement_after_labels): Pass correct
769         parameters to c_parser_do_statement.
771 2020-06-16  Jakub Jelinek  <jakub@redhat.com>
773         * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
774         c_in_omp_for.
775         (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
776         premature c_fully_fold.  Defer explicit c_fully_fold calls to after
777         c_finish_omp_for.
778         * c-tree.h (c_in_omp_for): Declare.
779         * c-typeck.c (c_in_omp_for): Define.
780         (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
781         (digest_init): Likewise.
782         (build_binary_op): Likewise.
784 2020-06-16  Jakub Jelinek  <jakub@redhat.com>
786         * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
787         from kind by comma rather than colon.
789 2020-06-05  Mark Wielaard  <mark@klomp.org>
791         * c-decl.c (implicit_decl_warning): When warned and olddecl is
792         an undeclared builtin, then add a fixit header hint, if found.
793         (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
794         warning_at about implicit builtin declaration type mismatch.
796 2020-06-03  Mark Wielaard  <mark@klomp.org>
798         * c-parser.c (struct c_parser): Add seen_string_literal
799         bitfield.
800         (c_parser_consume_token): Reset seen_string_literal.
801         (c_parser_error_richloc): Add name_hint if seen_string_literal
802         and next token is a CPP_NAME and we have a missing header
803         suggestion for the name.
804         (c_parser_string_literal): Set seen_string_literal.
806 2020-06-03  Mark Wielaard  <mark@klomp.org>
808         * c-parser.c (c_parser_postfix_expression_after_primary): Add
809         scope with matching_parens after CPP_OPEN_PAREN.
811 2020-06-03  Tobias Burnus  <tobias@codesourcery.com>
813         * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
815 2020-05-28  Nicolas Bértolo  <nicolasbertolo@gmail.com>
817         * Make-lang.in: Remove extra slash.
819 2020-05-19  Martin Liska  <mliska@suse.cz>
821         * c-parser.c: Fix typo.
823 2020-05-14  Jakub Jelinek  <jakub@redhat.com>
825         * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
827 2020-05-07  Richard Biener  <rguenther@suse.de>
829         PR middle-end/94703
830         * gimple-parser.c (c_parser_parse_ssa_name): Do not set
831         DECL_GIMPLE_REG_P.
833 2020-04-30  Jakub Jelinek  <jakub@redhat.com>
835         PR c/94842
836         * c-decl.c (set_labels_context_r): In addition to context-less
837         LABEL_DECLs adjust also LABEL_DECLs with context equal to
838         parent function if any.
839         (store_parm_decls): Adjust comment.
841 2020-04-19  Jakub Jelinek  <jakub@redhat.com>
843         PR objc/94637
844         * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
845         two CPP_COLON tokens.
847 2020-04-17  Jakub Jelinek  <jakub@redhat.com>
849         PR other/94629
850         * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
851         to data.clauses.
853 2020-04-15  Jakub Jelinek  <jakub@redhat.com>
855         PR c/94593
856         * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
857         requires directive when not at file scope.
859 2020-04-08  Tobias Burnus  <tobias@codesourcery.com>
861         PR middle-end/94120
862         * c-decl.c (c_check_in_current_scope): New function.
863         * c-tree.h (c_check_in_current_scope): Declare it.
864         * c-parser.c (c_parser_oacc_declare): Add check that variables
865         are declared in the same scope as the directive. Fix handling
866         of namespace vars.
868 2020-04-07  Jakub Jelinek  <jakub@redhat.com>
870         PR c++/94512
871         * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
872         if c_parser_omp_master succeeded.
874 2020-03-23  Jakub Jelinek  <jakub@redhat.com>
876         PR gcov-profile/94029
877         PR c/94239
878         * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
879         the function_start_locus location.  Don't do that afterwards for the
880         __GIMPLE body parsing.
882 2020-03-19  Jakub Jelinek  <jakub@redhat.com>
884         PR gcov-profile/94029
885         * c-tree.h (finish_function): Add location_t argument defaulted to
886         input_location.
887         * c-parser.c (c_parser_compound_statement): Add endlocp argument and
888         set it to the locus of closing } if non-NULL.
889         (c_parser_compound_statement_nostart): Return locus of closing }.
890         (c_parser_parse_rtl_body): Likewise.
891         (c_parser_declaration_or_fndef): Propagate locus of closing } to
892         finish_function.
893         * c-decl.c (finish_function): Add end_loc argument, use it instead of
894         input_location to set function_end_locus.
896 2020-03-17  Jakub Jelinek  <jakub@redhat.com>
898         PR c/94172
899         * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
900         instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
901         (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
902         * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
903         ENUMERAL_TYPEs.
904         (finish_incomplete_vars): New function, moved from finish_struct.  Use
905         relayout_decl instead of layout_decl.
906         (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
907         being TYPE_VFIELD.  Use finish_incomplete_vars.
908         (finish_enum): Clear C_TYPE_INCOMPLETE_VARS.  Call
909         finish_incomplete_vars.
910         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
911         also on ENUMERAL_TYPEs.
913 2020-03-16  Jakub Jelinek  <jakub@redhat.com>
915         PR c/94179
916         * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
918 2020-03-13  Martin Sebor  <msebor@redhat.com>
920         PR c/94040
921         * c-decl.c (builtin_structptr_type_count): New constant.
922         (match_builtin_function_types): Reject decls that are incompatible
923         in types pointed to by pointers.
924         (diagnose_mismatched_decls): Adjust comments.
926 2020-03-05  Joseph Myers  <joseph@codesourcery.com>
928         PR c/93577
929         * c-typeck.c (pop_init_level): Do not diagnose initializers as
930         empty when initialized type is error_mark_node.
931         (set_designator, process_init_element): Ignore initializers for
932         elements of a variable-size type or of error_mark_node.
934 2020-03-01  Martin Sebor  <msebor@redhat.com>
936         PR middle-end/93926
937         * c-decl.c (types_close_enough_to_match): New function.
938         (match_builtin_function_types):
939         (diagnose_mismatched_decls): Add missing inform call to a warning.
941 2020-03-01  Martin Sebor  <msebor@redhat.com>
943         PR c/93812
944         * c-typeck.c (build_functype_attribute_variant): New function.
945         (composite_type): Call it.
947 2020-02-25  Jakub Jelinek  <jakub@redhat.com>
949         PR other/93912
950         * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
951         Rename last argument from probablity to probability.
953 2020-02-13  Jakub Jelinek  <jakub@redhat.com>
955         PR c/93576
956         * c-decl.c (grokdeclarator): If this_size_varies, only push size into
957         *expr if it has side effects.
959 2020-01-30  Jeff Law  <law@redhat.com>
961         PR c/88660
962         * c-parser.c (c_parser_switch_statement): Make sure to request
963         marking the switch expr as used.
965 2020-01-22  Joseph Myers  <joseph@codesourcery.com>
967         PR c/93348
968         * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
969         argument with integer operands.
971 2020-01-16  Kerem Kat  <keremkat@gmail.com>
973         PR c/92833
974         * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
975         to support 4 available tokens.
977 2020-01-15  Joseph Myers  <joseph@codesourcery.com>
979         PR c/93072
980         * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
981         determine whether to set DECL_CONTEXT.
983 2020-01-13  Joseph Myers  <joseph@codesourcery.com>
985         PR c/93241
986         * c-typeck.c (build_c_cast): Check for expressions with integer
987         operands that can occur in an unevaluated part of an integer
988         constant expression and call note_integer_operands as needed.
990 2019-01-08  Richard Biener  <rguenther@suse.de>
992         PR middle-end/93199
993         * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
994         permanently.
996 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
998         Update copyright years.
1000 2019-12-20  Eric Botcazou  <ebotcazou@adacore.com>
1002         * c-decl.c (collect_source_ref_cb): Delete.
1003         (for_each_global_decl): Rename into...
1004         (collect_source_refs): ...this.  Call collect_source_ref directly.
1005         (c_parse_final_cleanups): Always call collect_source_ref on the main
1006         input filename.
1008 2019-12-19  Julian Brown  <julian@codesourcery.com>
1009             Cesar Philippidis  <cesar@codesourcery.com>
1011         * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1012         detach clauses.
1013         (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1014         Allow deref (->) in variable lists if true.
1015         (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1016         Pass to c_parser_omp_variable_list.
1017         (c_parser_oacc_data_clause): Support attach and detach clauses.  Update
1018         call to c_parser_omp_variable_list.
1019         (c_parser_oacc_all_clauses): Support attach and detach clauses.
1020         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1021         OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1022         OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1023         (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1024         * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1025         and detach.  Support deref.
1026         (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1027         GOMP_MAP_ALWAYS_POINTER for OpenACC.
1028         (c_oacc_check_attachments): New function.
1029         (c_finish_omp_clauses): Check attach/detach arguments for being
1030         pointers using above.  Support deref.
1032 2019-12-19  Julian Brown  <julian@codesourcery.com>
1033             Maciej W. Rozycki  <macro@codesourcery.com>
1034             Tobias Burnus  <tobias@codesourcery.com>
1035             Thomas Schwinge  <thomas@codesourcery.com>
1037         * c-parser.c (c_parser_omp_clause_name): Support no_create.
1038         (c_parser_oacc_data_clause): Likewise.
1039         (c_parser_oacc_all_clauses): Likewise.
1040         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1041         (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1042         PRAGMA_OACC_CLAUSE_NO_CREATE.
1043         * c-typeck.c (handle_omp_array_sections): Support
1044         GOMP_MAP_NO_ALLOC.
1046 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
1048         * c-objc-common.c (range_label_for_type_mismatch::get_text):
1049         Replace label_text ctor calls.
1051 2019-12-04  Joseph Myers  <joseph@codesourcery.com>
1053         PR c/36941
1054         PR c/88827
1055         * c-typeck.c (convert_lvalue_to_rvalue): Call
1056         require_complete_type for arguments not of void types.
1057         (build_indirect_ref): Do not diagnose dereferencing pointers to
1058         incomplete types.
1059         * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1061 2019-12-03  Joseph Myers  <joseph@codesourcery.com>
1063         PR c/88704
1064         * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1065         old-style parameter definitions.
1067 2019-12-01  Sandra Loosemore  <sandra@codesourcery.com>
1069         PR target/92499
1071         * c-decl.c (flexible_array_type_p): Move to common code.
1073 2019-11-30  Richard Sandiford  <richard.sandiford@arm.com>
1075         * c-decl.c (start_decl): Allow initialization of variables whose
1076         size is a POLY_INT_CST.
1077         (finish_decl): Use verify_type_context to check whether the target
1078         allows variables with a particular type to have static or thread-local
1079         storage duration.  Don't raise a second error if such variables do
1080         not have a constant size.
1081         (grokdeclarator): Use verify_type_context to check whether the
1082         target allows fields or array elements to have a particular type.
1083         * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1084         the target allows pointer difference for the types involved.
1085         (build_unary_op): Likewise for pointer increment and decrement.
1087 2019-11-29  Joseph Myers  <joseph@codesourcery.com>
1089         * c-parser.c (struct c_parser): Add members raw_tokens and
1090         raw_tokens_used.
1091         (c_lex_one_token): Add argument raw.  Handle lexing raw tokens and
1092         using previously-lexed raw tokens.
1093         (c_parser_peek_nth_token_raw)
1094         (c_parser_check_balanced_raw_token_sequence): New functions.
1095         (c_parser_nth_token_starts_std_attributes): Use
1096         c_parser_check_balanced_raw_token_sequence for Objective-C.
1098 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
1100         PR c/91985
1101         * c-decl.c (finish_declspecs): Use int instead of decimal
1102         floating-point types if decimal floating-point not supported.
1104 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
1106         * c-tree.h (struct c_declarator): Use a structure for id member.
1107         * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1108         declarators at the start, not when handling individual declarators
1109         later.  Use u.id.id instead of u.id.
1110         (grokfield): Use u.id.id instead of u.id.
1111         (build_id_declarator): Set u.id.id and u.id.attrs.
1112         (finish_declspecs): Handle postfix attributes in case of typedef
1113         name or typeof used.
1114         * c-parser.c (c_parser_direct_declarator)
1115         (c_parser_direct_declarator_inner): Place declarator for
1116         attributes inside that for function or array, not outside.  Set
1117         u.id.attrs for identifiers.
1118         (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1119         * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1120         instead of u.id.
1122 2019-11-22  Jakub Jelinek  <jakub@redhat.com>
1124         PR c/90677
1125         * c-decl.c (identifier_global_tag): Define.
1127 2019-11-20  Richard Biener  <rguenther@suse.de>
1129         PR c/92088
1130         * c-decl.c (grokdeclarator): Prevent inlining of nested
1131         function with VLA arguments.
1133 2019-11-20  Joseph Myers  <joseph@codesourcery.com>
1135         * c-decl.c (c_warn_type_attributes): New function.
1136         (groktypename, grokdeclarator, finish_declspecs): Call
1137         c_warn_type_attributes before applying attributes to types.
1138         * c-tree.h (c_warn_type_attributes): Declare.
1140 2019-11-19  Joseph Myers  <joseph@codesourcery.com>
1142         * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1143         standard attributes.
1144         * c-parser.c (c_parser_std_attribute): Take argument for_tm.  Use
1145         pedwarn for unknown standard attributes and return error_mark_node
1146         for them.
1148 2019-11-18  Matthew Malcomson  <matthew.malcomson@arm.com>
1150         * c-parser.c (c_parser_parse_rtl_body): Always call
1151         run_rtl_passes, even if startwith pass is not provided.
1153 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
1155         * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1156         duplicate standard attributes.
1158 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
1160         * c-decl.c (std_attribute_table): Add maybe_unused.
1162 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
1164         * c-decl.c (std_attribute_table): Add fallthrough.
1165         * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1166         attribute at top level.
1168 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
1170         * c-decl.c (std_attribute_table): New.
1171         (c_init_decl_processing): Register attributes from
1172         std_attribute_table.
1173         * c-parser.c (c_parser_attribute_arguments): Add arguments
1174         require_string and allow_empty_args.  All callers changed.
1175         (c_parser_std_attribute): Set require_string argument for
1176         "deprecated" attribute.
1178 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
1180         * c-parser.c (c_parser_postfix_expression)
1181         (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1182         * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1184 2019-11-14  Richard Sandiford  <richard.sandiford@arm.com>
1186         * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1187         of build_same_sized_truth_vector_type.
1188         (build_vec_cmp): Likewise.
1190 2019-11-14  Jakub Jelinek  <jakub@redhat.com>
1192         * c-parser.c (c_parser_omp_context_selector): Don't require score
1193         argument to fit into shwi, just to be INTEGER_CST.  Diagnose
1194         negative score.
1196         * c-parser.c (c_parser_omp_context_selector): Rename
1197         CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1198         Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1199         identifier in that.  For CTX_PROPERTY_NAME_LIST, allow identifiers
1200         and string literals.
1202 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
1204         * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1205         ctsk_tagfirstref_attrs.
1206         (struct c_declspecs): Update description of attrs.  Add
1207         postfix_attrs and non_std_attrs_seen_p.  Increase size of
1208         typespec_kind bit-field.
1209         (c_warn_unused_attributes): New declaration.
1210         (parser_xref_tag): Update prototype.
1211         * c-decl.c (c_warn_unused_attributes): New function.
1212         (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1213         ctsk_tagref_attrs.  Handle attribute declarations.
1214         (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1215         (grokdeclarator): Handle standard attributes.
1216         (parser_xref_tag): Add arguments have_std_attrs and attrs.  Apply
1217         attributes to incomplete type reference.
1218         (xref_tag): Update call to parser_xref_tag.
1219         (declspecs_add_addrspace, declspecs_add_type)
1220         (declspecs_add_scspec, declspecs_add_attrs): Set
1221         non_std_attrs_seen_p.
1222         (finish_declspecs): Apply postfix standard attributes to type.
1223         * c-parser.c (c_token_starts_declspecs)
1224         (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1225         (c_parser_next_tokens_start_declaration): Update comments.
1226         (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1227         parser->tokens[2] to parser->tokens[1].
1228         (c_parser_nth_token_starts_std_attributes)
1229         (c_parser_std_attribute_specifier_sequence): New functions.
1230         (c_parser_declaration_or_fndef): Add arguments have_attrs and
1231         attrs.  All callers changed.  Handle standard attributes.
1232         (c_parser_parms_declarator, c_parser_parms_list_declarator)
1233         (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1234         All callers changed.
1235         (c_parser_declspecs): Add arguments start_std_attr_ok and
1236         end_std_attr_ok.  All callers changed.  Handle standard
1237         attributes.
1238         (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1239         (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1240         (c_parser_compound_statement_nostart, c_parser_all_labels)
1241         (c_parser_label, c_parser_statement, c_parser_for_statement):
1242         Handle standard attributes.
1243         * c-parser.h (c_parser_declspecs): Update prototype.
1244         * gimple-parser.c (c_parser_gimple_declaration): Update call to
1245         c_parser_declspecs.
1247 2019-11-12  Martin Liska  <mliska@suse.cz>
1249         * gimple-parser.c: Do not include params.h.
1251 2019-11-12  Martin Liska  <mliska@suse.cz>
1253         * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1254         with the new one, include opts.h if needed.  Use SET_OPTION_IF_UNSET
1255         macro.
1257 2019-11-12  Maciej W. Rozycki  <macro@codesourcery.com>
1258             Frederik Harwath  <frederik@codesourcery.com>
1260         gcc/c/
1261         * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1262         (c_parser_oacc_kernels_parallel): Rename function to...
1263         (c_parser_oacc_compute): ... this.  Handle PRAGMA_OACC_SERIAL.
1264         (c_parser_omp_construct): Update accordingly.
1267 2019-11-11  Jakub Jelinek  <jakub@redhat.com>
1269         * c-parser.c (c_parser_translation_unit): Diagnose declare target
1270         without corresponding end declare target.
1272 2019-11-08  Richard Sandiford  <richard.sandiford@arm.com>
1274         * c-convert.c (convert): Only handle vector conversions if one of
1275         the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1276         allows it.
1277         * c-typeck.c (build_array_ref): Only allow vector indexing if the
1278         vectors satisfy gnu_vector_type_p.
1279         (build_unary_op): Only allow unary operators to be applied to
1280         vectors if they satisfy gnu_vector_type_p.
1281         (digest_init): Only allow by-element initialization of vectors
1282         if they satisfy gnu_vector_type_p.
1283         (really_start_incremental_init): Likewise.
1284         (push_init_level): Likewise.
1285         (pop_init_level): Likewise.
1286         (process_init_element): Likewise.
1287         (build_binary_op): Only allow binary operators to be applied to
1288         vectors if they satisfy gnu_vector_type_p.
1290 2019-11-08  Joseph Myers  <joseph@codesourcery.com>
1292         * c-decl.c (grokparms): Convert () in a function definition to
1293         (void) for C2x.
1294         (store_parm_decls_oldstyle): Pedwarn for C2x.
1295         (store_parm_decls): Update comment about () not generating a
1296         prototype.
1298 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
1300         * c-parser.c (c_parser_attribute_arguments): New function.
1301         Factored out of c_parser_gnu_attribute.
1302         (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1303         (c_parser_balanced_token_sequence, c_parser_std_attribute)
1304         (c_parser_std_attribute_specifier): New functions.
1305         (c_parser_transaction_attributes): Use
1306         c_parser_std_attribute_specifier.
1308 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
1310         * c-parser.c (c_parser): Remove lex_untranslated_string.  Add
1311         lex_joined_string and translate_strings_p.
1312         (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1313         c_lex_with_flags.
1314         (c_parser_string_literal): New function.
1315         (c_parser_static_assert_declaration_no_semi): Use
1316         c_parser_string_literal.  Do not set lex_untranslated_string.
1317         (c_parser_asm_string_literal): Use c_parser_string_literal.
1318         (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1319         (c_parser_gnu_attributes): Set and restore translate_strings_p
1320         instead of lex_untranslated_string.
1321         (c_parser_asm_statement): Do not set lex_untranslated_string.
1322         (c_parser_asm_operands): Likewise.
1323         (c_parser_has_attribute_expression): Set and restore
1324         translate_strings_p instead of lex_untranslated_string.
1325         (c_parser_postfix_expression): Use c_parser_string_literal.
1326         (pragma_lex): Likewise.
1327         (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1328         (c_parse_file): Set translate_strings_p.
1329         * gimple-parser.c (c_parser_gimple_postfix_expression)
1330         (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1331         * c-parser.c (c_parser_string_literal): Declare function.
1333 2019-11-02  Jakub Jelinek  <jakub@redhat.com>
1335         * c-parser.c (c_finish_omp_declare_variant): Use
1336         omp_get_context_selector instead of c_omp_get_context_selector.
1338 2019-10-29  Richard Sandiford  <richard.sandiford@arm.com>
1340         * c-tree.h (c_simulate_enum_decl): Declare.
1341         * c-decl.c (c_simulate_enum_decl): New function.
1342         * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1344 2019-10-29  Richard Sandiford  <richard.sandiford@arm.com>
1346         * c-tree.h (c_simulate_builtin_function_decl): Declare.
1347         * c-decl.c (c_simulate_builtin_function_decl): New function.
1348         * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1349         to the above.
1351 2019-10-28  Martin Sebor  <msebor@redhat.com>
1353         PR c/66970
1354         * c-decl.c (names_builtin_p): Define a new function.
1356 2019-10-28  Richard Biener  <rguenther@suse.de>
1358         PR c/92249
1359         * gimple-parser.c (c_parser_parse_gimple_body): Make
1360         current_bb the entry block initially to easier recover
1361         from errors.
1362         (c_parser_gimple_compound_statement): Adjust.
1364 2019-10-24  Jakub Jelinek  <jakub@redhat.com>
1366         * c-parser.c (c_finish_omp_declare_variant): Use
1367         omp_context_selector_matches instead of
1368         c_omp_context_selector_matches.
1369         * c-decl.c (c_decl_attributes): Add "omp declare target block"
1370         attribute in between declare target and end declare target
1371         pragmas.
1373 2019-10-15  Joseph Myers  <joseph@codesourcery.com>
1375         * c-parser.c (c_parser_attribute_any_word): Rename to
1376         c_parser_gnu_attribute_any_word.  All callers changed.
1377         (c_parser_attribute): Rename to c_parser_gnu_attribute.  All
1378         callers changed.
1379         (c_parser_attributes): Rename to c_parser_gnu_attributes.  All
1380         callers changed.
1381         (c_parser_declaration_or_fndef, c_parser_declspecs)
1382         (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1383         (c_parser_struct_declaration, c_parser_declarator)
1384         (c_parser_gnu_attribute, c_parser_compound_statement)
1385         (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1386         (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1387         attribute-related syntax productions.
1389 2019-10-14  Richard Sandiford  <richard.sandiford@arm.com>
1391         * c-objc-common.c (useful_aka_type_p): Replace with...
1392         (get_aka_type): ...this new function.  Given the original type,
1393         decide which aka type to print (if any).  Only look through typedefs
1394         if user_facing_original_type_p.
1395         (print_type): Update accordingly.
1397 2019-10-14  Jakub Jelinek  <jakub@redhat.com>
1399         * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1400         into int NESTED, if it is 2, diagnose missing commas in between
1401         clauses.
1402         (c_parser_omp_context_selector): Pass 2 as last argument to
1403         c_parser_omp_all_clauses.
1405 2019-10-12  Jakub Jelinek  <jakub@redhat.com>
1407         * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1408         For simd properties, put them directly into TREE_VALUE.
1409         (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1410         If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1411         add "omp declare variant base" attribute rather than
1412         "omp declare variant".
1414 2019-10-11  Joseph Myers  <joseph@codesourcery.com>
1416         * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1418 2019-10-10  Jakub Jelinek  <jakub@redhat.com>
1420         * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1421         true, terminate processing on closing paren and don't skip to end of
1422         pragma line.
1423         (c_parser_omp_declare_simd): Handle also declare variant.
1424         (omp_construct_selectors, omp_device_selectors,
1425         omp_implementation_selectors, omp_user_selectors): New variables.
1426         (c_parser_omp_context_selector,
1427         c_parser_omp_context_selector_specification,
1428         c_finish_omp_declare_variant): New functions.
1429         (c_finish_omp_declare_simd): Handle both declare simd and
1430         declare variant.
1431         (c_parser_omp_declare): Handle declare variant.
1433 2019-10-02  Joseph Myers  <joseph@codesourcery.com>
1435         * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1436         CPP_COLON tokens.
1438 2019-10-01  Richard Sandiford  <richard.sandiford@arm.com>
1440         * c-objc-common.c (useful_aka_type_p): New function.
1441         (print_type): Use it to decide whether an aka type is worth printing.
1443 2019-09-27  Jakub Jelinek  <jakub@redhat.com>
1445         PR c++/88203
1446         * c-parser.c (c_parser_predefined_identifier): New function.
1447         (c_parser_postfix_expression): Use it.
1448         (c_parser_omp_variable_list): Parse predefined identifiers.
1449         * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1450         in shared and firstprivate clauses, even when they are predetermined
1451         shared.
1453 2019-09-27  Richard Sandiford  <richard.sandiford@arm.com>
1455         * c-typeck.c (build_function_call_vec): Take the original function
1456         decl as an optional final parameter.  Pass all built-in calls to
1457         check_builtin_function_arguments.
1459 2019-09-20  Eric Botcazou  <ebotcazou@adacore.com>
1461         PR c/91815
1462         * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1463         of identifiers in the external scope only for variables and functions.
1465 2019-09-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1467         PR c/78736
1468         * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1470 2019-08-23  Iain Sandoe  <iain@sandoe.co.uk>
1472         PR pch/61250
1473         * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1474         after determining that the first token is not
1475         PRAGMA_GCC_PCH_PREPROCESS.
1477 2019-08-22  Eric Botcazou  <ebotcazou@adacore.com>
1479         * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1480         FUNCTION_DECL to the right value in the presence of nested declarators.
1482 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
1484         PR middle-end/91421
1485         * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1487 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
1489         PR middle-end/91421
1490         * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1491         of a built_in_function.
1492         (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1494 2019-08-10  Jakub Jelinek  <jakub@redhat.com>
1496         * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1497         (c_parser_omp_clause_device_type): New function.
1498         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1499         (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1500         (c_parser_omp_declare_target): Handle device_type clauses.  Remove
1501         diagnostics for declare target with clauses nested in clause-less
1502         declare target declaration-definition-seq.
1503         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1505 2019-08-09  Jakub Jelinek  <jakub@redhat.com>
1507         * c-parser.c (check_no_duplicate_clause): Simplify using
1508         omp_find_clause.
1509         (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1510         directive name modifiers.
1511         (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1513         PR c/91401
1514         * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1515         check_no_duplicate_clause call.  Comment it out, instead emit a
1516         warning for duplicate dist_schedule clauses.
1518 2019-08-08  Richard Sandiford  <richard.sandiford@arm.com>
1520         * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1522 2019-08-08  Jakub Jelinek  <jakub@redhat.com>
1524         * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1525         OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1526         instead of generic_head to track duplicates.
1528 2019-08-07  Jakub Jelinek  <jakub@redhat.com>
1530         * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1531         (c_parser_omp_clause_use_device_addr): New function.
1532         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1533         (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1534         (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1535         like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1536         map or use_device_* clauses.
1537         * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1538         in OpenMP, require pointer type rather than pointer or array type.
1539         Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1541 2019-07-31  Jakub Jelinek  <jakub@redhat.com>
1543         PR c/91192
1544         * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1545         even if finish is UNKNOWN_LOCATION, just use start as finish in that
1546         case.
1548 2019-07-25  Martin Liska  <mliska@suse.cz>
1549             Dominik Infuhr  <dominik.infuehr@theobroma-systems.com>
1551         PR c++/23383
1552         * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1554 2019-07-25  Martin Liska  <mliska@suse.cz>
1556         * c-decl.c (merge_decls): Use new macros
1557         (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1559 2019-07-23  Richard Biener  <rguenther@suse.de>
1561         PR tree-optimization/83518
1562         * gimple-parser.c (c_parser_parse_gimple_body): When we have
1563         a CFG also rebuild cgraph edges.
1565 2019-07-20  Jakub Jelinek  <jakub@redhat.com>
1567         * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1568         (c_parser_omp_clause_bind): New function.
1569         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1570         (OMP_LOOP_CLAUSE_MASK): Define.
1571         (c_parser_omp_loop): New function.
1572         (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1573         loop combined with parallel or teams.
1574         (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1575         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1577 2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>
1579         PR c/53633
1580         * c-decl.c (finish_function): Check targetm.warn_func_return
1581         before issuing a -Wreturn-type warning.
1583 2019-07-12  Alexandre Oliva  <oliva@adacore.com>
1585         * gimple-parser.c (c_parser_gimple_try_stmt): New.
1586         (c_parser_compound_statement): Call it.
1588 2019-07-12  Jakub Jelinek  <jakub@redhat.com>
1590         * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1591         (c_parser_omp_clause_order): New function.
1592         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1593         (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1594         PRAGMA_OMP_CLAUSE_ORDER.
1595         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1597 2019-07-10  Richard Biener  <rguenther@suse.de>
1599         * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1600         _Literal (int *) &x for address literals.
1602 2019-07-09  Martin Sebor  <msebor@redhat.com>
1604         PR c++/61339
1605         * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1606         to class.
1607         (field_decl_cmp): Same.
1608         * c-parser.c (c_parser_struct_or_union_specifier): Same.
1609         * c-tree.h: Same.
1610         * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1612 2019-07-09  Martin Sebor  <msebor@redhat.com>
1614         PR c++/61339
1615         * c-decl.c: Change class-key from class to struct and vice versa
1616         to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1617         * gimple-parser.c: Same.
1619 2019-07-01  Richard Biener  <rguenther@suse.de>
1621         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1622         _Literal (char *) &"foo" for address literals pointing to
1623         STRING_CSTs.
1625 2019-06-25  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1627         * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1628         * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1629         C incompatibility if alternate "__intN__" form is used.
1631 2019-06-24  Martin Sebor  <msebor@redhat.com>
1633         * c-typeck.c (build_binary_op): Hyphenate floating-point.
1635 2019-06-10  Jakub Jelinek  <jakub@redhat.com>
1637         * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1638         (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1639         (c_parser_omp_scan_loop_body): New function.
1640         (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1641         inscan reduction clauses.
1642         * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1643         non-inscan reductions on the same construct, or inscan reductions with
1644         ordered or schedule clauses, or inscan array reductions.
1646 2019-06-05  Martin Sebor  <msebor@redhat.com>
1648         PR c/90737
1649         * c-typeck.c (c_finish_return): Only consider functions returning
1650         pointers as candidates for -Wreturn-local-addr.
1652 2019-06-05  Martin Sebor  <msebor@redhat.com>
1654         * c-decl.c (start_decl): Adjust quoting and hyphenation
1655         in diagnostics.
1656         (finish_decl): Same.
1657         (finish_enum): Same.
1658         (start_function): Same.
1659         (declspecs_add_type): Same.
1660         * c-parser.c (warn_for_abs): Same.
1661         * c-typeck.c (build_binary_op): Same.
1663 2019-05-17  Thomas Schwinge  <thomas@codesourcery.com>
1665         PR c/89433
1666         * c-parser.c (c_finish_oacc_routine): Rework checking if already
1667         marked with an OpenACC 'routine' directive.
1669         PR c/89433
1670         * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1671         (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1673         PR c/89433
1674         * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1675         clauses from "omp declare target" attribute.
1677 2019-05-16  Martin Sebor  <msebor@redhat.com>
1679         * c-decl.c (start_decl): Quote keywords, operators, and
1680         types in diagnostics.
1681         (finish_decl): Same.
1682         * c-parser.c (c_parser_asm_statement): Same.
1683         (c_parser_conditional_expression): Same.
1684         (c_parser_transaction_cancel): Same.
1685         * c-typeck.c (c_common_type): Same.
1686         (build_conditional_expr): Same.
1687         (digest_init): Same.
1688         (process_init_element): Same.
1689         (build_binary_op): Same.
1691 2019-05-17  Richard Biener  <rguenther@suse.de>
1693         * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1694         (c_parser_gimple_unary_expression): Likewise.
1695         (c_parser_gimple_parentized_ternary_expression): New function.
1697 2019-05-16  Richard Biener  <rguenther@suse.de>
1699         * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1700         (c_parser_gimple_unary_expression): Likewise.
1702 2019-05-15  Richard Biener  <rguenther@suse.de>
1704         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1705         __BIT_FIELD_REF.
1707 2019-05-14  Richard Biener  <rguenther@suse.de>
1709         * gimple-parser.c (c_parser_gimple_statement): Remove
1710         questionable auto-promotion to VIEW_CONVERT_EXPR.
1711         (c_parser_gimple_typespec): Split out from __MEM parsing.
1712         (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1713         * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1714         as __VIEW_CONVERT with -gimple.
1716 2019-05-09  Martin Liska  <mliska@suse.cz>
1718         * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1719         __MAX.
1720         (c_parser_gimple_unary_expression): Parse also binary expression
1721         __MIN and __MAX.
1722         (c_parser_gimple_parentized_binary_expression): New function.
1724 2019-05-09  Martin Liska  <mliska@suse.cz>
1726         * gimple-parser.c (struct gimple_parser): Add probability.
1727         for gimple_parser_edge.
1728         (gimple_parser::push_edge): Add new argument probability.
1729         (c_parser_gimple_parse_bb_spec): Parse also probability
1730         if present.
1731         (c_parser_parse_gimple_body): Set edge probability.
1732         (c_parser_gimple_compound_statement): Consume token
1733         before calling c_parser_gimple_goto_stmt.
1734         Parse BB counts.
1735         (c_parser_gimple_statement): Pass new argument.
1736         (c_parser_gimple_goto_stmt): Likewise.
1737         (c_parser_gimple_if_stmt): Likewise.
1738         (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1739         * c-parser.c (c_parser_declaration_or_fndef): Pass
1740         hot_bb_threshold argument.
1741         * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1742         field.
1743         (c_parser_gimple_parse_bb_spec_edge_probability): New.
1745 2019-04-26  Jakub Jelinek  <jakub@redhat.com>
1747         PR debug/90197
1748         * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1749         * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1750         (c_parser_do_statement): Likewise.
1751         (c_parser_for_statement): Likewise.  Formatting fixes.
1752         * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1753         emit DEBUG_BEGIN_STMTs if needed.
1755 2019-04-19  Jakub Jelinek  <jakub@redhat.com>
1757         PR c/89888
1758         * c-typeck.c (struct c_switch): Remove outside_range_p member.
1759         (c_start_case): Don't clear it.
1760         (do_case): Adjust c_add_case_label caller.
1761         (c_finish_case): Adjust c_do_switch_warnings caller.
1763         PR c++/90108
1764         * c-decl.c (merge_decls): If remove is main variant and
1765         DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1766         variant that has newdecl as TYPE_NAME if any.
1768 2019-04-12  Jakub Jelinek  <jakub@redhat.com>
1770         PR c/89933
1771         * c-decl.c (merge_decls): When newdecl's type is its main variant,
1772         don't try to remove it from the variant list, but instead assert
1773         it has no variants.
1775 2019-04-01  Richard Biener  <rguenther@suse.de>
1777         PR c/71598
1778         * c-tree.h (c_get_alias_set): Declare.
1779         * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1780         * c-objc-common.c (c_get_alias_set): Treat enumeral types
1781         as the underlying integer type.
1783 2019-03-19  Martin Sebor  <msebor@redhat.com>
1785         PR tree-optimization/89688
1786         * c-decl.c (finish_decl): Call braced_lists_to_string for more
1787         kinds of initializers.
1789 2019-03-19  Jakub Jelinek  <jakub@redhat.com>
1791         PR c/89734
1792         * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1793         return type even if quals_used is 0.  Formatting fixes.
1795 2019-03-14  Richard Biener  <rguenther@suse.de>
1797         * c-tree.h (enum c_declspec_il): New.
1798         (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1799         enum bitfield.
1800         * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1801         Pass start pass and declspec_il to c_parser_parse_gimple_body.
1802         (c_parser_declspecs): Adjust.
1803         * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1804         gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1805         and bitmap.h.
1806         (struct gimple_parser): New.
1807         (gimple_parser::push_edge): New method.
1808         (c_parser_gimple_parse_bb_spec): New helper.
1809         (c_parser_parse_gimple_body): Get start pass and IL specification.
1810         Initialize SSA and CFG.
1811         (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1812         Build a gimple_parser parsing state and pass it along.
1813         (c_parser_gimple_statement): Change intermittend __PHI internal
1814         function argument for the edge.
1815         (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1816         (c_parser_gimple_goto_stmt): Record edges to build.
1817         (c_parser_gimple_if_stmt): Likewise.
1818         * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1819         (c_parser_gimple_or_rtl_pass_list): Likewise.
1821 2019-03-11  Martin Liska  <mliska@suse.cz>
1823         * c-decl.c (check_for_loop_decls): Wrap an option name
1824         in a string format message and fix GNU coding style.
1825         * c-parser.c (c_parser_declspecs): Likewise.
1827 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
1829         PR tree-optimization/89550
1830         * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1831         returned true.
1832         (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1833         or warning returned true.
1835 2019-02-28  Jakub Jelinek  <jakub@redhat.com>
1837         PR c/89525
1838         * c-typeck.c (convert_arguments): Call inform_declaration only if
1839         the previous warning_at call returned true.
1841 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
1843         * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1844         parameter.  Adjust all users.
1845         (c_parser_oacc_simple_clause): Replace parser with loc formal
1846         parameter.  Adjust all users.
1848 2019-02-19  Chung-Lin Tang  <cltang@codesourcery.com>
1850         PR c/87924
1851         * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1852         clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1854 2019-02-15  Jakub Jelinek  <jakub@redhat.com>
1856         PR c/89340
1857         * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1858         before c_decl_attributes rather than after it.
1860 2019-02-06  Jakub Jelinek  <jakub@redhat.com>
1862         PR c/89211
1863         * c-parser.c (c_parser_declaration_or_fndef): Don't update
1864         DECL_ARGUMENTS of d if it has been defined already.  Use a single if
1865         instead of 3 nested ifs.
1867 2019-02-06  Joseph Myers  <joseph@codesourcery.com>
1869         PR c/88584
1870         * c-decl.c (finish_decl): Do not complete array types for arrays
1871         with external linkage not at file scope.
1873 2019-02-05  Richard Biener  <rguenther@suse.de>
1875         PR c/88606
1876         * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1877         all type variants when not supported.
1879 2019-01-30  Jakub Jelinek  <jakub@redhat.com>
1881         PR c/89061
1882         * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1883         * c-decl.c (decl_jump_unsafe): Return false for
1884         C_DECL_COMPOUND_LITERAL_P decls.
1885         (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1887 2019-01-29  Jakub Jelinek  <jakub@redhat.com>
1889         PR c/89045
1890         * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1891         scope.
1893         PR c/86125
1894         * c-decl.c (last_fileptr_type): Remove.
1895         (last_structptr_types): New variable.
1896         (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1897         {old,new}rettype instead of the types themselves.  Assert
1898         last_structptr_types array has the same number of elements
1899         as builtin_structptr_types array.  Use TYPE_MAIN_VARIANT for
1900         argument oldtype and newtype.  Instead of handling
1901         just fileptr_type_node specially, handle all builtin_structptr_types
1902         pointer nodes.  Formatting fix.
1904 2019-01-24  Martin Sebor  <msebor@redhat.com>
1906         PR c/86125
1907         PR c/88886
1908         PR middle-end/86308
1909         * c-decl.c (match_builtin_function_types): Add arguments.
1910         (diagnose_mismatched_decls): Diagnose mismatched declarations
1911         of built-ins more strictly.
1913 2019-01-24  Jakub Jelinek  <jakub@redhat.com>
1915         PR c++/88976
1916         * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1917         on #pragma omp cancel with different modifiers.
1919 2019-01-18  H.J. Lu  <hongjiu.lu@intel.com>
1921         PR c/51628
1922         PR c/88664
1923         * c-typeck.c (convert_for_assignment): Upate the
1924         warn_for_address_or_pointer_of_packed_member call.
1926 2019-01-16  Tom Honermann  <tom@honermann.net>
1927             Jason Merrill  <jason@redhat.com>
1929         * c-typeck.c (digest_init): Revised the error message produced for
1930         ill-formed cases of array initialization with a string literal.
1931         (error_init): Make variadic.
1933 2019-01-12  Jakub Jelinek  <jakub@redhat.com>
1935         * c-typeck.c (convert_for_assignment): Fix a comment typo.
1937 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
1939         PR c/88701
1940         * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1941         if current_function_decl is non-NULL.
1943 2019-01-07  Joseph Myers  <joseph@codesourcery.com>
1945         PR c/88720
1946         PR c/88726
1947         * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1948         whether a function is nested, not DECL_EXTERNAL.  Diagnose inline
1949         functions declared but never defined only for external scope, not
1950         for other scopes.
1952 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
1954         PR c++/85052
1955         * c-parser.c (c_parser_postfix_expression): Parse
1956         __builtin_convertvector.
1958 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
1960         Update copyright years.
1962 2018-12-20  H.J. Lu  <hongjiu.lu@intel.com>
1964         PR c/51628
1965         * c-typeck.c (convert_for_assignment): Call
1966         warn_for_address_or_pointer_of_packed_member.
1968 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
1970         * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1971         a more specific error message (instead of just falling through).
1973 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
1975         * c-parser.c (c_parser_asm_statement): Keep track of the location each
1976         asm qualifier is first seen; use that to give nicer "duplicate asm
1977         qualifier" messages.  Delete 'quals" variable, instead pass the
1978         "is_volatile_ flag to build_asm_stmt directly.
1979         * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1980         * c-typeck.c (build_asm_stmt): Ditto; adjust.
1982 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
1984         * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1985         "done" boolean variable.
1987 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
1989         PR c++/87504
1990         * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1991         Move from here to gcc-rich-location.h and gcc-rich-location.c.
1992         (build_binary_op): Use struct op_location_t and
1993         class binary_op_rich_location.
1995 2018-12-11  Jakub Jelinek  <jakub@redhat.com>
1997         PR sanitizer/88426
1998         * c-convert.c (convert): Call c_fully_fold before calling
1999         ubsan_instrument_float_cast.
2001 2018-12-08  Segher Boessenkool  <segher@kernel.crashing.org>
2003         * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2004         setting "quals".
2006 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
2008         * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2009         after asm.  Pass a flag for it to build_asm_expr.
2010         * c-tree.h (build_asm_expr): Update declaration.
2011         * c-typeck.c (build_asm_stmt): Add is_inline parameter.  Use it to
2012         set ASM_INLINE_P.
2014 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
2016         PR inline-asm/55681
2017         * c-parser.c (c_parser_asm_statement): Update grammar.  Allow any
2018         combination of volatile and goto, in any order, without repetitions.
2020 2018-12-04  James Norris  <jnorris@codesourcery.com>
2021             Cesar Philippidis  <cesar@codesourcery.com>
2022             Julian Brown  <julian@codesourcery.com>
2024         * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2025         code.
2027 2018-11-30  Richard Biener  <rguenther@suse.de>
2029         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2030         _Literal (type) { ... } as empty aggregate or vector constructor.
2032 2018-11-29  Martin Sebor  <msebor@redhat.com>
2034         PR c/88091
2035         * c-typeck.c (convert_argument): Add a parameter.  Adjust indentation.
2036         (convert_arguments): Add comments.  Pass additional argument to
2037         the function above.
2039 2018-11-29  Martin Sebor  <msebor@redhat.com>
2041         PR c/88172
2042         PR testsuite/88208
2043         * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2045 2018-11-23  Martin Sebor  <msebor@redhat.com>
2047         PR testsuite/88098
2048         * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2049         (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2051 2018-11-20  Martin Sebor  <msebor@redhat.com>
2053         * c-parser.c (c_parser_has_attribute_expression): New function.
2054         (c_parser_attribute): New function.
2055         (c_parser_attributes): Move code into c_parser_attribute.
2056         (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2058 2018-11-15  Martin Sebor  <msebor@redhat.com>
2060         PR c/83656
2061         * c-decl.c (header_for_builtin_fn): Declare.
2062         (diagnose_mismatched_decls): Diagnose declarations of built-in
2063         functions without a prototype.
2064         * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2065         (convert_argument): Same.
2066         (convert_arguments): Factor code out into convert_argument.
2067         Detect mismatches between built-in formal arguments in calls
2068         to built-in without prototype.
2069         (build_conditional_expr): Same.
2070         (type_or_builtin_type): New function.
2071         (convert_for_assignment): Add argument.  Conditionally issue
2072         warnings instead of errors for mismatches.
2074 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2076         * c-decl.c: Replace "source_location" with "location_t".
2077         * c-tree.h: Likewise.
2078         * c-typeck.c: Likewise.
2079         * gimple-parser.c: Likewise.
2081 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
2083         * c-parser.c (c_parser_omp_clause_final): Use
2084         c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2085         c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2086         parsing instead of c_parser_paren_condition.
2087         (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2088         convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2089         c_fully_fold instead of c_parser_condition.
2090         (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2091         c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2092         c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2093         c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2094         c_parser_expr_no_commas instead of c_parser_expression.
2096         * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2097         reduction clause with inscan modifier.
2099         * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2100         clauses other than atomic_default_mem_order.
2102 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
2104         * c-parser.c: Include memmode.h.
2105         (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2106         (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2107         (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2108         task_reduction clauses.
2109         (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2110         For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2111         section, or lvalue assignment expression.
2112         (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2113         (c_parser_omp_clause_lastprivate): Parse optional
2114         conditional: modifier.
2115         (c_parser_omp_clause_hint): Require constant integer expression rather
2116         than just integer expression.
2117         (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2118         clause.
2119         (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2120         Parse reduction modifiers.  Pass KIND to c_parser_omp_variable_list.
2121         (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2122         functions.
2123         (c_parser_omp_clause_depend): Parse iterator modifier and handle
2124         iterators.  Parse mutexinoutset and depobj kinds.
2125         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2126         callers.
2127         (c_parser_omp_all_clauses): Likewise.  Handle
2128         PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2129         PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2130         (c_parser_omp_atomic): Parse hint and memory order clauses.  Handle
2131         default memory order from requires directive if any.  Adjust
2132         c_finish_omp_atomic caller.
2133         (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2134         (c_parser_omp_flush): Parse flush with memory-order-clause.
2135         (c_parser_omp_for_loop): Allow NE_EXPR even in
2136         OpenMP loops, adjust c_finish_omp_for caller.
2137         (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2138         (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2139         Allow to be called while parsing combined parallel master.
2140         Parse combined master taskloop{, simd}.
2141         (c_parser_omp_parallel): Parse combined
2142         parallel master{, taskloop{, simd}} constructs.
2143         (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2144         (OMP_TASKGROUP_CLAUSE_MASK): Define.
2145         (c_parser_omp_taskgroup): Add LOC argument.  Parse taskgroup clauses.
2146         (OMP_TASKWAIT_CLAUSE_MASK): Define.
2147         (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2148         (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2149         around teams body.  Use SET_EXPR_LOCATION.
2150         (c_parser_omp_target_data): Allow target data
2151         with only use_device_ptr clauses.
2152         (c_parser_omp_target): Use SET_EXPR_LOCATION.  Set
2153         OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2154         (c_parser_omp_requires): New function.
2155         (c_finish_taskloop_clauses): New function.
2156         (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2157         (c_parser_omp_taskloop): Use c_finish_taskloop_clauses.  Add forward
2158         declaration.  Disallow in_reduction clause when combined with parallel
2159         master.
2160         (c_parser_omp_construct): Adjust c_parser_omp_master and
2161         c_parser_omp_taskgroup callers.
2162         * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2163         other than cancel.
2164         (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2165         like OMP_CLAUSE_REDUCTION.
2166         (handle_omp_array_sections): Likewise.  Call save_expr on array
2167         reductions before calling build_index_type.  Handle depend clauses
2168         with iterators.
2169         (struct c_find_omp_var_s): New type.
2170         (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2171         (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2172         with static, runtime or auto schedule kinds.  Call save_expr for whole
2173         array reduction sizes.  Diagnose reductions with zero sized elements
2174         or variable length structures.  Diagnose nogroup clause used with
2175         reduction clause(s).  Handle depend clause with
2176         OMP_CLAUSE_DEPEND_DEPOBJ.  Diagnose bit-fields.  Require
2177         omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2178         some different type for other kinds.  Use build_unary_op with
2179         ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2180         Handle depend clauses with iterators.  Remove no longer needed special
2181         case that predetermined const qualified vars may be specified in
2182         firstprivate clause.  Complain if const qualified vars are mentioned
2183         in data-sharing clauses other than firstprivate or shared.  Use
2184         error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2185         error.  Formatting fix.  Handle OMP_CLAUSE_NONTEMPORAL and
2186         OMP_CLAUSE_{IN,TASK}_REDUCTION.  Allow any lvalue as
2187         OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2189 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
2191         * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2192         logic for change to name_hint::operator bool.
2193         (undeclared_variable): Likewise.
2194         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2195         (c_parser_parameter_declaration): Likewise.
2197 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
2199         * c-errors.c (pedwarn_c11): New function.
2200         * c-parser.c (disable_extension_diagnostics): Save
2201         warn_c11_c2x_compat and set it to 0.
2202         (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2203         (c_parser_static_assert_declaration_no_semi): Handle
2204         _Static_assert without string constant.
2205         * c-tree.h (pedwarn_c11): New prototype.
2207 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
2209         * Make-lang.in (selftest-c): New.
2210         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2211         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2212         from gcc/Makefile.in.
2214 2018-10-02  Richard Biener  <rguenther@suse.de>
2216         * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2218 2018-09-26  Joseph Myers  <joseph@codesourcery.com>
2220         PR c/87390
2221         * c-typeck.c (build_binary_op): Use excess precision for
2222         comparisons of integers and floating-point for C11 and later.
2224 2018-09-26  Martin Jambor  <mjambor@suse.cz>
2226         PR c/87347
2227         * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL.  Fix
2228         comment.
2230 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2232         * c-objc-common.c (range_label_for_type_mismatch::get_text):
2233         Update for new param.
2234         * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2235         Likewise.
2237 2018-09-17  Martin Jambor  <mjambor@suse.cz>
2239         PR c/63886
2240         * c-parser.c: (warn_for_abs): New function.
2241         (c_parser_postfix_expression_after_primary): Call it.
2243 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2245         * c-typeck.c (digest_init): Shorten overlength strings.
2247 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2249         * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2251 2018-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2253         * c-decl.c (finish_decl): Call braced_list_to_string here ...
2254         * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2256 2018-08-30  Alexander Monakov  <amonakov@ispras.ru>
2258         * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2259         "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2261 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
2263         PR 87091
2264         * c-decl.c (implicitly_declare): Update call to
2265         maybe_add_include_fixit to suggest overriding the location, as it
2266         is for a note.
2267         * c-objc-common.c (c_tree_printer): Update for conversion of
2268         show_caret_p to a tri-state.
2270 2018-08-27  Martin Liska  <mliska@suse.cz>
2272         * c-decl.c (locate_old_decl): Use new function
2273         fndecl_built_in_p and remove check for FUNCTION_DECL if
2274         possible.
2275         (diagnose_mismatched_decls): Likewise.
2276         (merge_decls): Likewise.
2277         (warn_if_shadowing): Likewise.
2278         (pushdecl): Likewise.
2279         (implicitly_declare): Likewise.
2280         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2281         * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2282         * c-typeck.c (build_function_call_vec): Likewise.
2283         (convert_arguments): Likewise.
2285 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
2287         PR other/84889
2288         * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2289         (diagnose_mismatched_decls): Likewise, in various places.
2290         (warn_if_shadowing): Likewise.
2291         (implicit_decl_warning): Likewise.
2292         (implicitly_declare): Likewise.
2293         (undeclared_variable): Likewise.
2294         (declare_label): Likewise.
2295         (grokdeclarator): Likewise.
2296         (start_function): Likewise.
2297         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2298         (c_parser_parameter_declaration): Likewise.
2299         (c_parser_binary_expression): Likewise.
2300         * c-typeck.c (c_expr_sizeof_expr): Likewise.
2301         (parser_build_binary_op): Likewise.
2302         (build_unary_op): Likewise.
2303         (error_init): Likewise.
2304         (pedwarn_init): Likewise.
2305         (warning_init): Likewise.
2306         (convert_for_assignment): Likewise.
2308 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
2310         * c-objc-common.c: Include "gcc-rich-location.h".
2311         (c_tree_printer): Move implemenation of '%T' to...
2312         (print_type): ...this new function.
2313         (range_label_for_type_mismatch::get_text): New function.
2314         * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2315         range for the various ic_argpass cases.
2316         (class maybe_range_label_for_tree_type_mismatch): New class.
2317         (build_binary_op): Use it when calling binary_op_error.
2319 2018-08-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2321         * c-decl.c (start_decl): Do not warn if variables is named as main
2322         and is a local variable.
2324 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2326         PR c/19315
2327         * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2328         objects of unknown size.
2330 2018-08-13  Martin Sebor  <msebor@redhat.com>
2332         PR tree-optimization/71625
2333         * c-parser.c (c_parser_declaration_or_fndef): Call
2334         braced_list_to_string.
2336 2018-08-03  Bogdan Harjoc  <harjoc@gmail.com>
2338         PR c/86690
2339         * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2340         errors.
2342 2018-08-01  Martin Sebor  <msebor@redhat.com>
2344         PR tree-optimization/86650
2345         * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2346         and TREE_BLOCK (t) from within percent_K_format to this callsite.
2348 2018-08-01  Jakub Jelinek  <jakub@redhat.com>
2350         PR c/85704
2351         * c-typeck.c (init_field_decl_cmp): New function.
2352         (output_pending_init_elements): Use it for field comparisons
2353         instead of pure bit_position comparisons.
2355 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
2357         * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2358         type here, instead add "omp declare target implicit" attribute.
2359         (finish_decl): Diagnose vars without mappable type here.
2361 2018-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
2362             Thomas Schwinge  <thomas@codesourcery.com>
2363             Cesar Philippidis  <cesar@codesourcery.com>
2365         * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2366         and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2367         to their non-present_or_* counterparts. Make 'self' an alias to
2368         PRAGMA_OACC_CLAUSE_HOST.
2369         (c_parser_oacc_data_clause): Update GOMP mappings for
2370         PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2371         PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2372         (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2373         Remove support for present_or_* clauses.
2374         (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2375         (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2376         (OACC_DECLARE_CLAUSE_MASK): Likewise.
2377         (OACC_DATA_CLAUSE_MASK): Likewise.
2378         (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2379         (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2380         (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2381         (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2382         * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2384 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
2386         * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2387         * gimple-parser.c (c_parser_gimple_statement): Likewise.
2388         (c_parser_gimple_unary_expression): Likewise.
2390 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
2392         PR c/86093
2393         * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2394         before doing POINTER_DIFF_EXPR.
2396 2018-06-07  Marek Polacek  <polacek@redhat.com>
2398         PR c/85318
2399         * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2400         for loop initial declarations.
2402 2018-05-30  David Pagan  <dave.pagan@oracle.com>
2404         PR c/55976
2405         * c-decl.c (grokdeclarator): Update check for return type warnings.
2406         (start_function): Likewise.
2407         (finish_function): Likewise.
2408         * c-typeck.c (c_finish_return): Update check for return type warnings.
2409         Pass OPT_Wreturn_type to pedwarn when appropriate.
2411 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
2413         * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2414         __FMA_EXPR handlng.
2416 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
2418         * gimple-parser.c: Include internal-fn.h.
2419         (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2420         (c_parser_gimple_call_internal): New function.
2421         (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2422         Fix typos in comment.
2424 2018-05-10  Jakub Jelinek  <jakub@redhat.com>
2426         PR c++/85662
2427         * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2428         fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2429         fold_convert_loc.
2430         * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2431         fold_offsetof_1, pass argtype as TYPE to it and drop the
2432         fold_convert_loc.
2434 2018-05-02  David Pagan  <dave.pagan@oracle.com>
2436         PR c/30552
2437         * c-decl.c (old_style_parameter_scope): New function.
2438         * c-parser.c (c_parser_postfix_expression): Check for statement
2439         expressions in old-style function parameter list declarations.
2440         * c-parser.h (old_style_parameter_scope): New extern declaration.
2442 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
2444         PR sanitizer/84307
2445         * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2446         it is not TREE_STATIC.
2447         * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2448         not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2449         its COMPOUND_LITERAL_EXPR_DECL.
2451 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
2453         * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2454         where all functions return the same _FloatN or _FloatNx type,
2455         treat integer types as _Float64 instead of double.
2457 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
2459         PR c/84999
2460         * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2461         building vector comparison, diagnose it and return error_mark_node.
2463 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
2465         PR c/84853
2466         * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2467         If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2468         INTEGER_TYPE element type.
2470 2018-03-13  David Pagan  <dave.pagan@oracle.com>
2472         PR c/46921
2473         * c-typeck.c (output_init_element): Ensure field initializer
2474         expression is always evaluated if there are side effects.
2476 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
2478         PR c/84721
2479         * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2480         !building_stmt_list_p ().
2482 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
2484         PR c/84305
2485         * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2486         in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2487         and include the BIND_EXPR in the list of things that need to be
2488         pre-evaluated.
2490 2018-02-09  Nathan Sidwell  <nathan@acm.org>
2492         PR c/84293
2493         * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2494         to strict_aliasing_warning.
2496 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
2498         * c-typeck.c (really_start_incremental_init, push_init_level,
2499         set_nonincremental_init, output_init_element, process_init_element):
2500         Use DECL_UNNAMED_BIT_FIELD.
2502 2018-01-31  Marek Polacek  <polacek@redhat.com>
2504         PR c/81779
2505         * c-parser.c (c_parser_compound_statement_nostart): Call
2506         expansion_point_location_if_in_system_header.
2508 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
2510         PR c++/83814
2511         * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2512         the C part.
2514 2018-01-13  Jakub Jelinek  <jakub@redhat.com>
2516         PR c/83801
2517         * c-tree.h (decl_constant_value_1): Add a bool argument.
2518         * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2519         returning a CONSTRUCTOR if it is true.  Use error_operand_p.
2520         (decl_constant_value): Adjust caller.
2521         * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2522         decl_constant_value_1 as IN_INIT.  Otherwise, punt if
2523         decl_constant_value returns initializer that has BLKmode or
2524         array type.
2525         (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2527 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
2528             Alan Hayward  <alan.hayward@arm.com>
2529             David Sherwood  <david.sherwood@arm.com>
2531         * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2532         TYPE_VECTOR_SUBPARTS.
2534 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
2536         Update copyright years.
2538 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
2540         PR c/83595
2541         * c-parser.c (c_parser_braced_init, c_parser_initelt,
2542         c_parser_conditional_expression, c_parser_cast_expression,
2543         c_parser_sizeof_expression, c_parser_alignof_expression,
2544         c_parser_postfix_expression, c_parser_omp_declare_reduction,
2545         c_parser_transaction_expression): Use set_error () method instead
2546         of setting value member to error_mark_node.
2548 2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
2550         * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2551         and _Float<N>X built-in functions.
2553 2017-12-22  Jakub Jelinek  <jakub@redhat.com>
2555         PR debug/83550
2556         * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2557         TYPE_STUB_DECL and call rest_of_type_compilation before processing
2558         incomplete vars rather than after it.
2560         PR debug/83547
2561         * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2562         indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2563         and consider empty ones if there are no other stmts.  For
2564         -Wunused-value walk all statements before the one only followed by
2565         DEBUG_BEGIN_STMTs.
2567 2017-12-22  Mike Stump  <mikestump@comcast.net>
2568             Eric Botcazou  <ebotcazou@adacore.com>
2570         * c-parser.c (c_parser_while_statement): Add unroll parameter and
2571         build ANNOTATE_EXPR if present.  Add 3rd operand to ANNOTATE_EXPR.
2572         (c_parser_do_statement): Likewise.
2573         (c_parser_for_statement): Likewise.
2574         (c_parser_statement_after_labels): Adjust calls to above.
2575         (c_parse_pragma_ivdep): New static function.
2576         (c_parser_pragma_unroll): Likewise.
2577         (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2578         <PRAGMA_UNROLL>: New case.
2580 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
2582         * c-typeck.c (comptypes_internal, function_types_compatible_p,
2583         perform_integral_promotions, digest_init): Replace Yoda conditions
2584         with typical order conditions.
2585         * c-decl.c (check_bitfield_type_and_width): Likewise.
2587 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2589         * c-typeck.c (c_safe_arg_type_equiv_p,
2590         c_safe_function_type_cast_p): New function.
2591         (build_c_cast): Implement -Wcast-function-type.
2593 2017-12-14  Richard Biener  <rguenther@suse.de>
2595         PR c/83415
2596         * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2597         like REALPART_EXPR for the behavior of whether its operand
2598         is an lvalue.
2600 2017-12-12  Marek Polacek  <polacek@redhat.com>
2602         PR c/82679
2603         * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2605 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
2607         * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2608         * c-parser.c (add_debug_begin_stmt): New.
2609         (c_parser_declaration_or_fndef): Call it.
2610         (c_parser_compound_statement_nostart): Likewise.
2611         (c_parser_statement_after_labels): Likewise.
2612         * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2614 2017-12-07  Joseph Myers  <joseph@codesourcery.com>
2616         * c-decl.c (build_compound_literal): Add parameter alignas_align
2617         and set alignment of decl if nonzero.
2618         * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2619         (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2620         qualifier.
2621         (c_parser_struct_declaration): Update syntax comment.
2622         (c_parser_type_name): Add alignas_ok argument and pass it to
2623         c_parser_declspecs.
2624         (c_parser_cast_expression): Pass true to c_parser_type_name and
2625         give error if a cast used an _Alignas specifier.
2626         (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2627         give error if sizeof (type-name) used an _Alignas specifier.
2628         (c_parser_alignof_expression): Pass true to c_parser_type_name and
2629         give error if _Alignof (type-name) used an _Alignas specifier.
2630         (c_parser_postfix_expression_after_paren_type): Check specified
2631         alignment for a compound literal and pass it to
2632         build_compound_literal.
2633         * c-parser.h (c_parser_type_name): Update prototype.
2634         * c-tree.h (build_compound_literal): Update prototype.
2636 2017-12-07  Martin Sebor  <msebor@redhat.com>
2638         PR c/81544
2639         * c-decl.c (c_decl_attributes): Look up existing declaration and
2640         pass it to decl_attributes.
2642 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
2644         PR c/83236
2645         * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2646         reserved for use by the implementation.
2648 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
2650         * c-decl.c: Include "c-family/c-spellcheck.h".
2652 2017-12-05  Martin Liska  <mliska@suse.cz>
2653             Jakub Jelinek  <jakub@redhat.com>
2655         * c-typeck.c (pointer_diff): Add new argument and instrument
2656         pointer subtraction.
2657         (build_binary_op): Similar for pointer comparison.
2659 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
2661         PR c/79153
2662         * c-parser.c: Include tree-iterator.h.
2663         (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2664         into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2665         on it.
2667         PR c/83222
2668         * c-tree.h (decl_constant_value_1): Declare.
2669         * c-typeck.c (decl_constant_value_1): New function.
2670         (decl_constant_value): Use it.
2671         * c-fold.c (c_fully_fold_internal): If in_init, use
2672         decl_constant_value_1 instead of decl_constant_value.
2674 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
2676         * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2678 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
2680         PR sanitizer/81275
2681         * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2682         c_switch_covers_all_cases_p returns true.
2684 2017-11-28  Julia Koval  <julia.koval@intel.com>
2685             Sebastian Peryt  <sebastian.peryt@intel.com>
2687         * Make-lang.in (c/c-array-notation.o): Remove.
2688         * c-array-notation.c: Delete.
2689         * c-decl.c: Remove cilkplus condition.
2690         * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2691         c_parser_cilk_verify_simd, c_parser_array_notation,
2692         c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2693         c_parser_cilk_simd_fn_vector_attrs,
2694         c_finish_cilk_simd_fn_tokens): Delete.
2695         (c_parser_declaration_or_fndef): Remove cilkplus condition.
2696         (c_parser_direct_declarator_inner): Ditto.
2697         (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2698         (c_parser_attributes, c_parser_compound_statement,
2699         c_parser_statement_after_labels, c_parser_if_statement,
2700         c_parser_switch_statement, c_parser_while_statement,
2701         c_parser_do_statement, c_parser_for_statement,
2702         c_parser_unary_expression, c_parser_postfix_expression,
2703         c_parser_postfix_expression_after_primary,
2704         c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2705         c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2706         support.
2707         * c-typeck.c (build_array_ref, build_function_call_vec,
2708         convert_arguments,
2709         lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2710         c_finish_loop, build_binary_op): Remove cilkplus support.
2712 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
2714         * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2715         of build3.
2717 2017-11-14  Boris Kolpackov  <boris@codesynthesis.com>
2719         * Make-lang.in (c.install-plugin): Install backend import library.
2721 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
2723         * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2724         pragma_stmt context.
2726 2017-11-23  Mike Stump  <mikestump@comcast.net>
2727             Eric Botcazou  <ebotcazou@adacore.com>
2729         * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2730         ANNOTATE_EXPR.
2731         (c_parser_do_statement): Likewise.
2732         (c_parser_for_statement): Likewise.
2734 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
2736         PR c++/62170
2737         * c-objc-common.c (c_tree_printer): Convert penultimate param from
2738         bool to bool *.  Within '%T' handling, if showing an "aka", use
2739         "quoted" param to add appropriate quoting.
2741 2017-11-22  Marek Polacek  <polacek@redhat.com>
2743         PR c++/60336
2744         PR middle-end/67239
2745         PR target/68355
2746         * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2748 2017-11-21  David Malcolm  <dmalcolm@redhat.com>
2750         PR c/83056
2751         * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2752         earlier failed lookups.
2754 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
2756         * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2757         * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2759 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
2761         PR c/81404
2762         * c-decl.c: Include "c-family/known-headers.h".
2763         (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2764         to known-headers.cc.
2765         (class suggest_missing_header): Move to known-header.h.
2766         (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2767         than get_c_name_hint.
2769 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
2771         * c-decl.c (get_c_name_hint): New function.
2772         (class suggest_missing_header): New class.
2773         (lookup_name_fuzzy): Call get_c_name_hint and use it to
2774         suggest missing headers to the user.
2776 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
2778         * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2779         Include "c-family/name-hint.h"
2780         (implicit_decl_warning): Convert "hint" from
2781         const char * to name_hint.  Pass location to
2782         lookup_name_fuzzy.  Suppress any deferred diagnostic if the
2783         warning was not printed.
2784         (undeclared_variable): Likewise for "guessed_id".
2785         (lookup_name_fuzzy): Convert return type from const char *
2786         to name_hint.  Add location_t param.
2787         * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2788         Include "c-family/name-hint.h"
2789         (c_parser_declaration_or_fndef): Convert "hint" from
2790         const char * to name_hint.  Pass location to lookup_name_fuzzy.
2791         (c_parser_parameter_declaration): Likewise.
2793 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
2795         PR c/66618
2796         PR c/69960
2797         * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2798         where needed.
2799         * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2800         handle_omp_array_sections): Likewise.
2801         (digest_init): Don't call decl_constant_value_for_optimization.
2802         * c-tree.h (decl_constant_value_for_optimization): Removed.
2803         * c-fold.c (c_fold_array_ref): New function.
2804         (c_fully_fold_internal): Add LVAL argument, propagate it through
2805         recursive calls.  For VAR_P call decl_constant_value and
2806         unshare if not LVAL and either optimizing or IN_INIT.  Remove
2807         decl_constant_value_for_optimization calls.  If IN_INIT and not LVAL,
2808         fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2809         (c_fully_fold): Add LVAL argument, pass it through to
2810         c_fully_fold_internal.
2811         (decl_constant_value_for_optimization): Removed.
2813 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
2815         PR c/81156
2816         * c-parser.c (check_tgmath_function): New function.
2817         (enum tgmath_parm_kind): New enum.
2818         (c_parser_postfix_expression): Handle __builtin_tgmath.
2820 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
2822         * c-decl.c (implicit_decl_warning): Update for renaming of
2823         pedwarn_at_rich_loc and warning_at_rich_loc.
2824         (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2825         (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2826         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2827         (c_parser_struct_or_union_specifier): Likewise for renaming of
2828         pedwarn_at_rich_loc.
2829         (c_parser_parameter_declaration): Likewise for renaming of
2830         error_at_rich_loc.
2831         * c-typeck.c (build_component_ref): Likewise.
2832         (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2833         (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2834         (set_init_label): Likewise for renaming of error_at_rich_loc.
2836 2017-10-30  Richard Biener  <rguenther@suse.de>
2838         * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2839         stmts.
2841 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
2843         * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2844         fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2846 2017-10-25  David Malcolm  <dmalcolm@redhat.com>
2848         PR c/7356
2849         * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2850         semicolons.
2852 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
2854         PR libstdc++/81706
2855         * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2856         newdecl to corresponding __builtin_ if any.
2858 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
2860         PR c++/82466
2861         * c-decl.c (diagnose_mismatched_decls): Use
2862         OPT_Wbuiltin_declaration_mismatch.
2864 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
2866         * c-parser.c (c_parser_require): Add "type_is_unique" param and
2867         use it to guard calls to maybe_suggest_missing_token_insertion.
2868         (c_parser_parms_list_declarator): Override default value of new
2869         "type_is_unique" param to c_parser_require.
2870         (c_parser_asm_statement): Likewise.
2871         * c-parser.h (c_parser_require): Add "type_is_unique" param,
2872         defaulting to true.
2874 2017-10-11  Nathan Sidwell  <nathan@acm.org>
2876         * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2878 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
2880         * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2881         operating on trees as wide_ints.
2882         * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2883         (c_tree_equal): Likewise.
2885 2017-10-04  David Malcolm  <dmalcolm@redhat.com>
2887         * c-decl.c (push_parm_decl): Store c_parm's location into the
2888         PARAM_DECL.
2889         (build_c_parm): Add "loc" param and store it within the c_parm.
2890         * c-parser.c (struct c_parser): Add "last_token_location" field.
2891         (c_parser_consume_token): Store location of the token into the
2892         new field.
2893         (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2894         when handling a FUNCTION_DECL, if it doesn't already have them.
2895         (c_parser_parameter_declaration): Generate a location for the
2896         parameter, and pass it to the call to build_c_parm.
2897         * c-tree.h (struct c_parm): Add field "loc".
2898         (build_c_parm): Add location_t param.
2899         * c-typeck.c (get_fndecl_argument_location): New function.
2900         (inform_for_arg): New function.
2901         (convert_for_assignment): Use inform_for_arg when dealing with
2902         ic_argpass.
2904 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
2906         * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2907         width is non-NULL.
2908         (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2909         don't SET_DECL_C_BIT_FIELD here.
2911         PR c/82340
2912         * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2913         instead of trying to set just TREE_READONLY manually.
2915 2017-09-16  Tom de Vries  <tom@codesourcery.com>
2917         PR c/81875
2918         * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2919         cond itself.
2921 2017-09-15  Joseph Myers  <joseph@codesourcery.com>
2923         PR c/82071
2924         * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2925         for C11.
2926         (build_conditional_expr): For C11, generate result with excess
2927         precision when one argument is an integer and the other is of a
2928         type using excess precision.
2930 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2932         * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2934 2017-09-13  Marek Polacek  <polacek@redhat.com>
2936         PR c/82167
2937         * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2938         than expr.original_type.
2940 2017-09-12  Nathan Sidwell  <nathan@acm.org>
2942         * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2943         resort_sorted_fields): Moved from c-family/c-common.c.
2944         * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2946 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
2948         PR c/82071
2949         * c-typeck.c (build_atomic_assign): Handle argument with excess
2950         precision.  Ensure any EXCESS_PRECISION_EXPR is present in
2951         argument passed to build_binary_op and convert_for_assignment but
2952         not for call to c_fully_fold.
2953         (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2954         Ensure build_binary_op is called with argument with original
2955         semantic type.  Avoid calling c_fully_fold with an
2956         EXCESS_PRECISION_EXPR from build_binary_op.
2958 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
2960         PR c/81887
2961         * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2963 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
2964             Alan Hayward  <alan.hayward@arm.com>
2965             David Sherwood  <david.sherwood@arm.com>
2967         * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2968         (c_common_type): Likewise.  Use as_a <scalar_mode> when setting
2969         m1 and m2 to the signed equivalent of a fixed-point
2970         SCALAR_TYPE_MODE.
2972 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
2974         * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2975         than CAN_HAVE_LOCATION_P when determining whether to use the
2976         location_t value within "value".
2978 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
2980         * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2981         rather than peeking the location of the first token.
2982         * c-tree.h (c_expr::get_location): New method.
2984 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
2986         * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2987         to check_function_arguments.
2989 2017-08-18  Marek Polacek  <polacek@redhat.com>
2991         * c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
2992         commentary.
2994 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
2996         PR c/53037
2997         * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2998         (check_bitfield_type_and_width): Don't allow bit-field with
2999         warn_if_not_aligned type.
3001 2017-08-14  Martin Sebor  <msebor@redhat.com>
3003         PR c/81117
3004         * c-objc-common.c (c_objc_common_init): Handle 'G'.
3006 2017-08-11  Marek Polacek  <polacek@redhat.com>
3008         PR c/81795
3009         * c-decl.c (pushtag): Only print inform if the warning was printed.
3010         (grokdeclarator): Likewise.
3012 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
3014         * c-parser.c (c_parser_error): Rename to...
3015         (c_parser_error_richloc): ...this, making static, and adding
3016         "richloc" parameter, passing it to the c_parse_error call,
3017         rather than calling c_parser_set_source_position_from_token.
3018         (c_parser_error): Reintroduce, reimplementing in terms of the
3019         above, converting return type from void to bool.
3020         (class token_pair): New class.
3021         (struct matching_paren_traits): New struct.
3022         (matching_parens): New typedef.
3023         (struct matching_brace_traits): New struct.
3024         (matching_braces): New typedef.
3025         (get_matching_symbol): New function.
3026         (c_parser_require): Add param MATCHING_LOCATION, using it to
3027         highlight matching "opening" tokens for missing "closing" tokens.
3028         (c_parser_skip_until_found): Likewise.
3029         (c_parser_static_assert_declaration_no_semi): Convert explicit
3030         parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3031         class matching_parens, so that the pertinent open parenthesis is
3032         highlighted when there are problems locating the close
3033         parenthesis.
3034         (c_parser_struct_or_union_specifier): Likewise.
3035         (c_parser_typeof_specifier): Likewise.
3036         (c_parser_alignas_specifier): Likewise.
3037         (c_parser_simple_asm_expr): Likewise.
3038         (c_parser_braced_init): Likewise, for matching_braces.
3039         (c_parser_paren_condition): Likewise, for matching_parens.
3040         (c_parser_switch_statement): Likewise.
3041         (c_parser_for_statement): Likewise.
3042         (c_parser_asm_statement): Likewise.
3043         (c_parser_asm_operands): Likewise.
3044         (c_parser_cast_expression): Likewise.
3045         (c_parser_sizeof_expression): Likewise.
3046         (c_parser_alignof_expression): Likewise.
3047         (c_parser_generic_selection): Likewise.
3048         (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3049         RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3050         RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3051         In case CPP_OPEN_PAREN, pass loc_open_paren to the
3052         c_parser_skip_until_found call.
3053         (c_parser_objc_class_definition): Use class matching_parens as
3054         above.
3055         (c_parser_objc_method_decl): Likewise.
3056         (c_parser_objc_try_catch_finally_statement): Likewise.
3057         (c_parser_objc_synchronized_statement): Likewise.
3058         (c_parser_objc_at_property_declaration): Likewise.
3059         (c_parser_oacc_wait_list): Likewise.
3060         (c_parser_omp_var_list_parens): Likewise.
3061         (c_parser_omp_clause_collapse): Likewise.
3062         (c_parser_omp_clause_default): Likewise.
3063         (c_parser_omp_clause_if): Likewise.
3064         (c_parser_omp_clause_num_threads): Likewise.
3065         (c_parser_omp_clause_num_tasks): Likewise.
3066         (c_parser_omp_clause_grainsize): Likewise.
3067         (c_parser_omp_clause_priority): Likewise.
3068         (c_parser_omp_clause_hint): Likewise.
3069         (c_parser_omp_clause_defaultmap): Likewise.
3070         (c_parser_oacc_single_int_clause): Likewise.
3071         (c_parser_omp_clause_ordered): Likewise.
3072         (c_parser_omp_clause_reduction): Likewise.
3073         (c_parser_omp_clause_schedule): Likewise.
3074         (c_parser_omp_clause_num_teams): Likewise.
3075         (c_parser_omp_clause_thread_limit): Likewise.
3076         (c_parser_omp_clause_aligned): Likewise.
3077         (c_parser_omp_clause_linear): Likewise.
3078         (c_parser_omp_clause_safelen): Likewise.
3079         (c_parser_omp_clause_simdlen): Likewise.
3080         (c_parser_omp_clause_depend): Likewise.
3081         (c_parser_omp_clause_map): Likewise.
3082         (c_parser_omp_clause_device): Likewise.
3083         (c_parser_omp_clause_dist_schedule): Likewise.
3084         (c_parser_omp_clause_proc_bind): Likewise.
3085         (c_parser_omp_clause_uniform): Likewise.
3086         (c_parser_omp_for_loop): Likewise.
3087         (c_parser_cilk_clause_vectorlength): Likewise.
3088         (c_parser_cilk_clause_linear): Likewise.
3089         (c_parser_transaction_expression): Likewise.
3090         * c-parser.h (c_parser_require): Add param matching_location with
3091         default UNKNOWN_LOCATION.
3092         (c_parser_error): Convert return type from void to bool.
3093         (c_parser_skip_until_found): Add param matching_location with
3094         default UNKNOWN_LOCATION.
3096 2017-08-09  Marek Polacek  <polacek@redhat.com>
3098         * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3099         * c-tree.h (build_external_ref): Update declaration.
3100         * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3101         (build_external_ref): Change the type of a parameter to bool.
3102         (parser_build_binary_op): Use true/false instead of 1/0.
3103         (pointer_diff): Likewise.
3104         (build_modify_expr): Likewise.
3105         (set_designator): Change the type of a parameter to bool.
3106         (set_init_index): Use true/false instead of 1/0.
3107         (set_init_label): Likewise.
3108         (output_init_element): Change the type of a parameter to bool.
3109         (output_pending_init_elements): Use true/false instead of 1/0.
3110         (process_init_element): Likewise.
3111         (build_binary_op): Change the type of a parameter to bool.
3113 2017-08-09  Marek Polacek  <polacek@redhat.com>
3115         PR c/81233
3116         * c-typeck.c (pedwarn_init): Make the function take a variable list.
3117         Call emit_diagnostic_valist instead of pedwarn.
3118         (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3119         Print the relevant types in diagnostics.
3121 2017-08-09  Marek Polacek  <polacek@redhat.com>
3123         PR c/81417
3124         * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
3125         build_conditional_expr.
3126         * c-parser.c (c_parser_conditional_expression): Create locations for
3127         EXP1 and EXP2 from their source ranges.  Pass the locations down to
3128         build_conditional_expr.
3129         * c-tree.h (build_conditional_expr): Update declaration.
3130         * c-typeck.c (build_conditional_expr): Add location_t parameters.
3131         For -Wsign-compare, also print the types.
3133 2017-08-08  Martin Liska  <mliska@suse.cz>
3135         * c-convert.c: Include header files.
3136         * c-typeck.c: Likewise.
3138 2017-08-07  Martin Liska  <mliska@suse.cz>
3140         * c-parser.c (c_parser_attributes): Canonicalize name of an
3141         attribute.
3143 2017-08-02  Marek Polacek  <polacek@redhat.com>
3145         PR c/81289
3146         * c-parser.c (c_parser_unary_expression): Use set_error.
3148         PR c/81448
3149         PR c/81306
3150         * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3151         warnings.  Avoid walking MACRO_MAP_LOCATIONS.
3153 2017-07-31  Jan Hubicka  <hubicka@ucw.cz>
3154             Martin Liska  <mliska@suse.cz>
3156         * c-typeck.c (c_finish_goto_label): Build gimple predict
3157         statement.
3159 2017-07-31  Martin Liska  <mliska@suse.cz>
3161         PR sanitize/81530
3162         * c-convert.c (convert): Guard condition with flag_sanitize_p
3163         also with current_function_decl non-null equality.
3164         * c-decl.c (grokdeclarator): Likewise.
3165         * c-typeck.c (build_binary_op): Likewise.
3167 2017-07-25  Marek Polacek  <polacek@redhat.com>
3169         * c-decl.c (grokfield): Remove local variable.
3171 2017-07-25  Marek Polacek  <polacek@redhat.com>
3173         PR c/81364
3174         * c-parser.c (c_parser_else_body): Don't warn about multistatement
3175         macro expansion if the body is in { }.
3176         (c_parser_while_statement): Likewise.
3177         (c_parser_for_statement): Likewise.
3179 2017-07-18  Nathan Sidwell  <nathan@acm.org>
3181         * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3183 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
3185         * c-decl.c (implicitly_declare): When suggesting a missing
3186         #include, provide a fix-it hint.
3188 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
3190         * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3191         and call that instead.
3192         * c-tree.h (selftest::run_c_tests): New decl.
3194 2017-06-26  Marek Polacek  <polacek@redhat.com>
3196         PR c/80116
3197         * c-parser.c (c_parser_if_body): Set the location of the
3198         body of the conditional after parsing all the labels.  Call
3199         warn_for_multistatement_macros.
3200         (c_parser_else_body): Likewise.
3201         (c_parser_switch_statement): Likewise.
3202         (c_parser_while_statement): Likewise.
3203         (c_parser_for_statement): Likewise.
3204         (c_parser_statement): Add a default argument.  Save the location
3205         after labels have been parsed.
3206         (c_parser_c99_block_statement): Likewise.
3208 2017-06-19  Richard Biener  <rguenther@suse.de>
3210         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3211         negated _Literals to parse _Literal (int) -1.
3213 2017-06-13  Martin Liska  <mliska@suse.cz>
3215         PR sanitize/78204
3216         * c-convert.c (convert): Use sanitize_flags_p.
3217         * c-decl.c (grokdeclarator): Likewise.
3218         * c-typeck.c (convert_for_assignment): Likewise.
3219         (c_finish_return): Likewise.
3220         (build_binary_op): Likewise.
3222 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
3224         PR c/81006
3225         * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3226         to sizetype before size_binop.
3228 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
3230         * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3231         of TDI_generic.
3233 2017-06-06  Marek Polacek  <polacek@redhat.com>
3235         PR c/79983
3236         * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3237         ref.
3238         (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3240 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3242         * c-parser.c (c_parser_binary_expression): Implement the
3243         -Wsizeof_pointer_div warning.
3244         (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3245         from a parenthesized expression.
3246         (c_parser_expr_list): Use c_last_sizeof_loc.
3247         * c-tree.h (c_last_sizeof_loc): New external.
3248         * c-typeck.c (c_last_sizeof_loc): New variable.
3249         (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3251 2017-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
3253         PR testsuite/80580
3254         * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3256 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
3258         * c-objc-common.c (c_tree_printer): Gain bool and const char **
3259         parameters.
3261 2017-05-24  Martin Sebor  <msebor@redhat.com>
3263         PR c/80731
3264         * c-fold.c (c_fully_fold_internal): Adjust.
3265         * c-typeck.c (parser_build_unary_op): Adjust.
3267 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
3269         * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3270         "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3271         "VECTOR_LENGTH".
3273 2017-05-23  Marek Polacek  <polacek@redhat.com>
3275         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3276         quotes.
3278 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
3280         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3281         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3282         it returned invariant.  Call tree_invariant_p unconditionally
3283         afterwards to decide whether to return expr or op0.
3285 2017-05-22  Nathan Sidwell  <nathan@acm.org>
3287         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3289 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
3291         * c-parser.c (c_parser_omp_clause_default): Handle
3292         "OMP_CLAUSE_DEFAULT_PRESENT".
3294 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3296         * config-lang.in (gtfiles): Add c-family/c-format.c.
3298 2017-05-18  Nathan Sidwell  <nathan@acm.org>
3300         * c-decl.c (pushdecl_top_level): Delete unused function.
3302 2017-05-18  Marek Polacek  <polacek@redhat.com>
3304         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3305         (check_earlier_gotos): Likewise.
3306         (define_label): Likewise.
3307         (pending_xref_error): Likewise.
3308         (smallest_type_quals_location): Likewise.
3309         (grokdeclarator): Likewise.
3310         (grokparms): Likewise.
3311         (identifier_global_value): Likewise.
3312         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3313         (find_init_member): Likewise.
3315 2017-05-18  Marek Polacek  <polacek@redhat.com>
3317         * c-decl.c (start_decl): Use false/true instead of 0/1.
3318         (grokdeclarator): Likewise.
3319         (finish_struct): Likewise.
3320         (start_function): Change the return type to bool.  Use false/true
3321         instead of 0/1.
3322         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3323         * c-tree.h (start_function): Update.
3324         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3325         (set_designator): Change the return type to bool.  Use false/true
3326         instead of 0/1.
3328 2017-05-17  Marek Polacek  <polacek@redhat.com>
3330         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3331         * c-typeck.c: Likewise.
3333 2017-05-17  Marek Polacek  <polacek@redhat.com>
3335         PR sanitizer/80659
3336         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3337         DECL_IGNORED_P even for non-static compound literals.
3339 2017-05-17  Martin Liska  <mliska@suse.cz>
3341         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3342         use it instead of int type.
3344 2017-05-17  Marek Polacek  <polacek@redhat.com>
3346         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
3347         call c_fully_fold.
3348         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
3349         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
3350         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3351         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3352         save_expr.
3353         (c_parser_conditional_expression): Likewise.
3354         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3355         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3356         (process_init_element): Likewise.
3357         (build_binary_op): Likewise.
3358         (handle_omp_array_sections_1): Likewise.
3360 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
3362         * c-parser.c (c_parser_omp_clause_num_gangs)
3363         (c_parser_omp_clause_num_workers)
3364         (c_parser_omp_clause_vector_length): Merge functions into...
3365         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
3366         all users.
3368 2017-05-11  Nathan Sidwell  <nathan@acm.org>
3370         * gimple-parser.c: Don't #include tree-dump.h.
3372 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
3374         PR testsuite/80580
3375         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3377 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
3379         PR testsuite/80580
3380         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3381         incorrect __MEM syntax.
3383 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
3385         PR testsuite/80580
3386         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3387         type of unary '*'.
3389 2017-05-09  Nathan Sidwell  <nathan@acm.org>
3391         * c-tree.h (pushdecl): Declare.
3393 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
3395         * c-decl.c (warn_defaults_to): Replace report_diagnostic
3396         with diagnostic_report_diagnostic.
3397         * c-errors.c (pedwarn_c99): Likewise.
3398         (pedwarn_c90): Likewise.
3400 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
3402         PR c++/80038
3403         * c-gimplify.c (c_gimplify_expr): Remove calls to
3404         cilk_gimplifY_call_params_in_spawned_fn.
3406 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
3408         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3409         hint for removing extra semicolon.
3411 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
3413         PR c/80468
3414         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3415         enabled, set specs->type to integer_type_node.
3417 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
3419         * c-array-notation.c: Fix typo in comment.
3421 2017-03-29  Marek Polacek  <polacek@redhat.com>
3423         PR c/79730
3424         * c-decl.c (finish_decl): Check VAR_P.
3426 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
3428         PR middle-end/80162
3429         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3430         * c-typeck.c (c_mark_addressable): Likewise.  Look through
3431         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3432         to ARRAY_TYPE.
3433         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3435 2017-03-23  Marek Polacek  <polacek@redhat.com>
3437         * c-tree.h: Remove a C_RID_YYCODE reference.
3439 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
3441         PR c/80097
3442         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3443         optional COMPOUND_EXPR with ubsan instrumentation.
3445 2017-03-17  Marek Polacek  <polacek@redhat.com>
3447         * c-parser.c: Add C11 references.
3449 2017-03-15  Marek Polacek  <polacek@redhat.com>
3451         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3453 2017-03-11  Marek Polacek  <polacek@redhat.com>
3455         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
3457 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
3459         PR translation/79848
3460         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3461         "%qs".
3462         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3464 2017-03-09  Marek Polacek  <polacek@redhat.com>
3466         PR sanitizer/79757
3467         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3468         parameter declarations with initializers.
3470 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
3472         PR c/79969
3473         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3474         TYPE_STUB_DECL.
3476 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
3478         PR c/79834
3479         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3480         for "may only be used in compound statements" diagnostics, change it
3481         such that the same translatable string is used for all pragmas.  For
3482         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3483         diagnostics.
3484         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3485         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3486         "may only be used in compound statements" diagnostics, such that the
3487         same translatable string is used for all pragmas.
3489 2017-03-04  Marek Polacek  <polacek@redhat.com>
3491         PR c/79847
3492         * c-decl.c (implicit_decl_warning): Add missing space.
3494 2017-03-03  Marek Polacek  <polacek@redhat.com>
3496         PR c/79758
3497         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3498         current_function_prototype_arg_types is error_mark_node.  Fix
3499         formatting.  Use TREE_VALUE instead of TREE_TYPE.
3501 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
3503         PR c/79837
3504         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3505         %<min%> or %<max%> in the diagnostics, instead mention identifier.
3506         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3507         diagnostics.
3509         PR c/79836
3510         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3511         instead of %<_Generic>.
3512         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3513         (c_parser_omp_target_exit_data): Use %<release%> instead of
3514         %<release>.
3516 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
3518         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3519         instead of just cond ? "..." : "...".
3520         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3521         for "enter"/"exit" keyword.
3522         (c_finish_oacc_routine): Don't use %s to supply portions of the
3523         message.
3525 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
3527         PR c++/79588
3528         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3529         handle -Wrestrict here.
3530         * c-typeck.c (build_function_call_vec): Adjust
3531         check_function_arguments caller.
3533 2017-02-23  Richard Biener  <rguenther@suse.de>
3535         PR c/79684
3536         * gimple-parser.c (c_parser_gimple_statement): Use set_error
3537         to initialize c_exprs to return.
3538         (c_parser_gimple_binary_expression): Likewise.
3539         (c_parser_gimple_unary_expression): Likewise.
3540         (c_parser_gimple_postfix_expression): Likewise.
3542 2017-02-22  Marek Polacek  <polacek@redhat.com>
3544         PR c/79662
3545         * c-typeck.c (convert_arguments): Handle error_mark_node.
3547 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3549         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3550         value of c_parser_parse_ssa_name against error_mark_node and emit
3551         error if ssa name is anonymous and written as default definition.
3553 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3555         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3556         FMA_EXPR.
3558 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
3560         PR c++/79512
3561         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3562         ignore #pragma omp target even when not followed by identifier.
3564 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3566         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3567         (c_parser_gimple_unary_expression): Likewise.
3569 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
3571         * c-parser.c (c_parser_oacc_declare): Add missing space in
3572         diagnostics.
3574 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3576         PR c/79478
3577         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3578         set_c_expr_source_range when parsing ssa-name.
3580 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
3581             Richard Biener  <rguenther@suse.de>
3583         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3584         building IL when arguments are error_mark_node.
3585         (c_parser_gimple_unary_expression): Likewise.
3586         (c_parser_gimple_if_stmt): Likewise.
3587         (c_parser_gimple_switch_stmt): Likewise.
3588         (c_parser_gimple_return_stmt): Likewise.
3589         (c_parser_parse_ssa_name): When name lookup fails do not build
3590         an SSA name.  Use undeclared rather than not declared in error
3591         reporting.
3593 2017-02-09  Marek Polacek  <polacek@redhat.com>
3595         PR c/79428
3596         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3597         instead of c_parser_skip_until_found.
3599 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
3601         PR c/79431
3602         * c-parser.c (c_parser_omp_declare_target): Don't invoke
3603         symtab_node::get on automatic variables.
3605 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
3606             Chung-Lin Tang  <cltang@codesourcery.com>
3608         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3609         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3610         semantic checking.
3611         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3613 2017-02-07  Richard Biener  <rguenther@suse.de>
3615         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3616         (c_parser_gimple_postfix_expression_after_primary):
3617         Do not use c_build_function_call_vec to avoid folding and promotion.
3618         Simplify.
3620 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
3622         PR lto/79061
3623         * c-decl.c (pop_scope): Pass main_input_filename to
3624         build_translation_unit_decl.
3626 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
3628         * c-parser.c: Include "read-rtl-function.h" and
3629         "run-rtl-passes.h".
3630         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3631         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
3632         production.  Update for renaming of field "gimple_pass" to
3633         "gimple_or_rtl_pass".  If __RTL was seen, call
3634         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
3635         to an auto_timevar, to cope with early exit.
3636         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3637         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3638         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3639         Handle RID_RTL.
3640         (c_parser_parse_rtl_body): New function.
3641         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3642         (struct c_declspecs): Rename field "gimple_pass" to
3643         "gimple_or_rtl_pass".  Add field "rtl_p".
3644         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3645         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3646         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3647         (c_parser_gimple_or_rtl_pass_list): ...this.
3649 2017-01-20  Marek Polacek  <polacek@redhat.com>
3651         PR c/64279
3652         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3654 2017-01-13  Richard Biener  <rguenther@suse.de>
3656         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3657         nops.
3659 2017-01-13  Richard Biener  <rguenther@suse.de>
3661         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3662         _Literal ( type-name ) number.
3664 2017-01-12  Richard Biener  <rguenther@suse.de>
3666         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3667         __MEM.
3669 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
3671         PR c++/72813
3672         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3673         PCH file.
3675 2017-01-11  Richard Biener  <rguenther@suse.de>
3677         PR bootstrap/79052
3678         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3679         returns on parse errors.
3681 2017-01-04  Marek Polacek  <polacek@redhat.com>
3683         PR c++/64767
3684         * c-parser.c (c_parser_postfix_expression): Mark zero character
3685         constants by setting original_type in c_expr.
3686         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3687         with a zero character constant.
3688         (char_type_p): New function.
3690 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
3692         * c-parser.c (c_parser_declaration_or_fndef): Create a
3693         rich_location at init_loc and parse it to start_init.
3694         (last_init_list_comma): New global.
3695         (c_parser_braced_init): Update last_init_list_comma when parsing
3696         commas.  Pass it to pop_init_level.  Pass location of closing
3697         brace to pop_init_level.
3698         (c_parser_postfix_expression_after_paren_type): Create a
3699         rich_location at type_loc and parse it to start_init.
3700         (c_parser_omp_declare_reduction): Likewise for loc.
3701         * c-tree.h (start_init): Add rich_location * param.
3702         (pop_init_level): Add location_t param.
3703         * c-typeck.c (struct initializer_stack): Add field
3704         "missing_brace_richloc".
3705         (start_init): Add richloc param, use it to initialize
3706         the stack node's missing_brace_richloc.
3707         (last_init_list_comma): New decl.
3708         (finish_implicit_inits): Pass last_init_list_comma to
3709         pop_init_level.
3710         (push_init_level): When finding missing open braces, add fix-it
3711         hints to the richloc.
3712         (pop_init_level): Add "insert_before" param and pass it
3713         when calling pop_init_level.  Add fixits about missing
3714         close braces to any richloc.  Use the richloc for the
3715         -Wmissing-braces warning.
3716         (set_designator): Pass last_init_list_comma to pop_init_level.
3717         (process_init_element): Likewise.
3719 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
3721         Update copyright years.
3723 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
3725         PR bootstrap/78817
3726         * c-typeck.c (build_function_call_vec): If check_function_arguments
3727         returns true, set TREE_NO_WARNING on CALL_EXPR.
3729         PR c/77767
3730         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3731         to *expr instead of overwriting it.
3733 2016-12-20  Richard Biener  <rguenther@suse.de>
3735         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3736         error recovery.
3737         (c_parser_gimple_statement): Only build assigns for non-error
3738         stmts.
3739         (c_parser_gimple_postfix_expression_after): Improve error recovery.
3741 2016-12-14  Martin Jambor  <mjambor@suse.cz>
3743         * c-parser.c: Include omp-general.h and omp-offload.h instead of
3744         omp-low.h.
3745         (c_finish_oacc_routine): Adjusted call to
3746         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3747         to use their new names.
3748         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3749         use its new name.
3750         (c_parser_oacc_update): Likewise.
3751         (c_parser_omp_simd): Likewise.
3752         (c_parser_omp_target_update): Likewise.
3753         * c-typeck.c: Include omp-general.h instead of omp-low.h.
3754         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3755         name.
3756         (c_finish_omp_cancellation_point): Likewise.
3757         * gimple-parser.c: Do not include omp-low.h
3759 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
3760             James Norris  <jnorris@codesourcery.com>
3762         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3763         EXIT_DATA,WAIT} are not used in compound statements.
3764         (c_parser_oacc_enter_exit_data): Update diagnostics.
3766 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3768         PR c++/71973
3769         * c-decl.c (diagnose_mismatched_decls): Use
3770         OPT_Wbuiltin_declaration_mismatch here too.
3772 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
3773             Alan Hayward  <alan.hayward@arm.com>
3774             David Sherwood  <david.sherwood@arm.com>
3776         * c-decl.c (merge_decls): Use SET_DECL_MODE.
3777         (make_label, finish_struct): Likewise.
3779 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
3780             Richard Biener  <rguenther@suse.de>
3782         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3783         * config-lang.in (gtfiles): Add c/c-parser.h.
3784         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3785         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3786         * c-parser.c (enum c_id_kind, struct c_token,
3787         c_parser_next_token_is, c_parser_next_token_is_not,
3788         c_parser_next_token_is_keyword,
3789         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3790         Split out to ...
3791         * c-parser.h: ... new header.
3792         * c-parser.c: Include c-parser.h and gimple-parser.h.
3793         (c_parser_peek_token, c_parser_peek_2nd_token,
3794         c_token_starts_typename, c_parser_next_token_starts_declspecs,
3795         c_parser_next_tokens_start_declaration, c_parser_consume_token,
3796         c_parser_error, c_parser_require, c_parser_skip_until_found,
3797         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3798         c_parser_type_name): Export.
3799         (c_parser_tokens_buf): New function.
3800         (c_parser_error): Likewise.
3801         (c_parser_set_error): Likewise.
3802         (c_parser_declspecs): Handle RID_GIMPLE.
3803         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3804         via c_parser_parse_gimple_body.
3805         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3806         c_token_starts_typename, c_parser_next_token_starts_declspecs,
3807         c_parser_next_tokens_start_declaration, c_parser_consume_token,
3808         c_parser_error, c_parser_require, c_parser_skip_until_found,
3809         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3810         c_parser_type_name): Declare.
3811         (struct c_parser): Declare forward.
3812         (c_parser_tokens_buf): Declare.
3813         (c_parser_error): Likewise.
3814         (c_parser_set_error): Likewise.
3815         * gimple-parser.c: New file.
3816         * gimple-parser.h: Likewise.
3818 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3820         PR c/35503
3821         * c-parser.c (c_parser_postfix_expression_after_primary): Call
3822         warn_for_restrict.
3824 2016-09-11  Le-Chun Wu  <lcwu@google.com>
3825             Mark Wielaard  <mjw@redhat.com>
3827         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3828         to the given -Wshadow= variant.
3830 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3832         * c-typeck.c: Include memmodel.h.
3834 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
3836         PR target/77957
3837         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3838         instead of lhd_return_null_tree_v.
3840 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
3842         PR c++/69733
3843         * c-decl.c (smallest_type_quals_location): New static function.
3844         (grokdeclarator): Try to find the correct location for an ignored
3845         qualifier.
3847 2016-09-26  Marek Polacek  <polacek@redhat.com>
3849         PR c/7652
3850         * c-decl.c (pop_scope): Add gcc_fallthrough.
3852 2016-09-26  Marek Polacek  <polacek@redhat.com>
3854         PR c/7652
3855         * c-parser.c (struct c_token): Add flags field.
3856         (c_lex_one_token): Pass it to c_lex_with_flags.
3857         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3858         into IFN_FALLTHROUGH.
3859         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
3860         attribute fallthrough after a case label or default label.
3861         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3863 2016-09-24  Marek Polacek  <polacek@redhat.com>
3865         PR c/77490
3866         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3867         have boolean value.  Warn about ++/-- on booleans.
3869 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
3871         * c-parser.c (incomplete_record_decls): Remove unnecessary
3872         = vNULL initialization of file scope vec.
3874 2016-09-16  Marek Polacek  <polacek@redhat.com>
3876         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3878 2016-09-14  Marek Polacek  <polacek@redhat.com>
3880         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3881         (fix_array_notation_expr): Likewise.
3882         * c-decl.c (finish_decl): Likewise.
3883         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3884         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3885         (function_to_pointer_conversion): Use false instead of 0.
3886         (convert_lvalue_to_rvalue): Likewise.
3887         (parser_build_unary_op): Likewise.
3888         (build_atomic_assign): Likewise.
3889         (build_unary_op): Change nonconvert parameter type to bool, use
3890         true/false instead of 1/0.
3891         (build_binary_op): Use true instead of 1.
3893 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
3895         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3896         of add_fixit_insert to add_fixit_insert_before.
3898 2016-09-13  Marek Polacek  <polacek@redhat.com>
3900         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
3901         it.
3903 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3905         PR c++/77496
3906         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3907         COMPOUND_EXPR to warn_for_omitted_condop.
3909 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
3911         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3912         c_get_substring_location for this new langhook.
3914 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
3916         PR c/65467
3917         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3918         flag_openmp.
3919         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3920         instead of mark_exp_read on low_bound/length expression.
3921         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3922         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3923         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3924         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3925         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3926         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3927         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3928         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3929         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3930         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3931         instead of mark_expr_read.
3932         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3933         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3934         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3935         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3936         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3937         array section bases outside of depend clause, for depend clause
3938         use convert_lvalue_to_rvalue on the base.
3939         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3940         linear, aligned, map, to and from clauses.
3941         (c_omp_clause_copy_ctor): New function.
3943 2016-09-01  Marek Polacek  <polacek@redhat.com>
3945         PR c/7652
3946         * c-typeck.c (composite_type): Add FALLTHRU comment.
3948 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
3950         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3951         to the insertion fixits for "struct", "union", and "enum".
3953 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
3955         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3956         rather than add_fixit_misspelled_id.
3957         (undeclared_variable): Likewise.
3958         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
3959         now-redundant "here" params from add_fixit_insert method calls.
3960         (c_parser_parameter_declaration): Likewise.
3961         * c-typeck.c (build_component_ref): Remove now-redundant range
3962         param from add_fixit_replace method calls.
3964 2016-08-25  Marek Polacek  <polacek@redhat.com>
3966         * c-typeck.c (parser_build_binary_op): Pass LHS to
3967         warn_logical_not_parentheses.
3969 2016-08-25  Marek Polacek  <polacek@redhat.com>
3971         PR c/77323
3972         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3973         or _FloatN or _FloatNx is not supported.
3974         (finish_declspecs): Set type to integer_type_node when _FloatN or
3975         _FloatNx is not supported.
3977 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
3979         PR c/32187
3980         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3981         (struct c_declspecs): Add field floatn_nx_idx.
3982         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3983         and _FloatNx type specifiers.
3984         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3985         (c_parser_declspecs, c_parser_attribute_any_word)
3986         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3987         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3988         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3989         narrower than double.
3991 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
3992             Martin Liska  <mliska@suse.cz>
3994         PR c/67410
3995         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3996         % to determine val element to change.  Assert that
3997         wchar_bytes * charwidth fits into val array.
3999 2016-08-12  Marek Polacek  <polacek@redhat.com>
4001         PR c/7652
4002         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4003         (c_parser_postfix_expression): Likewise.
4004         * c-typeck.c (build_unary_op): Adjust fall through comment.
4005         (c_mark_addressable): Likewise.
4007 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
4009         PR c/72816
4010         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4011         array member through typedef, for orig_qual_indirect == 0 clear
4012         orig_qual_type.
4014 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
4016         PR c/64955
4017         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4018         this up to selftest::run_c_tests.
4019         (selftest::run_c_tests): New function.
4021 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
4023         * c-parser.c (struct oacc_routine_data): Add error_seen and
4024         fndecl_seen members.
4025         (c_finish_oacc_routine): Use these.
4026         (c_parser_declaration_or_fndef): Adjust.
4027         (c_parser_oacc_routine): Likewise.  Support more C language
4028         constructs, and improve diagnostics.  Move pragma context
4029         checking...
4030         (c_parser_pragma): ... here.
4032         * c-parser.c (struct oacc_routine_data): New.
4033         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4034         Simplify code.
4035         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
4036         declare target" attribute.
4038 2016-08-01  Jan Beulich  <jbeulich@suse.com>
4040         * c-fold.c (c_fully_fold_internal): Also emit shift count
4041         warnings for vector types.
4042         * c-typeck.c (build_binary_op): Likewise.
4044 2016-07-29  Marek Polacek  <polacek@redhat.com>
4046         PR c/71742
4047         * c-decl.c (finish_struct): Rephrase an error message.
4049         PR c/71853
4050         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4051         to error node for invalid code.
4053         PR c/71573
4054         * c-decl.c (implicitly_declare): Return decl early not only for
4055         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4057 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
4059         PR c/71969
4060         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4061         on GNU extern inline functions.
4063 2016-07-29  Marek Polacek  <polacek@redhat.com>
4065         PR c/71583
4066         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4067         check expr.value.
4069 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
4071         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4073 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
4075         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4076         spellcheck-tree.h
4077         (best_macro_match): Likewise, converting from a typedef to a
4078         subclass.
4079         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4080         (lookup_name_fuzzy): Update for change of best_macro_match to a
4081         subclass with a ctor that calls cpp_forall_identifiers.
4083 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
4085         * c-decl.c (implicit_decl_warning): Update for conversion of
4086         return type of lookup_name_fuzzy to const char *.
4087         (undeclared_variable): Likewise.
4088         (lookup_name_fuzzy): Convert return type from tree to
4089         const char *.
4090         * c-parser.c (c_parser_declaration_or_fndef): Update for
4091         conversion of return type of lookup_name_fuzzy to const char *.
4092         (c_parser_parameter_declaration): Likewise.
4094 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
4096         * c-parser.c (c_parser_oacc_declare): Don't scan for
4097         GOMP_MAP_POINTER.
4098         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4099         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4100         zero-length subarrays.
4102 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
4104         PR c/71858
4105         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4106         instead of FUZZY_LOOKUP_NAME.
4107         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4108         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4110 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
4112         PR c/71858
4113         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4115 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
4117         * c-parser.c (c_parser_generic_selection): Make type of variable
4118         auto_vec.
4119         (c_parser_omp_declare_simd): Likewise.
4121 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
4123         * c-decl.c (struct c_struct_parse_info): Change member types
4124         from vec to auto_vec.
4125         (start_struct): Adjust.
4126         (finish_struct): Likewise.
4128 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
4130         PR c/71719
4131         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4133 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
4135         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4136         Move pragma context checking into...
4137         (c_parser_omp_cancellation_point): ... here, and improve
4138         diagnostic messages.
4139         * c-typeck.c (c_finish_omp_cancel)
4140         (c_finish_omp_cancellation_point): Improve diagnostic messages.
4142 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
4144         PR c/71685
4145         * c-typeck.c (c_build_qualified_type): Don't clear
4146         C_TYPE_INCOMPLETE_VARS for the main variant.
4148 2016-06-28  Martin Sebor  <msebor@redhat.com>
4150         PR c/71552
4151         * c-typeck.c (output_init_element): Diagnose incompatible types
4152         before non-constant initializers.
4154 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
4156         * Make-lang.in: Don't cat ../stage_current if it does not exist.
4158 2016-06-23  Andi Kleen  <ak@linux.intel.com>
4160         * Make-lang.in: Add support for autofdo.
4162 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
4164         PR c/70339
4165         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4166         (implicit_decl_warning): When issuing warnings for implicit
4167         declarations, attempt to provide a suggestion via
4168         lookup_name_fuzzy.
4169         (undeclared_variable): Likewise when issuing errors.
4170         (lookup_name_in_scope): Likewise.
4171         (struct edit_distance_traits<cpp_hashnode *>): New struct.
4172         (best_macro_match): New typedef.
4173         (find_closest_macro_cpp_cb): New function.
4174         (lookup_name_fuzzy): New function.
4175         * c-parser.c: Include gcc-rich-location.h.
4176         (c_token_starts_typename): Split out case CPP_KEYWORD into...
4177         (c_keyword_starts_typename): ...this new function.
4178         (c_parser_declaration_or_fndef): When issuing errors about
4179         missing "struct" etc, add a fixit.  For other kinds of errors,
4180         attempt to provide a suggestion via lookup_name_fuzzy.
4181         (c_parser_parms_declarator): When looking ahead to detect typos in
4182         type names, also reject CPP_KEYWORD.
4183         (c_parser_parameter_declaration): When issuing errors about
4184         unknown type names, attempt to provide a suggestion via
4185         lookup_name_fuzzy.
4186         * c-tree.h (c_keyword_starts_typename): New prototype.
4188 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
4190         PR c/71601
4191         * c-typeck.c (build_conditional_expr): Return error_mark_node if
4192         c_common_type returns error_mark_node.
4194 2016-06-19  Martin Sebor  <msebor@redhat.com>
4196         PR c/69507
4197         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4198         __alignof__ (expression).
4200 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
4202         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4204 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
4206         * c-typeck.c (build_component_ref): Simplify fixit code by
4207         using gcc_rich_location::add_fixit_misspelled_id.
4208         (set_init_label): Likewise.
4210 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
4212         * c-parser.c (c_parser_initelt): Provide location of name for new
4213         location_t param of set_init_label.
4214         * c-tree.h (set_init_label): Add location_t param.
4215         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4216         param and use it when issuing error messages about unrecognized
4217         field names.  Attempt to provide a fixit hint if appropriate,
4218         otherwise update the error message to provide the type name.
4220 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
4222         PR c/71381
4223         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4224         Loosen checking.
4226 2016-06-08  Martin Sebor  <msebor@redhat.com>
4227             Jakub Jelinek  <jakub@redhat.com>
4229         PR c++/70507
4230         PR c/68120
4231         * c-typeck.c (convert_arguments): Don't promote last argument
4232         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4234 2016-06-08  Marek Polacek  <polacek@redhat.com>
4236         PR c/71418
4237         * c-decl.c (grokdeclarator): Check TYPE_P.
4239         PR c/71426
4240         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4241         code.
4243 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
4245         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4246         and structure element reference, capture the location of the
4247         element name token and pass it to build_component_ref.
4248         (c_parser_postfix_expression_after_primary): Likewise for
4249         structure element dereference.
4250         (c_parser_omp_variable_list): Likewise for
4251         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4252         * c-tree.h (build_component_ref): Add location_t param.
4253         * c-typeck.c (build_component_ref): Add location_t param
4254         COMPONENT_LOC.  Use it, if available, when issuing hints about
4255         mispelled member names to provide a fixit replacement hint.
4257 2016-06-06  Marek Polacek  <polacek@redhat.com>
4259         PR c/71362
4260         * c-parser.c (c_parser_direct_declarator): Set location.
4262 2016-06-06  Marek Polacek  <polacek@redhat.com>
4264         * c-typeck.c (comptypes_internal): Handle comparisons of
4265         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
4266         TYPE_REF_CAN_ALIAS_ALL.
4268 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
4270         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4271         arguments as addressable when async clause exists.
4273 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
4275         PR c++/71349
4276         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4277         when combined with target construct.
4279 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
4281         * c-parser.c (c_parser_omp_clause_schedule): Warn if
4282         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4284 2016-05-25  Marek Polacek  <polacek@redhat.com>
4286         PR c/71265
4287         * c-decl.c (c_make_fname_decl): Don't check seen_error.
4289         PR c/71266
4290         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4292 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
4294         * c-parser.c (c_parser_oacc_declare): Add support for
4295         GOMP_MAP_FIRSTPRIVATE_POINTER.
4296         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4297         argument with enum c_omp_region_type ort.
4298         (handle_omp_array_sections): Likewise.  Update call to
4299         handle_omp_array_sections_1.
4300         (c_finish_omp_clauses): Add specific errors and warning messages for
4301         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
4302         call to handle_omp_array_sections.
4304 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
4306         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4308 2016-05-24  Richard Biener  <rguenther@suse.de>
4310         PR middle-end/70434
4311         PR c/69504
4312         * c-typeck.c (build_array_ref): Do not complain about indexing
4313         non-lvalue vectors.  Adjust for function name change.
4315 2016-05-20  Martin Sebor  <msebor@redhat.com>
4317         PR c/71115
4318         * c-typeck.c (error_init): Use
4319         expansion_point_location_if_in_system_header.
4320         (warning_init): Same.
4322 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
4324         PR c/71171
4325         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4326         in error-handling.
4327         (c_parser_postfix_expression): Likewise.
4328         * c-tree.h (c_expr::set_error): New method.
4329         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4330         that result's range is initialized.
4332 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
4334         * c-typeck.c (parser_build_unary_op): Fix formatting.
4336 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
4338         * c-decl.c (grokdeclarator): Remove errmsg and use of
4339         targetm.invalid_return_type.
4340         (grokparms): Remove errmsg and use of
4341         targetm.invalid_parameter_type.
4343 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
4345         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4346         function return type.
4348 2016-05-12  Marek Polacek  <polacek@redhat.com>
4350         PR c/70756
4351         * c-decl.c (build_compound_literal): Pass LOC down to
4352         c_incomplete_type_error.
4353         * c-tree.h (require_complete_type): Adjust declaration.
4354         (c_incomplete_type_error): Likewise.
4355         * c-typeck.c (require_complete_type): Add location parameter, pass it
4356         down to c_incomplete_type_error.
4357         (c_incomplete_type_error): Add location parameter, pass it down to
4358         error_at.
4359         (build_component_ref): Pass location down to c_incomplete_type_error.
4360         (default_conversion): Pass location down to require_complete_type.
4361         (build_array_ref): Likewise.
4362         (build_function_call_vec): Likewise.
4363         (convert_arguments): Likewise.
4364         (build_unary_op): Likewise.
4365         (build_c_cast): Likewise.
4366         (build_modify_expr): Likewise.
4367         (convert_for_assignment): Likewise.
4368         (c_finish_omp_clauses): Likewise.
4370 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
4372         PR c/43651
4373         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4374         is enabled.
4375         * c-errors.c (pedwarn_c90): Return true if warned.
4376         * c-tree.h (pedwarn_c90): Change return type to bool.
4377         (enum c_declspec_word): Add new enumerator cdw_atomic.
4379 2016-05-11  Marek Polacek  <polacek@redhat.com>
4381         PR c++/71024
4382         * c-decl.c (diagnose_mismatched_decls): Factor out code to
4383         diagnose_mismatched_attributes and call it.
4385 2016-05-10  Marek Polacek  <polacek@redhat.com>
4387         PR c/70255
4388         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4389         on a declaration following the definition.
4391 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
4393         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4394         parse it through to c_parser_c99_block_statement.
4395         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4396         caller.
4398 2016-05-04  Marek Polacek  <polacek@redhat.com>
4400         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4401         OPT_Wdangling_else.
4403 2016-05-04  Marek Polacek  <polacek@redhat.com>
4405         PR c/48778
4406         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4407         for macro expansions.
4409 2016-05-03  Marek Polacek  <polacek@redhat.com>
4411         PR c/70859
4412         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4413         check_builtin_function_arguments.
4415 2016-05-03  Richard Biener  <rguenther@suse.de>
4417         * Make-lang.in (cc1-checksum.c): For stage-final re-use
4418         the checksum from the previous stage.
4420 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
4422         * c-parser.c (c_parser_oacc_all_clauses): Update call to
4423         c_finish_omp_clauses.
4424         (c_parser_omp_all_clauses): Likewise.
4425         (c_parser_oacc_cache): Likewise.
4426         (c_parser_oacc_loop): Likewise.
4427         (omp_split_clauses): Likewise.
4428         (c_parser_omp_declare_target): Likewise.
4429         (c_parser_cilk_all_clauses): Likewise.
4430         (c_parser_cilk_for): Likewise.
4431         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4432         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4434 2016-05-02  Marek Polacek  <polacek@redhat.com>
4436         PR c/70851
4437         * c-decl.c (grokdeclarator): Diagnose when array's size has an
4438         incomplete type.
4440 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
4442         PR middle-end/70626
4443         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4444         OACC_LOOP_CLAUSE_MASK.
4445         (c_parser_oacc_kernels_parallel): Update call to
4446         c_oacc_split_loop_clauses.
4448 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
4450         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4451         argument to build_modify_expr in two cases.
4453 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
4455         * c-parser.c (c_parser_postfix_expression_after_primary): Call
4456         warn_for_memset instead of warning directly here.
4458 2016-04-26  Marek Polacek  <polacek@redhat.com>
4460         PR c/67784
4461         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4462         out of ...
4463         (c_parser_for_statement): ... here.
4464         (c_parser_if_statement): Use it.
4465         (c_parser_switch_statement): Use it.
4466         (c_parser_while_statement): Use it.
4468         PR c/70791
4469         * c-decl.c (pushdecl): Pass LOCUS down to warning.
4471 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
4473         PR c++/69363
4474         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4475         instead of c_finish_cilk_clauses.
4476         * c-tree.h (c_finish_omp_clauses): Add new default argument.
4477         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
4478         floating-point variables in the linear clause for Cilk Plus.
4480 2016-04-18  Michael Matz  <matz@suse.de>
4482         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4483         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4485 2016-04-15  Marek Polacek  <polacek@redhat.com>
4487         PR c/70671
4488         * c-typeck.c (build_unary_op): Pass location down to error and
4489         warning call.
4491 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
4493         PR c/70436
4494         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4495         where needed.
4496         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4497         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4498         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4499         Adjust c_parser_pragma callers.
4500         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
4501         caller.
4502         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4503         c_parser_statement.
4504         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4505         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4506         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4507         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4508         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4509         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4510         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4511         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4512         down where needed.
4513         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
4514         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4515         calls.
4517 2016-04-13  Marek Polacek  <polacek@redhat.com>
4519         PR c/70436
4520         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4521         adjust callers.
4522         (c_parser_statement): Likewise.
4523         (c_parser_c99_block_statement): Likewise.
4524         (c_parser_while_statement): Likewise.
4525         (c_parser_for_statement): Likewise.
4526         (c_parser_if_body): Don't set IF_P here.
4527         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
4528         about dangling else here.
4529         * c-tree.h (c_finish_if_stmt): Adjust declaration.
4530         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
4531         warn about dangling else here.
4533 2016-04-04  Marek Polacek  <polacek@redhat.com>
4535         PR c/70307
4536         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4538 2016-03-31  Marek Polacek  <polacek@redhat.com>
4540         PR c/70297
4541         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4543 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
4545         PR c/70281
4546         * c-parser.c (c_parser_postfix_expression): Set the source range
4547         for uses of "__builtin_types_compatible_p".
4549 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
4551         PR c/70280
4552         * c-typeck.c (composite_type): Don't count void_list_node
4553         into len, if the list is terminated by void_list_node, start
4554         with void_list_node instead of NULL for newargs.  Stop
4555         at void_list_node.
4557 2016-03-16  Marek Polacek  <polacek@redhat.com>
4559         PR c/70093
4560         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4561         nested functions returning VM types.
4563 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
4565         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4566         when calling c_finish_omp_clauses.
4568 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
4570         PR c/69824
4571         * c-decl.c (get_parm_info): Don't queue implicit function declarations
4572         for later.
4574 2016-03-04  Marek Polacek  <polacek@redhat.com>
4576         PR c/69798
4577         * c-parser.c (c_parser_postfix_expression): Call
4578         c_parser_cast_expression rather than c_parser_postfix_expression.
4580 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
4582         PR c/69796
4583         PR c/69974
4584         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4585         of incomplete decls to error_mark_node.
4587 2016-02-24  Marek Polacek  <polacek@redhat.com>
4589         PR c/69819
4590         * c-decl.c (finish_decl): Don't update the copy of the type of a
4591         different decl type.
4593 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
4595         PR objc/69844
4596         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4597         in id_kind reclassification.
4599 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
4601         PR c/69835
4602         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4604 2016-02-16  James Norris  <jnorris@codesourcery.com>
4606         PR c/64748
4607         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4609 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
4611         * c-decl.c (build_null_declspecs): Zero the entire struct.
4613         PR c/69522
4614         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
4615         callers changed.  If nested_p is true, use it to call
4616         finish_implicit_inits.
4617         * c-tree.h (finish_implicit_inits): Declare.
4618         * c-typeck.c (finish_implicit_inits): New function.  Move code
4619         from ...
4620         (push_init_level): ... here.
4621         (set_designator, process_init_element): Call finish_implicit_inits.
4623 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
4625         PR c/69768
4626         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4627         arguments for -Waddress warning.
4629 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
4631         PR c/69669
4632         * c-decl.c (finish_enum): When honoring mode attribute,
4633         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4635 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
4637         PR debug/69518
4638         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4639         all type variants, not just TYPE_MAIN_VARIANT.
4641 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
4643         PR debug/66869
4644         * c-decl.c (c_write_global_declarations_1): Warn with
4645         warn_unused_function if static prototype without definition
4646         is not C_DECL_USED.
4648 2016-01-27  Marek Polacek  <polacek@redhat.com>
4650         PR c/68062
4651         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4652         to unsigned, if needed.  Add -Wsign-compare warning.
4654 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
4656         PR tree-optimization/69483
4657         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4659 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4661         PR c/24293
4662         * c-tree.h (incomplete_record_decls): Declare.
4663         * c-parser.c (incomplete_record_decls): Define.
4664         (c_parser_translation_unit): Iterate through incomplete_record_decls and
4665         report error if any decl has zero size.
4666         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4667         or enum type to incomplete_record_decls.
4669 2016-01-14  Tom de Vries  <tom@codesourcery.com>
4671         PR tree-optimization/68773
4672         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4673         set force_output.
4675 2016-01-14  Marek Polacek  <polacek@redhat.com>
4677         PR c/69262
4678         * c-decl.c (grokdeclarator): Provide more information for invalid
4679         array declarations.
4681 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
4683         * c-parser.c (c_parser_unary_expression): For dereferences, build
4684         a combined location before calling build_indirect_ref, so that
4685         error reports cover the full range, manually updating the c_expr
4686         src_range.
4688 2016-01-06  Marek Polacek  <polacek@redhat.com>
4690         PR sanitizer/69099
4691         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
4692         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
4693         NULL.
4695 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
4697         Update copyright years.
4699 2016-01-04  Marek Polacek  <polacek@redhat.com>
4701         PR c/68908
4702         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
4703         optimization to use __atomic_fetch_* built-in if possible.
4705 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
4707         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4708         into...
4709         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
4710         all users.
4712 2015-12-22  Marek Polacek  <polacek@redhat.com>
4714         PR c/69002
4715         * c-typeck.c (build_component_ref): Warn when acessing elements of
4716         atomic structures or unions.
4718 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
4720         * c-typeck.c: Include "gcc-rich-location.h".
4721         (build_binary_op): In the two places that call binary_op_error,
4722         create a gcc_rich_location and populate it with the location of
4723         the binary op and its two operands.
4725 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
4727         * c-parser.c (c_parser_statement_after_labels): When calling
4728         c_finish_return, Use the return expression's location if it has
4729         one, falling back to the location of the first token within it.
4730         * c-typeck.c (c_finish_return): When issuing warnings about
4731         the incorrect presence/absence of a return value, issue a note
4732         showing the declaration of the function.
4734 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
4736         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4737         to 4.
4738         (c_parser_peek_nth_token): New function.
4739         (c_parser_peek_conflict_marker): New function.
4740         (c_parser_error): Detect conflict markers and report them as such.
4742 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
4744         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4745         to preserve range information for the primary expression
4746         in the call to c_parser_postfix_expression_after_primary.
4748 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
4750         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4751         expression location, falling back on the first token location,
4752         rather than always using the latter.
4754 2015-12-16  Marek Polacek  <polacek@redhat.com>
4756         PR c/64637
4757         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4758         available.
4760 2015-12-15  Marek Polacek  <polacek@redhat.com>
4762         PR c/68907
4763         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4764         artificial decl.
4766 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
4768         * c-parser.c (c_parser_alignof_expression): Capture location of
4769         closing parenthesis (if any), or of end of unary expression, and
4770         use it to build a src_range for the expression.
4772 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
4774         PR c/68757
4775         * c-parser.c (c_parser_get_builtin_args): Add
4776         "out_close_paren_loc" param, and write back to it.
4777         (c_parser_postfix_expression): Capture the closing
4778         parenthesis location for RID_CHOOSE_EXPR,
4779         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4780         RID_BUILTIN_SHUFFLE and use it to set the source range
4781         for such expressions; within RID_BUILTIN_COMPLEX set
4782         the underlying location.
4784 2015-12-07  Marek Polacek  <polacek@redhat.com>
4786         PR c/68668
4787         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4788         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4790 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
4792         * c-tree.h (c_build_va_arg): Adjust prototype.
4793         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4794         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4795         parameter, adjust throughout and issue an error if EXPR is a component
4796         with reverse storage order.
4798 2015-12-02  Jason Merrill  <jason@redhat.com>
4800         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4801         (c_fully_fold_internal, decl_constant_value_for_optimization):
4802         Move from c-common.c.
4803         * c-tree.h: Declare decl_constant_value_for_optimization.
4804         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4806 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
4808         PR c/68162
4809         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4810         following link from declarator to next declarator.  Track original
4811         qualified type and pass it to c_build_qualified_type.
4812         * c-typeck.c (c_build_qualified_type): Add arguments
4813         orig_qual_type and orig_qual_indirect.
4815 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
4817         * c-parser.c (c_parser_omp_clause_name)
4818         (c_parser_oacc_all_clauses): Alphabetical sorting.
4820 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
4822         PR c/68533
4823         * c-decl.c (get_parm_info): Use b->locus instead of input_location
4824         for diagnostics.
4826 2015-12-01  Julian Brown  <julian@codesourcery.com>
4827             Cesar Philippidis  <cesar@codesourcery.com>
4828             James Norris  <James_Norris@mentor.com>
4830         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4831         (c_parser_oacc_clause_use_device): New function.
4832         (c_parser_oacc_all_clauses): Add use_device support.
4833         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4834         (c_parser_oacc_host_data): New function.
4835         (c_parser_omp_construct): Add host_data support.
4836         * c-tree.h (c_finish_oacc_host_data): Add prototype.
4837         * c-typeck.c (c_finish_oacc_host_data): New function.
4838         (c_finish_omp_clauses): Add use_device support.
4840 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
4842         PR c/67106
4843         * c-decl.c: Set TYPE_PACKED in variants.
4845 2015-11-27  Martin Liska  <mliska@suse.cz>
4847         PR c++/68312
4848         * c-array-notation.c (fix_builtin_array_notation_fn):
4849         Use release_vec_vec instead of vec::release.
4850         (build_array_notation_expr): Likewise.
4851         (fix_conditional_array_notations_1): Likewise.
4852         (fix_array_notation_expr): Likewise.
4853         (fix_array_notation_call_expr): Likewise.
4855 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
4857         PR c/63326
4858         * c-parser.c (c_parser_compound_statement_nostart): If
4859         last_label is true, use pragma_stmt instead of pragma_compound
4860         as second c_parser_pragma argument.
4861         (c_parser_omp_ordered, c_parser_omp_target_update,
4862         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4863         false as second argument to c_parser_skip_to_pragma_eol after
4864         diagnosing standalone directives used in pragma_stmt context.
4866 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
4868         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4869         with "if (ENABLE_OFFLOADING)".
4871 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
4873         PR objc/68438
4874         * c-parser.c (c_parser_postfix_expression): Set up source ranges
4875         for various Objective-C constructs: Class.name syntax,
4876         @selector(), @protocol(), @encode(), and [] message syntax.
4878 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
4880         PR 62314
4881         * c-typeck.c (should_suggest_deref_p): New function.
4882         (build_component_ref): Special-case POINTER_TYPE when
4883         generating a "not a structure of union"  error message, and
4884         suggest a "->" rather than a ".", providing a fix-it hint.
4886 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
4888         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4889         candidate into a new function, find_closest_identifier.
4891 2015-11-19  Marek Polacek  <polacek@redhat.com>
4893         PR c/68412
4894         * c-typeck.c (parser_build_binary_op): Properly handle
4895         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4897 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
4899         * c-parser.c (set_c_expr_source_range): Bulletproof both
4900         overloaded implementations against NULL expr->value.
4901         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4902         values.
4903         (c_parser_unary_expression): Likewise when handling addresses of
4904         labels.
4905         (c_parser_postfix_expression): Likewise for statement expressions,
4906         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4907         __builtin_va_arg, and for __builtin_offset_of.
4908         (c_parser_postfix_expression_after_paren_type): Initialize expr's
4909         src_range using the range of the braced initializer.
4910         (c_parser_transaction_expression): Set src_range for "ret" to a
4911         sane pair of values.
4913 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
4915         * c-parser.c (c_finish_omp_declare_simd): Look for
4916         "simd" attribute as well. Update error message.
4918 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
4920         * c-parser.c (c_parser_omp_declare_target): Adjust.
4922 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
4924         * c-typeck.c (c_finish_omp_clauses): Don't mark
4925         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4927 2015-11-14  Marek Polacek  <polacek@redhat.com>
4929         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4930         * c-typeck.c: Likewise.
4932 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
4934         * c-decl.c (warn_defaults_to): Pass line_table to
4935         rich_location ctor.
4936         * c-errors.c (pedwarn_c99): Likewise.
4937         (pedwarn_c90): Likewise.
4938         * c-parser.c (set_c_expr_source_range): New functions.
4939         (c_token::get_range): New method.
4940         (c_token::get_finish): New method.
4941         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4942         based on the range from the start of the LHS to the end of the
4943         RHS.
4944         (c_parser_conditional_expression): Likewise, based on the range
4945         from the start of the cond.value to the end of exp2.value.
4946         (c_parser_binary_expression): Call set_c_expr_source_range on
4947         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4948         (c_parser_cast_expression): Call set_c_expr_source_range on ret
4949         based on the cast_loc through to the end of the expr.
4950         (c_parser_unary_expression): Likewise, based on the
4951         op_loc through to the end of op.
4952         (c_parser_sizeof_expression) Likewise, based on the start of the
4953         sizeof token through to either the closing paren or the end of
4954         expr.
4955         (c_parser_postfix_expression): Likewise, using the token range,
4956         or from the open paren through to the close paren for
4957         parenthesized expressions.
4958         (c_parser_postfix_expression_after_primary): Likewise, for
4959         various kinds of expression.
4960         * c-tree.h (struct c_expr): Add field "src_range".
4961         (c_expr::get_start): New method.
4962         (c_expr::get_finish): New method.
4963         (set_c_expr_source_range): New decls.
4964         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4965         on ret for prefix unary ops.
4966         (parser_build_binary_op): Likewise, running from the start of
4967         arg1.value through to the end of arg2.value.
4969 2015-11-13  Marek Polacek  <polacek@redhat.com>
4971         PR c/68320
4972         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4974 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
4976         * c-typeck.c: Include spellcheck.h.
4977         (lookup_field_fuzzy_find_candidates): New function.
4978         (lookup_field_fuzzy): New function.
4979         (build_component_ref): If the field was not found, try using
4980         lookup_field_fuzzy and potentially offer a suggestion.
4982 2015-11-12  James Norris  <jnorris@codesourcery.com>
4983             Joseph Myers  <joseph@codesourcery.com>
4985         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4986         (c_parser_omp_clause_name): Handle 'device_resident' clause.
4987         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4988         and PRAGMA_OMP_CLAUSE_LINK.
4989         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4990         and PRAGMA_OACC_CLAUSE_LINK.
4991         (OACC_DECLARE_CLAUSE_MASK): New definition.
4992         (c_parser_oacc_declare): New function.
4994 2015-11-12  Marek Polacek  <polacek@redhat.com>
4996         PR c/67784
4997         * c-parser.c (c_parser_for_statement): Reclassify the token in
4998         a correct scope.
5000 2015-11-11  Marek Polacek  <polacek@redhat.com>
5002         PR c/68107
5003         PR c++/68266
5004         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
5005         checking the size of an array.
5007 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
5009         * c-array-notation.c: Remove unused header files.
5010         * c-aux-info.c: Likewise.
5011         * c-convert.c: Likewise.
5012         * c-decl.c: Likewise.
5013         * c-errors.c: Likewise.
5014         * c-lang.c: Likewise.
5015         * c-objc-common.c: Likewise.
5016         * c-parser.c: Likewise.
5017         * c-typeck.c: Likewise.
5018         * gccspec.c: Likewise.
5020 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
5021             Cesar Philippidis  <cesar@codesourcery.com>
5022             James Norris  <jnorris@codesourcery.com>
5023             Julian Brown  <julian@codesourcery.com>
5024             Nathan Sidwell  <nathan@codesourcery.com>
5026         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5027         routine arg.
5028         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5029         (c_parser_pragma): Parse 'acc routine'.
5030         (OACC_ROUTINE_CLAUSE_MARK): Define.
5031         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5033 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5035         PR debug/67192
5036         * c-typeck.c (c_finish_loop): For unconditional loops, set the
5037         location of the backward-goto to the start of the loop body.
5039 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5041         PR debug/67192
5042         * c-parser.c (c_parser_while_statement): Finish the loop before
5043         parsing ahead for misleading indentation.
5044         (c_parser_for_statement): Likewise.
5046 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
5048         * c-decl.c (finish_struct): If the structure has reverse storage
5049         order, rewrite the type of array fields with scalar component.  Call
5050         maybe_apply_pragma_scalar_storage_order on entry.
5051         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
5052         errors on bit-fields and reverse SSO here and not...
5053         (c_mark_addressable): ...here.
5054         (output_init_element): Adjust call to initializer_constant_valid_p.
5055         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5057 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
5059         * c-decl.c (warn_defaults_to): Update for change in signature
5060         of diagnostic_set_info.
5061         * c-errors.c (pedwarn_c99): Likewise.
5062         (pedwarn_c90): Likewise.
5063         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5064         for textinfo::set_location.
5066 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
5067             Thomas Schwinge  <thomas@codesourcery.com>
5068             James Norris  <jnorris@codesourcery.com>
5070         * c-parser.c (c_parser_omp_clause_name): Add support for
5071         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5072         (c_parser_omp_clause_default): Add is_oacc argument. Handle
5073         default(none) in OpenACC.
5074         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5075         arguments.
5076         (c_parser_oacc_clause_tile): New function.
5077         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5078         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5079         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5080         TILE}.
5081         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5082         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5083         FIRSTPRIVATE}.
5084         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5085         (c_parser_oacc_update): Update the error message for missing clauses.
5086         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5087         and OMP_CLAUSE_INDEPENDENT.
5089 2015-11-05  Marek Polacek  <polacek@redhat.com>
5091         PR c/68090
5092         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5093         deal with pre-evaluation on invalid types.
5095 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
5096             Ilya Verbin  <ilya.verbin@intel.com>
5098         * c-parser.c: Include context.h and gimple-expr.h.
5099         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5100         monotonic together with nonmonotonic.
5101         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
5102         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5103         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5104         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5105         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
5106         expressions on combined target teams before the target.
5107         (c_parser_omp_declare_target): If decl has "omp declare target" or
5108         "omp declare target link" attribute, and cgraph or varpool node already
5109         exists, then set corresponding flags.  Call c_finish_omp_clauses
5110         in the parenthesized extended-list syntax case.
5111         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5112         declare target.
5113         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5114         on OMP_CLAUSE_REDUCTION array sections.
5115         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5116         into the constant offset, or for variable low-bound using
5117         POINTER_PLUS_EXPR.  For structure element based array sections use
5118         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5119         (c_finish_omp_clauses): Drop generic_field_head, structure
5120         elements are now always mapped even as array section bases,
5121         diagnose same var in data sharing and mapping clauses.  Diagnose if
5122         linear step on declare simd is neither a constant nor a uniform
5123         parameter.  Look through POINTER_PLUS_EXPR for array section
5124         reductions.  Diagnose the same var or function appearing multiple
5125         times on the same directive.  Fix up wording for the to clause if t
5126         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
5127         modifier on kinds other than dynamic or guided or nonmonotonic
5128         modifier together with ordered clause.
5130 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
5131             Chung-Lin Tang  <cltang@codesourcery.com>
5133         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5135 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
5137         * c-array-notation.c: Reorder #include's and remove duplicates.
5138         * c-aux-info.c: Likewise.
5139         * c-convert.c: Likewise.
5140         * c-decl.c: Likewise.
5141         * c-errors.c: Likewise.
5142         * c-lang.c: Likewise.
5143         * c-objc-common.c: Likewise.
5144         * c-parser.c: Likewise.
5145         * c-typeck.c: Likewise.
5147 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
5149         PR debug/66068
5150         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5151         after calling build_qualified_type.
5153 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
5154             Thomas Schwinge  <thomas@codesourcery.com>
5155             James Norris  <jnorris@codesourcery.com>
5156             Joseph Myers  <joseph@codesourcery.com>
5157             Julian Brown  <julian@codesourcery.com>
5158             Bernd Schmidt  <bschmidt@redhat.com>
5160         * c-parser.c (c_parser_oacc_shape_clause): New.
5161         (c_parser_oacc_simple_clause): New.
5162         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5163         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5165 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
5166             James Norris  <jnorris@codesourcery.com>
5167             Cesar Philippidis  <cesar@codesourcery.com>
5169         PR c/64765
5170         PR c/64880
5171         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5172         parameters, and handle these.  Adjust all users.
5173         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5174         into...
5175         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
5176         all users.
5177         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5178         declare functions.
5179         (c_finish_omp_construct): Declare function.
5180         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5181         Merge functions into...
5182         (c_finish_omp_construct): ... this new function.
5184 2015-10-22  Richard Biener  <rguenther@suse.de>
5186         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5187         before folding a MINUS_EXPR.
5189 2015-10-21  Marek Polacek  <polacek@redhat.com>
5191         PR c/68024
5192         * c-decl.c (start_function): Warn about vararg functions without
5193         a prototype.
5195 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
5197         * c-typeck.c (build_conditional_expr): Use boolean vector
5198         type for vector comparison.
5199         (build_vec_cmp): New.
5200         (build_binary_op): Use build_vec_cmp for comparison.
5202 2015-10-20  Marek Polacek  <polacek@redhat.com>
5204         * c-parser.c (is_cilkplus_vector_p): Don't define here.
5206 2015-10-20  Marek Polacek  <polacek@redhat.com>
5208         PR c/67964
5209         * c-parser.c (c_parser_attributes): Break out of the loop if the
5210         token after an attribute isn't a comma.
5212 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
5213             Aldy Hernandez  <aldyh@redhat.com>
5215         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5216         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5217         (c_parser_omp_variable_list): Handle structure elements for
5218         map, to and from clauses.  Handle array sections in reduction
5219         clause.  Formatting fixes.
5220         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5221         if clause modifiers.
5222         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5223         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5224         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5225         c_parser_omp_clause_is_device_ptr): New functions.
5226         (c_parser_omp_clause_ordered): Parse optional parameter.
5227         (c_parser_omp_clause_reduction): Handle array reductions.
5228         (c_parser_omp_clause_schedule): Parse optional simd modifier.
5229         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5230         functions.
5231         (c_parser_omp_clause_linear): Parse linear clause modifiers.
5232         (c_parser_omp_clause_depend_sink): New function.
5233         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5234         (c_parser_omp_clause_map): Parse release/delete map kinds and
5235         optional always modifier.
5236         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5237         and c_finish_omp_clauses callers.
5238         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
5239         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5240         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5241         (OMP_CRITICAL_CLAUSE_MASK): Define.
5242         (c_parser_omp_critical): Parse critical clauses.
5243         (c_parser_omp_for_loop): Handle doacross loops, adjust
5244         c_finish_omp_for and c_finish_omp_clauses callers.
5245         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5246         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5247         (OMP_FOR_CLAUSE_MASK): Add linear clause.
5248         (c_parser_omp_for): Disallow ordered clause when combined with
5249         distribute.  Disallow linear clause when combined with distribute
5250         and not combined with simd.
5251         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5252         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5253         parse clauses and if depend clause is found, don't parse a body.
5254         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5255         Allow target parallel without for after it.
5256         (OMP_TASK_CLAUSE_MASK): Add priority clause.
5257         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5258         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5259         invalid kinds.
5260         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5261         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5262         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5263         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5264         functions.
5265         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5266         defaultmap and is_device_ptr clauses.
5267         (c_parser_omp_target): Parse target parallel and target simd.  Set
5268         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
5269         and target exit data.  Diagnose invalid map kinds.
5270         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5271         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5272         construct.
5273         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5274         &omp_priv.
5275         (OMP_TASKLOOP_CLAUSE_MASK): Define.
5276         (c_parser_omp_taskloop): New function.
5277         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5278         handle PRAGMA_OMP_TASKLOOP.
5279         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5280         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5281         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5282         Add IS_OMP argument, handle structure element bases, diagnose
5283         bitfields, pass IS_OMP recursively, diagnose known zero length
5284         array sections in depend clauses, handle array sections in reduction
5285         clause, diagnose negative length even for pointers.
5286         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5287         types, pass IS_OMP down to handle_omp_array_sections_1, handle
5288         array sections in reduction clause, set
5289         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5290         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5291         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5292         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5294 2015-10-06  Marek Polacek  <polacek@redhat.com>
5296         * c-parser.c (c_parser_statement_after_labels): Use
5297         protected_set_expr_location.
5298         (c_parser_omp_clause_num_gangs): Likewise.
5299         (c_parser_omp_clause_num_threads): Likewise.
5300         (c_parser_omp_clause_num_workers): Likewise.
5301         (c_parser_omp_clause_vector_length): Likewise.
5302         (c_parser_omp_clause_num_teams): Likewise.
5303         (c_parser_omp_clause_thread_limit): Likewise.
5304         * c-typeck.c (build_c_cast): Likewise.
5305         (c_cast_expr): Likewise.
5307 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
5309         * c-typeck.c (c_tree_equal): Use real_equal instead of
5310         REAL_VALUES_EQUAL.
5312 2015-10-04  Jason Merrill  <jason@redhat.com>
5314         * c-parser.c (c_lex_one_token): Handle @synchronized.
5315         * c-decl.c (match_builtin_function_types): A declaration of a built-in
5316         can change whether the function is transaction_safe.
5318 2015-10-02  Marek Polacek  <polacek@redhat.com>
5320         PR c/67730
5321         * c-typeck.c (convert_for_assignment): Use the expansion point
5322         location throughout.
5324 2015-10-02  Marek Polacek  <polacek@redhat.com>
5326         PR c/64249
5327         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5328         and pass it down to c_parser_if_statement.
5329         (c_parser_else_body): Add CHAIN parameter and pass it down to
5330         c_parser_statement_after_labels.
5331         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
5332         duplicated if-else-if conditions.
5334 2015-10-01  Marek Polacek  <polacek@redhat.com>
5336         * c-typeck.c (convert_for_assignment): Improve commentary.
5338 2015-09-30  Marek Polacek  <polacek@redhat.com>
5340         PR c/67730
5341         * c-typeck.c (c_finish_return): Use the expansion point location for
5342         certain "return with value" warnings.
5344 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5346         * c-parser.c (pragma_lex): Add loc argument.
5348 2015-09-15  Marek Polacek  <polacek@redhat.com>
5350         PR c/67580
5351         * c-decl.c (tag_exists_p): New function.
5352         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5353         struct/union/enum keywords are missing.
5354         * c-tree.h (tag_exists_p): Declare.
5356 2015-09-15  Marek Polacek  <polacek@redhat.com>
5358         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5359         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5360         Return NULL_TREE instead of 0.
5361         (lookup_name): Return NULL_TREE instead of 0.
5362         (lookup_name_in_scope): Likewise.
5363         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5364         (parser_xref_tag): Use false instead of 0.
5365         (start_struct): Use true instead of 1.
5366         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5368 2015-09-14  Marek Polacek  <polacek@redhat.com>
5370         * c-typeck.c (set_nonincremental_init_from_string): Use
5371         HOST_WIDE_INT_M1U when shifting a negative value.
5373 2015-09-09  Mark Wielaard  <mjw@redhat.com>
5375         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5376         parm against NULL.
5378 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
5380         PR c/67502
5381         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5382         into OMP_FOR_PRE_BODY rather than before the loop.
5384 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
5386         PR c/67501
5387         * c-parser.c (c_parser_oacc_all_clauses,
5388         c_parser_omp_all_clauses): Remove invalid clause from
5389         list of clauses even if parser->error is set.
5391         PR c/67500
5392         * c-parser.c (c_parser_omp_clause_aligned,
5393         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5394         test for errors.
5395         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5396         error_mark_node.
5398         PR c/67495
5399         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5400         instead of c_parser_unary_expression.  If the result is !lvalue_p,
5401         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5403 2015-09-04  Marek Polacek  <polacek@redhat.com>
5405         PR sanitizer/67279
5406         * c-typeck.c (build_binary_op): Don't instrument static initializers.
5408 2015-09-03  Martin Sebor  <msebor@redhat.com>
5410         PR c/66516
5411         * c-typeck.c (convert_arguments, parser_build_unary_op,
5412         build_conditional_expr, c_cast_expr, convert_for_assignment,
5413         build_binary_op, _objc_common_truthvalue_conversion): Call
5414         reject_gcc_builtin.
5415         (c_decl_implicit): Define.
5417 2015-09-02  Marek Polacek  <polacek@redhat.com>
5419         PR c/67432
5420         * c-parser.c (c_parser_enum_specifier): Give a better error for
5421         an empty enum.
5423 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
5425         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5427 2015-08-12  Marek Polacek  <polacek@redhat.com>
5429         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5430         LOC to it.
5432 2015-08-03  Marek Polacek  <polacek@redhat.com>
5434         PR c/67088
5435         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5436         Use it.
5437         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5439 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
5441         * c-parser.c (c_parser_if_body): Take token_indent_info
5442         argument. Call warn_for_misleading_indentation even when the
5443         body is a semicolon.  Extract token_indent_infos corresponding
5444         to the guard, body and next tokens.  Adjust call to
5445         warn_for_misleading_indentation accordingly.
5446         (c_parser_else_body): Likewise.
5447         (c_parser_if_statement): Likewise.
5448         (c_parser_while_statement): Likewise.
5449         (c_parser_for_statement): Likewise.
5451 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
5452             Manuel López-Ibáñez  <manu@gcc.gnu.org>
5454         * c-decl.c (get_parm_info): Remove static var. Update warning
5455         message.
5457 2015-07-27  Marek Polacek  <polacek@redhat.com>
5459         PR c++/66555
5460         PR c/54979
5461         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5463 2015-07-20  Marek Polacek  <polacek@redhat.com>
5465         PR c++/55095
5466         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5467         (build_binary_op): Warn about left shift overflows.
5469 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
5471         * c-array-notation.c: Adjust includes for flags.h changes.
5472         * c-objc-common.c: Likewise.
5474 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
5476         * c-array-notation.c: Adjust includes.
5477         * c-aux-info.c: Likewise.
5478         * c-convert.c: Likewise.
5479         * c-decl.c: Likewise.
5480         * c-errors.c: Likewise.
5481         * c-lang.c: Likewise.
5482         * c-objc-common.c: Likewise.
5483         * c-parser.c: Likewise.
5484         * c-typeck.c: Likewise.
5486 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5488         PR fortran/66605
5489         * c-decl.c (finish_function): Call do_warn_unused_parameter.
5491 2015-06-29  Marek Polacek  <polacek@redhat.com>
5493         PR c/66322
5494         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5495         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
5496         about -Wswitch-bool here.
5497         (do_case): Update c_add_case_label call.
5498         (c_finish_case): Update c_do_switch_warnings call.
5500 2015-06-27  Marek Polacek  <polacek@redhat.com>
5502         * c-typeck.c: Use VECTOR_TYPE_P throughout.
5504 2015-06-26  Marek Polacek  <polacek@redhat.com>
5506         * c-array-notation.c (fix_builtin_array_notation_fn): Use
5507         INDIRECT_REF_P.
5508         * c-typeck.c (array_to_pointer_conversion): Likewise.
5509         (build_unary_op): Likewise.
5510         (c_finish_return): Likewise.
5512 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
5514         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5515         * c-parser.c: Likewise.
5517 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
5519         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5520         instead of pointer_hash.
5521         (detect_field_duplicates): Likewise.
5523 2015-06-25  Marek Polacek  <polacek@redhat.com>
5525         * c-array-notation.c: Use VAR_P throughout.
5526         * c-decl.c: Likewise.
5527         * c-objc-common.c: Likewise.
5528         * c-parser.c: Likewise.
5529         * c-typeck.c: Likewise.
5531 2015-06-25  Marek Polacek  <polacek@redhat.com>
5533         * c-decl.c: Use is_global_var throughout.
5534         * c-parser.c: Likewise.
5535         * c-typeck.c: Likewise.
5537 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
5539         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5540         * c-aux-info.c: Likewise.
5541         * c-convert.c: Likewise.
5542         * c-decl.c: Likewise.
5543         * c-errors.c: Likewise.
5544         * c-lang.c: Likewise.
5545         * c-objc-common.c: Likewise.
5546         * c-parser.c: Likewise.
5547         * c-typeck.c: Likewise.
5549 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
5551         PR middle-end/66325
5552         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5553         variants.
5555 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
5557         * c-decl.c (pop_scope): Register the main translation unit
5558         through the new debug hook.
5560 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
5562         * c-array-notation.c : Adjust include files.
5563         * c-aux-info.c : Likewise.
5564         * c-convert.c : Likewise.
5565         * c-decl.c : Likewise.
5566         * c-errors.c : Likewise.
5567         * c-lang.c : Likewise.
5568         * c-lang.h : Likewise.
5569         * c-objc-common.c : Likewise.
5570         * c-parser.c : Likewise.
5571         * c-typeck.c : Likewise.
5573 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
5575         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5576         immediately clobber it.
5577         (c_write_global_declarations_1): Remove call to
5578         check_global_declaration_1.
5579         (c_write_global_declarations_2): Remove.
5580         (c_write_final_cleanups): Rename from c_write_global_declarations.
5581         Remove call to finalize_compilation_unit.
5582         Remove calls to debugging hooks.
5583         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5584         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5585         * c-tree.h: Remove c_write_global_declarations.
5587 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
5589         * c-array-notation.c: Adjust includes for restructured coretypes.h.
5590         * c-aux-info.c: Likewise.
5591         * c-convert.c: Likewise.
5592         * c-decl.c: Likewise.
5593         * c-errors.c: Likewise.
5594         * c-lang.c: Likewise.
5595         * c-objc-common.c: Likewise.
5596         * c-parser.c: Likewise.
5597         * c-typeck.c: Likewise.
5599 2015-06-04  Marek Polacek  <polacek@redhat.com>
5601         PR c/66341
5602         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5603         it is a lvalue.
5605 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5607         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5608         Warn for empty struct.
5609         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5611 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
5613         * c-decl.c (start_function): Call plugin before parsing.
5614         (finish_function): Call plugin after parsing.
5616 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5618         PR c/49551
5619         * c-decl.c (merge_decls): Merge DECL_COMMON.
5621 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
5623         * Make-lang.in (check_gcc_pallelize): Define.
5625 2015-05-22  Marek Polacek  <polacek@redhat.com>
5627         PR c/47043
5628         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5629         attributes.
5631 2015-05-21  Marek Polacek  <polacek@redhat.com>
5633         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5634         DECL_BUILT_IN.
5636 2015-05-20  Marek Polacek  <polacek@redhat.com>
5638         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5639         * c-typeck.c: Likewise.
5641 2015-05-19  Marek Polacek  <polacek@redhat.com>
5643         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5645 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
5647         PR middle-end/66199
5648         * c-parser.c (c_parser_omp_for_loop): Don't add
5649         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5650         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5651         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5652         constructs.
5654 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
5656         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5657         swaps.
5659 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5661         PR fortran/44054
5662         * c-objc-common.c (c_tree_printer): Replace locus pointer with
5663         accessor function.
5665 2015-05-14  Marek Polacek  <polacek@redhat.com>
5667         PR c/66066
5668         PR c/66127
5669         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5670         rather than with 0.
5672 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
5674         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5675         to add a call to warn_for_misleading_indentation.
5676         (c_parser_else_body): Likewise, adding param "else_loc".
5677         (c_parser_if_statement): Check for misleading indentation.
5678         (c_parser_while_statement): Likewise.
5679         (c_parser_for_statement): Likewise.
5681 2015-05-08  Marek Polacek  <polacek@redhat.com>
5683         PR c/64918
5684         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5685         (output_init_element): Likewise.
5687 2015-05-07  Marek Polacek  <polacek@redhat.com>
5689         PR c/65179
5690         * c-typeck.c (build_binary_op): Warn when left shifting a negative
5691         value.
5693 2015-04-30  Marek Polacek  <polacek@redhat.com>
5695         * c-typeck.c (set_init_label): Call error_at instead of error and
5696         pass LOC to it.
5698         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
5699         the type of a decl.
5701         * c-typeck.c (c_build_va_arg): Clarify the error message.
5703 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
5705         * c-parser.c (c_parser_oacc_enter_exit_data): Use
5706         OMP_STANDALONE_CLAUSES.
5708 2015-04-28  Marek Polacek  <polacek@redhat.com>
5710         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5712 2015-04-28  Marek Polacek  <polacek@redhat.com>
5714         PR c/65901
5715         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5717 2015-04-25  Marek Polacek  <polacek@redhat.com>
5719         PR c/52085
5720         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
5721         attribute.
5723 2015-04-23  Marek Polacek  <polacek@redhat.com>
5725         PR c/65345
5726         * c-decl.c (set_labels_context_r): New function.
5727         (store_parm_decls): Call it via walk_tree_without_duplicates.
5728         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5729         instead of create_tmp_var.  Build TARGET_EXPR instead of
5730         COMPOUND_EXPR.
5731         (build_atomic_assign): Use create_tmp_var_raw instead of
5732         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
5734 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
5736         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5737         (c_parser_omp_target_update): Add missed %> to error_at ().
5739 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
5741         PR target/55143
5742         * c-decl.c (c_default_pointer_mode): Remove definition.
5743         * c-tree.h (c_default_pointer_mode): Remove declaration.
5745 2015-03-27  Tobias Burnus  <burnus@net-b.de>
5747         PR c/65586
5748         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5749         error out.
5750         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5751         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5752         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5754 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
5756         * c-decl.c (c_decl_attributes): Also add "omp declare target"
5757         attribute for DECL_EXTERNAL VAR_DECLs.
5759 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
5761         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5762         argument.
5764 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
5766         PR c/65120
5767         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5768         before preparing arguments to warn_logical_not_parentheses.
5770 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
5772         PR c/65120
5773         * c-typeck.c (parser_build_binary_op): Don't warn for
5774         !!x == y or !b == y where b is _Bool.
5776 2015-03-09  Marek Polacek  <polacek@redhat.com>
5778         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5779         * c-decl.c (grokdeclarator): Likewise.
5780         * c-typeck.c (build_binary_op): Likewise.
5782 2015-02-27  Marek Polacek  <polacek@redhat.com>
5784         PR c/65228
5785         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5787 2015-02-14  Marek Polacek  <polacek@redhat.com>
5789         PR c/64768
5790         * c-decl.c (grokdeclarator): Set the range of a flexible array member
5791         declared through a typedef name.
5793 2015-02-13  Marek Polacek  <polacek@redhat.com>
5795         PR c/65050
5796         * c-decl.c (grokdeclarator): Print also the type when giving
5797         the error message about array's incomplete element type.
5799 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
5801         PR c/64824
5802         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5803         check in the POP macro.
5805 2015-02-09  Marek Polacek  <polacek@redhat.com>
5807         PR c/64856
5808         * c-typeck.c (process_init_element): Don't always wrap
5809         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5810         initializing a range of elements.
5812 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
5814         PR c/64824
5815         PR c/64868
5816         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5818 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
5820         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5821         processing enum declaration.
5823 2015-01-29  Marek Polacek  <polacek@redhat.com>
5825         PR c/64709
5826         * c-typeck.c (pop_init_level): If constructor_elements has
5827         exactly one element with integer_zerop value, set constructor_zeroinit
5828         to 1.  Remove braces around warning_init call.
5830 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
5832         PR c/64766
5833         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5834         of FUNCTION_DECLs with error_mark_node.
5836 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
5838         PR c/64778
5839         * c-typeck.c (convert_arguments): Return -1 if there are
5840         error_args, even if we've diagnosed too many arguments.
5842 2015-01-21  Richard Biener  <rguenther@suse.de>
5844         PR middle-end/64313
5845         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5846         for builtins the user declared correctly.
5848 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
5849             Bernd Schmidt  <bernds@codesourcery.com>
5850             Cesar Philippidis  <cesar@codesourcery.com>
5851             James Norris  <jnorris@codesourcery.com>
5852             Jakub Jelinek  <jakub@redhat.com>
5853             Ilmir Usmanov  <i.usmanov@samsung.com>
5855         * c-parser.c: Include "gomp-constants.h".
5856         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5857         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5858         Use OMP_CLAUSE_SET_MAP_KIND.
5859         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5860         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5861         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5862         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5863         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5864         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5865         "copyout", "create", "delete", "deviceptr", "gang", "host",
5866         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5867         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5868         "present_or_create", "pcreate", "seq", "self", "vector",
5869         "vector_length", "wait", "worker".
5870         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5871         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5872         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5873         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5874         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5875         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5876         (c_parser_oacc_data_clause_deviceptr)
5877         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5878         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5879         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5880         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5881         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5882         (c_parser_oacc_parallel, c_parser_oacc_update)
5883         (c_parser_oacc_wait): New functions.
5884         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5885         (c_finish_oacc_data): New prototypes.
5886         * c-typeck.c: Include "gomp-constants.h".
5887         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
5888         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
5889         OMP_CLAUSE_SET_MAP_KIND.
5890         (c_finish_oacc_parallel, c_finish_oacc_kernels)
5891         (c_finish_oacc_data): New functions.
5892         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5893         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5894         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5895         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5896         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5897         GOMP_MAP_FORCE_DEVICEPTR.
5899 2015-01-09  Michael Collison  <michael.collison@linaro.org>
5901         * c-array-notation.c: Include hash-set.h, machmode.h,
5902         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5903         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5904         * c-aux-info.c: Ditto.
5905         * c-convert.c: Ditto.
5906         * c-decl.c: Ditto.
5907         * c-errors.c: Ditto.
5908         * c-lang.c: Dittoxs.
5909         * c-objc-common.c: Ditto.
5910         * c-parser.c: Ditto.
5911         * c-typeck.c: Include hash-set.h, machmode.h,
5912         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5913         fold-const.h, wide-int.h, inchash.h, real.h and
5914         fixed-value.h due to flattening of tree.h.
5916 2015-01-07  Marek Polacek  <polacek@redhat.com>
5918         PR c/64417
5919         * c-typeck.c (process_init_element): Disallow initialization of
5920         a flexible array member with a string constant if the structure
5921         is in an array.
5923 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
5925         PR sanitizer/64344
5926         * c-typeck.c (convert_for_assignment, c_finish_return): For
5927         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5928         types also set in_late_binary_op around convert call.
5929         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5930         to integral type casts, if not in_late_binary_op, pass c_fully_fold
5931         result on expr as last argument to ubsan_instrument_float_cast,
5932         if in_late_binary_op, don't use c_save_expr but save_expr.
5934         Update copyright years.
5936 2015-01-05  Marek Polacek  <polacek@redhat.com>
5938         PR c/64423
5939         * c-typeck.c (build_array_ref): Pass loc down to
5940         warn_array_subscript_with_type_char.
5942 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
5944         * c-typeck.c: New behavious for pointers to arrays with qualifiers
5945         (common-pointer-type): For pointers to arrays take qualifiers from
5946         element type.
5947         (build_conditional_expr): Add warnings for lost qualifiers.
5948         (comp-target-types): Allow pointers to arrays with different qualifiers.
5949         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
5950         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
5951         to PEDWARN_FOR_QUALIFIERS.
5953 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
5955         PR sanitizer/64289
5956         * c-convert.c: Include ubsan.h.
5957         (convert): For real -> integral casts and
5958         -fsanitize=float-cast-overflow don't call convert_to_integer, but
5959         instead instrument the float cast directly.
5961 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
5963         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5964         c_finish_stmt_expr): Remove NULL last argument from
5965         create_tmp_var_raw and create_tmp_var calls.
5966         * c-array-notation.c (fix_builtin_array_notation_fn,
5967         build_array_notation_expr, fix_conditional_array_notations_1,
5968         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5970 2014-11-28  Marek Polacek  <polacek@redhat.com>
5972         PR c/63862
5973         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5974         convert the right operand to integer type.
5976 2014-11-25  Marek Polacek  <polacek@redhat.com>
5978         PR c/63877
5979         * c-decl.c (start_function): Disable -Wmissing-declarations warning
5980         for inline functions.
5982 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
5984         PR target/63764
5985         * c-typeck.c (build_array_ref): Adjust
5986         convert_vector_to_pointer_for_subscript caller.  If it returns true,
5987         call non_lvalue_loc on the result.
5989 2014-11-11  Richard Biener  <rguenther@suse.de>
5991         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5992         to true.
5994 2014-11-10  Andi Kleen  <ak@linux.intel.com>
5996         PR c/60804
5997         * c-parser.c (c_parser_statement_after_labels): Call
5998         check_no_cilk.
5999         (c_parser_if_statement): Dito.
6000         (c_parser_switch_statement): Dito.
6001         (c_parser_while_statement): Dito.
6002         (c_parser_do_statement): Dito.
6003         (c_parser_for_statement): Dito.
6004         * c-typeck.c (c_finish_loop): Dito.
6006 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
6008         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6009         OPT_Wshift_count_overflow in the warnings.
6011 2014-10-30  Marek Polacek  <polacek@redhat.com>
6013         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6014         print the stripped version as well, if they're not the same.
6016 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
6018         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6019         machine_mode.
6021 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
6023         * c-decl.c: Adjust include files.
6024         * c-parser.c: Ditto.
6026 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
6027             Tom Tromey  <tromey@redhat.com>
6029         * c-tree.h (enum c_oracle_request): New.
6030         (c_binding_oracle_function): New typedef.
6031         (c_binding_oracle, c_pushtag, c_bind): Declare.
6032         * c-decl.c (c_binding_oracle): New global.
6033         (I_SYMBOL_CHECKED): New macro.
6034         (i_symbol_binding): New function.
6035         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6036         (I_TAG_CHECKED): New macro.
6037         (i_tag_binding): New function.
6038         (I_TAG_BINDING, I_TAG_DECL): Redefine.
6039         (I_LABEL_CHECKED): New macro.
6040         (i_label_binding): New function.
6041         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6042         (c_print_identifier): Save and restore c_binding_oracle.
6043         (c_pushtag, c_bind): New functions.
6045 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
6047         * c-typeck.c: Adjust include files.
6049 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6051         PR c++/53061
6052         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6053         initialization here...
6054         (c_initialize_diagnostics): ... but here. Set defaults after
6055         building pretty-printer.
6057 2014-10-23  Marek Polacek  <polacek@redhat.com>
6059         PR c/63626
6060         * c-decl.c (pop_scope): Don't print warning in external_scope.
6062 2014-10-19  Marek Polacek  <polacek@redhat.com>
6064         PR c/63567
6065         * c-typeck.c (output_init_element): Allow initializing objects with
6066         static storage duration with compound literals even in C99 and add
6067         pedwarn for it.
6069 2014-10-17  Marek Polacek  <polacek@redhat.com>
6071         PR c/63567
6072         * c-typeck.c (digest_init): Allow initializing objects with static
6073         storage duration with compound literals even in C99 and add pedwarn
6074         for it.
6076 2014-10-17  Marek Polacek  <polacek@redhat.com>
6078         PR c/63543
6079         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6080         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6081         error multiple times.  Print the type.
6083 2014-10-17  Marek Polacek  <polacek@redhat.com>
6085         PR c/63549
6086         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6087         type.
6089 2014-10-17  Marek Polacek  <polacek@redhat.com>
6091         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6092         (start_function): Use OPT_Wimplicit_int instead of 0.
6093         (store_parm_decls_oldstyle): Likewise.
6095 2014-10-17  Alan Modra  <amodra@gmail.com>
6097         PR middle-end/61848
6098         * c-decl.c (merge_decls): Don't merge section name or tls model
6099         to newdecl symtab node, instead merge to olddecl.  Override
6100         existing olddecl section name.  Set tls_model for all thread-local
6101         vars, not just OMP thread-private ones.  Remove incorrect comment.
6103 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
6105         * c-decl.c: Adjust include files.
6107 2014-10-14  DJ Delorie  <dj@redhat.com>
6109         * c-parser.c (c_parse_init): Add RID entries for each __intN.
6110         (c_token_starts_typename): Check all __intN, not just __int128.
6111         (c_token_starts_declspecs): Likewise.
6112         (c_parser_declspecs): Likewise.
6113         (c_parser_attribute_any_word): Likewise.
6114         (c_parser_objc_selector): Likewise.
6115         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6116         (struct c_declspecs): Add int_n_idx field to record *which* __intN
6117         is specified.
6118         * c-decl.c (declspecs_add_type): Check for all __intN, not just
6119         __int128.
6120         (finish_declspecs): Likewise.
6122 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
6124         * c-parser.c (c_parser_all_labels): New function to replace
6125         the duplicate code.
6126         (c_parser_statement): Call the new function.
6128 2014-10-09  Marek Polacek  <polacek@redhat.com>
6130         PR c/63480
6131         * c-typeck.c (pop_init_level): Don't warn about initializing
6132         with { }.
6134 2014-10-07  Marek Polacek  <polacek@redhat.com>
6136         PR c/59717
6137         * c-decl.c (header_for_builtin_fn): New function.
6138         (implicitly_declare): Suggest which header to include.
6140 2014-10-07  Marek Polacek  <polacek@redhat.com>
6142         * c-convert.c (convert): Use error_operand_p.
6143         * c-typeck.c (require_complete_type): Likewise.
6144         (really_atomic_lvalue): Likewise.
6145         (digest_init): Likewise.
6146         (handle_omp_array_sections_1): Likewise.
6148 2014-10-03  Marek Polacek  <polacek@redhat.com>
6150         PR c/63453
6151         * c-decl.c (pop_scope): Don't warn about "inline function declared
6152         but never defined" for functions marked with gnu_inline attribute.
6154 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
6156         PR c++/63249
6157         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6158         on low_bound and length.
6160 2014-09-24  Marek Polacek  <polacek@redhat.com>
6162         PR c/61405
6163         PR c/53874
6164         * c-parser.c: Don't define CPP_KEYWORD.
6165         (c_parser_switch_statement): Pass original type to c_finish_case.
6166         * c-tree.h (c_finish_case): Update declaration.
6167         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
6168         conditionally to c_do_switch_warnings.
6170 2014-09-03  Marek Polacek  <polacek@redhat.com>
6172         PR c/62024
6173         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6174         conversions.
6176 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
6177             Balaji V. Iyer  <balaji.v.iyer@intel.com>
6178             Igor Zamyatin  <igor.zamyatin@intel.com>
6180         * c-parser.c (c_parser_cilk_for): New function.
6181         (c_parser_cilk_grainsize): Likewise.
6182         (c_get_temp_regvar): Likewise.
6183         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6184         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6185         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6186         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6187         case.
6189 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
6191         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6192         with using HOST_WIDE_INT without truncation to 'int'
6194 2014-08-22  Marek Polacek  <polacek@redhat.com>
6196         PR c++/62199
6197         * c-typeck.c (parser_build_binary_op): Adjust call to
6198         warn_logical_not_parentheses.
6200 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
6202         PR other/62008
6203         * c-parser.c (c_parser_array_notation): Check for correct
6204         type of an array added.
6206 2014-08-19  Marek Polacek  <polacek@redhat.com>
6208         PR c++/62153
6209         * c-typeck.c (build_binary_op): If either operand of a comparison
6210         is a boolean expression, call maybe_warn_bool_compare.
6212 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
6214         PR c/45584
6215         * c-typeck.c (build_c_cast): Do a conversion even when the
6216         TYPE_MAIN_VARIANTs are the same.
6218 2014-08-19  Marek Polacek  <polacek@redhat.com>
6220         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6221         pedwarn_c99 instead of pedwarn.
6222         (grokfield): Likewise.
6223         (warn_defaults_to): New function.
6224         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6225         Unconditionally call pedwarn_c99 instead of pedwarn.
6226         (start_function): Call warn_defaults_to instead of pedwarn_c99.
6227         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6228         check flag_isoc11 before.
6229         * c-errors.c (pedwarn_c99): Change the return type to bool.
6230         Handle -Wc99-c11-compat.
6231         * c-parser.c (disable_extension_diagnostics): Handle
6232         warn_c99_c11_compat.
6233         (restore_extension_diagnostics): Likewise.
6234         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6235         instead of pedwarn, don't check flag_isoc11 before.
6236         (c_parser_declspecs): Likewise.
6237         (c_parser_alignas_specifier): Likewise.
6238         (c_parser_alignof_expression): Likewise.
6239         (c_parser_generic_selection): Likewise.
6240         * c-tree.h (pedwarn_c99): Update declaration.
6241         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6242         of pedwarn_c99.
6244 2014-08-19  Marek Polacek  <polacek@redhat.com>
6246         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6247         to pedwarn_c90.
6248         * c-errors.c: Include "opts.h".
6249         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6250         * c-parser.c (disable_extension_diagnostics): Handle negative value
6251         of warn_c90_c99_compat, too.
6252         (restore_extension_diagnostics): Likewise.
6253         (c_parser_compound_statement_nostart): Pass
6254         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6256 2014-08-12  Marek Polacek  <polacek@redhat.com>
6258         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6259         Add pedwarn.
6260         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6261         Likewise.
6262         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6264 2014-08-10  Marek Polacek  <polacek@redhat.com>
6266         PR c/51849
6267         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6268         Call pedwarn_c90 instead of pedwarn.
6269         (check_bitfield_type_and_width): Likewise.
6270         (declspecs_add_qual): Likewise.
6271         (declspecs_add_type): Likewise.
6272         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6273         Adjust to only call pedwarn_c90.
6274         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
6275         pedwarn_c90 instead of pedwarn.
6276         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6277         * c-parser.c (disable_extension_diagnostics): Handle
6278         warn_c90_c99_compat.
6279         (restore_extension_diagnostics): Likewise.
6280         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
6281         pedwarn_c90 instead of pedwarn.
6282         (c_parser_initelt): Likewise.
6283         (c_parser_postfix_expression): Likewise.
6284         (c_parser_postfix_expression_after_paren_type): Likewise.
6285         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6286         * c-tree.h: Fix formatting.
6287         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
6288         pedwarn_c90 instead of pedwarn.
6290 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
6292         * c-typeck.c: Remove include of pointer-set.h.
6294 2014-08-07  Marek Polacek  <polacek@redhat.com>
6296         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6298 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
6300         * c-typeck.c: Use hash_map instead of pointer_map.
6302 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
6304         * c-decl.c: Use hash_set instead of pointer_set.
6306 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
6308         PR middle-end/61455
6309         * c-array-notation.c (expand_array_notations): Handling
6310         of DECL_EXPR added.
6312 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
6314         PR c++/60517
6315         * c-typeck.c (c_finish_return): Return 0 instead of the address of
6316         a local variable.
6318 2014-07-30  Tom Tromey  <tromey@redhat.com>
6320         * c-typeck.c (struct constructor_stack) <designator_depth>: New
6321         field.
6322         (really_start_incremental_init, push_init_level): Initialize
6323         designator_depth.
6324         (pop_init_level): Set global designator_depth.
6325         (process_init_element): Check for designated_init attribute.
6327 2014-07-20  Marek Polacek  <polacek@redhat.com>
6329         PR c/61852
6330         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
6331         (implicitly_declare): Pass location to implicit_decl_warning.
6333 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
6335         PR middle-end/61294
6336         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6337         If non-NULL, call c_parser_check_literal_zero.
6338         (c_parser_check_literal_zero): New function.
6339         (c_parser_postfix_expression_after_primary): Adjust
6340         c_parser_expr_list caller, handle -Wmemset-transposed-args.
6342 2014-07-06  Marek Polacek  <polacek@redhat.com>
6344         PR c/6940
6345         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6346         * c-tree.h (C_ARRAY_PARAMETER): Define.
6347         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6348         function parameter.
6350 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
6351             Chen Gang  <gang.chen.5i5j@gmail.com>
6353         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6354         releasing symbol.
6356 2014-07-01  Marek Polacek  <polacek@redhat.com>
6358         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6359         instead of 0 to WARN_FOR_ASSIGNMENT.
6361 2014-07-01  Marek Polacek  <polacek@redhat.com>
6363         PR c/58286
6364         * c-typeck.c (convert_for_assignment): Pass
6365         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6367 2014-06-30  Marek Polacek  <polacek@redhat.com>
6369         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6370         has no_sanitize_undefined attribute.
6372 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
6374         PR middle-end/57541
6375         * c-array-notation.c (fix_builtin_array_notation_fn):
6376         Check for 0 arguments in builtin call. Check that bultin argument is
6377         correct.
6378         * c-parser.c (c_parser_array_notation): Check for incorrect initial
6379         index.
6381 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6383         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6384         qualifiers in __auto_type for atomic types.
6385         (c_parser_typeof_specifier): Discard all type qualifiers in
6386         __typeof__ for atomic types.
6388 2014-06-25  Marek Polacek  <polacek@redhat.com>
6390         PR c/61162
6391         * c-parser.c (c_parser_statement_after_labels): Pass the location of
6392         the return expression to c_finish_return.
6394 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
6396         * c-typeck.c (c_finish_omp_clauses): Make sure
6397         OMP_CLAUSE_LINEAR_STEP has correct type.
6399 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
6401         * c-decl.c: Adjust.
6403 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
6405         * c-parser.c (c_parser_omp_for_loop): For
6406         #pragma omp parallel for simd move lastprivate clause from parallel
6407         to for rather than simd.
6409 2014-06-23  Marek Polacek  <polacek@redhat.com>
6411         * c-typeck.c (parser_build_binary_op): Don't call
6412         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6414 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
6416         * c-parser.c (c_parser_omp_threadprivate): Likewise.
6417         * c-decl.c (merge_decls): Likewise.
6419 2014-06-09  Marek Polacek  <polacek@redhat.com>
6421         PR c/36446
6422         * c-typeck.c (error_init): Call inform instead of error_at.
6423         (pedwarn_init): Call inform instead of pedwarn.
6424         (warning_init): Call inform instead of warning_at.
6426 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
6428         * c-decl.c (merge_decls): Use set_decl_section_name.
6429         (duplicate_decls): Remove node if it exists.
6431 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
6433         PR c/53119
6434         * c-typeck.c (push_init_level, process_init_element,
6435         pop_init_level): Correct check for zero initialization, move
6436         missing brace warning to respect zero initialization.
6438 2014-06-05  Marek Polacek  <polacek@redhat.com>
6440         PR c/56724
6441         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6443 2014-06-05  Marek Polacek  <polacek@redhat.com>
6445         PR c/49706
6446         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
6447         on the left hand side operand of a comparison.
6449 2014-06-05  Marek Polacek  <polacek@redhat.com>
6451         PR c/48062
6452         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6453         Print note only if the warning was printed.
6455 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
6457         PR c/58942
6458         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6459         with a pointer.
6461 2014-06-03  Marek Polacek  <polacek@redhat.com>
6463         PR c/60439
6464         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6465         c_start_case.
6466         * c-tree.h (c_start_case): Update.
6467         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
6468         switch condition has boolean value.
6470 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
6472         * c-decl.c: Include builtins.h.
6473         * c-parser.c: Likewise.
6475 2014-05-27  Marek Polacek  <polacek@redhat.com>
6477         PR c/56724
6478         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
6479         error and warning calls to error_at and warning_at.  Pass location of
6480         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
6481         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6482         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
6484 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
6486         PR c/61191
6487         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6488         function parameters.
6490 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
6492         * c-decl.c (merge_decls): Preserve symtab node pointers.
6493         (duplicate_decls): Free new decl.
6495 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
6497         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6498         initialization.
6500         * c-parser.c (c_parser_omp_target): Return bool values.
6502 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
6504         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6505         num_teams_loc variable to num_thread_limit_loc.
6507 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
6509         * c-array-notation.c (expand_array_notations): Use void_node
6510         instead of void_zero_node.
6512 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
6514         * c-decl.c (finish_struct): Adjust.
6515         (finish_enum): Likewise.
6516         (bind): Adjust.
6517         (record_inline_static): Likewise.
6518         (push_scope): Likewise.
6519         (make_label): Likewise.
6520         (lookup_label_for_goto): Likewise.
6521         (finish_struct): Likewise.
6522         (finish_enum): Likewise.
6523         (store_parm_decls): Likewise.
6524         (c_push_function_context): Likewise.
6525         * c-lang.h: Remove usage of variable_size gty attribute.
6526         * c-parser.c (c_parse_init): Adjust.
6527         (c_parse_file): Likewise.
6529 2014-05-13  Marek Polacek  <polacek@redhat.com>
6531         PR c/61162
6532         * c-typeck.c (convert_for_assignment): Pass location to
6533         WARN_FOR_ASSIGNMENT instead of input_location.
6535 2014-05-10  Marek Polacek  <polacek@redhat.com>
6537         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6538         maybe_warn_string_init.
6539         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6540         maybe_warn_string_init.
6541         * c-tree.h (maybe_warn_string_init): Update declaration.
6542         * c-typeck.c (maybe_warn_string_init): Add location parameter.
6543         Call pedwarn_init with loc instead of with input_location.
6544         (digest_init): Pass init_loc to maybe_warn_string_init.
6545         (pop_init_level): Call pedwarn_init with loc instead of with
6546         input_location.
6547         (set_init_index): Likewise.
6548         (process_init_element): Likewise.
6550 2014-05-09  Marek Polacek  <polacek@redhat.com>
6552         PR c/61096
6553         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6554         (c_parser_initelt): Pass location to set_init_label.  Pass array index
6555         location to set_init_index.
6556         * c-tree.h (push_init_level): Update declaration.
6557         (pop_init_level): Likewise.
6558         (set_init_index): Likewise.
6559         (set_init_label): Likewise.
6560         * c-typeck.c (error_init): Add location parameter.  Call error_at
6561         instead of error.
6562         (digest_init): Pass init_loc to error_init.
6563         (really_start_incremental_init):
6564         (push_init_level): Add location parameter.  Pass loc to pop_init_level
6565         and error_init.
6566         (pop_init_level): Likewise.
6567         (set_designator): Add location parameter.  Pass loc to pop_init_level,
6568         push_init_level, and error_init.
6569         (set_init_index): Add location parameter.  Pass loc to error_init and
6570         set_designator.
6571         (set_init_label): Likewise.
6572         (output_init_element): Pass loc to error_init.
6573         (process_init_element): Pass loc to error_init, pop_init_level,
6574         pedwarn_init, and push_init_level.
6576 2014-05-09  Marek Polacek  <polacek@redhat.com>
6578         PR c/50459
6579         * c-parser.c (c_parser_attributes): Parse the arguments as an
6580         expression-list if the attribute takes identifier.
6582 2014-05-08  Marek Polacek  <polacek@redhat.com>
6584         PR c/61053
6585         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6586         TYPE_ALIGN_UNIT.
6588 2014-05-08  Marek Polacek  <polacek@redhat.com>
6590         PR c/61077
6591         * c-decl.c (start_function): Warn for _Atomic-qualified return type
6592         of main.
6594 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
6595             Mike Stump  <mikestump@comcast.net>
6596             Richard Sandiford  <rdsandiford@googlemail.com>
6598         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6599         (finish_enum): Use wide-int interfaces.
6600         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6601         * c-typeck.c (build_c_cast): Likewise.
6602         (set_nonincremental_init_from_string): Likewise.
6603         (c_tree_equal): Likewise.
6605 2014-05-02  Marek Polacek  <polacek@redhat.com>
6607         PR c/25801
6608         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
6609         Return size_one_node when the type is not complete.
6610         (pointer_diff): Remove comment.
6611         (build_unary_op): Improve error messages.
6613 2014-05-02  Marek Polacek  <polacek@redhat.com>
6615         * c-typeck.c (c_finish_return): Separate warning_at calls.
6617 2014-05-02  Marek Polacek  <polacek@redhat.com>
6619         * c-tree.h (error_init): Remove declaration.
6620         (pedwarn_init): Likewise.
6621         * c-typeck.c (error_init): Make static and move above.
6622         (pedwarn_init): Likewise.
6623         (warning_init): Move above.
6624         (maybe_warn_string_init): Likewise.
6626 2014-05-01  Jeff Law  <law@redhat.com>
6628         Revert:
6630         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
6631         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6632         avoid goto.
6634 2014-05-02  Marek Polacek  <polacek@redhat.com>
6636         PR c/60784
6637         * c-typeck.c (push_init_level): Set constructor_designated to
6638         p->designated for structures.
6640 2014-05-01  Marek Polacek  <polacek@redhat.com>
6642         PR c/60915
6643         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6644         function-definition has an attribute after the declarator.
6646 2014-05-01  Marek Polacek  <polacek@redhat.com>
6648         PR c/60257
6649         * c-typeck.c (warning_init): Add location_t parameter.  Call
6650         warning_at instead of warning.
6651         (push_init_level): Pass input_location to warning_init.
6652         (add_pending_init): Add location_t parameter.  Pass loc to
6653         warning_init.
6654         (set_nonincremental_init): Pass input_location to add_pending_init.
6655         (set_nonincremental_init_from_string): Likewise.
6656         (output_init_element): Pass loc to warning_init and to
6657         add_pending_init.
6659 2014-05-01  Marek Polacek  <polacek@redhat.com>
6661         PR c/43395
6662         * c-typeck.c (c_finish_return): Distinguish between label and variable
6663         when warning about returning local address.
6665 2014-05-01  Marek Polacek  <polacek@redhat.com>
6667         PR c/29467
6668         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6669         in C89 mode.
6671 2014-05-01  Marek Polacek  <polacek@redhat.com>
6673         PR c/43245
6674         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6675         instead of 0 to WARN_FOR_QUALIFIERS.
6677 2014-05-01  Marek Polacek  <polacek@redhat.com>
6679         PR c/56989
6680         * c-typeck.c (default_conversion): Use better location for
6681         error call.
6683 2014-04-30  Marek Polacek  <polacek@redhat.com>
6685         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6686         also when SANITIZE_FLOAT_DIVIDE is on.
6688 2014-04-30  Marek Polacek  <polacek@redhat.com>
6690         PR c/60139
6691         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6692         and pedwarn_init.  Use loc insted of input_location.
6694 2014-04-30  Marek Polacek  <polacek@redhat.com>
6696         PR c/60351
6697         * c-typeck.c (build_binary_op): Use location when warning about
6698         shift count.
6700 2014-04-25  Marek Polacek  <polacek@redhat.com>
6702         PR c/18079
6703         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6704         always_inline/noinline and hot/cold attributes.
6706 2014-04-25  Marek Polacek  <polacek@redhat.com>
6708         PR c/60114
6709         * c-parser.c (c_parser_initelt): Pass input_location to
6710         process_init_element.
6711         (c_parser_initval): Pass loc to process_init_element.
6712         * c-tree.h (process_init_element): Adjust declaration.
6713         * c-typeck.c (push_init_level): Pass input_location to
6714         process_init_element.
6715         (pop_init_level): Likewise.
6716         (set_designator): Likewise.
6717         (output_init_element): Add location_t parameter.  Pass loc to
6718         digest_init.
6719         (output_pending_init_elements): Pass input_location to
6720         output_init_element.
6721         (process_init_element): Add location_t parameter.  Pass loc to
6722         output_init_element.
6724 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
6726         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6727         atomic-clause, allow comma in between atomic-clause and
6728         seq_cst.
6730 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
6732         PR c/59073
6733         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6734         fails, don't set OM_PARALLEL_COMBINED and return NULL.
6736 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
6738         PR middle-end/60469
6739         * c-array-notation.c (fix_builtin_array_notation_fn): Use
6740         create_tmp_var instead build_decl for creating temps.
6741         (build_array_notation_expr): Likewise.
6742         (fix_conditional_array_notations_1): Likewise.
6743         (fix_array_notation_expr): Likewise.
6744         (fix_array_notation_call_expr): Likewise.
6746 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
6748         PR c++/60689
6749         * c-tree.h (c_build_function_call_vec): New prototype.
6750         * c-typeck.c (build_function_call_vec): Don't call
6751         resolve_overloaded_builtin here.
6752         (c_build_function_call_vec): New wrapper function around
6753         build_function_call_vec.  Call resolve_overloaded_builtin here.
6754         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6755         Call c_build_function_call_vec instead of build_function_call_vec.
6756         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6757         * c-decl.c (finish_decl): Likewise.
6759 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6761         PR c/55383
6762         * c-typeck.c: Use correct format string in cast-qual warning
6764 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
6766         * c-decl.c (c_decl_attributes): Use
6767         lang_hooks.types.omp_mappable_type.
6768         * c-typeck.c (c_finish_omp_clauses): Likewise.
6770 2014-03-06  Marek Polacek  <polacek@redhat.com>
6772         PR c/60197
6773         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6774         of checking tree code.
6776 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
6778         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6779         (c_parser_parameter_declaration): Likewise.
6781 2014-02-19  Marek Polacek  <polacek@redhat.com>
6783         PR c/60195
6784         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6785         Call mark_exp_read on exp.value.
6786         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
6787         TREE_ADDRESSABLE on old instead of val.
6788         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6790 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
6792         * c-parser.c (c_parser_get_builtin_args): Replace calls to
6793         C_EXPR_APPEND by vec_safe_push.
6794         * c-tree.h (C_EXPR_APPEND): Remove.
6796 2014-01-31  Marek Polacek  <polacek@redhat.com>
6798         PR c/59963
6799         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6800         build_function_call_vec.
6801         (build_function_call): Likewise.
6802         (build_atomic_assign): Likewise.
6803         (build_function_call_vec): Add arg_loc parameter.  Use it.
6804         (convert_arguments): Likewise.
6805         (convert_for_assignment): Rename rhs_loc to expr_loc.
6806         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6807         (c_parser_objc_keywordexpr): Likewise.
6808         (c_parser_postfix_expression_after_primary): Call
6809         build_function_call_vec with expr_loc rather than op_loc.
6810         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
6811         build_function_call_vec.
6812         (c_parser_expr_list): Add locations parameter.  Fill it with locations
6813         of function arguments.
6814         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6816 2014-01-30  Marek Polacek  <polacek@redhat.com>
6818         PR c/59940
6819         * c-typeck.c (build_function_call_vec): Use loc parameter.
6820         (convert_arguments): Add location parameter.  Use it.
6821         (ep_convert_and_check): Likewise.
6822         (build_atomic_assign): Adjust convert_for_assignment call.
6823         (build_modify_expr): Likewise.
6824         (digest_init): Likewise.
6825         (c_finish_return): Likewise.
6826         (build_conditional_expr): Adjust ep_convert_and_check calls.
6827         (convert_for_assignment): Add rhs_loc parameter.  Use it.
6828         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6829         calls.
6831 2014-01-30  Richard Biener  <rguenther@suse.de>
6833         PR c/59905
6834         * c-typeck.c (build_function_call_vec): Do not replace calls
6835         to a function via an incompatible type with a runtime abort.
6837 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6839         * c-parser.c (c_parser_declaration_or_fndef): Replaced
6840         flag_enable_cilkplus with flag_cilkplus.
6841         (c_parser_direct_declarator_inner): Likewise.
6842         (c_parser_attribute_any_word): Likewise.
6843         (c_parser_attributes): Likewise.
6844         (c_parser_compound_statement): Likewise.
6845         (c_parser_statement_after_labels): Likewise.
6846         (c_parser_if_statement): Likewise.
6847         (c_parser_switch_statement): Likewise.
6848         (c_parser_do_statement): Likewise.
6849         (c_parser_for_statement): Likewise.
6850         (c_parser_unary_expression): Likewise.
6851         (c_parser_postfix_expression): Likewise.
6852         (c_parser_postfix_expression_after_primary): Likewise.
6853         (c_parser_postfix_expression_after_primary): Likewise.
6854         (c_parser_omp_clause_name): Likewise.
6855         (c_finish_omp_declare_simd): Likewise.
6856         (c_parser_cilk_verify_simd): Likewise.
6857         * c-typeck.c (build_array_ref): Likewise.
6858         (build_function_call_vec): Likewise.
6859         (convert_arguments): Likewise.
6860         (build_compound_expr): Likewise.
6861         (c_finish_return): Likewise.
6862         (c_finish_if_stmt): Likewise.
6863         (c_finish_loop): Likewise.
6864         (build_binary_op): Likewise.
6866 2014-01-23  Marek Polacek  <polacek@redhat.com>
6868         PR c/59846
6869         * c-typeck.c (parser_build_binary_op): Use location instead of
6870         input_location.
6871         (build_binary_op): Pass location to shorten_compare.
6873 2014-01-23  Marek Polacek  <polacek@redhat.com>
6875         PR c/58346
6876         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6877         an empty aggregate.
6879 2014-01-23  Marek Polacek  <polacek@redhat.com>
6881         PR c/59871
6882         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6883         of a comma expression.
6884         (emit_side_effect_warnings): Likewise.
6886 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6888         PR c/59825
6889         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6890         function to use walk_tree and moved a lot of its functionality to
6891         expand_array_notations.
6892         (expand_array_notations): New function.
6894 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6896         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6897         attribute an attribute without value.
6899 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
6901         PR middle-end/58809
6902         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6903         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6905 2014-01-22  Marek Polacek  <polacek@redhat.com>
6907         PR c/59891
6908         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6909         of remove_c_maybe_const_expr on op1 and op2.
6911 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
6913         PR c/58943
6914         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6915         effects, preevaluate rhs using SAVE_EXPR first.
6917 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6919         PR c++/59631
6920         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6921         statements with if-elseif statements.
6923 2014-01-06  Marek Polacek  <polacek@redhat.com>
6925         PR c/57773
6926         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6927         defined bit-field types only in ISO C.
6929 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
6931         Update copyright years
6933 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
6935         * c-array-notation.c: Use the standard form for the copyright notice.
6937 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6939         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6940         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6941         field in parser is not empty.  If not-empty, call the function
6942         c_parser_finish_omp_declare_simd.
6943         (c_parser_cilk_clause_vectorlength): Modified function to be shared
6944         between SIMD-enabled functions and #pragma simd.  Added new parameter.
6945         (c_parser_cilk_all_clauses): Modified the usage of the function
6946         c_parser_cilk_clause_vectorlength as mentioned above.
6947         (c_parser_cilk_simd_fn_vector_attrs): New function.
6948         (c_finish_cilk_simd_fn_tokens): Likewise.
6949         (is_cilkplus_vector_p): Likewise.
6950         (c_parser_omp_clause_name): Added checking for "vectorlength,"
6951         "nomask," and "mask" strings in clause name.
6952         (c_parser_omp_all_clauses): Added 3 new case statements:
6953         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6954         PRAGMA_CILK_CLAUSE_NOMASK.
6955         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
6956         check for vector attribute and if so call the function
6957         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
6958         called the function c_finish_cilk_simd_fn_tokens.
6959         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6960         parser field is non-empty.  If so, parse them as you would parse
6961         the omp declare simd pragma.
6962         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6963         Added a check when step is a parameter and flag it as error.
6964         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6965         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6966         pragma_omp_clause.
6968 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
6970         * c-parser.c (c_parser_omp_parallel): Fix description.
6972 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6974         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6975         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6976         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6977         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6979 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
6981         PR c/52023
6982         * c-parser.c (c_parser_alignas_specifier): Use
6983         c_sizeof_or_alignof_type instead of c_alignof.
6984         (c_parser_alignof_expression): Likewise, with min_alignof
6985         parameter depending on alignof spelling used.
6987 2013-12-04  Marek Polacek  <polacek@redhat.com>
6989         PR c/54113
6990         * c-decl.c (start_function): Don't warn for missing prototype for
6991         inline functions.
6993 2013-12-03  Marek Polacek  <polacek@redhat.com>
6995         PR c/59351
6996         * c-decl.c (build_compound_literal): Allow compound literals with
6997         empty initial value.
6999 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
7001         PR c/58235
7002         * c-typeck.c (build_modify_expr): Diagnose assignment to
7003         expression with array type.
7005 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
7007         PR c/42262
7008         * c-typeck.c (process_init_element): Do not treat a string as
7009         initializing a whole array when used with a designator for an
7010         individual element.
7012 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
7014         PR c/57574
7015         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7016         an inline function following a static declaration.
7018 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
7020         PR c/59310
7021         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7022         to p_name before calling c_parser_omp_teams instead of after.
7023         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7024         argument.  Remove unused p_name variable.
7026 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
7027             Jakub Jelinek  <jakub@redhat.com>
7029         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7030         external_scope is NULL.
7032 2013-11-27  Tom de Vries  <tom@codesourcery.com>
7033             Marc Glisse  <marc.glisse@inria.fr>
7035         PR c++/59032
7036         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7038 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
7040         * c-typeck.c: Add required include files from gimple.h.
7042 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
7044         * c-decl.c (define_label, shadow_tag_warned)
7045         (check_bitfield_type_and_width, grokdeclarator, grokparms,
7046         store_parm_decls_newstyle, store_parm_decls_oldstyle)
7047         (declspecs_add_type): Remove use of in_system_header macro.
7048         * c-parser.c (c_parser_unary_expression): Likewise.
7049         * c-typeck.c (store_init_value, process_init_element)
7050         (c_start_case): Likewise.
7052         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7053         macro.
7055         * c-parser.c (c_parser_set_source_position_from_token): Remove
7056         reference to in_system_header from comment.
7058 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
7060         * c-decl.c (grokdeclarator): Update comment to refer to
7061         tree_to_[su]hwi rather than tree_low_cst.
7063 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
7065         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7066         tree_to_uhwi throughout.
7068 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
7070         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7071         throughout.
7073 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
7075         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7076         throughout.
7078 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
7080         * c-parser.c (c_parser_cilk_simd): New.
7081         (c_parser_cilk_verify_simd): New.
7082         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7083         (c_parser_omp_for_loop): Add case for NE_EXPR.
7084         Set c_break_label for CILK_SIMD.
7085         (c_parser_cilk_clause_vectorlength): New.
7086         (c_parser_cilk_clause_linear): New.
7087         (c_parser_cilk_clause_name): New.
7088         (c_parser_cilk_all_clauses): New.
7089         * c-typeck.c (build_unary_op): Pass location argument to
7090         readonly_error.
7091         (build_modify_expr): Same.
7092         (build_asm_expr): Same.
7093         (c_finish_bc_stmt): Error on break/continue in loops.
7095 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
7097         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7099 2013-11-14  Diego Novillo  <dnovillo@google.com>
7101         * c-decl.c: Include print-tree.h.
7102         Include stor-layout.h.
7103         Include varasm.h.
7104         Include attribs.h.
7105         Include stringpool.h.
7106         * c-lang.c: Include fold-const.h.
7107         * c-parser.c: Include stringpool.h.
7108         Include attribs.h.
7109         Include stor-layout.h.
7110         Include varasm.h.
7111         Include trans-mem.h.
7112         * c-typeck.c: Include stor-layout.h.
7113         Include trans-mem.h.
7114         Include varasm.h.
7115         Include stmt.h.
7117 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
7119         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7120         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7121         __auto_type.
7122         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7123         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7124         RID_AUTO_TYPE.
7125         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7126         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7127         (c_parser_declarator, c_parser_direct_declarator_inner)
7128         (c_parser_parameter_declaration, c_parser_type_name): All callers
7129         changed.
7130         (c_parser_declaration_or_fndef): Handle declarations with type
7131         determined from the initializer.
7133 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
7135         * c-typeck.c: Include gimplify.h.
7137 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
7139         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7140         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7141         comment.
7142         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7143         or _Thread_local as appropriate in diagnostics.
7144         (build_null_declspecs): Initialize ret->thread_gnu_p.
7145         (declspecs_add_scspec): Handle either __thread or _Thread_local
7146         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
7147         pedantic.  Do not disallow _Thread_local extern and _Thread_local
7148         static.
7150 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
7151             Andrew MacLeod  <amacleod@redhat.com>
7153         * c-aux-info.c (gen_type): Handle atomic qualifier.
7154         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7155         qualifiers when compating types.
7156         (shadow_tag_warned): Handle atomic_p in declspecs.
7157         (quals_from_declspecs): Likewise.
7158         (start_decl): Use c_type_promotes_to when promoting argument
7159         types.
7160         (grokdeclarator): Handle _Atomic.
7161         (get_parm_info): Diagnose any qualifier on "void" as only
7162         parameter.
7163         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7164         comparing types.  Use c_type_promotes_to when promoting argument
7165         types.
7166         (finish_function): Use c_type_promotes_to when promoting argument
7167         types.
7168         (build_null_declspecs): Handle atomic_p in declspecs.
7169         (declspecs_add_qual): Handle RID_ATOMIC.
7170         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7171         (c_token_starts_declspecs): Handle RID_ATOMIC.
7172         (c_parser_declspecs): Handle atomic type specifiers and
7173         qualifiers.
7174         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7175         from types of expressions with atomic type.
7176         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7177         (c_parser_attribute_any_word): Handle RID_ATOMIC.
7178         (c_parser_initializer, c_parser_initelt, c_parser_initval)
7179         (c_parser_statement_after_labels, c_parser_switch_statement)
7180         (c_parser_for_statement, c_parser_expr_no_commas)
7181         (c_parser_conditional_expression, c_parser_binary_expression)
7182         (c_parser_cast_expression, c_parser_unary_expression)
7183         (c_parser_postfix_expression)
7184         (c_parser_postfix_expression_after_primary, c_parser_expression):
7185         Use convert_lvalue_to_rvalue.
7186         (c_parser_expression_conv, c_parser_expr_list): Document
7187         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
7188         (c_parser_objc_synchronized_statement): Use
7189         convert_lvalue_to_rvalue.
7190         (c_parser_objc_selector): Handle RID_ATOMIC.
7191         (c_parser_objc_receiver, c_parser_array_notation): Use
7192         convert_lvalue_to_rvalue.
7193         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7194         _Atomic (type-name).
7195         (struct c_declspecs): Add atomic_p field.
7196         (convert_lvalue_to_rvalue): Declare.
7197         * c-typeck.c (c_type_promotes_to): Promote atomic types to
7198         corresponding atomic types.
7199         (qualify_type): Don't add _Atomic qualifiers from second argument.
7200         (comp_target_types): Do not allow _Atomic mismatches.
7201         (type_lists_compatible_p): Do not remove atomic qualifiers when
7202         comparing types.
7203         (really_atomic_lvalue, convert_lvalue_to_rvalue)
7204         (build_atomic_assign): New functions.
7205         (build_unary_op): Use build_atomic_assign for atomic increment and
7206         decrement.
7207         (build_conditional_expr): Do not treat _Atomic void as a qualified
7208         version of void.
7209         (build_modify_expr): Use build_atomic_assign for atomic LHS.
7210         (find_anonymous_field_with_type, convert_to_anonymous_field)
7211         (convert_for_assignment): Do not remove atomic qualifiers when
7212         comparing types.
7213         (digest_init): Do not accept initialization of arrays of atomic
7214         elements by string constants.
7215         (build_asm_expr): Use convert_lvalue_to_rvalue.
7216         (build_binary_op): Do not treat _Atomic void as a qualified
7217         version of void.
7219 2013-11-06  DJ Delorie  <dj@redhat.com>
7221         * c-decl.c (locate_old_decl): If a previous conflicting decl is
7222         both explicit and builtin, print the location of the explicit one.
7224 2013-11-05  Tobias Burnus  <burnus@net-b.de>
7226         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7227         c_parser_omp_distribute, c_parser_omp_teams,
7228         c_parser_omp_target, c_parser_omp_declare): Handle
7229         -fopenmp-simd.
7231 2013-11-03  Marek Polacek  <polacek@redhat.com>
7233         * c-decl.c (grokdeclarator): Add VLA instrumentation.
7235 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
7237         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7238         check_dup_generic at the end, unless remove is true.
7239         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7240         remove = true;.
7241         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7243 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
7245         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7246         with decl that is not pointer nor array.
7248 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7250         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7251         a spawning function is found.
7252         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7253         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7254         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7255         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7256         case.
7257         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7258         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7259         expr.
7260         (c_finish_return): Added a check to reject _Cilk_spawn in return
7261         expression.
7262         (build_cilk_spawn): New function.
7263         (build_cilk_sync): Likewise.
7264         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
7266 2013-10-27  Tobias Burnus  <burnus@net-b.de>
7268         PR other/33426
7269         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7270         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7271         (c_parser_statement_after_labels): Update calls.
7273 2013-10-24  Tobias Burnus  <burnus@net-b.de>
7275         PR other/33426
7276         * c-parser.c (c_parser_pragma, c_parser_for_statement):
7277         Handle PRAGMA_IVDEP.
7278         (c_parser_statement_after_labels): Update call.
7280 2013-10-24  Marek Polacek  <polacek@redhat.com>
7282         * c-parser.c (c_parser_struct_declaration): Add a comment.
7283         (c_parser_declarator): Don't allow _Alignas here.
7285 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
7287         * c-parser.c: Include omp-low.h.
7288         * c-typeck.c: Likewise.
7290 2013-10-17  Marek Polacek  <polacek@redhat.com>
7292         PR c/58267
7293         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7294         Document syntax of the array-declarator.
7295         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7296         are not permitted.
7297         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7298         (c_parser_struct_declaration): Likewise.
7299         (c_parser_declarator): Likewise.
7300         (c_parser_direct_declarator_inner): Likewise.
7301         (c_parser_parameter_declaration): Likewise.
7302         (c_parser_type_name): Likewise.
7304 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
7306         * c-lang.h (current_omp_declare_target_attribute): New extern
7307         decl.
7308         * c-parser.c: Include c-lang.h.
7309         (struct c_parser): Change tokens to c_token *.
7310         Add tokens_buf field.  Change tokens_avail type to unsigned int.
7311         (c_parser_consume_token): If parser->tokens isn't
7312         &parser->tokens_buf[0], increment parser->tokens.
7313         (c_parser_consume_pragma): Likewise.
7314         (enum pragma_context): Add pragma_struct and pragma_param.
7315         (c_parser_external_declaration): Adjust
7316         c_parser_declaration_or_fndef caller.
7317         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7318         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7319         Adjust recursive call.
7320         (c_parser_struct_or_union_specifier): Use pragma_struct instead
7321         of pragma_external.
7322         (c_parser_parameter_declaration): Use pragma_param instead of
7323         pragma_external.
7324         (c_parser_compound_statement_nostart, c_parser_label,
7325         c_parser_for_statement): Adjust
7326         c_parser_declaration_or_fndef callers.
7327         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7328         it through to c_parser_conditional_expression.
7329         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7330         pass it through to c_parser_binary_expression.  Adjust recursive
7331         call.
7332         (c_parser_binary_expression): Remove prec argument, add
7333         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
7334         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7335         binop matches it, use build2 instead of parser_build_binary_op.
7336         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7337         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7338         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7339         Handle pragma_struct and pragma_param the same as pragma_external.
7340         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7341         (c_parser_omp_variable_list): Parse array sections for
7342         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7343         (c_parser_omp_clause_collapse): Fully fold collapse expression.
7344         (c_parser_omp_clause_reduction): Handle user defined reductions.
7345         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7346         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7347         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7348         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7349         c_parser_omp_clause_depend, c_parser_omp_clause_map,
7350         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7351         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7352         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7353         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
7354         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
7355         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7356         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
7357         (c_parser_omp_for_loop): Add CODE argument, pass it through
7358         to c_finish_omp_for.  Change last argument to cclauses,
7359         and adjust uses to grab parallel clauses from the array of all
7360         the split clauses.  Adjust c_parser_binary_expression,
7361         c_parser_declaration_or_fndef and c_finish_omp_for callers.
7362         (omp_split_clauses): New function.
7363         (c_parser_omp_simd): New function.
7364         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7365         Allow the function to be called also when parsing combined constructs,
7366         and call c_parser_omp_simd when parsing for simd.
7367         (c_parser_omp_sections_scope): If section-sequence doesn't start with
7368         #pragma omp section, require exactly one structured-block instead of
7369         sequence of statements.
7370         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7371         Allow the function to be called also when parsing combined constructs.
7372         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7373         Allow the function to be called also when parsing combined
7374         constructs.
7375         (c_parser_omp_taskgroup, c_parser_omp_cancel,
7376         c_parser_omp_cancellation_point, c_parser_omp_distribute,
7377         c_parser_omp_teams, c_parser_omp_target_data,
7378         c_parser_omp_target_update, c_parser_omp_target,
7379         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7380         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7381         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7382         (c_parser_omp_construct): Add p_name and mask vars.  Handle
7383         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7384         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
7385         and c_parser_omp_sections callers.
7386         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7387         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7388         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7389         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
7390         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
7391         OMP_CLAUSE_DEPEND.
7392         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7393         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7394         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7395         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7396         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7397         * c-typeck.c: Include tree-inline.h.
7398         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7399         handle_omp_array_sections_1, handle_omp_array_sections,
7400         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7401         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7402         user defined reductions.
7403         (c_tree_equal): New function.
7404         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7405         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7406         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7407         c_check_omp_declare_reduction_r): New prototypes.
7408         * c-decl.c (current_omp_declare_target_attribute): New variable.
7409         (c_decl_attributes): New function.
7410         (start_decl, start_function): Use it instead of decl_attributes.
7411         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7412         c_omp_reduction_decl, c_omp_reduction_lookup,
7413         c_check_omp_declare_reduction_r): New functions.
7415 2013-09-25  Tom Tromey  <tromey@redhat.com>
7417         * Make-lang.in (c/gccspec.o): Remove.
7418         (CFLAGS-c/gccspec.o): New variable.
7419         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7420         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7421         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7423 2013-09-25  Tom Tromey  <tromey@redhat.com>
7425         * Make-lang.in (c/gccspec.o): Don't use subshell.
7427 2013-09-18  Marek Polacek  <polacek@redhat.com>
7429         PR sanitize/58443
7430         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7431         Remove unnecessary check.
7433 2013-09-18  Marek Polacek  <polacek@redhat.com>
7435         PR sanitizer/58411
7436         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7437         no_sanitize_undefined attribute.
7439 2013-09-13  Kai Tietz  <ktietz@redhat.com>
7441         PR target/57848
7442         * c-decl.c (c_builtin_function_ext_scope): Remove
7443         wrong assumption that it is never called on prexisting
7444         symbol.
7446 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
7448         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7450 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7452         * c-objc-common.c (c_tree_printer): Tidy.
7454 2013-08-30  Marek Polacek  <polacek@redhat.com>
7456         * c-typeck.c (build_binary_op): Add division by zero and shift
7457         instrumentation.
7459 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
7460             Joseph Myers  <joseph@codesourcery.com>
7462         PR c/35649
7463         * c-typeck.c (c_common_type): Prefer double_type_node over
7464         other REAL_TYPE types with the same precision.
7465         (convert_arguments): Likewise.
7467 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7469         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7470         (c_initialize_diagnostics): Call a destructor for the early printer.
7472 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7474         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7475         printer initialization.
7477 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7479         PR c/57490
7480         * c-array-notation.c (fix_conditional_array_notations_1): Added a
7481         check for truth values.
7482         (expand_array_notation_exprs): Added truth values case.  Removed an
7483         unwanted else.  Added for-loop to walk through subtrees in default
7484         case.
7486 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7488         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7490 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
7492         * c-parser.c (struct c_generic_association): Fix typo.
7494 2013-07-23  Tom Tromey  <tromey@redhat.com>
7495             Joseph Myers  <joseph@codesourcery.com>
7497         * c-parser.c (struct c_generic_association): New.
7498         (c_generic_association_d): New typedef.
7499         (c_parser_generic_selection): New function.
7500         (c_parser_postfix_expression): Handle RID_GENERIC.
7502 2013-07-13  Jason Merrill  <jason@redhat.com>
7504         PR c++/57793
7505         * c-decl.c (finish_struct): Check for too-large class.
7507 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
7509         PR c/57821
7510         * c-typeck.c (set_init_index): When folding, check for index overflow.
7512 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7514         * c-parser.c (c_parser_array_notation): Removed rejection of array
7515         notations in an array of function pointers.
7517 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7519         * c-array-notation.c (make_triplet_val_inv): New function.
7520         (create_cmp_incr): Likewise.
7521         (create_array_refs): Likewise.
7522         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7523         Also modularized common parts between functions and called the function.
7524         (build_array_notation_expr): Likewise.
7525         (fix_conditional_array_notations_1): Likewise.
7526         (fix_array_notation_expr): Likewise.
7527         (fix_array_notation_call_expr): Likewise.
7529 2013-06-18  Marek Polacek  <polacek@redhat.com>
7531         PR c/57630
7532         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7534 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7536         * c-array-notation.c (build_array_notation_expr): Reject array notation
7537         mismatch between LHS and RHS even inside a call_expr.  Also, removed
7538         a couple while statements that were dead code.
7540 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7542         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7543         excessive precision expressions in function parameters.  Also removed
7544         couple unwanted while statements.
7546 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7548         * c-array-notation.c (expand_array_notation_exprs): Added
7549         ARRAY_NOTATION_REF case.
7551 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7553         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7554         function to c-family/array-notation-common.c.
7555         (is_cilkplus_reduce_builtin): Likewise.
7556         (find_rank): Likewise.
7557         (extract_array_notation_exprs): Likewise.
7558         (replace_array_notations): Likewise.
7559         (find_inv_trees): Likewise.
7560         (replace_inv_trees): Likewise.
7561         (contains_array_notation_expr): Likewise.
7562         (find_correct_array_notation_type): Likewise.
7563         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7564         (struct inv_list): Moved this to c-family/array-notation-common.c.
7565         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
7567 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7569         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7570         reduction functions outside the for-loop.  Added a check if the fundecl
7571         is non-NULL.  Finally, removed an unwanted if-statement, and made the
7572         body unconditional.
7574 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7576         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7577         condition of the if-statement matches the rank of else-block and then-
7578         block when array notations are used.
7579         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7580         expression after the entire function body is parsed.
7581         (c_parser_expr_no_commas): Delayed creating array notation expressions
7582         to the end of function parsing.
7583         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7584         whole if-statement instead of just the condition.
7585         (expand_array_notation_exprs): Added MODIFY_EXPR case.
7587 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7589         PR c/57474
7590         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7591         array to NULL_TREE if they are unused.  Also added a check for the
7592         field to be NULL before its fields are used in future.
7594 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7596         PR bootstrap/57450
7597         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7598         (build_array_notation_expr): Likewise.
7600 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7602         * c-typeck.c (build_array_ref): Added a check to see if array's
7603         index is greater than one.  If true, then emit an error.
7604         (build_function_call_vec): Exclude error reporting and checking
7605         for builtin array-notation functions.
7606         (convert_arguments): Likewise.
7607         (c_finish_return): Added a check for array notations as a return
7608         expression.  If true, then emit an error.
7609         (c_finish_loop): Added a check for array notations in a loop
7610         condition.  If true then emit an error.
7611         (lvalue_p): Added a ARRAY_NOTATION_REF case.
7612         (build_binary_op): Added a check for array notation expr inside
7613         op1 and op0.  If present, we call another function to find correct
7614         type.
7615         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7616         * c-parser.c (c_parser_compound_statement): Check if array
7617         notation code is used in tree, if so, then transform them into
7618         appropriate C code.
7619         (c_parser_expr_no_commas): Check if array notation is used in LHS
7620         or RHS, if so, then build array notation expression instead of
7621         regular modify.
7622         (c_parser_postfix_expression_after_primary): Added a check for
7623         colon(s) after square braces, if so then handle it like an array
7624         notation.  Also, break up array notations in unary op if found.
7625         (c_parser_direct_declarator_inner): Added a check for array
7626         notation.
7627         (c_parser_compound_statement): Added a check for array notation in
7628         a stmt.  If one is present, then expand array notation expr.
7629         (c_parser_if_statement): Likewise.
7630         (c_parser_switch_statement): Added a check for array notations in
7631         a switch statement's condition.  If true, then output an error.
7632         (c_parser_while_statement): Similarly, but for a while.
7633         (c_parser_do_statement): Similarly, but for a do-while.
7634         (c_parser_for_statement): Similarly, but for a for-loop.
7635         (c_parser_unary_expression): Check if array notation is used in a
7636         pre-increment or pre-decrement expression.  If true, then expand
7637         them.
7638         (c_parser_array_notation): New function.
7639         * c-array-notation.c: New file.
7640         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7642 2013-05-23  Mike Stump  <mikestump@comcast.net>
7644         * c-typeck.c (convert_for_assignment): Handle references to memory
7645         spaces better.
7647 2013-05-16  Jason Merrill  <jason@redhat.com>
7649         * Make-lang.in (cc1$(exeext)): Use link mutex.
7651 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
7653         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7654         to simply use OPT_Wpointer_arith.
7655         (build_unary_op): Likewise.
7657 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
7659         PR c/19449
7660         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7661         argument.  If set, or it temporarily for parsing of the first
7662         argument into force_folding_builtin_constant_p.
7663         (c_parser_postfix_expression): Adjust callers.
7665 2013-03-21  Richard Biener  <rguenther@suse.de>
7667         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7668         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
7670 2013-02-12  Marek Polacek  <polacek@redhat.com>
7672         PR c/44938
7673         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7674         origtypes to NULL.
7676 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
7678         PR c/56078
7679         * c-typeck.c (set_nonincremental_init_from_string): If
7680         constructor_max_index is NULL, treat it as if tree_int_cst_lt
7681         returned false.
7682         (process_init_element): Likewise.
7684 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
7686         PR c++/55619
7687         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7688         argument, don't call default_function_array_conversion
7689         nor c_fully_fold here.
7690         (c_parser_asm_statement): Adjust callers.
7691         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7692         and outputs here, and call default_function_array_conversion
7693         on inputs that don't need to be addressable.
7695 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
7697         PR c/39464
7698         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7699         warning require that both c_common_unsigned_type as well as
7700         c_common_signed_type is the same for both mvl and mvr types.
7702 2012-11-16  Diego Novillo  <dnovillo@google.com>
7704         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7706         * c-common.c: Use new vec API in vec.h.
7707         * c-common.h: Likewise.
7708         * c-gimplify.c: Likewise.
7709         * c-pragma.c: Likewise.
7710         * c-pretty-print.c: Likewise.
7711         * c-pretty-print.h: Likewise.
7712         * c-semantics.c: Likewise.
7713         * c-decl.c: Likewise.
7714         * c-parser.c: Likewise.
7715         * c-tree.h: Likewise.
7716         * c-typeck.c: Likewise.
7718 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
7720         PR c++/54930
7721         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7723 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7725         PR c/53066
7726         * c-decl.c (warn_if_shadowing): Do not warn if a variable
7727         shadows a function, unless the variable is a function or a
7728         pointer-to-function.
7730 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
7732         PR c/54381
7733         * c-parser.c (struct c_tree_loc_pair): Removed.
7734         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7735         add location_t * and tree * arguments, fill in array of 3
7736         sizeof_arg trees and corresponding locs.
7737         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7738         c_parser_expr_list callers.
7739         (c_parser_postfix_expression_after_primary): Likewise.  Pass
7740         array of 3 sizeof_arg trees and locs (corresponding to first
7741         3 arguments) to sizeof_pointer_memaccess_warning.
7743 2012-10-09  Lawrence Crowl  <crowl@google.com>
7745         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7746         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7747         hash table.
7749 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
7751         PR c++/54194
7752         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7753         call.
7755 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
7757         PR c++/54427
7758         * c-typeck.c: Include c-common.h.
7759         (enum stv_conv): Moved to c-common.h.
7760         (scalar_to_vector): Moved to c-common.c.
7761         (build_binary_op): Adapt to scalar_to_vector's new prototype.
7762         * Make-lang.in: c-typeck.c depends on c-common.h.
7764 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
7766         * c-decl.c (c_write_global_declarations): Fix handling of
7767         -fdump-ada-spec*.
7769 2012-09-30  Sharad Singhai  <singhai@google.com>
7771         * c-decl.c (c_write_global_declarations): Use a different method
7772         to determine if the dump has ben initialized.
7774 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
7776         PR c/54552
7777         * c-typeck.c (c_cast_expr): When casting to a type requiring
7778         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7779         c_fully_fold first.
7781 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
7783         PR c/54103
7784         * c-typeck.c (build_unary_op): Pass original argument of
7785         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7786         any C_MAYBE_CONST_EXPR, if it has integer operands.
7787         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7788         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7789         to c_objc_common_truthvalue_conversion, then remove any
7790         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
7791         c_objc_common_truthvalue_conversion not
7792         c_common_truthvalue_conversion.
7793         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7794         call note_integer_operands for arguments with integer operands
7795         that are not integer constants.
7797 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
7799         PR c/54559
7800         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7801         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7803 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
7805         PR c/54428
7806         * c-convert.c (convert): Don't call fold_convert_loc if
7807         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7808         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
7809         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7811 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
7813         PR c/54355
7814         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7815         for nested and empty_ok arguments in the call to
7816         c_parser_declaration_or_fndef.
7818 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
7820         * c-tree.h (c_last_sizeof_arg): Declare.
7821         * c-parser.c (struct c_tree_loc_pair): New type.
7822         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
7823         non-NULL.
7824         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7825         (c_parser_postfix_expression_after_primary): Likewise.  Call
7826         sizeof_pointer_memaccess_warning if needed.
7827         (sizeof_ptr_memacc_comptypes): New function.
7828         * c-typeck.c (c_last_sizeof_arg): New global variable.
7829         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7831 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
7833         * c-lang.h (lang_decl): Add variable_size GTY option.
7835 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
7837         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7838         * Make-lang.in: Fix dependencies.
7840 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
7842         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7843         and add language Makefile hooks.
7844         * config-lang.in: New file.
7845         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7846         add the required "normal" config-lang.in rules.
7847         * c-lang.h: Moved from gcc/ to here.
7848         * c-tree.h: Likewise.
7849         * c-objc-common.c: Likewise.
7850         * c-objc-common.h: Likewise.
7851         * c-typeck.c: Likewise.
7852         * c-convert.c: Likewise.
7853         * c-lang.c: Likewise.
7854         * c-aux-info.c: Likewise.
7855         * c-errors.c: Likewise.
7856         * gccspec.c: Likewise.
7857         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
7858         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
7860 Copyright (C) 2012-2021 Free Software Foundation, Inc.
7862 Copying and distribution of this file, with or without modification,
7863 are permitted in any medium without royalty provided the copyright
7864 notice and this notice are preserved.