Daily bump.
[official-gcc.git] / gcc / c / ChangeLog
blob73f6168c460628ba8be56751fa5a7c859c114594
1 2021-10-01  Martin Sebor  <msebor@redhat.com>
3         PR c/102103
4         * c-typeck.c (maybe_warn_for_null_address): New function.
5         (build_binary_op): Call it.
7 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
8             Richard Biener  <rguenther@suse.de>
10         PR sanitizer/102515
11         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
12         for division even for SANITIZE_SI_OVERFLOW.
14 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
16         * c-parser.c (c_parser_omp_clause_order): Set
17         OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
19 2021-09-28  Andrew Pinski  <apinski@marvell.com>
21         PR c/32122
22         * c-parser.c (c_parser_statement_after_labels): Pass
23         the c_expr instead of the tree to c_finish_goto_ptr.
24         * c-typeck.c (c_finish_goto_ptr): Change the second
25         argument type to c_expr.
26         * c-tree.h (c_finish_goto_ptr): Likewise.
27         Error out if the expression was not of a pointer type.
29 2021-09-22  Jakub Jelinek  <jakub@redhat.com>
31         * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
32         modifiers.
34 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
36         * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
37         and reproducible modifiers.
38         (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
40 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
42         * c-parser.c (c_parser_omp_clause_default): Handle private and
43         firstprivate arguments, adjust diagnostics on unknown argument.
45 2021-09-17  Jakub Jelinek  <jakub@redhat.com>
47         * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
48         is true.
50 2021-09-10  Jakub Jelinek  <jakub@redhat.com>
52         * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
53         cond.value is >, < or == with omp_atomic_lhs as one of the operands,
54         don't call build_conditional_expr, instead build a COND_EXPR directly.
55         (c_parser_binary_expression): Avoid calling parser_build_binary_op
56         if omp_atomic_lhs even in more cases for >, < or ==.
57         (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
58         parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
59         acq_rel on atomic read/write and acq_rel/acquire clauses on update.
60         * c-typeck.c (build_binary_op): For flag_openmp only handle
61         MIN_EXPR/MAX_EXPR.
63 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
65         * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
66         directive.
68 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
70         * c-decl.c (enum deprecated_states): Add unavailable state.
71         (merge_decls): Copy unavailability.
72         (quals_from_declspecs): Handle unavailable case.
73         (start_decl): Amend the logic handling suppression of nested
74         deprecation states to include unavailability.
75         (smallest_type_quals_location): Amend comment.
76         (grokdeclarator): Handle the unavailable deprecation state.
77         (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
78         * c-tree.h (struct c_declspecs): Add unavailable_p.
79         * c-typeck.c (build_component_ref): Handle unavailability.
80         (build_external_ref): Likewise.
82 2021-09-01  Roger Sayle  <roger@nextmovesoftware.com>
83             Joseph Myers  <joseph@codesourcery.com>
85         PR c/79412
86         * c-decl.c (duplicate_decls): On significant mismatches, mark the
87         types of both (non-function) decls as error_mark_node, so that the
88         middle-end can see the code is malformed.
89         (free_attr_access_data): Don't process if the type has been set to
90         error_mark_node.
92 2021-08-31  Marcel Vollweiler  <marcel@codesourcery.com>
94         * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
95         and 'ancestor' in 'target device' clauses.
97 2021-08-23  Jakub Jelinek  <jakub@redhat.com>
99         * c-parser.c (c_parser_omp_clause_num_tasks,
100         c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
102 2021-08-22  Martin Uecker  <muecker@gwdg.de>
104         PR c/98397
105         * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
106         for pointers to arrays with qualifiers.
107         (build_conditional_expr): For C23 don't lose qualifiers for pointers
108         to arrays when the other pointer is a void pointer. Update warnings.
109         (convert_for_assignment): Update warnings for C2X when converting from
110         void* with qualifiers to a pointer to array with the same qualifiers.
112 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
114         * c-parser.c (c_parser_omp_error): New function.
115         (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
117 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
119         * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
120         comma at the end of list.
121         (c_parser_omp_requires): Likewise.
123 2021-08-19  Jakub Jelinek  <jakub@redhat.com>
125         * c-parser.c (c_parser_omp_requires): Don't call
126         c_parser_peek_2nd_token and optionally consume token if current
127         token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
129 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
131         * c-parser.c (c_parser_omp_nothing): New function.
132         (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
134 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
136         * c-parser.c (c_parser_statement_after_labels): Add restart label
137         near the start of the function.  If c_parser_pragma returns false,
138         goto restart.
139         (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
140         c_parser_omp_cancellation_point returned.  For PRAGMA_OMP_DECLARE
141         return what c_parser_omp_declare returned.  Return true instead of
142         false after emitting errors that the directive is not allowed in
143         pragma_stmt context.
144         (c_parser_omp_ordered): Return true instead of
145         false after emitting errors that the directive is not allowed in
146         pragma_stmt context.
147         (c_parser_omp_target_update): Likewise.
148         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
149         Change return type from tree to bool, return false if the
150         directive should be ignored in pragma_stmt contexts.
151         (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
152         return their result directly.
153         (c_parser_omp_cancellation_point): Change return type from void to
154         bool, return false if the directive should be ignored in pragma_stmt
155         contexts.
156         (c_parser_omp_declare): Likewise.
158 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
160         * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
161         (c_parser_omp_scope): New function.
162         (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
164 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
166         * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
167         (c_parser_omp_clause_filter): New function.
168         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
169         (OMP_MASKED_CLAUSE_MASK): Define.
170         (c_parser_omp_masked): New function.
171         (c_parser_omp_parallel): Handle parallel masked.
172         (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
173         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
175 2021-08-12  Martin Uecker  <muecker@gwdg.de>
177         PR c/101838
178         PR c/29970
179         * c-typeck.c (c_expr_sizeof_type): Evaluate
180         size expressions for structs of variable size.
182 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
184         * c-parser.c (c_parser_omp_clause_proc_bind): Accept
185         'primary' as alias for 'master'.
187 2021-08-10  Martin Uecker  <muecker@gwdg.de>
189         PR c/29970
190         * c-typeck.c (c_expr_sizeof_expr): Evaluate
191         size expressions for structs of variable size.
193 2021-08-06  Tamar Christina  <tamar.christina@arm.com>
195         * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
196         * c-tree.h (c_simulate_enum_decl): Likewise.
198 2021-08-06  Martin Sebor  <msebor@redhat.com>
200         * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
201         vec arguments to by-reference.
202         (c_finish_omp_declare_simd): Same.
203         (c_parser_compound_statement_nostart): Same.
204         (c_parser_for_statement): Same.
205         (c_parser_objc_methodprotolist): Same.
206         (c_parser_oacc_routine): Same.
207         (c_parser_omp_for_loop): Same.
208         (c_parser_omp_declare_simd): Same.
210 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
211             Joseph Myers  <joseph@codesourcery.com>
212             Cesar Philippidis  <cesar@codesourcery.com>
214         * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
215         (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
216         (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
217         * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
219 2021-07-20  Martin Sebor  <msebor@redhat.com>
221         * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
222         by-const-reference.
223         * c-typeck.c (c_build_function_call_vec): Same.
225 2021-07-15  Martin Sebor  <msebor@redhat.com>
227         PR c/101289
228         PR c/97548
229         * c-decl.c (get_parm_array_spec): Strip nops.
231 2021-07-06  Martin Sebor  <msebor@redhat.com>
233         * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
235 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
237         PR c/101297
238         * c-parser.c (c_parser_omp_atomic): Consume comma only if it
239         appears before a CPP_NAME.
241 2021-06-25  Martin Sebor  <msebor@redhat.com>
243         * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
244         warning_suppressed_p, suppress_warning, and copy_no_warning.
245         (diagnose_mismatched_decls): Same.
246         (duplicate_decls): Same.
247         (grokdeclarator): Same.
248         (finish_function): Same.
249         (c_write_global_declarations_1): Same.
250         * c-fold.c (c_fully_fold_internal): Same.
251         * c-parser.c (c_parser_expr_no_commas): Same.
252         (c_parser_postfix_expression): Same.
253         * c-typeck.c (array_to_pointer_conversion): Same.
254         (function_to_pointer_conversion): Same.
255         (default_function_array_conversion): Same.
256         (convert_lvalue_to_rvalue): Same.
257         (default_conversion): Same.
258         (build_indirect_ref): Same.
259         (build_function_call_vec): Same.
260         (build_atomic_assign): Same.
261         (build_unary_op): Same.
262         (c_finish_return): Same.
263         (emit_side_effect_warnings): Same.
264         (c_finish_stmt_expr): Same.
265         (c_omp_clause_copy_ctor): Same.
267 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
269         PR c/101176
270         * c-parser.c (c_parser_has_attribute_expression): Set source range for
271         the result.
273 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
275         PR c/101171
276         * c-typeck.c (build_c_cast): Don't call note_integer_operands on
277         error_mark_node.
279 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
281         * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
282         C_ORT_OMP for clauses on target construct.
283         (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
284         (c_parser_omp_target): For non-combined target add
285         map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION.  Pass
286         C_ORT_OMP_TARGET to c_finish_omp_clauses.
287         * c-typeck.c (handle_omp_array_sections): Adjust ort handling
288         for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
289         never present on C_ORT_*DECLARE_SIMD.
290         (c_finish_omp_clauses): Likewise.  Handle OMP_CLAUSE_IN_REDUCTION
291         on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
292         corresponding map clauses.
294 2021-06-21  Jakub Jelinek  <jakub@redhat.com>
296         PR inline-asm/100785
297         * c-typeck.c (c_mark_addressable): Diagnose trying to make
298         bit-fields addressable.
300 2021-06-15  Robin Dapp  <rdapp@linux.ibm.com>
302         * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
303         similar.
305 2021-06-14  Tobias Burnus  <tobias@codesourcery.com>
307         PR c/100913
308         * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
309         var in the error case.
311 2021-06-07  Eric Botcazou  <ebotcazou@adacore.com>
313         PR c/100920
314         * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
315         spot built-in functions.
317 2021-06-06  Jakub Jelinek  <jakub@redhat.com>
319         PR c/100902
320         * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
321         even when target is combined with other constructs.
323 2021-06-06  Eric Botcazou  <ebotcazou@adacore.com>
325         PR c/100920
326         * c-decl.c (finish_struct): Fix thinko in previous change.
327         * c-typeck.c (convert_for_assignment): Do not warn on pointer
328         assignment and initialization for storage order purposes if the
329         RHS is a call to a DECL_IS_MALLOC function.
331 2021-06-04  Martin Sebor  <msebor@redhat.com>
333         PR c/100783
334         * c-objc-common.c (print_type): Handle erroneous types.
336 2021-06-03  Jakub Jelinek  <jakub@redhat.com>
338         PR c++/100859
339         * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
340         after depend only cases.
342 2021-05-31  Richard Biener  <rguenther@suse.de>
344         PR c++/88601
345         * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
346         * c-parser.c (c_parser_postfix_expression): Likewise.
348 2021-05-28  Richard Biener   <rguenther@suse.de>
350         PR c/100803
351         * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
352         invalid if conditions.
354 2021-05-28  Jakub Jelinek  <jakub@redhat.com>
356         PR middle-end/99928
357         * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
358         (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
359         marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT.  Add
360         map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
361         maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
362         present too.  For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
363         if present in map_head, map_field_head or map_firstprivate_head
364         bitmaps.
366 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
368         * c-parser.c (c_parser_omp_clause_affinity): New.
369         (c_parser_omp_clause_name, c_parser_omp_variable_list,
370         c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
371         * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
372         c_finish_omp_clauses): Likewise.
374 2021-05-26  Eric Botcazou  <ebotcazou@adacore.com>
376         PR c/100653
377         * c-decl.c (finish_struct): Warn for a union containing an aggregate
378         field with a differing scalar storage order.
380 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
382         PR middle-end/99928
383         * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
384         OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain.  Don't error
385         if a decl is mentioned both in map clause and in such firstprivate
386         clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
388 2021-05-19  Jakub Jelinek  <jakub@redhat.com>
390         PR middle-end/99928
391         * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
392         master when combined with taskloop.
393         (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
394         parallel master when not combined with taskloop.
396 2021-05-18  Richard Biener  <rguenther@suse.de>
398         PR c/100522
399         * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
400         Diagnose calls to non-functions.
401         (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
403 2021-05-17  Richard Biener  <rguenther@suse.de>
405         PR c/100625
406         * gimple-parser.c (c_parser_gimple_label): Avoid building
407         a GIMPLE label with NULL label decl.
409 2021-05-13  Martin Sebor  <msebor@redhat.com>
411         PR c/100550
412         * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
414 2021-05-12  Marcel Vollweiler  <marcel@codesourcery.com>
416         * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
417         'close'.
419 2021-05-10  Martin Liska  <mliska@suse.cz>
421         * c-aux-info.c (affix_data_type): Use startswith
422         function instead of strncmp.
423         * c-typeck.c (build_function_call_vec): Likewise.
424         * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
426 2021-05-07  Eric Botcazou  <ebotcazou@adacore.com>
428         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
429         on the address of a pointer field in a record with reverse SSO.
431 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
433         * c-typeck.c (c_finish_omp_clauses): Accept float + complex
434         for || and && reductions.
436 2021-04-29  Joseph Myers  <joseph@codesourcery.com>
438         * c-typeck.c (function_types_compatible_p): For C2X, treat
439         unprototyped function as compatible with non-variadic prototyped
440         function even if some argument types are changed by the default
441         argument promotions.
443 2021-04-15  Martin Sebor  <msebor@redhat.com>
445         PR c/99420
446         PR c/99972
447         * c-decl.c (pushdecl): Always propagate type attribute.
449 2021-04-15  Richard Sandiford  <richard.sandiford@arm.com>
451         PR c/98852
452         * c-typeck.c (c_common_type): Do not drop attributes that
453         affect type identity.
455 2021-04-10  Jakub Jelinek  <jakub@redhat.com>
457         PR c/99990
458         * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
459         error_mark_node.
461 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
463         PR c++/99565
464         * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
465         to operand_equal_p.
467 2021-03-19  Jakub Jelinek  <jakub@redhat.com>
469         PR c/99588
470         * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
471         with modifycode NOP_EXPR produces and mark the _Atomic var as read
472         if found.
473         (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
474         rather than STATEMENT_LIST.  Otherwise call mark_exp_read on lhs.
475         Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
477 2021-03-15  Tobias Burnus  <tobias@codesourcery.com>
479         PR c++/99509
480         * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
481         ensure that the varpool node is marked as offloadable.
483 2021-03-05  Tobias Burnus  <tobias@codesourcery.com>
485         PR c/99137
486         * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
488 2021-02-24  Martin Sebor  <msebor@redhat.com>
490         PR middle-end/97172
491         * c-decl.c (free_attr_access_data): Clear attribute arg spec.
493 2021-02-18  Jakub Jelinek  <jakub@redhat.com>
495         PR c/99136
496         * c-typeck.c (c_finish_return): Don't wrap retval into
497         EXCESS_PRECISION_EXPR in functions that return void.
499 2021-02-11  Marek Polacek  <polacek@redhat.com>
501         * c-parser.c (c_parser_if_statement): Use vec_free.
503 2021-02-04  Martin Sebor  <msebor@redhat.com>
505         PR c/97882
506         * c-decl.c (locate_old_decl): Add type to diagnostic output.
507         (diagnose_mismatched_decls): Same.
508         (start_function): Introduce temporaries for better readability.
509         * c-typeck.c (comptypes_internal): Only consider complete enum
510         types in comparisons with integers.
512 2021-02-01  Martin Sebor  <msebor@redhat.com>
514         PR middle-end/97172
515         * c-decl.c (free_attr_access_data): New function.
516         (c_parse_final_cleanups): Call free_attr_access_data.
518 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
520         * c-parser.c (c_parser_omp_clause_detach): New.
521         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
522         (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
523         * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
524         clause.  Prevent use of detach with mergeable and overriding the
525         data sharing mode of the event handle.
527 2021-01-15  Jakub Jelinek  <jakub@redhat.com>
529         * c-typeck.c (c_finish_omp_clauses): For reduction build array with
530         unqualified element type and then call c_build_qualified_type on the
531         ARRAY_TYPE.
533 2021-01-07  Richard Biener  <rguenther@suse.de>
535         * gimple-parser.c (c_parser_gimple_compound_statement): Only
536         reallocate loop array if it is too small.
538 2020-12-16  Martin Uecker  <muecker@gwdg.de>
540         PR c/98047
541         * c-typeck.c (build_modify_expr): Drop qualifiers.
543 2020-12-16  Martin Uecker  <muecker@gwdg.de>
545         PR c/98260
546         * c-parser.c (c_parser_expression): Look into
547         nop expression when marking expressions as read.
549 2020-12-14  Martin Liska  <mliska@suse.cz>
551         PR sanitizer/98204
552         * c-typeck.c (pointer_diff): Do not emit a top-level
553         sanitization.
554         (build_binary_op): Likewise.
556 2020-12-09  Tobias Burnus  <tobias@codesourcery.com>
558         * c-parser.c (c_parser_omp_allocate): New.
559         (c_parser_omp_construct): Call it.
561 2020-12-09  Richard Biener  <rguenther@suse.de>
563         PR c/98200
564         * gimple-parser.c (c_parser_gimple_postfix_expression): Return
565         early on error.
567 2020-12-07  Martin Uecker  <muecker@gwdg.de>
569         PR c/97981
570         * c-typeck.c (convert_lvalue_to_rvalue): Move the code
571         that drops qualifiers to the end of the function.
573 2020-11-26  Martin Uecker  <muecker@gwdg.de>
575         PR c/65455
576         PR c/92935
577         * c-parser.c (c_parser_declaration_or_fndef): Remove
578         redundant code to drop qualifiers of _Atomic types for __auto_type.
579         (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
580         types for __typeof__.
582 2020-11-24  Jakub Jelinek  <jakub@redhat.com>
584         PR c/97958
585         * c-parser.c (c_parser_binary_expression): For omp atomic binary
586         expressions, use make_node instead of build2 to avoid checking build2
587         performs.
589 2020-11-23  Joseph Myers  <joseph@codesourcery.com>
591         PR c/95630
592         * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
593         for comparisons of complete and incomplete pointers.
595 2020-11-21  Aaron Sawdey  <acsawdey@linux.ibm.com>
597         * c-aux-info.c (gen_type): Support opaque types.
599 2020-11-20  Martin Sebor  <msebor@redhat.com>
601         PR middle-end/97879
602         * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
604 2020-11-20  Jakub Jelinek  <jakub@redhat.com>
606         PR other/97911
607         * Make-lang.in (c.serial): Change from goal to a variable.
608         (.PHONY): Drop c.serial.
610 2020-11-20  Martin Uecker  <muecker@gwdg.de>
612         * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
614 2020-11-19  Jakub Jelinek  <jakub@redhat.com>
616         PR c/97860
617         * c-decl.c (get_parm_array_spec): Bail out of nelts is
618         error_operand_p.
620 2020-11-18  Jakub Jelinek  <jakub@redhat.com>
622         * Make-lang.in (c.serial): New goal.
623         (.PHONY): Add c.serial c.prev.
624         (cc1$(exeext)): Call LINK_PROGRESS.
626 2020-11-13  Vladimir N. Makarov  <vmakarov@redhat.com>
628         * c-parser.c (c_parser_asm_statement): Parse outputs for asm
629         goto too.
630         * c-typeck.c (build_asm_expr): Remove an assert checking output
631         absence for asm goto.
633 2020-11-13  Jakub Jelinek  <jakub@redhat.com>
635         * c-typeck.c (c_finish_omp_clauses): Don't clear
636         OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
638 2020-11-13  Iain Sandoe  <iain@sandoe.co.uk>
640         PR objc/77404
641         * c-parser.c (c_parser_objc_class_definition): Pass the
642         location of the class name to the interface declaration.
644 2020-11-10  Strager Neds  <strager.nds@gmail.com>
646         * c-decl.c (merge_decls): Use new overload of
647         set_decl_section_name.
649 2020-11-10  Chung-Lin Tang  <cltang@codesourcery.com>
651         * c-parser.c (c_parser_omp_target_data): Add use of
652         new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
653         handled map clause kind.
654         (c_parser_omp_target_enter_data): Likewise.
655         (c_parser_omp_target_exit_data): Likewise.
656         (c_parser_omp_target): Likewise.
657         * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
658         use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
659         (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
660         same struct field access to co-exist on OpenMP construct.
662 2020-11-07  Martin Uecker  <muecker@gwdg.de>
664         * c-parser.c (c_parser_label): Implement mixing of labels and code.
665         (c_parser_all_labels): Likewise.
667 2020-11-06  Iain Sandoe  <iain@sandoe.co.uk>
669         * c-parser.c (c_parser_objc_at_property_declaration):
670         Improve parsing fidelity. Associate better location info
671         with @property attributes.  Clean up the interface to
672         objc_add_property_declaration ().
674 2020-11-06  Nathan Sidwell  <nathan@acm.org>
676         * c-decl.c (diagnose_mismatched_decls): Rename
677         DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
678         (warn_if_shadowing, implicitly_declare, names_builtin_p)
679         (collect_source_refs): Likewise.
680         * c-typeck.c (inform_declaration, inform_for_arg)
681         (convert_for_assignment): Likewise.
683 2020-11-06  Tobias Burnus  <tobias@codesourcery.com>
685         * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
686         OpenACC matching.
687         (c_parser_omp_construct): Update call.
689 2020-11-04  Jakub Jelinek  <jakub@redhat.com>
691         PR c++/97670
692         * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
693         find underlying decl to clear in the aligned_head bitmap.
695 2020-11-04  Joseph Myers  <joseph@codesourcery.com>
697         * c-decl.c (handle_nodiscard_attribute): New.
698         (std_attribute_table): Add nodiscard.
699         * c-parser.c (c_parser_std_attribute): Expect argument to
700         nodiscard attribute to be a string.  Do not special-case ignoring
701         nodiscard.
702         * c-typeck.c (maybe_warn_nodiscard): New.
703         (build_compound_expr, emit_side_effect_warnings): Call
704         maybe_warn_nodiscard.
705         (c_process_expr_stmt, c_finish_stmt_expr): Also call
706         emit_side_effect_warnings if warn_unused_result.
708 2020-10-29  Asher Gordon  <AsDaGo@posteo.net>
710         * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
711         with XDELETE.
712         (finish_init): Likewise.
713         (pop_init_level): Likewise.
715 2020-10-28  Joseph Myers  <joseph@codesourcery.com>
717         * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
718         error_at for omitted parameter name.
720 2020-10-28  Jakub Jelinek  <jakub@redhat.com>
722         * c-parser.c (c_parser_omp_clause_name): Handle allocate.
723         (c_parser_omp_clause_allocate): New function.
724         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
725         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
726         OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
727         OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
728         OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
729         OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
730         PRAGMA_OMP_CLAUSE_ALLOCATE.
731         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
733 2020-10-27  Joseph Myers  <joseph@codesourcery.com>
735         * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
736         standard attributes.
738 2020-10-23  Marek Polacek  <polacek@redhat.com>
740         PR c++/91741
741         * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
742         (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
743         (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
744         * c-tree.h (char_type_p): Declare.
745         * c-typeck.c (char_type_p): No longer static.
747 2020-10-23  Martin Sebor  <msebor@redhat.com>
749         PR middle-end/97552
750         * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
752 2020-09-19  Martin Sebor  <msebor@redhat.com>
754         PR c/50584
755         * c-decl.c (lookup_last_decl): Define new function.
756         (c_decl_attributes): Call it.
757         (start_decl): Add argument and use it.
758         (finish_decl): Call build_attr_access_from_parms and decl_attributes.
759         (get_parm_array_spec): Define new function.
760         (push_parm_decl): Call get_parm_array_spec.
761         (start_function): Call warn_parm_array_mismatch.  Build attribute
762         access and add it to current function.
763         * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
764         in forms of array parameters.
765         * c-tree.h (start_decl): Add argument.
767 2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
769         * c-decl.c (c_break_label, c_cont_label): Delete, and replace
770         with...
771         (in_statement): New.
772         (start_function): Adjust for above change.
773         (c_push_function_context, c_pop_function_context): Likewise.
774         * c-lang.h (struct language_function): Likewise.
775         * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
776         * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
777         New.
778         (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
779         (c_parser_switch_statement): Adjust break/switch context handling
780         and calls to renamed functions.
781         (c_parser_while_statement): Adjust break/switch context handling and
782         build a WHILE_STMT.
783         (c_parser_do_statement): Ditto, with DO_STMT respectively.
784         (c_parser_for_statement): Ditto, with FOR_STMT respectively.
785         (c_parser_omp_for_loop): Adjust break/switch context handling.
786         * c-tree.h (c_break_label, c_cont_label): Delete.
787         (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
788         (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
789         (in_statement, switch_statement_break_seen_p): Declare.
790         (c_start_case, c_finish_case): Renamed to...
791         (c_start_switch, c_finish_switch).
792         (c_finish_bc_stmt): Adjust arguments.
793         * c-typeck.c (build_function_call_vec): Don't try to print
794         statements with %qE format.
795         (struct c_switch):  Rename switch_expr field to switch_stmt.
796         Add break_stmt_seen_p field.
797         (c_start_case): Rename to c_start_switch.  Build a SWITCH_STMT
798         instead of a SWITCH_EXPR.  Update for changes to struct c_switch.
799         (do_case): Update for changes to struct c_switch.
800         (c_finish_case): Rename to c_finish_switch.  Update for changes to
801         struct c_switch and change of representation from SWITCH_EXPR to
802         SWITCH_STMT.
803         (c_finish_loop): Delete.
804         (c_finish_bc_stmt): Update to reflect changes to break/continue
805         state representation.  Build a BREAK_STMT or CONTINUE_STMT instead
806         of a GOTO_EXPR except for objc foreach loops.
808 2020-09-01  Jakub Jelinek  <jakub@redhat.com>
810         PR c++/96867
811         * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
812         only on PARM_DECLs.
814 2020-08-28  Martin Sebor  <msebor@redhat.com>
816         PR c/96596
817         * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
818         argument type.
820 2020-08-27  Martin Liska  <mliska@suse.cz>
822         * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
823         growth function to true.
825 2020-08-25  Tobias Burnus  <tobias@codesourcery.com>
827         PR c/96678
828         * c-typeck.c (handle_omp_array_sections_1): Talk about
829         array function parameter in the error message.
831 2020-08-18  Jakub Jelinek  <jakub@redhat.com>
833         PR c/96571
834         * c-parser.c (c_parser_generic_selection): Change match_found from bool
835         to int, holding index of the match.  Call mark_exp_read on the selector
836         expression and on expressions other than the selected one.
838 2020-08-01  Richard Sandiford  <richard.sandiford@arm.com>
840         PR c/96377
841         * c-typeck.c (process_init_element): Split test for whether to
842         recurse into a record, union or array into...
843         (initialize_elementwise_p): ...this new function.  Don't recurse
844         into a vector type if the initialization value is also a vector.
846 2020-07-31  Richard Biener  <rguenther@suse.de>
848         PR debug/96383
849         * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
850         Define to c_common_finalize_early_debug.
852 2020-07-22  Tobias Burnus  <tobias@codesourcery.com>
854         * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
855         (c_parser_omp_critical): Permit hint(0) clause without named critical.
856         (c_parser_omp_construct): Don't assert if error_mark_node is returned.
858 2020-07-21  Sunil K Pandey  <skpgkp2@gmail.com>
860         PR target/95237
861         * c-decl.c (finish_decl): Call target hook
862         lower_local_decl_alignment to lower local decl alignment.
864 2020-07-09  Julian Brown  <julian@codesourcery.com>
865             Thomas Schwinge  <thomas@codesourcery.com>
867         PR middle-end/95270
868         * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
869         for standalone attach/detach clauses.
871 2020-07-08  Eric Botcazou  <ebotcazou@adacore.com>
873         * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
874         set, warn for conversion between pointers that point to incompatible
875         scalar storage orders.
877 2020-07-07  Kaipeng Zhou  <zhoukaipeng3@huawei.com>
879         * c-parser.c (c_parser_statement_after_labels): Pass correct
880         parameters to c_parser_do_statement.
882 2020-06-16  Jakub Jelinek  <jakub@redhat.com>
884         * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
885         c_in_omp_for.
886         (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
887         premature c_fully_fold.  Defer explicit c_fully_fold calls to after
888         c_finish_omp_for.
889         * c-tree.h (c_in_omp_for): Declare.
890         * c-typeck.c (c_in_omp_for): Define.
891         (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
892         (digest_init): Likewise.
893         (build_binary_op): Likewise.
895 2020-06-16  Jakub Jelinek  <jakub@redhat.com>
897         * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
898         from kind by comma rather than colon.
900 2020-06-05  Mark Wielaard  <mark@klomp.org>
902         * c-decl.c (implicit_decl_warning): When warned and olddecl is
903         an undeclared builtin, then add a fixit header hint, if found.
904         (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
905         warning_at about implicit builtin declaration type mismatch.
907 2020-06-03  Mark Wielaard  <mark@klomp.org>
909         * c-parser.c (struct c_parser): Add seen_string_literal
910         bitfield.
911         (c_parser_consume_token): Reset seen_string_literal.
912         (c_parser_error_richloc): Add name_hint if seen_string_literal
913         and next token is a CPP_NAME and we have a missing header
914         suggestion for the name.
915         (c_parser_string_literal): Set seen_string_literal.
917 2020-06-03  Mark Wielaard  <mark@klomp.org>
919         * c-parser.c (c_parser_postfix_expression_after_primary): Add
920         scope with matching_parens after CPP_OPEN_PAREN.
922 2020-06-03  Tobias Burnus  <tobias@codesourcery.com>
924         * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
926 2020-05-28  Nicolas Bértolo  <nicolasbertolo@gmail.com>
928         * Make-lang.in: Remove extra slash.
930 2020-05-19  Martin Liska  <mliska@suse.cz>
932         * c-parser.c: Fix typo.
934 2020-05-14  Jakub Jelinek  <jakub@redhat.com>
936         * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
938 2020-05-07  Richard Biener  <rguenther@suse.de>
940         PR middle-end/94703
941         * gimple-parser.c (c_parser_parse_ssa_name): Do not set
942         DECL_GIMPLE_REG_P.
944 2020-04-30  Jakub Jelinek  <jakub@redhat.com>
946         PR c/94842
947         * c-decl.c (set_labels_context_r): In addition to context-less
948         LABEL_DECLs adjust also LABEL_DECLs with context equal to
949         parent function if any.
950         (store_parm_decls): Adjust comment.
952 2020-04-19  Jakub Jelinek  <jakub@redhat.com>
954         PR objc/94637
955         * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
956         two CPP_COLON tokens.
958 2020-04-17  Jakub Jelinek  <jakub@redhat.com>
960         PR other/94629
961         * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
962         to data.clauses.
964 2020-04-15  Jakub Jelinek  <jakub@redhat.com>
966         PR c/94593
967         * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
968         requires directive when not at file scope.
970 2020-04-08  Tobias Burnus  <tobias@codesourcery.com>
972         PR middle-end/94120
973         * c-decl.c (c_check_in_current_scope): New function.
974         * c-tree.h (c_check_in_current_scope): Declare it.
975         * c-parser.c (c_parser_oacc_declare): Add check that variables
976         are declared in the same scope as the directive. Fix handling
977         of namespace vars.
979 2020-04-07  Jakub Jelinek  <jakub@redhat.com>
981         PR c++/94512
982         * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
983         if c_parser_omp_master succeeded.
985 2020-03-23  Jakub Jelinek  <jakub@redhat.com>
987         PR gcov-profile/94029
988         PR c/94239
989         * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
990         the function_start_locus location.  Don't do that afterwards for the
991         __GIMPLE body parsing.
993 2020-03-19  Jakub Jelinek  <jakub@redhat.com>
995         PR gcov-profile/94029
996         * c-tree.h (finish_function): Add location_t argument defaulted to
997         input_location.
998         * c-parser.c (c_parser_compound_statement): Add endlocp argument and
999         set it to the locus of closing } if non-NULL.
1000         (c_parser_compound_statement_nostart): Return locus of closing }.
1001         (c_parser_parse_rtl_body): Likewise.
1002         (c_parser_declaration_or_fndef): Propagate locus of closing } to
1003         finish_function.
1004         * c-decl.c (finish_function): Add end_loc argument, use it instead of
1005         input_location to set function_end_locus.
1007 2020-03-17  Jakub Jelinek  <jakub@redhat.com>
1009         PR c/94172
1010         * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1011         instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1012         (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1013         * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1014         ENUMERAL_TYPEs.
1015         (finish_incomplete_vars): New function, moved from finish_struct.  Use
1016         relayout_decl instead of layout_decl.
1017         (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1018         being TYPE_VFIELD.  Use finish_incomplete_vars.
1019         (finish_enum): Clear C_TYPE_INCOMPLETE_VARS.  Call
1020         finish_incomplete_vars.
1021         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1022         also on ENUMERAL_TYPEs.
1024 2020-03-16  Jakub Jelinek  <jakub@redhat.com>
1026         PR c/94179
1027         * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1029 2020-03-13  Martin Sebor  <msebor@redhat.com>
1031         PR c/94040
1032         * c-decl.c (builtin_structptr_type_count): New constant.
1033         (match_builtin_function_types): Reject decls that are incompatible
1034         in types pointed to by pointers.
1035         (diagnose_mismatched_decls): Adjust comments.
1037 2020-03-05  Joseph Myers  <joseph@codesourcery.com>
1039         PR c/93577
1040         * c-typeck.c (pop_init_level): Do not diagnose initializers as
1041         empty when initialized type is error_mark_node.
1042         (set_designator, process_init_element): Ignore initializers for
1043         elements of a variable-size type or of error_mark_node.
1045 2020-03-01  Martin Sebor  <msebor@redhat.com>
1047         PR middle-end/93926
1048         * c-decl.c (types_close_enough_to_match): New function.
1049         (match_builtin_function_types):
1050         (diagnose_mismatched_decls): Add missing inform call to a warning.
1052 2020-03-01  Martin Sebor  <msebor@redhat.com>
1054         PR c/93812
1055         * c-typeck.c (build_functype_attribute_variant): New function.
1056         (composite_type): Call it.
1058 2020-02-25  Jakub Jelinek  <jakub@redhat.com>
1060         PR other/93912
1061         * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1062         Rename last argument from probablity to probability.
1064 2020-02-13  Jakub Jelinek  <jakub@redhat.com>
1066         PR c/93576
1067         * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1068         *expr if it has side effects.
1070 2020-01-30  Jeff Law  <law@redhat.com>
1072         PR c/88660
1073         * c-parser.c (c_parser_switch_statement): Make sure to request
1074         marking the switch expr as used.
1076 2020-01-22  Joseph Myers  <joseph@codesourcery.com>
1078         PR c/93348
1079         * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1080         argument with integer operands.
1082 2020-01-16  Kerem Kat  <keremkat@gmail.com>
1084         PR c/92833
1085         * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1086         to support 4 available tokens.
1088 2020-01-15  Joseph Myers  <joseph@codesourcery.com>
1090         PR c/93072
1091         * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1092         determine whether to set DECL_CONTEXT.
1094 2020-01-13  Joseph Myers  <joseph@codesourcery.com>
1096         PR c/93241
1097         * c-typeck.c (build_c_cast): Check for expressions with integer
1098         operands that can occur in an unevaluated part of an integer
1099         constant expression and call note_integer_operands as needed.
1101 2019-01-08  Richard Biener  <rguenther@suse.de>
1103         PR middle-end/93199
1104         * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1105         permanently.
1107 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
1109         Update copyright years.
1111 2019-12-20  Eric Botcazou  <ebotcazou@adacore.com>
1113         * c-decl.c (collect_source_ref_cb): Delete.
1114         (for_each_global_decl): Rename into...
1115         (collect_source_refs): ...this.  Call collect_source_ref directly.
1116         (c_parse_final_cleanups): Always call collect_source_ref on the main
1117         input filename.
1119 2019-12-19  Julian Brown  <julian@codesourcery.com>
1120             Cesar Philippidis  <cesar@codesourcery.com>
1122         * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1123         detach clauses.
1124         (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1125         Allow deref (->) in variable lists if true.
1126         (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1127         Pass to c_parser_omp_variable_list.
1128         (c_parser_oacc_data_clause): Support attach and detach clauses.  Update
1129         call to c_parser_omp_variable_list.
1130         (c_parser_oacc_all_clauses): Support attach and detach clauses.
1131         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1132         OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1133         OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1134         (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1135         * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1136         and detach.  Support deref.
1137         (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1138         GOMP_MAP_ALWAYS_POINTER for OpenACC.
1139         (c_oacc_check_attachments): New function.
1140         (c_finish_omp_clauses): Check attach/detach arguments for being
1141         pointers using above.  Support deref.
1143 2019-12-19  Julian Brown  <julian@codesourcery.com>
1144             Maciej W. Rozycki  <macro@codesourcery.com>
1145             Tobias Burnus  <tobias@codesourcery.com>
1146             Thomas Schwinge  <thomas@codesourcery.com>
1148         * c-parser.c (c_parser_omp_clause_name): Support no_create.
1149         (c_parser_oacc_data_clause): Likewise.
1150         (c_parser_oacc_all_clauses): Likewise.
1151         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1152         (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1153         PRAGMA_OACC_CLAUSE_NO_CREATE.
1154         * c-typeck.c (handle_omp_array_sections): Support
1155         GOMP_MAP_NO_ALLOC.
1157 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
1159         * c-objc-common.c (range_label_for_type_mismatch::get_text):
1160         Replace label_text ctor calls.
1162 2019-12-04  Joseph Myers  <joseph@codesourcery.com>
1164         PR c/36941
1165         PR c/88827
1166         * c-typeck.c (convert_lvalue_to_rvalue): Call
1167         require_complete_type for arguments not of void types.
1168         (build_indirect_ref): Do not diagnose dereferencing pointers to
1169         incomplete types.
1170         * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1172 2019-12-03  Joseph Myers  <joseph@codesourcery.com>
1174         PR c/88704
1175         * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1176         old-style parameter definitions.
1178 2019-12-01  Sandra Loosemore  <sandra@codesourcery.com>
1180         PR target/92499
1182         * c-decl.c (flexible_array_type_p): Move to common code.
1184 2019-11-30  Richard Sandiford  <richard.sandiford@arm.com>
1186         * c-decl.c (start_decl): Allow initialization of variables whose
1187         size is a POLY_INT_CST.
1188         (finish_decl): Use verify_type_context to check whether the target
1189         allows variables with a particular type to have static or thread-local
1190         storage duration.  Don't raise a second error if such variables do
1191         not have a constant size.
1192         (grokdeclarator): Use verify_type_context to check whether the
1193         target allows fields or array elements to have a particular type.
1194         * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1195         the target allows pointer difference for the types involved.
1196         (build_unary_op): Likewise for pointer increment and decrement.
1198 2019-11-29  Joseph Myers  <joseph@codesourcery.com>
1200         * c-parser.c (struct c_parser): Add members raw_tokens and
1201         raw_tokens_used.
1202         (c_lex_one_token): Add argument raw.  Handle lexing raw tokens and
1203         using previously-lexed raw tokens.
1204         (c_parser_peek_nth_token_raw)
1205         (c_parser_check_balanced_raw_token_sequence): New functions.
1206         (c_parser_nth_token_starts_std_attributes): Use
1207         c_parser_check_balanced_raw_token_sequence for Objective-C.
1209 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
1211         PR c/91985
1212         * c-decl.c (finish_declspecs): Use int instead of decimal
1213         floating-point types if decimal floating-point not supported.
1215 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
1217         * c-tree.h (struct c_declarator): Use a structure for id member.
1218         * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1219         declarators at the start, not when handling individual declarators
1220         later.  Use u.id.id instead of u.id.
1221         (grokfield): Use u.id.id instead of u.id.
1222         (build_id_declarator): Set u.id.id and u.id.attrs.
1223         (finish_declspecs): Handle postfix attributes in case of typedef
1224         name or typeof used.
1225         * c-parser.c (c_parser_direct_declarator)
1226         (c_parser_direct_declarator_inner): Place declarator for
1227         attributes inside that for function or array, not outside.  Set
1228         u.id.attrs for identifiers.
1229         (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1230         * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1231         instead of u.id.
1233 2019-11-22  Jakub Jelinek  <jakub@redhat.com>
1235         PR c/90677
1236         * c-decl.c (identifier_global_tag): Define.
1238 2019-11-20  Richard Biener  <rguenther@suse.de>
1240         PR c/92088
1241         * c-decl.c (grokdeclarator): Prevent inlining of nested
1242         function with VLA arguments.
1244 2019-11-20  Joseph Myers  <joseph@codesourcery.com>
1246         * c-decl.c (c_warn_type_attributes): New function.
1247         (groktypename, grokdeclarator, finish_declspecs): Call
1248         c_warn_type_attributes before applying attributes to types.
1249         * c-tree.h (c_warn_type_attributes): Declare.
1251 2019-11-19  Joseph Myers  <joseph@codesourcery.com>
1253         * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1254         standard attributes.
1255         * c-parser.c (c_parser_std_attribute): Take argument for_tm.  Use
1256         pedwarn for unknown standard attributes and return error_mark_node
1257         for them.
1259 2019-11-18  Matthew Malcomson  <matthew.malcomson@arm.com>
1261         * c-parser.c (c_parser_parse_rtl_body): Always call
1262         run_rtl_passes, even if startwith pass is not provided.
1264 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
1266         * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1267         duplicate standard attributes.
1269 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
1271         * c-decl.c (std_attribute_table): Add maybe_unused.
1273 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
1275         * c-decl.c (std_attribute_table): Add fallthrough.
1276         * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1277         attribute at top level.
1279 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
1281         * c-decl.c (std_attribute_table): New.
1282         (c_init_decl_processing): Register attributes from
1283         std_attribute_table.
1284         * c-parser.c (c_parser_attribute_arguments): Add arguments
1285         require_string and allow_empty_args.  All callers changed.
1286         (c_parser_std_attribute): Set require_string argument for
1287         "deprecated" attribute.
1289 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
1291         * c-parser.c (c_parser_postfix_expression)
1292         (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1293         * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1295 2019-11-14  Richard Sandiford  <richard.sandiford@arm.com>
1297         * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1298         of build_same_sized_truth_vector_type.
1299         (build_vec_cmp): Likewise.
1301 2019-11-14  Jakub Jelinek  <jakub@redhat.com>
1303         * c-parser.c (c_parser_omp_context_selector): Don't require score
1304         argument to fit into shwi, just to be INTEGER_CST.  Diagnose
1305         negative score.
1307         * c-parser.c (c_parser_omp_context_selector): Rename
1308         CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1309         Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1310         identifier in that.  For CTX_PROPERTY_NAME_LIST, allow identifiers
1311         and string literals.
1313 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
1315         * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1316         ctsk_tagfirstref_attrs.
1317         (struct c_declspecs): Update description of attrs.  Add
1318         postfix_attrs and non_std_attrs_seen_p.  Increase size of
1319         typespec_kind bit-field.
1320         (c_warn_unused_attributes): New declaration.
1321         (parser_xref_tag): Update prototype.
1322         * c-decl.c (c_warn_unused_attributes): New function.
1323         (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1324         ctsk_tagref_attrs.  Handle attribute declarations.
1325         (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1326         (grokdeclarator): Handle standard attributes.
1327         (parser_xref_tag): Add arguments have_std_attrs and attrs.  Apply
1328         attributes to incomplete type reference.
1329         (xref_tag): Update call to parser_xref_tag.
1330         (declspecs_add_addrspace, declspecs_add_type)
1331         (declspecs_add_scspec, declspecs_add_attrs): Set
1332         non_std_attrs_seen_p.
1333         (finish_declspecs): Apply postfix standard attributes to type.
1334         * c-parser.c (c_token_starts_declspecs)
1335         (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1336         (c_parser_next_tokens_start_declaration): Update comments.
1337         (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1338         parser->tokens[2] to parser->tokens[1].
1339         (c_parser_nth_token_starts_std_attributes)
1340         (c_parser_std_attribute_specifier_sequence): New functions.
1341         (c_parser_declaration_or_fndef): Add arguments have_attrs and
1342         attrs.  All callers changed.  Handle standard attributes.
1343         (c_parser_parms_declarator, c_parser_parms_list_declarator)
1344         (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1345         All callers changed.
1346         (c_parser_declspecs): Add arguments start_std_attr_ok and
1347         end_std_attr_ok.  All callers changed.  Handle standard
1348         attributes.
1349         (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1350         (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1351         (c_parser_compound_statement_nostart, c_parser_all_labels)
1352         (c_parser_label, c_parser_statement, c_parser_for_statement):
1353         Handle standard attributes.
1354         * c-parser.h (c_parser_declspecs): Update prototype.
1355         * gimple-parser.c (c_parser_gimple_declaration): Update call to
1356         c_parser_declspecs.
1358 2019-11-12  Martin Liska  <mliska@suse.cz>
1360         * gimple-parser.c: Do not include params.h.
1362 2019-11-12  Martin Liska  <mliska@suse.cz>
1364         * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1365         with the new one, include opts.h if needed.  Use SET_OPTION_IF_UNSET
1366         macro.
1368 2019-11-12  Maciej W. Rozycki  <macro@codesourcery.com>
1369             Frederik Harwath  <frederik@codesourcery.com>
1371         gcc/c/
1372         * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1373         (c_parser_oacc_kernels_parallel): Rename function to...
1374         (c_parser_oacc_compute): ... this.  Handle PRAGMA_OACC_SERIAL.
1375         (c_parser_omp_construct): Update accordingly.
1378 2019-11-11  Jakub Jelinek  <jakub@redhat.com>
1380         * c-parser.c (c_parser_translation_unit): Diagnose declare target
1381         without corresponding end declare target.
1383 2019-11-08  Richard Sandiford  <richard.sandiford@arm.com>
1385         * c-convert.c (convert): Only handle vector conversions if one of
1386         the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1387         allows it.
1388         * c-typeck.c (build_array_ref): Only allow vector indexing if the
1389         vectors satisfy gnu_vector_type_p.
1390         (build_unary_op): Only allow unary operators to be applied to
1391         vectors if they satisfy gnu_vector_type_p.
1392         (digest_init): Only allow by-element initialization of vectors
1393         if they satisfy gnu_vector_type_p.
1394         (really_start_incremental_init): Likewise.
1395         (push_init_level): Likewise.
1396         (pop_init_level): Likewise.
1397         (process_init_element): Likewise.
1398         (build_binary_op): Only allow binary operators to be applied to
1399         vectors if they satisfy gnu_vector_type_p.
1401 2019-11-08  Joseph Myers  <joseph@codesourcery.com>
1403         * c-decl.c (grokparms): Convert () in a function definition to
1404         (void) for C2x.
1405         (store_parm_decls_oldstyle): Pedwarn for C2x.
1406         (store_parm_decls): Update comment about () not generating a
1407         prototype.
1409 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
1411         * c-parser.c (c_parser_attribute_arguments): New function.
1412         Factored out of c_parser_gnu_attribute.
1413         (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1414         (c_parser_balanced_token_sequence, c_parser_std_attribute)
1415         (c_parser_std_attribute_specifier): New functions.
1416         (c_parser_transaction_attributes): Use
1417         c_parser_std_attribute_specifier.
1419 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
1421         * c-parser.c (c_parser): Remove lex_untranslated_string.  Add
1422         lex_joined_string and translate_strings_p.
1423         (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1424         c_lex_with_flags.
1425         (c_parser_string_literal): New function.
1426         (c_parser_static_assert_declaration_no_semi): Use
1427         c_parser_string_literal.  Do not set lex_untranslated_string.
1428         (c_parser_asm_string_literal): Use c_parser_string_literal.
1429         (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1430         (c_parser_gnu_attributes): Set and restore translate_strings_p
1431         instead of lex_untranslated_string.
1432         (c_parser_asm_statement): Do not set lex_untranslated_string.
1433         (c_parser_asm_operands): Likewise.
1434         (c_parser_has_attribute_expression): Set and restore
1435         translate_strings_p instead of lex_untranslated_string.
1436         (c_parser_postfix_expression): Use c_parser_string_literal.
1437         (pragma_lex): Likewise.
1438         (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1439         (c_parse_file): Set translate_strings_p.
1440         * gimple-parser.c (c_parser_gimple_postfix_expression)
1441         (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1442         * c-parser.c (c_parser_string_literal): Declare function.
1444 2019-11-02  Jakub Jelinek  <jakub@redhat.com>
1446         * c-parser.c (c_finish_omp_declare_variant): Use
1447         omp_get_context_selector instead of c_omp_get_context_selector.
1449 2019-10-29  Richard Sandiford  <richard.sandiford@arm.com>
1451         * c-tree.h (c_simulate_enum_decl): Declare.
1452         * c-decl.c (c_simulate_enum_decl): New function.
1453         * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1455 2019-10-29  Richard Sandiford  <richard.sandiford@arm.com>
1457         * c-tree.h (c_simulate_builtin_function_decl): Declare.
1458         * c-decl.c (c_simulate_builtin_function_decl): New function.
1459         * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1460         to the above.
1462 2019-10-28  Martin Sebor  <msebor@redhat.com>
1464         PR c/66970
1465         * c-decl.c (names_builtin_p): Define a new function.
1467 2019-10-28  Richard Biener  <rguenther@suse.de>
1469         PR c/92249
1470         * gimple-parser.c (c_parser_parse_gimple_body): Make
1471         current_bb the entry block initially to easier recover
1472         from errors.
1473         (c_parser_gimple_compound_statement): Adjust.
1475 2019-10-24  Jakub Jelinek  <jakub@redhat.com>
1477         * c-parser.c (c_finish_omp_declare_variant): Use
1478         omp_context_selector_matches instead of
1479         c_omp_context_selector_matches.
1480         * c-decl.c (c_decl_attributes): Add "omp declare target block"
1481         attribute in between declare target and end declare target
1482         pragmas.
1484 2019-10-15  Joseph Myers  <joseph@codesourcery.com>
1486         * c-parser.c (c_parser_attribute_any_word): Rename to
1487         c_parser_gnu_attribute_any_word.  All callers changed.
1488         (c_parser_attribute): Rename to c_parser_gnu_attribute.  All
1489         callers changed.
1490         (c_parser_attributes): Rename to c_parser_gnu_attributes.  All
1491         callers changed.
1492         (c_parser_declaration_or_fndef, c_parser_declspecs)
1493         (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1494         (c_parser_struct_declaration, c_parser_declarator)
1495         (c_parser_gnu_attribute, c_parser_compound_statement)
1496         (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1497         (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1498         attribute-related syntax productions.
1500 2019-10-14  Richard Sandiford  <richard.sandiford@arm.com>
1502         * c-objc-common.c (useful_aka_type_p): Replace with...
1503         (get_aka_type): ...this new function.  Given the original type,
1504         decide which aka type to print (if any).  Only look through typedefs
1505         if user_facing_original_type_p.
1506         (print_type): Update accordingly.
1508 2019-10-14  Jakub Jelinek  <jakub@redhat.com>
1510         * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1511         into int NESTED, if it is 2, diagnose missing commas in between
1512         clauses.
1513         (c_parser_omp_context_selector): Pass 2 as last argument to
1514         c_parser_omp_all_clauses.
1516 2019-10-12  Jakub Jelinek  <jakub@redhat.com>
1518         * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1519         For simd properties, put them directly into TREE_VALUE.
1520         (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1521         If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1522         add "omp declare variant base" attribute rather than
1523         "omp declare variant".
1525 2019-10-11  Joseph Myers  <joseph@codesourcery.com>
1527         * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1529 2019-10-10  Jakub Jelinek  <jakub@redhat.com>
1531         * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1532         true, terminate processing on closing paren and don't skip to end of
1533         pragma line.
1534         (c_parser_omp_declare_simd): Handle also declare variant.
1535         (omp_construct_selectors, omp_device_selectors,
1536         omp_implementation_selectors, omp_user_selectors): New variables.
1537         (c_parser_omp_context_selector,
1538         c_parser_omp_context_selector_specification,
1539         c_finish_omp_declare_variant): New functions.
1540         (c_finish_omp_declare_simd): Handle both declare simd and
1541         declare variant.
1542         (c_parser_omp_declare): Handle declare variant.
1544 2019-10-02  Joseph Myers  <joseph@codesourcery.com>
1546         * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1547         CPP_COLON tokens.
1549 2019-10-01  Richard Sandiford  <richard.sandiford@arm.com>
1551         * c-objc-common.c (useful_aka_type_p): New function.
1552         (print_type): Use it to decide whether an aka type is worth printing.
1554 2019-09-27  Jakub Jelinek  <jakub@redhat.com>
1556         PR c++/88203
1557         * c-parser.c (c_parser_predefined_identifier): New function.
1558         (c_parser_postfix_expression): Use it.
1559         (c_parser_omp_variable_list): Parse predefined identifiers.
1560         * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1561         in shared and firstprivate clauses, even when they are predetermined
1562         shared.
1564 2019-09-27  Richard Sandiford  <richard.sandiford@arm.com>
1566         * c-typeck.c (build_function_call_vec): Take the original function
1567         decl as an optional final parameter.  Pass all built-in calls to
1568         check_builtin_function_arguments.
1570 2019-09-20  Eric Botcazou  <ebotcazou@adacore.com>
1572         PR c/91815
1573         * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1574         of identifiers in the external scope only for variables and functions.
1576 2019-09-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1578         PR c/78736
1579         * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1581 2019-08-23  Iain Sandoe  <iain@sandoe.co.uk>
1583         PR pch/61250
1584         * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1585         after determining that the first token is not
1586         PRAGMA_GCC_PCH_PREPROCESS.
1588 2019-08-22  Eric Botcazou  <ebotcazou@adacore.com>
1590         * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1591         FUNCTION_DECL to the right value in the presence of nested declarators.
1593 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
1595         PR middle-end/91421
1596         * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1598 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
1600         PR middle-end/91421
1601         * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1602         of a built_in_function.
1603         (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1605 2019-08-10  Jakub Jelinek  <jakub@redhat.com>
1607         * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1608         (c_parser_omp_clause_device_type): New function.
1609         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1610         (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1611         (c_parser_omp_declare_target): Handle device_type clauses.  Remove
1612         diagnostics for declare target with clauses nested in clause-less
1613         declare target declaration-definition-seq.
1614         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1616 2019-08-09  Jakub Jelinek  <jakub@redhat.com>
1618         * c-parser.c (check_no_duplicate_clause): Simplify using
1619         omp_find_clause.
1620         (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1621         directive name modifiers.
1622         (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1624         PR c/91401
1625         * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1626         check_no_duplicate_clause call.  Comment it out, instead emit a
1627         warning for duplicate dist_schedule clauses.
1629 2019-08-08  Richard Sandiford  <richard.sandiford@arm.com>
1631         * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1633 2019-08-08  Jakub Jelinek  <jakub@redhat.com>
1635         * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1636         OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1637         instead of generic_head to track duplicates.
1639 2019-08-07  Jakub Jelinek  <jakub@redhat.com>
1641         * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1642         (c_parser_omp_clause_use_device_addr): New function.
1643         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1644         (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1645         (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1646         like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1647         map or use_device_* clauses.
1648         * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1649         in OpenMP, require pointer type rather than pointer or array type.
1650         Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1652 2019-07-31  Jakub Jelinek  <jakub@redhat.com>
1654         PR c/91192
1655         * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1656         even if finish is UNKNOWN_LOCATION, just use start as finish in that
1657         case.
1659 2019-07-25  Martin Liska  <mliska@suse.cz>
1660             Dominik Infuhr  <dominik.infuehr@theobroma-systems.com>
1662         PR c++/23383
1663         * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1665 2019-07-25  Martin Liska  <mliska@suse.cz>
1667         * c-decl.c (merge_decls): Use new macros
1668         (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1670 2019-07-23  Richard Biener  <rguenther@suse.de>
1672         PR tree-optimization/83518
1673         * gimple-parser.c (c_parser_parse_gimple_body): When we have
1674         a CFG also rebuild cgraph edges.
1676 2019-07-20  Jakub Jelinek  <jakub@redhat.com>
1678         * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1679         (c_parser_omp_clause_bind): New function.
1680         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1681         (OMP_LOOP_CLAUSE_MASK): Define.
1682         (c_parser_omp_loop): New function.
1683         (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1684         loop combined with parallel or teams.
1685         (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1686         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1688 2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>
1690         PR c/53633
1691         * c-decl.c (finish_function): Check targetm.warn_func_return
1692         before issuing a -Wreturn-type warning.
1694 2019-07-12  Alexandre Oliva  <oliva@adacore.com>
1696         * gimple-parser.c (c_parser_gimple_try_stmt): New.
1697         (c_parser_compound_statement): Call it.
1699 2019-07-12  Jakub Jelinek  <jakub@redhat.com>
1701         * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1702         (c_parser_omp_clause_order): New function.
1703         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1704         (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1705         PRAGMA_OMP_CLAUSE_ORDER.
1706         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1708 2019-07-10  Richard Biener  <rguenther@suse.de>
1710         * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1711         _Literal (int *) &x for address literals.
1713 2019-07-09  Martin Sebor  <msebor@redhat.com>
1715         PR c++/61339
1716         * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1717         to class.
1718         (field_decl_cmp): Same.
1719         * c-parser.c (c_parser_struct_or_union_specifier): Same.
1720         * c-tree.h: Same.
1721         * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1723 2019-07-09  Martin Sebor  <msebor@redhat.com>
1725         PR c++/61339
1726         * c-decl.c: Change class-key from class to struct and vice versa
1727         to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1728         * gimple-parser.c: Same.
1730 2019-07-01  Richard Biener  <rguenther@suse.de>
1732         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1733         _Literal (char *) &"foo" for address literals pointing to
1734         STRING_CSTs.
1736 2019-06-25  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1738         * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1739         * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1740         C incompatibility if alternate "__intN__" form is used.
1742 2019-06-24  Martin Sebor  <msebor@redhat.com>
1744         * c-typeck.c (build_binary_op): Hyphenate floating-point.
1746 2019-06-10  Jakub Jelinek  <jakub@redhat.com>
1748         * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1749         (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1750         (c_parser_omp_scan_loop_body): New function.
1751         (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1752         inscan reduction clauses.
1753         * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1754         non-inscan reductions on the same construct, or inscan reductions with
1755         ordered or schedule clauses, or inscan array reductions.
1757 2019-06-05  Martin Sebor  <msebor@redhat.com>
1759         PR c/90737
1760         * c-typeck.c (c_finish_return): Only consider functions returning
1761         pointers as candidates for -Wreturn-local-addr.
1763 2019-06-05  Martin Sebor  <msebor@redhat.com>
1765         * c-decl.c (start_decl): Adjust quoting and hyphenation
1766         in diagnostics.
1767         (finish_decl): Same.
1768         (finish_enum): Same.
1769         (start_function): Same.
1770         (declspecs_add_type): Same.
1771         * c-parser.c (warn_for_abs): Same.
1772         * c-typeck.c (build_binary_op): Same.
1774 2019-05-17  Thomas Schwinge  <thomas@codesourcery.com>
1776         PR c/89433
1777         * c-parser.c (c_finish_oacc_routine): Rework checking if already
1778         marked with an OpenACC 'routine' directive.
1780         PR c/89433
1781         * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1782         (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1784         PR c/89433
1785         * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1786         clauses from "omp declare target" attribute.
1788 2019-05-16  Martin Sebor  <msebor@redhat.com>
1790         * c-decl.c (start_decl): Quote keywords, operators, and
1791         types in diagnostics.
1792         (finish_decl): Same.
1793         * c-parser.c (c_parser_asm_statement): Same.
1794         (c_parser_conditional_expression): Same.
1795         (c_parser_transaction_cancel): Same.
1796         * c-typeck.c (c_common_type): Same.
1797         (build_conditional_expr): Same.
1798         (digest_init): Same.
1799         (process_init_element): Same.
1800         (build_binary_op): Same.
1802 2019-05-17  Richard Biener  <rguenther@suse.de>
1804         * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1805         (c_parser_gimple_unary_expression): Likewise.
1806         (c_parser_gimple_parentized_ternary_expression): New function.
1808 2019-05-16  Richard Biener  <rguenther@suse.de>
1810         * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1811         (c_parser_gimple_unary_expression): Likewise.
1813 2019-05-15  Richard Biener  <rguenther@suse.de>
1815         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1816         __BIT_FIELD_REF.
1818 2019-05-14  Richard Biener  <rguenther@suse.de>
1820         * gimple-parser.c (c_parser_gimple_statement): Remove
1821         questionable auto-promotion to VIEW_CONVERT_EXPR.
1822         (c_parser_gimple_typespec): Split out from __MEM parsing.
1823         (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1824         * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1825         as __VIEW_CONVERT with -gimple.
1827 2019-05-09  Martin Liska  <mliska@suse.cz>
1829         * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1830         __MAX.
1831         (c_parser_gimple_unary_expression): Parse also binary expression
1832         __MIN and __MAX.
1833         (c_parser_gimple_parentized_binary_expression): New function.
1835 2019-05-09  Martin Liska  <mliska@suse.cz>
1837         * gimple-parser.c (struct gimple_parser): Add probability.
1838         for gimple_parser_edge.
1839         (gimple_parser::push_edge): Add new argument probability.
1840         (c_parser_gimple_parse_bb_spec): Parse also probability
1841         if present.
1842         (c_parser_parse_gimple_body): Set edge probability.
1843         (c_parser_gimple_compound_statement): Consume token
1844         before calling c_parser_gimple_goto_stmt.
1845         Parse BB counts.
1846         (c_parser_gimple_statement): Pass new argument.
1847         (c_parser_gimple_goto_stmt): Likewise.
1848         (c_parser_gimple_if_stmt): Likewise.
1849         (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1850         * c-parser.c (c_parser_declaration_or_fndef): Pass
1851         hot_bb_threshold argument.
1852         * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1853         field.
1854         (c_parser_gimple_parse_bb_spec_edge_probability): New.
1856 2019-04-26  Jakub Jelinek  <jakub@redhat.com>
1858         PR debug/90197
1859         * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1860         * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1861         (c_parser_do_statement): Likewise.
1862         (c_parser_for_statement): Likewise.  Formatting fixes.
1863         * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1864         emit DEBUG_BEGIN_STMTs if needed.
1866 2019-04-19  Jakub Jelinek  <jakub@redhat.com>
1868         PR c/89888
1869         * c-typeck.c (struct c_switch): Remove outside_range_p member.
1870         (c_start_case): Don't clear it.
1871         (do_case): Adjust c_add_case_label caller.
1872         (c_finish_case): Adjust c_do_switch_warnings caller.
1874         PR c++/90108
1875         * c-decl.c (merge_decls): If remove is main variant and
1876         DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1877         variant that has newdecl as TYPE_NAME if any.
1879 2019-04-12  Jakub Jelinek  <jakub@redhat.com>
1881         PR c/89933
1882         * c-decl.c (merge_decls): When newdecl's type is its main variant,
1883         don't try to remove it from the variant list, but instead assert
1884         it has no variants.
1886 2019-04-01  Richard Biener  <rguenther@suse.de>
1888         PR c/71598
1889         * c-tree.h (c_get_alias_set): Declare.
1890         * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1891         * c-objc-common.c (c_get_alias_set): Treat enumeral types
1892         as the underlying integer type.
1894 2019-03-19  Martin Sebor  <msebor@redhat.com>
1896         PR tree-optimization/89688
1897         * c-decl.c (finish_decl): Call braced_lists_to_string for more
1898         kinds of initializers.
1900 2019-03-19  Jakub Jelinek  <jakub@redhat.com>
1902         PR c/89734
1903         * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1904         return type even if quals_used is 0.  Formatting fixes.
1906 2019-03-14  Richard Biener  <rguenther@suse.de>
1908         * c-tree.h (enum c_declspec_il): New.
1909         (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1910         enum bitfield.
1911         * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1912         Pass start pass and declspec_il to c_parser_parse_gimple_body.
1913         (c_parser_declspecs): Adjust.
1914         * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1915         gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1916         and bitmap.h.
1917         (struct gimple_parser): New.
1918         (gimple_parser::push_edge): New method.
1919         (c_parser_gimple_parse_bb_spec): New helper.
1920         (c_parser_parse_gimple_body): Get start pass and IL specification.
1921         Initialize SSA and CFG.
1922         (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1923         Build a gimple_parser parsing state and pass it along.
1924         (c_parser_gimple_statement): Change intermittend __PHI internal
1925         function argument for the edge.
1926         (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1927         (c_parser_gimple_goto_stmt): Record edges to build.
1928         (c_parser_gimple_if_stmt): Likewise.
1929         * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1930         (c_parser_gimple_or_rtl_pass_list): Likewise.
1932 2019-03-11  Martin Liska  <mliska@suse.cz>
1934         * c-decl.c (check_for_loop_decls): Wrap an option name
1935         in a string format message and fix GNU coding style.
1936         * c-parser.c (c_parser_declspecs): Likewise.
1938 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
1940         PR tree-optimization/89550
1941         * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1942         returned true.
1943         (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1944         or warning returned true.
1946 2019-02-28  Jakub Jelinek  <jakub@redhat.com>
1948         PR c/89525
1949         * c-typeck.c (convert_arguments): Call inform_declaration only if
1950         the previous warning_at call returned true.
1952 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
1954         * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1955         parameter.  Adjust all users.
1956         (c_parser_oacc_simple_clause): Replace parser with loc formal
1957         parameter.  Adjust all users.
1959 2019-02-19  Chung-Lin Tang  <cltang@codesourcery.com>
1961         PR c/87924
1962         * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1963         clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1965 2019-02-15  Jakub Jelinek  <jakub@redhat.com>
1967         PR c/89340
1968         * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1969         before c_decl_attributes rather than after it.
1971 2019-02-06  Jakub Jelinek  <jakub@redhat.com>
1973         PR c/89211
1974         * c-parser.c (c_parser_declaration_or_fndef): Don't update
1975         DECL_ARGUMENTS of d if it has been defined already.  Use a single if
1976         instead of 3 nested ifs.
1978 2019-02-06  Joseph Myers  <joseph@codesourcery.com>
1980         PR c/88584
1981         * c-decl.c (finish_decl): Do not complete array types for arrays
1982         with external linkage not at file scope.
1984 2019-02-05  Richard Biener  <rguenther@suse.de>
1986         PR c/88606
1987         * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1988         all type variants when not supported.
1990 2019-01-30  Jakub Jelinek  <jakub@redhat.com>
1992         PR c/89061
1993         * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1994         * c-decl.c (decl_jump_unsafe): Return false for
1995         C_DECL_COMPOUND_LITERAL_P decls.
1996         (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1998 2019-01-29  Jakub Jelinek  <jakub@redhat.com>
2000         PR c/89045
2001         * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2002         scope.
2004         PR c/86125
2005         * c-decl.c (last_fileptr_type): Remove.
2006         (last_structptr_types): New variable.
2007         (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2008         {old,new}rettype instead of the types themselves.  Assert
2009         last_structptr_types array has the same number of elements
2010         as builtin_structptr_types array.  Use TYPE_MAIN_VARIANT for
2011         argument oldtype and newtype.  Instead of handling
2012         just fileptr_type_node specially, handle all builtin_structptr_types
2013         pointer nodes.  Formatting fix.
2015 2019-01-24  Martin Sebor  <msebor@redhat.com>
2017         PR c/86125
2018         PR c/88886
2019         PR middle-end/86308
2020         * c-decl.c (match_builtin_function_types): Add arguments.
2021         (diagnose_mismatched_decls): Diagnose mismatched declarations
2022         of built-ins more strictly.
2024 2019-01-24  Jakub Jelinek  <jakub@redhat.com>
2026         PR c++/88976
2027         * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2028         on #pragma omp cancel with different modifiers.
2030 2019-01-18  H.J. Lu  <hongjiu.lu@intel.com>
2032         PR c/51628
2033         PR c/88664
2034         * c-typeck.c (convert_for_assignment): Upate the
2035         warn_for_address_or_pointer_of_packed_member call.
2037 2019-01-16  Tom Honermann  <tom@honermann.net>
2038             Jason Merrill  <jason@redhat.com>
2040         * c-typeck.c (digest_init): Revised the error message produced for
2041         ill-formed cases of array initialization with a string literal.
2042         (error_init): Make variadic.
2044 2019-01-12  Jakub Jelinek  <jakub@redhat.com>
2046         * c-typeck.c (convert_for_assignment): Fix a comment typo.
2048 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
2050         PR c/88701
2051         * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2052         if current_function_decl is non-NULL.
2054 2019-01-07  Joseph Myers  <joseph@codesourcery.com>
2056         PR c/88720
2057         PR c/88726
2058         * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2059         whether a function is nested, not DECL_EXTERNAL.  Diagnose inline
2060         functions declared but never defined only for external scope, not
2061         for other scopes.
2063 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
2065         PR c++/85052
2066         * c-parser.c (c_parser_postfix_expression): Parse
2067         __builtin_convertvector.
2069 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
2071         Update copyright years.
2073 2018-12-20  H.J. Lu  <hongjiu.lu@intel.com>
2075         PR c/51628
2076         * c-typeck.c (convert_for_assignment): Call
2077         warn_for_address_or_pointer_of_packed_member.
2079 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
2081         * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2082         a more specific error message (instead of just falling through).
2084 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
2086         * c-parser.c (c_parser_asm_statement): Keep track of the location each
2087         asm qualifier is first seen; use that to give nicer "duplicate asm
2088         qualifier" messages.  Delete 'quals" variable, instead pass the
2089         "is_volatile_ flag to build_asm_stmt directly.
2090         * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2091         * c-typeck.c (build_asm_stmt): Ditto; adjust.
2093 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
2095         * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2096         "done" boolean variable.
2098 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
2100         PR c++/87504
2101         * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2102         Move from here to gcc-rich-location.h and gcc-rich-location.c.
2103         (build_binary_op): Use struct op_location_t and
2104         class binary_op_rich_location.
2106 2018-12-11  Jakub Jelinek  <jakub@redhat.com>
2108         PR sanitizer/88426
2109         * c-convert.c (convert): Call c_fully_fold before calling
2110         ubsan_instrument_float_cast.
2112 2018-12-08  Segher Boessenkool  <segher@kernel.crashing.org>
2114         * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2115         setting "quals".
2117 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
2119         * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2120         after asm.  Pass a flag for it to build_asm_expr.
2121         * c-tree.h (build_asm_expr): Update declaration.
2122         * c-typeck.c (build_asm_stmt): Add is_inline parameter.  Use it to
2123         set ASM_INLINE_P.
2125 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
2127         PR inline-asm/55681
2128         * c-parser.c (c_parser_asm_statement): Update grammar.  Allow any
2129         combination of volatile and goto, in any order, without repetitions.
2131 2018-12-04  James Norris  <jnorris@codesourcery.com>
2132             Cesar Philippidis  <cesar@codesourcery.com>
2133             Julian Brown  <julian@codesourcery.com>
2135         * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2136         code.
2138 2018-11-30  Richard Biener  <rguenther@suse.de>
2140         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2141         _Literal (type) { ... } as empty aggregate or vector constructor.
2143 2018-11-29  Martin Sebor  <msebor@redhat.com>
2145         PR c/88091
2146         * c-typeck.c (convert_argument): Add a parameter.  Adjust indentation.
2147         (convert_arguments): Add comments.  Pass additional argument to
2148         the function above.
2150 2018-11-29  Martin Sebor  <msebor@redhat.com>
2152         PR c/88172
2153         PR testsuite/88208
2154         * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2156 2018-11-23  Martin Sebor  <msebor@redhat.com>
2158         PR testsuite/88098
2159         * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2160         (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2162 2018-11-20  Martin Sebor  <msebor@redhat.com>
2164         * c-parser.c (c_parser_has_attribute_expression): New function.
2165         (c_parser_attribute): New function.
2166         (c_parser_attributes): Move code into c_parser_attribute.
2167         (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2169 2018-11-15  Martin Sebor  <msebor@redhat.com>
2171         PR c/83656
2172         * c-decl.c (header_for_builtin_fn): Declare.
2173         (diagnose_mismatched_decls): Diagnose declarations of built-in
2174         functions without a prototype.
2175         * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2176         (convert_argument): Same.
2177         (convert_arguments): Factor code out into convert_argument.
2178         Detect mismatches between built-in formal arguments in calls
2179         to built-in without prototype.
2180         (build_conditional_expr): Same.
2181         (type_or_builtin_type): New function.
2182         (convert_for_assignment): Add argument.  Conditionally issue
2183         warnings instead of errors for mismatches.
2185 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2187         * c-decl.c: Replace "source_location" with "location_t".
2188         * c-tree.h: Likewise.
2189         * c-typeck.c: Likewise.
2190         * gimple-parser.c: Likewise.
2192 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
2194         * c-parser.c (c_parser_omp_clause_final): Use
2195         c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2196         c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2197         parsing instead of c_parser_paren_condition.
2198         (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2199         convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2200         c_fully_fold instead of c_parser_condition.
2201         (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2202         c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2203         c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2204         c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2205         c_parser_expr_no_commas instead of c_parser_expression.
2207         * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2208         reduction clause with inscan modifier.
2210         * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2211         clauses other than atomic_default_mem_order.
2213 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
2215         * c-parser.c: Include memmode.h.
2216         (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2217         (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2218         (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2219         task_reduction clauses.
2220         (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2221         For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2222         section, or lvalue assignment expression.
2223         (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2224         (c_parser_omp_clause_lastprivate): Parse optional
2225         conditional: modifier.
2226         (c_parser_omp_clause_hint): Require constant integer expression rather
2227         than just integer expression.
2228         (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2229         clause.
2230         (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2231         Parse reduction modifiers.  Pass KIND to c_parser_omp_variable_list.
2232         (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2233         functions.
2234         (c_parser_omp_clause_depend): Parse iterator modifier and handle
2235         iterators.  Parse mutexinoutset and depobj kinds.
2236         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2237         callers.
2238         (c_parser_omp_all_clauses): Likewise.  Handle
2239         PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2240         PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2241         (c_parser_omp_atomic): Parse hint and memory order clauses.  Handle
2242         default memory order from requires directive if any.  Adjust
2243         c_finish_omp_atomic caller.
2244         (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2245         (c_parser_omp_flush): Parse flush with memory-order-clause.
2246         (c_parser_omp_for_loop): Allow NE_EXPR even in
2247         OpenMP loops, adjust c_finish_omp_for caller.
2248         (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2249         (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2250         Allow to be called while parsing combined parallel master.
2251         Parse combined master taskloop{, simd}.
2252         (c_parser_omp_parallel): Parse combined
2253         parallel master{, taskloop{, simd}} constructs.
2254         (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2255         (OMP_TASKGROUP_CLAUSE_MASK): Define.
2256         (c_parser_omp_taskgroup): Add LOC argument.  Parse taskgroup clauses.
2257         (OMP_TASKWAIT_CLAUSE_MASK): Define.
2258         (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2259         (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2260         around teams body.  Use SET_EXPR_LOCATION.
2261         (c_parser_omp_target_data): Allow target data
2262         with only use_device_ptr clauses.
2263         (c_parser_omp_target): Use SET_EXPR_LOCATION.  Set
2264         OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2265         (c_parser_omp_requires): New function.
2266         (c_finish_taskloop_clauses): New function.
2267         (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2268         (c_parser_omp_taskloop): Use c_finish_taskloop_clauses.  Add forward
2269         declaration.  Disallow in_reduction clause when combined with parallel
2270         master.
2271         (c_parser_omp_construct): Adjust c_parser_omp_master and
2272         c_parser_omp_taskgroup callers.
2273         * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2274         other than cancel.
2275         (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2276         like OMP_CLAUSE_REDUCTION.
2277         (handle_omp_array_sections): Likewise.  Call save_expr on array
2278         reductions before calling build_index_type.  Handle depend clauses
2279         with iterators.
2280         (struct c_find_omp_var_s): New type.
2281         (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2282         (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2283         with static, runtime or auto schedule kinds.  Call save_expr for whole
2284         array reduction sizes.  Diagnose reductions with zero sized elements
2285         or variable length structures.  Diagnose nogroup clause used with
2286         reduction clause(s).  Handle depend clause with
2287         OMP_CLAUSE_DEPEND_DEPOBJ.  Diagnose bit-fields.  Require
2288         omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2289         some different type for other kinds.  Use build_unary_op with
2290         ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2291         Handle depend clauses with iterators.  Remove no longer needed special
2292         case that predetermined const qualified vars may be specified in
2293         firstprivate clause.  Complain if const qualified vars are mentioned
2294         in data-sharing clauses other than firstprivate or shared.  Use
2295         error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2296         error.  Formatting fix.  Handle OMP_CLAUSE_NONTEMPORAL and
2297         OMP_CLAUSE_{IN,TASK}_REDUCTION.  Allow any lvalue as
2298         OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2300 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
2302         * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2303         logic for change to name_hint::operator bool.
2304         (undeclared_variable): Likewise.
2305         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2306         (c_parser_parameter_declaration): Likewise.
2308 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
2310         * c-errors.c (pedwarn_c11): New function.
2311         * c-parser.c (disable_extension_diagnostics): Save
2312         warn_c11_c2x_compat and set it to 0.
2313         (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2314         (c_parser_static_assert_declaration_no_semi): Handle
2315         _Static_assert without string constant.
2316         * c-tree.h (pedwarn_c11): New prototype.
2318 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
2320         * Make-lang.in (selftest-c): New.
2321         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2322         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2323         from gcc/Makefile.in.
2325 2018-10-02  Richard Biener  <rguenther@suse.de>
2327         * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2329 2018-09-26  Joseph Myers  <joseph@codesourcery.com>
2331         PR c/87390
2332         * c-typeck.c (build_binary_op): Use excess precision for
2333         comparisons of integers and floating-point for C11 and later.
2335 2018-09-26  Martin Jambor  <mjambor@suse.cz>
2337         PR c/87347
2338         * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL.  Fix
2339         comment.
2341 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
2343         * c-objc-common.c (range_label_for_type_mismatch::get_text):
2344         Update for new param.
2345         * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2346         Likewise.
2348 2018-09-17  Martin Jambor  <mjambor@suse.cz>
2350         PR c/63886
2351         * c-parser.c: (warn_for_abs): New function.
2352         (c_parser_postfix_expression_after_primary): Call it.
2354 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2356         * c-typeck.c (digest_init): Shorten overlength strings.
2358 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2360         * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2362 2018-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2364         * c-decl.c (finish_decl): Call braced_list_to_string here ...
2365         * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2367 2018-08-30  Alexander Monakov  <amonakov@ispras.ru>
2369         * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2370         "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2372 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
2374         PR 87091
2375         * c-decl.c (implicitly_declare): Update call to
2376         maybe_add_include_fixit to suggest overriding the location, as it
2377         is for a note.
2378         * c-objc-common.c (c_tree_printer): Update for conversion of
2379         show_caret_p to a tri-state.
2381 2018-08-27  Martin Liska  <mliska@suse.cz>
2383         * c-decl.c (locate_old_decl): Use new function
2384         fndecl_built_in_p and remove check for FUNCTION_DECL if
2385         possible.
2386         (diagnose_mismatched_decls): Likewise.
2387         (merge_decls): Likewise.
2388         (warn_if_shadowing): Likewise.
2389         (pushdecl): Likewise.
2390         (implicitly_declare): Likewise.
2391         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2392         * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2393         * c-typeck.c (build_function_call_vec): Likewise.
2394         (convert_arguments): Likewise.
2396 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
2398         PR other/84889
2399         * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2400         (diagnose_mismatched_decls): Likewise, in various places.
2401         (warn_if_shadowing): Likewise.
2402         (implicit_decl_warning): Likewise.
2403         (implicitly_declare): Likewise.
2404         (undeclared_variable): Likewise.
2405         (declare_label): Likewise.
2406         (grokdeclarator): Likewise.
2407         (start_function): Likewise.
2408         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2409         (c_parser_parameter_declaration): Likewise.
2410         (c_parser_binary_expression): Likewise.
2411         * c-typeck.c (c_expr_sizeof_expr): Likewise.
2412         (parser_build_binary_op): Likewise.
2413         (build_unary_op): Likewise.
2414         (error_init): Likewise.
2415         (pedwarn_init): Likewise.
2416         (warning_init): Likewise.
2417         (convert_for_assignment): Likewise.
2419 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
2421         * c-objc-common.c: Include "gcc-rich-location.h".
2422         (c_tree_printer): Move implemenation of '%T' to...
2423         (print_type): ...this new function.
2424         (range_label_for_type_mismatch::get_text): New function.
2425         * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2426         range for the various ic_argpass cases.
2427         (class maybe_range_label_for_tree_type_mismatch): New class.
2428         (build_binary_op): Use it when calling binary_op_error.
2430 2018-08-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2432         * c-decl.c (start_decl): Do not warn if variables is named as main
2433         and is a local variable.
2435 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2437         PR c/19315
2438         * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2439         objects of unknown size.
2441 2018-08-13  Martin Sebor  <msebor@redhat.com>
2443         PR tree-optimization/71625
2444         * c-parser.c (c_parser_declaration_or_fndef): Call
2445         braced_list_to_string.
2447 2018-08-03  Bogdan Harjoc  <harjoc@gmail.com>
2449         PR c/86690
2450         * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2451         errors.
2453 2018-08-01  Martin Sebor  <msebor@redhat.com>
2455         PR tree-optimization/86650
2456         * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2457         and TREE_BLOCK (t) from within percent_K_format to this callsite.
2459 2018-08-01  Jakub Jelinek  <jakub@redhat.com>
2461         PR c/85704
2462         * c-typeck.c (init_field_decl_cmp): New function.
2463         (output_pending_init_elements): Use it for field comparisons
2464         instead of pure bit_position comparisons.
2466 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
2468         * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2469         type here, instead add "omp declare target implicit" attribute.
2470         (finish_decl): Diagnose vars without mappable type here.
2472 2018-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
2473             Thomas Schwinge  <thomas@codesourcery.com>
2474             Cesar Philippidis  <cesar@codesourcery.com>
2476         * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2477         and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2478         to their non-present_or_* counterparts. Make 'self' an alias to
2479         PRAGMA_OACC_CLAUSE_HOST.
2480         (c_parser_oacc_data_clause): Update GOMP mappings for
2481         PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2482         PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2483         (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2484         Remove support for present_or_* clauses.
2485         (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2486         (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2487         (OACC_DECLARE_CLAUSE_MASK): Likewise.
2488         (OACC_DATA_CLAUSE_MASK): Likewise.
2489         (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2490         (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2491         (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2492         (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2493         * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2495 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
2497         * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2498         * gimple-parser.c (c_parser_gimple_statement): Likewise.
2499         (c_parser_gimple_unary_expression): Likewise.
2501 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
2503         PR c/86093
2504         * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2505         before doing POINTER_DIFF_EXPR.
2507 2018-06-07  Marek Polacek  <polacek@redhat.com>
2509         PR c/85318
2510         * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2511         for loop initial declarations.
2513 2018-05-30  David Pagan  <dave.pagan@oracle.com>
2515         PR c/55976
2516         * c-decl.c (grokdeclarator): Update check for return type warnings.
2517         (start_function): Likewise.
2518         (finish_function): Likewise.
2519         * c-typeck.c (c_finish_return): Update check for return type warnings.
2520         Pass OPT_Wreturn_type to pedwarn when appropriate.
2522 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
2524         * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2525         __FMA_EXPR handlng.
2527 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
2529         * gimple-parser.c: Include internal-fn.h.
2530         (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2531         (c_parser_gimple_call_internal): New function.
2532         (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2533         Fix typos in comment.
2535 2018-05-10  Jakub Jelinek  <jakub@redhat.com>
2537         PR c++/85662
2538         * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2539         fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2540         fold_convert_loc.
2541         * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2542         fold_offsetof_1, pass argtype as TYPE to it and drop the
2543         fold_convert_loc.
2545 2018-05-02  David Pagan  <dave.pagan@oracle.com>
2547         PR c/30552
2548         * c-decl.c (old_style_parameter_scope): New function.
2549         * c-parser.c (c_parser_postfix_expression): Check for statement
2550         expressions in old-style function parameter list declarations.
2551         * c-parser.h (old_style_parameter_scope): New extern declaration.
2553 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
2555         PR sanitizer/84307
2556         * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2557         it is not TREE_STATIC.
2558         * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2559         not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2560         its COMPOUND_LITERAL_EXPR_DECL.
2562 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
2564         * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2565         where all functions return the same _FloatN or _FloatNx type,
2566         treat integer types as _Float64 instead of double.
2568 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
2570         PR c/84999
2571         * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2572         building vector comparison, diagnose it and return error_mark_node.
2574 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
2576         PR c/84853
2577         * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2578         If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2579         INTEGER_TYPE element type.
2581 2018-03-13  David Pagan  <dave.pagan@oracle.com>
2583         PR c/46921
2584         * c-typeck.c (output_init_element): Ensure field initializer
2585         expression is always evaluated if there are side effects.
2587 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
2589         PR c/84721
2590         * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2591         !building_stmt_list_p ().
2593 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
2595         PR c/84305
2596         * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2597         in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2598         and include the BIND_EXPR in the list of things that need to be
2599         pre-evaluated.
2601 2018-02-09  Nathan Sidwell  <nathan@acm.org>
2603         PR c/84293
2604         * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2605         to strict_aliasing_warning.
2607 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
2609         * c-typeck.c (really_start_incremental_init, push_init_level,
2610         set_nonincremental_init, output_init_element, process_init_element):
2611         Use DECL_UNNAMED_BIT_FIELD.
2613 2018-01-31  Marek Polacek  <polacek@redhat.com>
2615         PR c/81779
2616         * c-parser.c (c_parser_compound_statement_nostart): Call
2617         expansion_point_location_if_in_system_header.
2619 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
2621         PR c++/83814
2622         * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2623         the C part.
2625 2018-01-13  Jakub Jelinek  <jakub@redhat.com>
2627         PR c/83801
2628         * c-tree.h (decl_constant_value_1): Add a bool argument.
2629         * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2630         returning a CONSTRUCTOR if it is true.  Use error_operand_p.
2631         (decl_constant_value): Adjust caller.
2632         * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2633         decl_constant_value_1 as IN_INIT.  Otherwise, punt if
2634         decl_constant_value returns initializer that has BLKmode or
2635         array type.
2636         (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2638 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
2639             Alan Hayward  <alan.hayward@arm.com>
2640             David Sherwood  <david.sherwood@arm.com>
2642         * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2643         TYPE_VECTOR_SUBPARTS.
2645 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
2647         Update copyright years.
2649 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
2651         PR c/83595
2652         * c-parser.c (c_parser_braced_init, c_parser_initelt,
2653         c_parser_conditional_expression, c_parser_cast_expression,
2654         c_parser_sizeof_expression, c_parser_alignof_expression,
2655         c_parser_postfix_expression, c_parser_omp_declare_reduction,
2656         c_parser_transaction_expression): Use set_error () method instead
2657         of setting value member to error_mark_node.
2659 2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
2661         * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2662         and _Float<N>X built-in functions.
2664 2017-12-22  Jakub Jelinek  <jakub@redhat.com>
2666         PR debug/83550
2667         * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2668         TYPE_STUB_DECL and call rest_of_type_compilation before processing
2669         incomplete vars rather than after it.
2671         PR debug/83547
2672         * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2673         indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2674         and consider empty ones if there are no other stmts.  For
2675         -Wunused-value walk all statements before the one only followed by
2676         DEBUG_BEGIN_STMTs.
2678 2017-12-22  Mike Stump  <mikestump@comcast.net>
2679             Eric Botcazou  <ebotcazou@adacore.com>
2681         * c-parser.c (c_parser_while_statement): Add unroll parameter and
2682         build ANNOTATE_EXPR if present.  Add 3rd operand to ANNOTATE_EXPR.
2683         (c_parser_do_statement): Likewise.
2684         (c_parser_for_statement): Likewise.
2685         (c_parser_statement_after_labels): Adjust calls to above.
2686         (c_parse_pragma_ivdep): New static function.
2687         (c_parser_pragma_unroll): Likewise.
2688         (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2689         <PRAGMA_UNROLL>: New case.
2691 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
2693         * c-typeck.c (comptypes_internal, function_types_compatible_p,
2694         perform_integral_promotions, digest_init): Replace Yoda conditions
2695         with typical order conditions.
2696         * c-decl.c (check_bitfield_type_and_width): Likewise.
2698 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2700         * c-typeck.c (c_safe_arg_type_equiv_p,
2701         c_safe_function_type_cast_p): New function.
2702         (build_c_cast): Implement -Wcast-function-type.
2704 2017-12-14  Richard Biener  <rguenther@suse.de>
2706         PR c/83415
2707         * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2708         like REALPART_EXPR for the behavior of whether its operand
2709         is an lvalue.
2711 2017-12-12  Marek Polacek  <polacek@redhat.com>
2713         PR c/82679
2714         * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2716 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
2718         * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2719         * c-parser.c (add_debug_begin_stmt): New.
2720         (c_parser_declaration_or_fndef): Call it.
2721         (c_parser_compound_statement_nostart): Likewise.
2722         (c_parser_statement_after_labels): Likewise.
2723         * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2725 2017-12-07  Joseph Myers  <joseph@codesourcery.com>
2727         * c-decl.c (build_compound_literal): Add parameter alignas_align
2728         and set alignment of decl if nonzero.
2729         * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2730         (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2731         qualifier.
2732         (c_parser_struct_declaration): Update syntax comment.
2733         (c_parser_type_name): Add alignas_ok argument and pass it to
2734         c_parser_declspecs.
2735         (c_parser_cast_expression): Pass true to c_parser_type_name and
2736         give error if a cast used an _Alignas specifier.
2737         (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2738         give error if sizeof (type-name) used an _Alignas specifier.
2739         (c_parser_alignof_expression): Pass true to c_parser_type_name and
2740         give error if _Alignof (type-name) used an _Alignas specifier.
2741         (c_parser_postfix_expression_after_paren_type): Check specified
2742         alignment for a compound literal and pass it to
2743         build_compound_literal.
2744         * c-parser.h (c_parser_type_name): Update prototype.
2745         * c-tree.h (build_compound_literal): Update prototype.
2747 2017-12-07  Martin Sebor  <msebor@redhat.com>
2749         PR c/81544
2750         * c-decl.c (c_decl_attributes): Look up existing declaration and
2751         pass it to decl_attributes.
2753 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
2755         PR c/83236
2756         * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2757         reserved for use by the implementation.
2759 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
2761         * c-decl.c: Include "c-family/c-spellcheck.h".
2763 2017-12-05  Martin Liska  <mliska@suse.cz>
2764             Jakub Jelinek  <jakub@redhat.com>
2766         * c-typeck.c (pointer_diff): Add new argument and instrument
2767         pointer subtraction.
2768         (build_binary_op): Similar for pointer comparison.
2770 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
2772         PR c/79153
2773         * c-parser.c: Include tree-iterator.h.
2774         (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2775         into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2776         on it.
2778         PR c/83222
2779         * c-tree.h (decl_constant_value_1): Declare.
2780         * c-typeck.c (decl_constant_value_1): New function.
2781         (decl_constant_value): Use it.
2782         * c-fold.c (c_fully_fold_internal): If in_init, use
2783         decl_constant_value_1 instead of decl_constant_value.
2785 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
2787         * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2789 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
2791         PR sanitizer/81275
2792         * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2793         c_switch_covers_all_cases_p returns true.
2795 2017-11-28  Julia Koval  <julia.koval@intel.com>
2796             Sebastian Peryt  <sebastian.peryt@intel.com>
2798         * Make-lang.in (c/c-array-notation.o): Remove.
2799         * c-array-notation.c: Delete.
2800         * c-decl.c: Remove cilkplus condition.
2801         * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2802         c_parser_cilk_verify_simd, c_parser_array_notation,
2803         c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2804         c_parser_cilk_simd_fn_vector_attrs,
2805         c_finish_cilk_simd_fn_tokens): Delete.
2806         (c_parser_declaration_or_fndef): Remove cilkplus condition.
2807         (c_parser_direct_declarator_inner): Ditto.
2808         (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2809         (c_parser_attributes, c_parser_compound_statement,
2810         c_parser_statement_after_labels, c_parser_if_statement,
2811         c_parser_switch_statement, c_parser_while_statement,
2812         c_parser_do_statement, c_parser_for_statement,
2813         c_parser_unary_expression, c_parser_postfix_expression,
2814         c_parser_postfix_expression_after_primary,
2815         c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2816         c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2817         support.
2818         * c-typeck.c (build_array_ref, build_function_call_vec,
2819         convert_arguments,
2820         lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2821         c_finish_loop, build_binary_op): Remove cilkplus support.
2823 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
2825         * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2826         of build3.
2828 2017-11-14  Boris Kolpackov  <boris@codesynthesis.com>
2830         * Make-lang.in (c.install-plugin): Install backend import library.
2832 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
2834         * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2835         pragma_stmt context.
2837 2017-11-23  Mike Stump  <mikestump@comcast.net>
2838             Eric Botcazou  <ebotcazou@adacore.com>
2840         * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2841         ANNOTATE_EXPR.
2842         (c_parser_do_statement): Likewise.
2843         (c_parser_for_statement): Likewise.
2845 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
2847         PR c++/62170
2848         * c-objc-common.c (c_tree_printer): Convert penultimate param from
2849         bool to bool *.  Within '%T' handling, if showing an "aka", use
2850         "quoted" param to add appropriate quoting.
2852 2017-11-22  Marek Polacek  <polacek@redhat.com>
2854         PR c++/60336
2855         PR middle-end/67239
2856         PR target/68355
2857         * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2859 2017-11-21  David Malcolm  <dmalcolm@redhat.com>
2861         PR c/83056
2862         * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2863         earlier failed lookups.
2865 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
2867         * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2868         * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2870 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
2872         PR c/81404
2873         * c-decl.c: Include "c-family/known-headers.h".
2874         (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2875         to known-headers.cc.
2876         (class suggest_missing_header): Move to known-header.h.
2877         (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2878         than get_c_name_hint.
2880 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
2882         * c-decl.c (get_c_name_hint): New function.
2883         (class suggest_missing_header): New class.
2884         (lookup_name_fuzzy): Call get_c_name_hint and use it to
2885         suggest missing headers to the user.
2887 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
2889         * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2890         Include "c-family/name-hint.h"
2891         (implicit_decl_warning): Convert "hint" from
2892         const char * to name_hint.  Pass location to
2893         lookup_name_fuzzy.  Suppress any deferred diagnostic if the
2894         warning was not printed.
2895         (undeclared_variable): Likewise for "guessed_id".
2896         (lookup_name_fuzzy): Convert return type from const char *
2897         to name_hint.  Add location_t param.
2898         * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2899         Include "c-family/name-hint.h"
2900         (c_parser_declaration_or_fndef): Convert "hint" from
2901         const char * to name_hint.  Pass location to lookup_name_fuzzy.
2902         (c_parser_parameter_declaration): Likewise.
2904 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
2906         PR c/66618
2907         PR c/69960
2908         * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2909         where needed.
2910         * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2911         handle_omp_array_sections): Likewise.
2912         (digest_init): Don't call decl_constant_value_for_optimization.
2913         * c-tree.h (decl_constant_value_for_optimization): Removed.
2914         * c-fold.c (c_fold_array_ref): New function.
2915         (c_fully_fold_internal): Add LVAL argument, propagate it through
2916         recursive calls.  For VAR_P call decl_constant_value and
2917         unshare if not LVAL and either optimizing or IN_INIT.  Remove
2918         decl_constant_value_for_optimization calls.  If IN_INIT and not LVAL,
2919         fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2920         (c_fully_fold): Add LVAL argument, pass it through to
2921         c_fully_fold_internal.
2922         (decl_constant_value_for_optimization): Removed.
2924 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
2926         PR c/81156
2927         * c-parser.c (check_tgmath_function): New function.
2928         (enum tgmath_parm_kind): New enum.
2929         (c_parser_postfix_expression): Handle __builtin_tgmath.
2931 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
2933         * c-decl.c (implicit_decl_warning): Update for renaming of
2934         pedwarn_at_rich_loc and warning_at_rich_loc.
2935         (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2936         (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2937         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2938         (c_parser_struct_or_union_specifier): Likewise for renaming of
2939         pedwarn_at_rich_loc.
2940         (c_parser_parameter_declaration): Likewise for renaming of
2941         error_at_rich_loc.
2942         * c-typeck.c (build_component_ref): Likewise.
2943         (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2944         (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2945         (set_init_label): Likewise for renaming of error_at_rich_loc.
2947 2017-10-30  Richard Biener  <rguenther@suse.de>
2949         * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2950         stmts.
2952 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
2954         * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2955         fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2957 2017-10-25  David Malcolm  <dmalcolm@redhat.com>
2959         PR c/7356
2960         * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2961         semicolons.
2963 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
2965         PR libstdc++/81706
2966         * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2967         newdecl to corresponding __builtin_ if any.
2969 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
2971         PR c++/82466
2972         * c-decl.c (diagnose_mismatched_decls): Use
2973         OPT_Wbuiltin_declaration_mismatch.
2975 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
2977         * c-parser.c (c_parser_require): Add "type_is_unique" param and
2978         use it to guard calls to maybe_suggest_missing_token_insertion.
2979         (c_parser_parms_list_declarator): Override default value of new
2980         "type_is_unique" param to c_parser_require.
2981         (c_parser_asm_statement): Likewise.
2982         * c-parser.h (c_parser_require): Add "type_is_unique" param,
2983         defaulting to true.
2985 2017-10-11  Nathan Sidwell  <nathan@acm.org>
2987         * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2989 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
2991         * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2992         operating on trees as wide_ints.
2993         * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2994         (c_tree_equal): Likewise.
2996 2017-10-04  David Malcolm  <dmalcolm@redhat.com>
2998         * c-decl.c (push_parm_decl): Store c_parm's location into the
2999         PARAM_DECL.
3000         (build_c_parm): Add "loc" param and store it within the c_parm.
3001         * c-parser.c (struct c_parser): Add "last_token_location" field.
3002         (c_parser_consume_token): Store location of the token into the
3003         new field.
3004         (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3005         when handling a FUNCTION_DECL, if it doesn't already have them.
3006         (c_parser_parameter_declaration): Generate a location for the
3007         parameter, and pass it to the call to build_c_parm.
3008         * c-tree.h (struct c_parm): Add field "loc".
3009         (build_c_parm): Add location_t param.
3010         * c-typeck.c (get_fndecl_argument_location): New function.
3011         (inform_for_arg): New function.
3012         (convert_for_assignment): Use inform_for_arg when dealing with
3013         ic_argpass.
3015 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
3017         * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3018         width is non-NULL.
3019         (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3020         don't SET_DECL_C_BIT_FIELD here.
3022         PR c/82340
3023         * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3024         instead of trying to set just TREE_READONLY manually.
3026 2017-09-16  Tom de Vries  <tom@codesourcery.com>
3028         PR c/81875
3029         * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3030         cond itself.
3032 2017-09-15  Joseph Myers  <joseph@codesourcery.com>
3034         PR c/82071
3035         * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3036         for C11.
3037         (build_conditional_expr): For C11, generate result with excess
3038         precision when one argument is an integer and the other is of a
3039         type using excess precision.
3041 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3043         * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3045 2017-09-13  Marek Polacek  <polacek@redhat.com>
3047         PR c/82167
3048         * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3049         than expr.original_type.
3051 2017-09-12  Nathan Sidwell  <nathan@acm.org>
3053         * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3054         resort_sorted_fields): Moved from c-family/c-common.c.
3055         * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3057 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
3059         PR c/82071
3060         * c-typeck.c (build_atomic_assign): Handle argument with excess
3061         precision.  Ensure any EXCESS_PRECISION_EXPR is present in
3062         argument passed to build_binary_op and convert_for_assignment but
3063         not for call to c_fully_fold.
3064         (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3065         Ensure build_binary_op is called with argument with original
3066         semantic type.  Avoid calling c_fully_fold with an
3067         EXCESS_PRECISION_EXPR from build_binary_op.
3069 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
3071         PR c/81887
3072         * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3074 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
3075             Alan Hayward  <alan.hayward@arm.com>
3076             David Sherwood  <david.sherwood@arm.com>
3078         * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3079         (c_common_type): Likewise.  Use as_a <scalar_mode> when setting
3080         m1 and m2 to the signed equivalent of a fixed-point
3081         SCALAR_TYPE_MODE.
3083 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
3085         * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3086         than CAN_HAVE_LOCATION_P when determining whether to use the
3087         location_t value within "value".
3089 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
3091         * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3092         rather than peeking the location of the first token.
3093         * c-tree.h (c_expr::get_location): New method.
3095 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
3097         * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3098         to check_function_arguments.
3100 2017-08-18  Marek Polacek  <polacek@redhat.com>
3102         * c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
3103         commentary.
3105 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
3107         PR c/53037
3108         * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3109         (check_bitfield_type_and_width): Don't allow bit-field with
3110         warn_if_not_aligned type.
3112 2017-08-14  Martin Sebor  <msebor@redhat.com>
3114         PR c/81117
3115         * c-objc-common.c (c_objc_common_init): Handle 'G'.
3117 2017-08-11  Marek Polacek  <polacek@redhat.com>
3119         PR c/81795
3120         * c-decl.c (pushtag): Only print inform if the warning was printed.
3121         (grokdeclarator): Likewise.
3123 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
3125         * c-parser.c (c_parser_error): Rename to...
3126         (c_parser_error_richloc): ...this, making static, and adding
3127         "richloc" parameter, passing it to the c_parse_error call,
3128         rather than calling c_parser_set_source_position_from_token.
3129         (c_parser_error): Reintroduce, reimplementing in terms of the
3130         above, converting return type from void to bool.
3131         (class token_pair): New class.
3132         (struct matching_paren_traits): New struct.
3133         (matching_parens): New typedef.
3134         (struct matching_brace_traits): New struct.
3135         (matching_braces): New typedef.
3136         (get_matching_symbol): New function.
3137         (c_parser_require): Add param MATCHING_LOCATION, using it to
3138         highlight matching "opening" tokens for missing "closing" tokens.
3139         (c_parser_skip_until_found): Likewise.
3140         (c_parser_static_assert_declaration_no_semi): Convert explicit
3141         parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3142         class matching_parens, so that the pertinent open parenthesis is
3143         highlighted when there are problems locating the close
3144         parenthesis.
3145         (c_parser_struct_or_union_specifier): Likewise.
3146         (c_parser_typeof_specifier): Likewise.
3147         (c_parser_alignas_specifier): Likewise.
3148         (c_parser_simple_asm_expr): Likewise.
3149         (c_parser_braced_init): Likewise, for matching_braces.
3150         (c_parser_paren_condition): Likewise, for matching_parens.
3151         (c_parser_switch_statement): Likewise.
3152         (c_parser_for_statement): Likewise.
3153         (c_parser_asm_statement): Likewise.
3154         (c_parser_asm_operands): Likewise.
3155         (c_parser_cast_expression): Likewise.
3156         (c_parser_sizeof_expression): Likewise.
3157         (c_parser_alignof_expression): Likewise.
3158         (c_parser_generic_selection): Likewise.
3159         (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3160         RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3161         RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3162         In case CPP_OPEN_PAREN, pass loc_open_paren to the
3163         c_parser_skip_until_found call.
3164         (c_parser_objc_class_definition): Use class matching_parens as
3165         above.
3166         (c_parser_objc_method_decl): Likewise.
3167         (c_parser_objc_try_catch_finally_statement): Likewise.
3168         (c_parser_objc_synchronized_statement): Likewise.
3169         (c_parser_objc_at_property_declaration): Likewise.
3170         (c_parser_oacc_wait_list): Likewise.
3171         (c_parser_omp_var_list_parens): Likewise.
3172         (c_parser_omp_clause_collapse): Likewise.
3173         (c_parser_omp_clause_default): Likewise.
3174         (c_parser_omp_clause_if): Likewise.
3175         (c_parser_omp_clause_num_threads): Likewise.
3176         (c_parser_omp_clause_num_tasks): Likewise.
3177         (c_parser_omp_clause_grainsize): Likewise.
3178         (c_parser_omp_clause_priority): Likewise.
3179         (c_parser_omp_clause_hint): Likewise.
3180         (c_parser_omp_clause_defaultmap): Likewise.
3181         (c_parser_oacc_single_int_clause): Likewise.
3182         (c_parser_omp_clause_ordered): Likewise.
3183         (c_parser_omp_clause_reduction): Likewise.
3184         (c_parser_omp_clause_schedule): Likewise.
3185         (c_parser_omp_clause_num_teams): Likewise.
3186         (c_parser_omp_clause_thread_limit): Likewise.
3187         (c_parser_omp_clause_aligned): Likewise.
3188         (c_parser_omp_clause_linear): Likewise.
3189         (c_parser_omp_clause_safelen): Likewise.
3190         (c_parser_omp_clause_simdlen): Likewise.
3191         (c_parser_omp_clause_depend): Likewise.
3192         (c_parser_omp_clause_map): Likewise.
3193         (c_parser_omp_clause_device): Likewise.
3194         (c_parser_omp_clause_dist_schedule): Likewise.
3195         (c_parser_omp_clause_proc_bind): Likewise.
3196         (c_parser_omp_clause_uniform): Likewise.
3197         (c_parser_omp_for_loop): Likewise.
3198         (c_parser_cilk_clause_vectorlength): Likewise.
3199         (c_parser_cilk_clause_linear): Likewise.
3200         (c_parser_transaction_expression): Likewise.
3201         * c-parser.h (c_parser_require): Add param matching_location with
3202         default UNKNOWN_LOCATION.
3203         (c_parser_error): Convert return type from void to bool.
3204         (c_parser_skip_until_found): Add param matching_location with
3205         default UNKNOWN_LOCATION.
3207 2017-08-09  Marek Polacek  <polacek@redhat.com>
3209         * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3210         * c-tree.h (build_external_ref): Update declaration.
3211         * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3212         (build_external_ref): Change the type of a parameter to bool.
3213         (parser_build_binary_op): Use true/false instead of 1/0.
3214         (pointer_diff): Likewise.
3215         (build_modify_expr): Likewise.
3216         (set_designator): Change the type of a parameter to bool.
3217         (set_init_index): Use true/false instead of 1/0.
3218         (set_init_label): Likewise.
3219         (output_init_element): Change the type of a parameter to bool.
3220         (output_pending_init_elements): Use true/false instead of 1/0.
3221         (process_init_element): Likewise.
3222         (build_binary_op): Change the type of a parameter to bool.
3224 2017-08-09  Marek Polacek  <polacek@redhat.com>
3226         PR c/81233
3227         * c-typeck.c (pedwarn_init): Make the function take a variable list.
3228         Call emit_diagnostic_valist instead of pedwarn.
3229         (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3230         Print the relevant types in diagnostics.
3232 2017-08-09  Marek Polacek  <polacek@redhat.com>
3234         PR c/81417
3235         * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
3236         build_conditional_expr.
3237         * c-parser.c (c_parser_conditional_expression): Create locations for
3238         EXP1 and EXP2 from their source ranges.  Pass the locations down to
3239         build_conditional_expr.
3240         * c-tree.h (build_conditional_expr): Update declaration.
3241         * c-typeck.c (build_conditional_expr): Add location_t parameters.
3242         For -Wsign-compare, also print the types.
3244 2017-08-08  Martin Liska  <mliska@suse.cz>
3246         * c-convert.c: Include header files.
3247         * c-typeck.c: Likewise.
3249 2017-08-07  Martin Liska  <mliska@suse.cz>
3251         * c-parser.c (c_parser_attributes): Canonicalize name of an
3252         attribute.
3254 2017-08-02  Marek Polacek  <polacek@redhat.com>
3256         PR c/81289
3257         * c-parser.c (c_parser_unary_expression): Use set_error.
3259         PR c/81448
3260         PR c/81306
3261         * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3262         warnings.  Avoid walking MACRO_MAP_LOCATIONS.
3264 2017-07-31  Jan Hubicka  <hubicka@ucw.cz>
3265             Martin Liska  <mliska@suse.cz>
3267         * c-typeck.c (c_finish_goto_label): Build gimple predict
3268         statement.
3270 2017-07-31  Martin Liska  <mliska@suse.cz>
3272         PR sanitize/81530
3273         * c-convert.c (convert): Guard condition with flag_sanitize_p
3274         also with current_function_decl non-null equality.
3275         * c-decl.c (grokdeclarator): Likewise.
3276         * c-typeck.c (build_binary_op): Likewise.
3278 2017-07-25  Marek Polacek  <polacek@redhat.com>
3280         * c-decl.c (grokfield): Remove local variable.
3282 2017-07-25  Marek Polacek  <polacek@redhat.com>
3284         PR c/81364
3285         * c-parser.c (c_parser_else_body): Don't warn about multistatement
3286         macro expansion if the body is in { }.
3287         (c_parser_while_statement): Likewise.
3288         (c_parser_for_statement): Likewise.
3290 2017-07-18  Nathan Sidwell  <nathan@acm.org>
3292         * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3294 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
3296         * c-decl.c (implicitly_declare): When suggesting a missing
3297         #include, provide a fix-it hint.
3299 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
3301         * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3302         and call that instead.
3303         * c-tree.h (selftest::run_c_tests): New decl.
3305 2017-06-26  Marek Polacek  <polacek@redhat.com>
3307         PR c/80116
3308         * c-parser.c (c_parser_if_body): Set the location of the
3309         body of the conditional after parsing all the labels.  Call
3310         warn_for_multistatement_macros.
3311         (c_parser_else_body): Likewise.
3312         (c_parser_switch_statement): Likewise.
3313         (c_parser_while_statement): Likewise.
3314         (c_parser_for_statement): Likewise.
3315         (c_parser_statement): Add a default argument.  Save the location
3316         after labels have been parsed.
3317         (c_parser_c99_block_statement): Likewise.
3319 2017-06-19  Richard Biener  <rguenther@suse.de>
3321         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3322         negated _Literals to parse _Literal (int) -1.
3324 2017-06-13  Martin Liska  <mliska@suse.cz>
3326         PR sanitize/78204
3327         * c-convert.c (convert): Use sanitize_flags_p.
3328         * c-decl.c (grokdeclarator): Likewise.
3329         * c-typeck.c (convert_for_assignment): Likewise.
3330         (c_finish_return): Likewise.
3331         (build_binary_op): Likewise.
3333 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
3335         PR c/81006
3336         * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3337         to sizetype before size_binop.
3339 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
3341         * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3342         of TDI_generic.
3344 2017-06-06  Marek Polacek  <polacek@redhat.com>
3346         PR c/79983
3347         * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3348         ref.
3349         (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3351 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3353         * c-parser.c (c_parser_binary_expression): Implement the
3354         -Wsizeof_pointer_div warning.
3355         (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3356         from a parenthesized expression.
3357         (c_parser_expr_list): Use c_last_sizeof_loc.
3358         * c-tree.h (c_last_sizeof_loc): New external.
3359         * c-typeck.c (c_last_sizeof_loc): New variable.
3360         (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3362 2017-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
3364         PR testsuite/80580
3365         * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3367 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
3369         * c-objc-common.c (c_tree_printer): Gain bool and const char **
3370         parameters.
3372 2017-05-24  Martin Sebor  <msebor@redhat.com>
3374         PR c/80731
3375         * c-fold.c (c_fully_fold_internal): Adjust.
3376         * c-typeck.c (parser_build_unary_op): Adjust.
3378 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
3380         * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3381         "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3382         "VECTOR_LENGTH".
3384 2017-05-23  Marek Polacek  <polacek@redhat.com>
3386         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3387         quotes.
3389 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
3391         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3392         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3393         it returned invariant.  Call tree_invariant_p unconditionally
3394         afterwards to decide whether to return expr or op0.
3396 2017-05-22  Nathan Sidwell  <nathan@acm.org>
3398         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3400 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
3402         * c-parser.c (c_parser_omp_clause_default): Handle
3403         "OMP_CLAUSE_DEFAULT_PRESENT".
3405 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3407         * config-lang.in (gtfiles): Add c-family/c-format.c.
3409 2017-05-18  Nathan Sidwell  <nathan@acm.org>
3411         * c-decl.c (pushdecl_top_level): Delete unused function.
3413 2017-05-18  Marek Polacek  <polacek@redhat.com>
3415         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3416         (check_earlier_gotos): Likewise.
3417         (define_label): Likewise.
3418         (pending_xref_error): Likewise.
3419         (smallest_type_quals_location): Likewise.
3420         (grokdeclarator): Likewise.
3421         (grokparms): Likewise.
3422         (identifier_global_value): Likewise.
3423         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3424         (find_init_member): Likewise.
3426 2017-05-18  Marek Polacek  <polacek@redhat.com>
3428         * c-decl.c (start_decl): Use false/true instead of 0/1.
3429         (grokdeclarator): Likewise.
3430         (finish_struct): Likewise.
3431         (start_function): Change the return type to bool.  Use false/true
3432         instead of 0/1.
3433         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3434         * c-tree.h (start_function): Update.
3435         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3436         (set_designator): Change the return type to bool.  Use false/true
3437         instead of 0/1.
3439 2017-05-17  Marek Polacek  <polacek@redhat.com>
3441         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3442         * c-typeck.c: Likewise.
3444 2017-05-17  Marek Polacek  <polacek@redhat.com>
3446         PR sanitizer/80659
3447         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3448         DECL_IGNORED_P even for non-static compound literals.
3450 2017-05-17  Martin Liska  <mliska@suse.cz>
3452         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3453         use it instead of int type.
3455 2017-05-17  Marek Polacek  <polacek@redhat.com>
3457         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
3458         call c_fully_fold.
3459         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
3460         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
3461         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3462         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3463         save_expr.
3464         (c_parser_conditional_expression): Likewise.
3465         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3466         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3467         (process_init_element): Likewise.
3468         (build_binary_op): Likewise.
3469         (handle_omp_array_sections_1): Likewise.
3471 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
3473         * c-parser.c (c_parser_omp_clause_num_gangs)
3474         (c_parser_omp_clause_num_workers)
3475         (c_parser_omp_clause_vector_length): Merge functions into...
3476         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
3477         all users.
3479 2017-05-11  Nathan Sidwell  <nathan@acm.org>
3481         * gimple-parser.c: Don't #include tree-dump.h.
3483 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
3485         PR testsuite/80580
3486         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3488 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
3490         PR testsuite/80580
3491         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3492         incorrect __MEM syntax.
3494 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
3496         PR testsuite/80580
3497         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3498         type of unary '*'.
3500 2017-05-09  Nathan Sidwell  <nathan@acm.org>
3502         * c-tree.h (pushdecl): Declare.
3504 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
3506         * c-decl.c (warn_defaults_to): Replace report_diagnostic
3507         with diagnostic_report_diagnostic.
3508         * c-errors.c (pedwarn_c99): Likewise.
3509         (pedwarn_c90): Likewise.
3511 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
3513         PR c++/80038
3514         * c-gimplify.c (c_gimplify_expr): Remove calls to
3515         cilk_gimplifY_call_params_in_spawned_fn.
3517 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
3519         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3520         hint for removing extra semicolon.
3522 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
3524         PR c/80468
3525         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3526         enabled, set specs->type to integer_type_node.
3528 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
3530         * c-array-notation.c: Fix typo in comment.
3532 2017-03-29  Marek Polacek  <polacek@redhat.com>
3534         PR c/79730
3535         * c-decl.c (finish_decl): Check VAR_P.
3537 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
3539         PR middle-end/80162
3540         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3541         * c-typeck.c (c_mark_addressable): Likewise.  Look through
3542         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3543         to ARRAY_TYPE.
3544         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3546 2017-03-23  Marek Polacek  <polacek@redhat.com>
3548         * c-tree.h: Remove a C_RID_YYCODE reference.
3550 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
3552         PR c/80097
3553         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3554         optional COMPOUND_EXPR with ubsan instrumentation.
3556 2017-03-17  Marek Polacek  <polacek@redhat.com>
3558         * c-parser.c: Add C11 references.
3560 2017-03-15  Marek Polacek  <polacek@redhat.com>
3562         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3564 2017-03-11  Marek Polacek  <polacek@redhat.com>
3566         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
3568 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
3570         PR translation/79848
3571         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3572         "%qs".
3573         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3575 2017-03-09  Marek Polacek  <polacek@redhat.com>
3577         PR sanitizer/79757
3578         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3579         parameter declarations with initializers.
3581 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
3583         PR c/79969
3584         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3585         TYPE_STUB_DECL.
3587 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
3589         PR c/79834
3590         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3591         for "may only be used in compound statements" diagnostics, change it
3592         such that the same translatable string is used for all pragmas.  For
3593         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3594         diagnostics.
3595         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3596         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3597         "may only be used in compound statements" diagnostics, such that the
3598         same translatable string is used for all pragmas.
3600 2017-03-04  Marek Polacek  <polacek@redhat.com>
3602         PR c/79847
3603         * c-decl.c (implicit_decl_warning): Add missing space.
3605 2017-03-03  Marek Polacek  <polacek@redhat.com>
3607         PR c/79758
3608         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3609         current_function_prototype_arg_types is error_mark_node.  Fix
3610         formatting.  Use TREE_VALUE instead of TREE_TYPE.
3612 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
3614         PR c/79837
3615         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3616         %<min%> or %<max%> in the diagnostics, instead mention identifier.
3617         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3618         diagnostics.
3620         PR c/79836
3621         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3622         instead of %<_Generic>.
3623         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3624         (c_parser_omp_target_exit_data): Use %<release%> instead of
3625         %<release>.
3627 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
3629         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3630         instead of just cond ? "..." : "...".
3631         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3632         for "enter"/"exit" keyword.
3633         (c_finish_oacc_routine): Don't use %s to supply portions of the
3634         message.
3636 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
3638         PR c++/79588
3639         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3640         handle -Wrestrict here.
3641         * c-typeck.c (build_function_call_vec): Adjust
3642         check_function_arguments caller.
3644 2017-02-23  Richard Biener  <rguenther@suse.de>
3646         PR c/79684
3647         * gimple-parser.c (c_parser_gimple_statement): Use set_error
3648         to initialize c_exprs to return.
3649         (c_parser_gimple_binary_expression): Likewise.
3650         (c_parser_gimple_unary_expression): Likewise.
3651         (c_parser_gimple_postfix_expression): Likewise.
3653 2017-02-22  Marek Polacek  <polacek@redhat.com>
3655         PR c/79662
3656         * c-typeck.c (convert_arguments): Handle error_mark_node.
3658 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3660         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3661         value of c_parser_parse_ssa_name against error_mark_node and emit
3662         error if ssa name is anonymous and written as default definition.
3664 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3666         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3667         FMA_EXPR.
3669 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
3671         PR c++/79512
3672         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3673         ignore #pragma omp target even when not followed by identifier.
3675 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3677         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3678         (c_parser_gimple_unary_expression): Likewise.
3680 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
3682         * c-parser.c (c_parser_oacc_declare): Add missing space in
3683         diagnostics.
3685 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3687         PR c/79478
3688         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3689         set_c_expr_source_range when parsing ssa-name.
3691 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
3692             Richard Biener  <rguenther@suse.de>
3694         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3695         building IL when arguments are error_mark_node.
3696         (c_parser_gimple_unary_expression): Likewise.
3697         (c_parser_gimple_if_stmt): Likewise.
3698         (c_parser_gimple_switch_stmt): Likewise.
3699         (c_parser_gimple_return_stmt): Likewise.
3700         (c_parser_parse_ssa_name): When name lookup fails do not build
3701         an SSA name.  Use undeclared rather than not declared in error
3702         reporting.
3704 2017-02-09  Marek Polacek  <polacek@redhat.com>
3706         PR c/79428
3707         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3708         instead of c_parser_skip_until_found.
3710 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
3712         PR c/79431
3713         * c-parser.c (c_parser_omp_declare_target): Don't invoke
3714         symtab_node::get on automatic variables.
3716 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
3717             Chung-Lin Tang  <cltang@codesourcery.com>
3719         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3720         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3721         semantic checking.
3722         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3724 2017-02-07  Richard Biener  <rguenther@suse.de>
3726         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3727         (c_parser_gimple_postfix_expression_after_primary):
3728         Do not use c_build_function_call_vec to avoid folding and promotion.
3729         Simplify.
3731 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
3733         PR lto/79061
3734         * c-decl.c (pop_scope): Pass main_input_filename to
3735         build_translation_unit_decl.
3737 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
3739         * c-parser.c: Include "read-rtl-function.h" and
3740         "run-rtl-passes.h".
3741         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3742         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
3743         production.  Update for renaming of field "gimple_pass" to
3744         "gimple_or_rtl_pass".  If __RTL was seen, call
3745         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
3746         to an auto_timevar, to cope with early exit.
3747         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3748         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3749         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3750         Handle RID_RTL.
3751         (c_parser_parse_rtl_body): New function.
3752         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3753         (struct c_declspecs): Rename field "gimple_pass" to
3754         "gimple_or_rtl_pass".  Add field "rtl_p".
3755         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3756         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3757         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3758         (c_parser_gimple_or_rtl_pass_list): ...this.
3760 2017-01-20  Marek Polacek  <polacek@redhat.com>
3762         PR c/64279
3763         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3765 2017-01-13  Richard Biener  <rguenther@suse.de>
3767         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3768         nops.
3770 2017-01-13  Richard Biener  <rguenther@suse.de>
3772         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3773         _Literal ( type-name ) number.
3775 2017-01-12  Richard Biener  <rguenther@suse.de>
3777         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3778         __MEM.
3780 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
3782         PR c++/72813
3783         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3784         PCH file.
3786 2017-01-11  Richard Biener  <rguenther@suse.de>
3788         PR bootstrap/79052
3789         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3790         returns on parse errors.
3792 2017-01-04  Marek Polacek  <polacek@redhat.com>
3794         PR c++/64767
3795         * c-parser.c (c_parser_postfix_expression): Mark zero character
3796         constants by setting original_type in c_expr.
3797         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3798         with a zero character constant.
3799         (char_type_p): New function.
3801 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
3803         * c-parser.c (c_parser_declaration_or_fndef): Create a
3804         rich_location at init_loc and parse it to start_init.
3805         (last_init_list_comma): New global.
3806         (c_parser_braced_init): Update last_init_list_comma when parsing
3807         commas.  Pass it to pop_init_level.  Pass location of closing
3808         brace to pop_init_level.
3809         (c_parser_postfix_expression_after_paren_type): Create a
3810         rich_location at type_loc and parse it to start_init.
3811         (c_parser_omp_declare_reduction): Likewise for loc.
3812         * c-tree.h (start_init): Add rich_location * param.
3813         (pop_init_level): Add location_t param.
3814         * c-typeck.c (struct initializer_stack): Add field
3815         "missing_brace_richloc".
3816         (start_init): Add richloc param, use it to initialize
3817         the stack node's missing_brace_richloc.
3818         (last_init_list_comma): New decl.
3819         (finish_implicit_inits): Pass last_init_list_comma to
3820         pop_init_level.
3821         (push_init_level): When finding missing open braces, add fix-it
3822         hints to the richloc.
3823         (pop_init_level): Add "insert_before" param and pass it
3824         when calling pop_init_level.  Add fixits about missing
3825         close braces to any richloc.  Use the richloc for the
3826         -Wmissing-braces warning.
3827         (set_designator): Pass last_init_list_comma to pop_init_level.
3828         (process_init_element): Likewise.
3830 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
3832         Update copyright years.
3834 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
3836         PR bootstrap/78817
3837         * c-typeck.c (build_function_call_vec): If check_function_arguments
3838         returns true, set TREE_NO_WARNING on CALL_EXPR.
3840         PR c/77767
3841         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3842         to *expr instead of overwriting it.
3844 2016-12-20  Richard Biener  <rguenther@suse.de>
3846         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3847         error recovery.
3848         (c_parser_gimple_statement): Only build assigns for non-error
3849         stmts.
3850         (c_parser_gimple_postfix_expression_after): Improve error recovery.
3852 2016-12-14  Martin Jambor  <mjambor@suse.cz>
3854         * c-parser.c: Include omp-general.h and omp-offload.h instead of
3855         omp-low.h.
3856         (c_finish_oacc_routine): Adjusted call to
3857         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3858         to use their new names.
3859         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3860         use its new name.
3861         (c_parser_oacc_update): Likewise.
3862         (c_parser_omp_simd): Likewise.
3863         (c_parser_omp_target_update): Likewise.
3864         * c-typeck.c: Include omp-general.h instead of omp-low.h.
3865         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3866         name.
3867         (c_finish_omp_cancellation_point): Likewise.
3868         * gimple-parser.c: Do not include omp-low.h
3870 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
3871             James Norris  <jnorris@codesourcery.com>
3873         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3874         EXIT_DATA,WAIT} are not used in compound statements.
3875         (c_parser_oacc_enter_exit_data): Update diagnostics.
3877 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3879         PR c++/71973
3880         * c-decl.c (diagnose_mismatched_decls): Use
3881         OPT_Wbuiltin_declaration_mismatch here too.
3883 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
3884             Alan Hayward  <alan.hayward@arm.com>
3885             David Sherwood  <david.sherwood@arm.com>
3887         * c-decl.c (merge_decls): Use SET_DECL_MODE.
3888         (make_label, finish_struct): Likewise.
3890 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
3891             Richard Biener  <rguenther@suse.de>
3893         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3894         * config-lang.in (gtfiles): Add c/c-parser.h.
3895         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3896         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3897         * c-parser.c (enum c_id_kind, struct c_token,
3898         c_parser_next_token_is, c_parser_next_token_is_not,
3899         c_parser_next_token_is_keyword,
3900         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3901         Split out to ...
3902         * c-parser.h: ... new header.
3903         * c-parser.c: Include c-parser.h and gimple-parser.h.
3904         (c_parser_peek_token, c_parser_peek_2nd_token,
3905         c_token_starts_typename, c_parser_next_token_starts_declspecs,
3906         c_parser_next_tokens_start_declaration, c_parser_consume_token,
3907         c_parser_error, c_parser_require, c_parser_skip_until_found,
3908         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3909         c_parser_type_name): Export.
3910         (c_parser_tokens_buf): New function.
3911         (c_parser_error): Likewise.
3912         (c_parser_set_error): Likewise.
3913         (c_parser_declspecs): Handle RID_GIMPLE.
3914         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3915         via c_parser_parse_gimple_body.
3916         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3917         c_token_starts_typename, c_parser_next_token_starts_declspecs,
3918         c_parser_next_tokens_start_declaration, c_parser_consume_token,
3919         c_parser_error, c_parser_require, c_parser_skip_until_found,
3920         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3921         c_parser_type_name): Declare.
3922         (struct c_parser): Declare forward.
3923         (c_parser_tokens_buf): Declare.
3924         (c_parser_error): Likewise.
3925         (c_parser_set_error): Likewise.
3926         * gimple-parser.c: New file.
3927         * gimple-parser.h: Likewise.
3929 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3931         PR c/35503
3932         * c-parser.c (c_parser_postfix_expression_after_primary): Call
3933         warn_for_restrict.
3935 2016-09-11  Le-Chun Wu  <lcwu@google.com>
3936             Mark Wielaard  <mjw@redhat.com>
3938         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3939         to the given -Wshadow= variant.
3941 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3943         * c-typeck.c: Include memmodel.h.
3945 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
3947         PR target/77957
3948         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3949         instead of lhd_return_null_tree_v.
3951 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
3953         PR c++/69733
3954         * c-decl.c (smallest_type_quals_location): New static function.
3955         (grokdeclarator): Try to find the correct location for an ignored
3956         qualifier.
3958 2016-09-26  Marek Polacek  <polacek@redhat.com>
3960         PR c/7652
3961         * c-decl.c (pop_scope): Add gcc_fallthrough.
3963 2016-09-26  Marek Polacek  <polacek@redhat.com>
3965         PR c/7652
3966         * c-parser.c (struct c_token): Add flags field.
3967         (c_lex_one_token): Pass it to c_lex_with_flags.
3968         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3969         into IFN_FALLTHROUGH.
3970         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
3971         attribute fallthrough after a case label or default label.
3972         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3974 2016-09-24  Marek Polacek  <polacek@redhat.com>
3976         PR c/77490
3977         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3978         have boolean value.  Warn about ++/-- on booleans.
3980 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
3982         * c-parser.c (incomplete_record_decls): Remove unnecessary
3983         = vNULL initialization of file scope vec.
3985 2016-09-16  Marek Polacek  <polacek@redhat.com>
3987         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3989 2016-09-14  Marek Polacek  <polacek@redhat.com>
3991         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3992         (fix_array_notation_expr): Likewise.
3993         * c-decl.c (finish_decl): Likewise.
3994         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3995         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3996         (function_to_pointer_conversion): Use false instead of 0.
3997         (convert_lvalue_to_rvalue): Likewise.
3998         (parser_build_unary_op): Likewise.
3999         (build_atomic_assign): Likewise.
4000         (build_unary_op): Change nonconvert parameter type to bool, use
4001         true/false instead of 1/0.
4002         (build_binary_op): Use true instead of 1.
4004 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
4006         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4007         of add_fixit_insert to add_fixit_insert_before.
4009 2016-09-13  Marek Polacek  <polacek@redhat.com>
4011         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
4012         it.
4014 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4016         PR c++/77496
4017         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4018         COMPOUND_EXPR to warn_for_omitted_condop.
4020 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
4022         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4023         c_get_substring_location for this new langhook.
4025 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
4027         PR c/65467
4028         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4029         flag_openmp.
4030         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4031         instead of mark_exp_read on low_bound/length expression.
4032         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4033         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4034         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4035         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4036         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4037         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4038         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4039         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4040         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4041         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4042         instead of mark_expr_read.
4043         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4044         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4045         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4046         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4047         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4048         array section bases outside of depend clause, for depend clause
4049         use convert_lvalue_to_rvalue on the base.
4050         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4051         linear, aligned, map, to and from clauses.
4052         (c_omp_clause_copy_ctor): New function.
4054 2016-09-01  Marek Polacek  <polacek@redhat.com>
4056         PR c/7652
4057         * c-typeck.c (composite_type): Add FALLTHRU comment.
4059 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
4061         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4062         to the insertion fixits for "struct", "union", and "enum".
4064 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
4066         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4067         rather than add_fixit_misspelled_id.
4068         (undeclared_variable): Likewise.
4069         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
4070         now-redundant "here" params from add_fixit_insert method calls.
4071         (c_parser_parameter_declaration): Likewise.
4072         * c-typeck.c (build_component_ref): Remove now-redundant range
4073         param from add_fixit_replace method calls.
4075 2016-08-25  Marek Polacek  <polacek@redhat.com>
4077         * c-typeck.c (parser_build_binary_op): Pass LHS to
4078         warn_logical_not_parentheses.
4080 2016-08-25  Marek Polacek  <polacek@redhat.com>
4082         PR c/77323
4083         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4084         or _FloatN or _FloatNx is not supported.
4085         (finish_declspecs): Set type to integer_type_node when _FloatN or
4086         _FloatNx is not supported.
4088 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
4090         PR c/32187
4091         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4092         (struct c_declspecs): Add field floatn_nx_idx.
4093         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4094         and _FloatNx type specifiers.
4095         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4096         (c_parser_declspecs, c_parser_attribute_any_word)
4097         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4098         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4099         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4100         narrower than double.
4102 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
4103             Martin Liska  <mliska@suse.cz>
4105         PR c/67410
4106         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4107         % to determine val element to change.  Assert that
4108         wchar_bytes * charwidth fits into val array.
4110 2016-08-12  Marek Polacek  <polacek@redhat.com>
4112         PR c/7652
4113         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4114         (c_parser_postfix_expression): Likewise.
4115         * c-typeck.c (build_unary_op): Adjust fall through comment.
4116         (c_mark_addressable): Likewise.
4118 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
4120         PR c/72816
4121         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4122         array member through typedef, for orig_qual_indirect == 0 clear
4123         orig_qual_type.
4125 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
4127         PR c/64955
4128         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4129         this up to selftest::run_c_tests.
4130         (selftest::run_c_tests): New function.
4132 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
4134         * c-parser.c (struct oacc_routine_data): Add error_seen and
4135         fndecl_seen members.
4136         (c_finish_oacc_routine): Use these.
4137         (c_parser_declaration_or_fndef): Adjust.
4138         (c_parser_oacc_routine): Likewise.  Support more C language
4139         constructs, and improve diagnostics.  Move pragma context
4140         checking...
4141         (c_parser_pragma): ... here.
4143         * c-parser.c (struct oacc_routine_data): New.
4144         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4145         Simplify code.
4146         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
4147         declare target" attribute.
4149 2016-08-01  Jan Beulich  <jbeulich@suse.com>
4151         * c-fold.c (c_fully_fold_internal): Also emit shift count
4152         warnings for vector types.
4153         * c-typeck.c (build_binary_op): Likewise.
4155 2016-07-29  Marek Polacek  <polacek@redhat.com>
4157         PR c/71742
4158         * c-decl.c (finish_struct): Rephrase an error message.
4160         PR c/71853
4161         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4162         to error node for invalid code.
4164         PR c/71573
4165         * c-decl.c (implicitly_declare): Return decl early not only for
4166         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4168 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
4170         PR c/71969
4171         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4172         on GNU extern inline functions.
4174 2016-07-29  Marek Polacek  <polacek@redhat.com>
4176         PR c/71583
4177         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4178         check expr.value.
4180 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
4182         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4184 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
4186         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4187         spellcheck-tree.h
4188         (best_macro_match): Likewise, converting from a typedef to a
4189         subclass.
4190         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4191         (lookup_name_fuzzy): Update for change of best_macro_match to a
4192         subclass with a ctor that calls cpp_forall_identifiers.
4194 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
4196         * c-decl.c (implicit_decl_warning): Update for conversion of
4197         return type of lookup_name_fuzzy to const char *.
4198         (undeclared_variable): Likewise.
4199         (lookup_name_fuzzy): Convert return type from tree to
4200         const char *.
4201         * c-parser.c (c_parser_declaration_or_fndef): Update for
4202         conversion of return type of lookup_name_fuzzy to const char *.
4203         (c_parser_parameter_declaration): Likewise.
4205 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
4207         * c-parser.c (c_parser_oacc_declare): Don't scan for
4208         GOMP_MAP_POINTER.
4209         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4210         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4211         zero-length subarrays.
4213 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
4215         PR c/71858
4216         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4217         instead of FUZZY_LOOKUP_NAME.
4218         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4219         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4221 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
4223         PR c/71858
4224         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4226 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
4228         * c-parser.c (c_parser_generic_selection): Make type of variable
4229         auto_vec.
4230         (c_parser_omp_declare_simd): Likewise.
4232 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
4234         * c-decl.c (struct c_struct_parse_info): Change member types
4235         from vec to auto_vec.
4236         (start_struct): Adjust.
4237         (finish_struct): Likewise.
4239 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
4241         PR c/71719
4242         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4244 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
4246         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4247         Move pragma context checking into...
4248         (c_parser_omp_cancellation_point): ... here, and improve
4249         diagnostic messages.
4250         * c-typeck.c (c_finish_omp_cancel)
4251         (c_finish_omp_cancellation_point): Improve diagnostic messages.
4253 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
4255         PR c/71685
4256         * c-typeck.c (c_build_qualified_type): Don't clear
4257         C_TYPE_INCOMPLETE_VARS for the main variant.
4259 2016-06-28  Martin Sebor  <msebor@redhat.com>
4261         PR c/71552
4262         * c-typeck.c (output_init_element): Diagnose incompatible types
4263         before non-constant initializers.
4265 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
4267         * Make-lang.in: Don't cat ../stage_current if it does not exist.
4269 2016-06-23  Andi Kleen  <ak@linux.intel.com>
4271         * Make-lang.in: Add support for autofdo.
4273 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
4275         PR c/70339
4276         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4277         (implicit_decl_warning): When issuing warnings for implicit
4278         declarations, attempt to provide a suggestion via
4279         lookup_name_fuzzy.
4280         (undeclared_variable): Likewise when issuing errors.
4281         (lookup_name_in_scope): Likewise.
4282         (struct edit_distance_traits<cpp_hashnode *>): New struct.
4283         (best_macro_match): New typedef.
4284         (find_closest_macro_cpp_cb): New function.
4285         (lookup_name_fuzzy): New function.
4286         * c-parser.c: Include gcc-rich-location.h.
4287         (c_token_starts_typename): Split out case CPP_KEYWORD into...
4288         (c_keyword_starts_typename): ...this new function.
4289         (c_parser_declaration_or_fndef): When issuing errors about
4290         missing "struct" etc, add a fixit.  For other kinds of errors,
4291         attempt to provide a suggestion via lookup_name_fuzzy.
4292         (c_parser_parms_declarator): When looking ahead to detect typos in
4293         type names, also reject CPP_KEYWORD.
4294         (c_parser_parameter_declaration): When issuing errors about
4295         unknown type names, attempt to provide a suggestion via
4296         lookup_name_fuzzy.
4297         * c-tree.h (c_keyword_starts_typename): New prototype.
4299 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
4301         PR c/71601
4302         * c-typeck.c (build_conditional_expr): Return error_mark_node if
4303         c_common_type returns error_mark_node.
4305 2016-06-19  Martin Sebor  <msebor@redhat.com>
4307         PR c/69507
4308         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4309         __alignof__ (expression).
4311 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
4313         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4315 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
4317         * c-typeck.c (build_component_ref): Simplify fixit code by
4318         using gcc_rich_location::add_fixit_misspelled_id.
4319         (set_init_label): Likewise.
4321 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
4323         * c-parser.c (c_parser_initelt): Provide location of name for new
4324         location_t param of set_init_label.
4325         * c-tree.h (set_init_label): Add location_t param.
4326         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4327         param and use it when issuing error messages about unrecognized
4328         field names.  Attempt to provide a fixit hint if appropriate,
4329         otherwise update the error message to provide the type name.
4331 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
4333         PR c/71381
4334         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4335         Loosen checking.
4337 2016-06-08  Martin Sebor  <msebor@redhat.com>
4338             Jakub Jelinek  <jakub@redhat.com>
4340         PR c++/70507
4341         PR c/68120
4342         * c-typeck.c (convert_arguments): Don't promote last argument
4343         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4345 2016-06-08  Marek Polacek  <polacek@redhat.com>
4347         PR c/71418
4348         * c-decl.c (grokdeclarator): Check TYPE_P.
4350         PR c/71426
4351         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4352         code.
4354 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
4356         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4357         and structure element reference, capture the location of the
4358         element name token and pass it to build_component_ref.
4359         (c_parser_postfix_expression_after_primary): Likewise for
4360         structure element dereference.
4361         (c_parser_omp_variable_list): Likewise for
4362         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4363         * c-tree.h (build_component_ref): Add location_t param.
4364         * c-typeck.c (build_component_ref): Add location_t param
4365         COMPONENT_LOC.  Use it, if available, when issuing hints about
4366         mispelled member names to provide a fixit replacement hint.
4368 2016-06-06  Marek Polacek  <polacek@redhat.com>
4370         PR c/71362
4371         * c-parser.c (c_parser_direct_declarator): Set location.
4373 2016-06-06  Marek Polacek  <polacek@redhat.com>
4375         * c-typeck.c (comptypes_internal): Handle comparisons of
4376         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
4377         TYPE_REF_CAN_ALIAS_ALL.
4379 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
4381         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4382         arguments as addressable when async clause exists.
4384 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
4386         PR c++/71349
4387         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4388         when combined with target construct.
4390 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
4392         * c-parser.c (c_parser_omp_clause_schedule): Warn if
4393         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4395 2016-05-25  Marek Polacek  <polacek@redhat.com>
4397         PR c/71265
4398         * c-decl.c (c_make_fname_decl): Don't check seen_error.
4400         PR c/71266
4401         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4403 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
4405         * c-parser.c (c_parser_oacc_declare): Add support for
4406         GOMP_MAP_FIRSTPRIVATE_POINTER.
4407         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4408         argument with enum c_omp_region_type ort.
4409         (handle_omp_array_sections): Likewise.  Update call to
4410         handle_omp_array_sections_1.
4411         (c_finish_omp_clauses): Add specific errors and warning messages for
4412         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
4413         call to handle_omp_array_sections.
4415 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
4417         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4419 2016-05-24  Richard Biener  <rguenther@suse.de>
4421         PR middle-end/70434
4422         PR c/69504
4423         * c-typeck.c (build_array_ref): Do not complain about indexing
4424         non-lvalue vectors.  Adjust for function name change.
4426 2016-05-20  Martin Sebor  <msebor@redhat.com>
4428         PR c/71115
4429         * c-typeck.c (error_init): Use
4430         expansion_point_location_if_in_system_header.
4431         (warning_init): Same.
4433 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
4435         PR c/71171
4436         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4437         in error-handling.
4438         (c_parser_postfix_expression): Likewise.
4439         * c-tree.h (c_expr::set_error): New method.
4440         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4441         that result's range is initialized.
4443 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
4445         * c-typeck.c (parser_build_unary_op): Fix formatting.
4447 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
4449         * c-decl.c (grokdeclarator): Remove errmsg and use of
4450         targetm.invalid_return_type.
4451         (grokparms): Remove errmsg and use of
4452         targetm.invalid_parameter_type.
4454 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
4456         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4457         function return type.
4459 2016-05-12  Marek Polacek  <polacek@redhat.com>
4461         PR c/70756
4462         * c-decl.c (build_compound_literal): Pass LOC down to
4463         c_incomplete_type_error.
4464         * c-tree.h (require_complete_type): Adjust declaration.
4465         (c_incomplete_type_error): Likewise.
4466         * c-typeck.c (require_complete_type): Add location parameter, pass it
4467         down to c_incomplete_type_error.
4468         (c_incomplete_type_error): Add location parameter, pass it down to
4469         error_at.
4470         (build_component_ref): Pass location down to c_incomplete_type_error.
4471         (default_conversion): Pass location down to require_complete_type.
4472         (build_array_ref): Likewise.
4473         (build_function_call_vec): Likewise.
4474         (convert_arguments): Likewise.
4475         (build_unary_op): Likewise.
4476         (build_c_cast): Likewise.
4477         (build_modify_expr): Likewise.
4478         (convert_for_assignment): Likewise.
4479         (c_finish_omp_clauses): Likewise.
4481 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
4483         PR c/43651
4484         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4485         is enabled.
4486         * c-errors.c (pedwarn_c90): Return true if warned.
4487         * c-tree.h (pedwarn_c90): Change return type to bool.
4488         (enum c_declspec_word): Add new enumerator cdw_atomic.
4490 2016-05-11  Marek Polacek  <polacek@redhat.com>
4492         PR c++/71024
4493         * c-decl.c (diagnose_mismatched_decls): Factor out code to
4494         diagnose_mismatched_attributes and call it.
4496 2016-05-10  Marek Polacek  <polacek@redhat.com>
4498         PR c/70255
4499         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4500         on a declaration following the definition.
4502 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
4504         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4505         parse it through to c_parser_c99_block_statement.
4506         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4507         caller.
4509 2016-05-04  Marek Polacek  <polacek@redhat.com>
4511         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4512         OPT_Wdangling_else.
4514 2016-05-04  Marek Polacek  <polacek@redhat.com>
4516         PR c/48778
4517         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4518         for macro expansions.
4520 2016-05-03  Marek Polacek  <polacek@redhat.com>
4522         PR c/70859
4523         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4524         check_builtin_function_arguments.
4526 2016-05-03  Richard Biener  <rguenther@suse.de>
4528         * Make-lang.in (cc1-checksum.c): For stage-final re-use
4529         the checksum from the previous stage.
4531 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
4533         * c-parser.c (c_parser_oacc_all_clauses): Update call to
4534         c_finish_omp_clauses.
4535         (c_parser_omp_all_clauses): Likewise.
4536         (c_parser_oacc_cache): Likewise.
4537         (c_parser_oacc_loop): Likewise.
4538         (omp_split_clauses): Likewise.
4539         (c_parser_omp_declare_target): Likewise.
4540         (c_parser_cilk_all_clauses): Likewise.
4541         (c_parser_cilk_for): Likewise.
4542         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4543         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4545 2016-05-02  Marek Polacek  <polacek@redhat.com>
4547         PR c/70851
4548         * c-decl.c (grokdeclarator): Diagnose when array's size has an
4549         incomplete type.
4551 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
4553         PR middle-end/70626
4554         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4555         OACC_LOOP_CLAUSE_MASK.
4556         (c_parser_oacc_kernels_parallel): Update call to
4557         c_oacc_split_loop_clauses.
4559 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
4561         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4562         argument to build_modify_expr in two cases.
4564 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
4566         * c-parser.c (c_parser_postfix_expression_after_primary): Call
4567         warn_for_memset instead of warning directly here.
4569 2016-04-26  Marek Polacek  <polacek@redhat.com>
4571         PR c/67784
4572         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4573         out of ...
4574         (c_parser_for_statement): ... here.
4575         (c_parser_if_statement): Use it.
4576         (c_parser_switch_statement): Use it.
4577         (c_parser_while_statement): Use it.
4579         PR c/70791
4580         * c-decl.c (pushdecl): Pass LOCUS down to warning.
4582 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
4584         PR c++/69363
4585         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4586         instead of c_finish_cilk_clauses.
4587         * c-tree.h (c_finish_omp_clauses): Add new default argument.
4588         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
4589         floating-point variables in the linear clause for Cilk Plus.
4591 2016-04-18  Michael Matz  <matz@suse.de>
4593         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4594         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4596 2016-04-15  Marek Polacek  <polacek@redhat.com>
4598         PR c/70671
4599         * c-typeck.c (build_unary_op): Pass location down to error and
4600         warning call.
4602 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
4604         PR c/70436
4605         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4606         where needed.
4607         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4608         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4609         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4610         Adjust c_parser_pragma callers.
4611         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
4612         caller.
4613         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4614         c_parser_statement.
4615         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4616         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4617         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4618         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4619         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4620         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4621         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4622         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4623         down where needed.
4624         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
4625         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4626         calls.
4628 2016-04-13  Marek Polacek  <polacek@redhat.com>
4630         PR c/70436
4631         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4632         adjust callers.
4633         (c_parser_statement): Likewise.
4634         (c_parser_c99_block_statement): Likewise.
4635         (c_parser_while_statement): Likewise.
4636         (c_parser_for_statement): Likewise.
4637         (c_parser_if_body): Don't set IF_P here.
4638         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
4639         about dangling else here.
4640         * c-tree.h (c_finish_if_stmt): Adjust declaration.
4641         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
4642         warn about dangling else here.
4644 2016-04-04  Marek Polacek  <polacek@redhat.com>
4646         PR c/70307
4647         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4649 2016-03-31  Marek Polacek  <polacek@redhat.com>
4651         PR c/70297
4652         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4654 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
4656         PR c/70281
4657         * c-parser.c (c_parser_postfix_expression): Set the source range
4658         for uses of "__builtin_types_compatible_p".
4660 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
4662         PR c/70280
4663         * c-typeck.c (composite_type): Don't count void_list_node
4664         into len, if the list is terminated by void_list_node, start
4665         with void_list_node instead of NULL for newargs.  Stop
4666         at void_list_node.
4668 2016-03-16  Marek Polacek  <polacek@redhat.com>
4670         PR c/70093
4671         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4672         nested functions returning VM types.
4674 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
4676         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4677         when calling c_finish_omp_clauses.
4679 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
4681         PR c/69824
4682         * c-decl.c (get_parm_info): Don't queue implicit function declarations
4683         for later.
4685 2016-03-04  Marek Polacek  <polacek@redhat.com>
4687         PR c/69798
4688         * c-parser.c (c_parser_postfix_expression): Call
4689         c_parser_cast_expression rather than c_parser_postfix_expression.
4691 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
4693         PR c/69796
4694         PR c/69974
4695         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4696         of incomplete decls to error_mark_node.
4698 2016-02-24  Marek Polacek  <polacek@redhat.com>
4700         PR c/69819
4701         * c-decl.c (finish_decl): Don't update the copy of the type of a
4702         different decl type.
4704 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
4706         PR objc/69844
4707         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4708         in id_kind reclassification.
4710 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
4712         PR c/69835
4713         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4715 2016-02-16  James Norris  <jnorris@codesourcery.com>
4717         PR c/64748
4718         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4720 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
4722         * c-decl.c (build_null_declspecs): Zero the entire struct.
4724         PR c/69522
4725         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
4726         callers changed.  If nested_p is true, use it to call
4727         finish_implicit_inits.
4728         * c-tree.h (finish_implicit_inits): Declare.
4729         * c-typeck.c (finish_implicit_inits): New function.  Move code
4730         from ...
4731         (push_init_level): ... here.
4732         (set_designator, process_init_element): Call finish_implicit_inits.
4734 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
4736         PR c/69768
4737         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4738         arguments for -Waddress warning.
4740 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
4742         PR c/69669
4743         * c-decl.c (finish_enum): When honoring mode attribute,
4744         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4746 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
4748         PR debug/69518
4749         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4750         all type variants, not just TYPE_MAIN_VARIANT.
4752 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
4754         PR debug/66869
4755         * c-decl.c (c_write_global_declarations_1): Warn with
4756         warn_unused_function if static prototype without definition
4757         is not C_DECL_USED.
4759 2016-01-27  Marek Polacek  <polacek@redhat.com>
4761         PR c/68062
4762         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4763         to unsigned, if needed.  Add -Wsign-compare warning.
4765 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
4767         PR tree-optimization/69483
4768         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4770 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4772         PR c/24293
4773         * c-tree.h (incomplete_record_decls): Declare.
4774         * c-parser.c (incomplete_record_decls): Define.
4775         (c_parser_translation_unit): Iterate through incomplete_record_decls and
4776         report error if any decl has zero size.
4777         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4778         or enum type to incomplete_record_decls.
4780 2016-01-14  Tom de Vries  <tom@codesourcery.com>
4782         PR tree-optimization/68773
4783         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4784         set force_output.
4786 2016-01-14  Marek Polacek  <polacek@redhat.com>
4788         PR c/69262
4789         * c-decl.c (grokdeclarator): Provide more information for invalid
4790         array declarations.
4792 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
4794         * c-parser.c (c_parser_unary_expression): For dereferences, build
4795         a combined location before calling build_indirect_ref, so that
4796         error reports cover the full range, manually updating the c_expr
4797         src_range.
4799 2016-01-06  Marek Polacek  <polacek@redhat.com>
4801         PR sanitizer/69099
4802         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
4803         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
4804         NULL.
4806 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
4808         Update copyright years.
4810 2016-01-04  Marek Polacek  <polacek@redhat.com>
4812         PR c/68908
4813         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
4814         optimization to use __atomic_fetch_* built-in if possible.
4816 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
4818         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4819         into...
4820         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
4821         all users.
4823 2015-12-22  Marek Polacek  <polacek@redhat.com>
4825         PR c/69002
4826         * c-typeck.c (build_component_ref): Warn when acessing elements of
4827         atomic structures or unions.
4829 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
4831         * c-typeck.c: Include "gcc-rich-location.h".
4832         (build_binary_op): In the two places that call binary_op_error,
4833         create a gcc_rich_location and populate it with the location of
4834         the binary op and its two operands.
4836 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
4838         * c-parser.c (c_parser_statement_after_labels): When calling
4839         c_finish_return, Use the return expression's location if it has
4840         one, falling back to the location of the first token within it.
4841         * c-typeck.c (c_finish_return): When issuing warnings about
4842         the incorrect presence/absence of a return value, issue a note
4843         showing the declaration of the function.
4845 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
4847         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4848         to 4.
4849         (c_parser_peek_nth_token): New function.
4850         (c_parser_peek_conflict_marker): New function.
4851         (c_parser_error): Detect conflict markers and report them as such.
4853 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
4855         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4856         to preserve range information for the primary expression
4857         in the call to c_parser_postfix_expression_after_primary.
4859 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
4861         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4862         expression location, falling back on the first token location,
4863         rather than always using the latter.
4865 2015-12-16  Marek Polacek  <polacek@redhat.com>
4867         PR c/64637
4868         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4869         available.
4871 2015-12-15  Marek Polacek  <polacek@redhat.com>
4873         PR c/68907
4874         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4875         artificial decl.
4877 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
4879         * c-parser.c (c_parser_alignof_expression): Capture location of
4880         closing parenthesis (if any), or of end of unary expression, and
4881         use it to build a src_range for the expression.
4883 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
4885         PR c/68757
4886         * c-parser.c (c_parser_get_builtin_args): Add
4887         "out_close_paren_loc" param, and write back to it.
4888         (c_parser_postfix_expression): Capture the closing
4889         parenthesis location for RID_CHOOSE_EXPR,
4890         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4891         RID_BUILTIN_SHUFFLE and use it to set the source range
4892         for such expressions; within RID_BUILTIN_COMPLEX set
4893         the underlying location.
4895 2015-12-07  Marek Polacek  <polacek@redhat.com>
4897         PR c/68668
4898         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4899         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4901 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
4903         * c-tree.h (c_build_va_arg): Adjust prototype.
4904         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4905         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4906         parameter, adjust throughout and issue an error if EXPR is a component
4907         with reverse storage order.
4909 2015-12-02  Jason Merrill  <jason@redhat.com>
4911         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4912         (c_fully_fold_internal, decl_constant_value_for_optimization):
4913         Move from c-common.c.
4914         * c-tree.h: Declare decl_constant_value_for_optimization.
4915         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4917 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
4919         PR c/68162
4920         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4921         following link from declarator to next declarator.  Track original
4922         qualified type and pass it to c_build_qualified_type.
4923         * c-typeck.c (c_build_qualified_type): Add arguments
4924         orig_qual_type and orig_qual_indirect.
4926 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
4928         * c-parser.c (c_parser_omp_clause_name)
4929         (c_parser_oacc_all_clauses): Alphabetical sorting.
4931 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
4933         PR c/68533
4934         * c-decl.c (get_parm_info): Use b->locus instead of input_location
4935         for diagnostics.
4937 2015-12-01  Julian Brown  <julian@codesourcery.com>
4938             Cesar Philippidis  <cesar@codesourcery.com>
4939             James Norris  <James_Norris@mentor.com>
4941         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4942         (c_parser_oacc_clause_use_device): New function.
4943         (c_parser_oacc_all_clauses): Add use_device support.
4944         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4945         (c_parser_oacc_host_data): New function.
4946         (c_parser_omp_construct): Add host_data support.
4947         * c-tree.h (c_finish_oacc_host_data): Add prototype.
4948         * c-typeck.c (c_finish_oacc_host_data): New function.
4949         (c_finish_omp_clauses): Add use_device support.
4951 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
4953         PR c/67106
4954         * c-decl.c: Set TYPE_PACKED in variants.
4956 2015-11-27  Martin Liska  <mliska@suse.cz>
4958         PR c++/68312
4959         * c-array-notation.c (fix_builtin_array_notation_fn):
4960         Use release_vec_vec instead of vec::release.
4961         (build_array_notation_expr): Likewise.
4962         (fix_conditional_array_notations_1): Likewise.
4963         (fix_array_notation_expr): Likewise.
4964         (fix_array_notation_call_expr): Likewise.
4966 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
4968         PR c/63326
4969         * c-parser.c (c_parser_compound_statement_nostart): If
4970         last_label is true, use pragma_stmt instead of pragma_compound
4971         as second c_parser_pragma argument.
4972         (c_parser_omp_ordered, c_parser_omp_target_update,
4973         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4974         false as second argument to c_parser_skip_to_pragma_eol after
4975         diagnosing standalone directives used in pragma_stmt context.
4977 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
4979         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4980         with "if (ENABLE_OFFLOADING)".
4982 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
4984         PR objc/68438
4985         * c-parser.c (c_parser_postfix_expression): Set up source ranges
4986         for various Objective-C constructs: Class.name syntax,
4987         @selector(), @protocol(), @encode(), and [] message syntax.
4989 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
4991         PR 62314
4992         * c-typeck.c (should_suggest_deref_p): New function.
4993         (build_component_ref): Special-case POINTER_TYPE when
4994         generating a "not a structure of union"  error message, and
4995         suggest a "->" rather than a ".", providing a fix-it hint.
4997 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
4999         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5000         candidate into a new function, find_closest_identifier.
5002 2015-11-19  Marek Polacek  <polacek@redhat.com>
5004         PR c/68412
5005         * c-typeck.c (parser_build_binary_op): Properly handle
5006         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5008 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
5010         * c-parser.c (set_c_expr_source_range): Bulletproof both
5011         overloaded implementations against NULL expr->value.
5012         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5013         values.
5014         (c_parser_unary_expression): Likewise when handling addresses of
5015         labels.
5016         (c_parser_postfix_expression): Likewise for statement expressions,
5017         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5018         __builtin_va_arg, and for __builtin_offset_of.
5019         (c_parser_postfix_expression_after_paren_type): Initialize expr's
5020         src_range using the range of the braced initializer.
5021         (c_parser_transaction_expression): Set src_range for "ret" to a
5022         sane pair of values.
5024 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
5026         * c-parser.c (c_finish_omp_declare_simd): Look for
5027         "simd" attribute as well. Update error message.
5029 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
5031         * c-parser.c (c_parser_omp_declare_target): Adjust.
5033 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
5035         * c-typeck.c (c_finish_omp_clauses): Don't mark
5036         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5038 2015-11-14  Marek Polacek  <polacek@redhat.com>
5040         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5041         * c-typeck.c: Likewise.
5043 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
5045         * c-decl.c (warn_defaults_to): Pass line_table to
5046         rich_location ctor.
5047         * c-errors.c (pedwarn_c99): Likewise.
5048         (pedwarn_c90): Likewise.
5049         * c-parser.c (set_c_expr_source_range): New functions.
5050         (c_token::get_range): New method.
5051         (c_token::get_finish): New method.
5052         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5053         based on the range from the start of the LHS to the end of the
5054         RHS.
5055         (c_parser_conditional_expression): Likewise, based on the range
5056         from the start of the cond.value to the end of exp2.value.
5057         (c_parser_binary_expression): Call set_c_expr_source_range on
5058         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5059         (c_parser_cast_expression): Call set_c_expr_source_range on ret
5060         based on the cast_loc through to the end of the expr.
5061         (c_parser_unary_expression): Likewise, based on the
5062         op_loc through to the end of op.
5063         (c_parser_sizeof_expression) Likewise, based on the start of the
5064         sizeof token through to either the closing paren or the end of
5065         expr.
5066         (c_parser_postfix_expression): Likewise, using the token range,
5067         or from the open paren through to the close paren for
5068         parenthesized expressions.
5069         (c_parser_postfix_expression_after_primary): Likewise, for
5070         various kinds of expression.
5071         * c-tree.h (struct c_expr): Add field "src_range".
5072         (c_expr::get_start): New method.
5073         (c_expr::get_finish): New method.
5074         (set_c_expr_source_range): New decls.
5075         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5076         on ret for prefix unary ops.
5077         (parser_build_binary_op): Likewise, running from the start of
5078         arg1.value through to the end of arg2.value.
5080 2015-11-13  Marek Polacek  <polacek@redhat.com>
5082         PR c/68320
5083         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5085 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
5087         * c-typeck.c: Include spellcheck.h.
5088         (lookup_field_fuzzy_find_candidates): New function.
5089         (lookup_field_fuzzy): New function.
5090         (build_component_ref): If the field was not found, try using
5091         lookup_field_fuzzy and potentially offer a suggestion.
5093 2015-11-12  James Norris  <jnorris@codesourcery.com>
5094             Joseph Myers  <joseph@codesourcery.com>
5096         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5097         (c_parser_omp_clause_name): Handle 'device_resident' clause.
5098         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5099         and PRAGMA_OMP_CLAUSE_LINK.
5100         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5101         and PRAGMA_OACC_CLAUSE_LINK.
5102         (OACC_DECLARE_CLAUSE_MASK): New definition.
5103         (c_parser_oacc_declare): New function.
5105 2015-11-12  Marek Polacek  <polacek@redhat.com>
5107         PR c/67784
5108         * c-parser.c (c_parser_for_statement): Reclassify the token in
5109         a correct scope.
5111 2015-11-11  Marek Polacek  <polacek@redhat.com>
5113         PR c/68107
5114         PR c++/68266
5115         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
5116         checking the size of an array.
5118 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
5120         * c-array-notation.c: Remove unused header files.
5121         * c-aux-info.c: Likewise.
5122         * c-convert.c: Likewise.
5123         * c-decl.c: Likewise.
5124         * c-errors.c: Likewise.
5125         * c-lang.c: Likewise.
5126         * c-objc-common.c: Likewise.
5127         * c-parser.c: Likewise.
5128         * c-typeck.c: Likewise.
5129         * gccspec.c: Likewise.
5131 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
5132             Cesar Philippidis  <cesar@codesourcery.com>
5133             James Norris  <jnorris@codesourcery.com>
5134             Julian Brown  <julian@codesourcery.com>
5135             Nathan Sidwell  <nathan@codesourcery.com>
5137         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5138         routine arg.
5139         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5140         (c_parser_pragma): Parse 'acc routine'.
5141         (OACC_ROUTINE_CLAUSE_MARK): Define.
5142         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5144 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5146         PR debug/67192
5147         * c-typeck.c (c_finish_loop): For unconditional loops, set the
5148         location of the backward-goto to the start of the loop body.
5150 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5152         PR debug/67192
5153         * c-parser.c (c_parser_while_statement): Finish the loop before
5154         parsing ahead for misleading indentation.
5155         (c_parser_for_statement): Likewise.
5157 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
5159         * c-decl.c (finish_struct): If the structure has reverse storage
5160         order, rewrite the type of array fields with scalar component.  Call
5161         maybe_apply_pragma_scalar_storage_order on entry.
5162         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
5163         errors on bit-fields and reverse SSO here and not...
5164         (c_mark_addressable): ...here.
5165         (output_init_element): Adjust call to initializer_constant_valid_p.
5166         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5168 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
5170         * c-decl.c (warn_defaults_to): Update for change in signature
5171         of diagnostic_set_info.
5172         * c-errors.c (pedwarn_c99): Likewise.
5173         (pedwarn_c90): Likewise.
5174         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5175         for textinfo::set_location.
5177 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
5178             Thomas Schwinge  <thomas@codesourcery.com>
5179             James Norris  <jnorris@codesourcery.com>
5181         * c-parser.c (c_parser_omp_clause_name): Add support for
5182         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5183         (c_parser_omp_clause_default): Add is_oacc argument. Handle
5184         default(none) in OpenACC.
5185         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5186         arguments.
5187         (c_parser_oacc_clause_tile): New function.
5188         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5189         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5190         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5191         TILE}.
5192         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5193         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5194         FIRSTPRIVATE}.
5195         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5196         (c_parser_oacc_update): Update the error message for missing clauses.
5197         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5198         and OMP_CLAUSE_INDEPENDENT.
5200 2015-11-05  Marek Polacek  <polacek@redhat.com>
5202         PR c/68090
5203         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5204         deal with pre-evaluation on invalid types.
5206 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
5207             Ilya Verbin  <ilya.verbin@intel.com>
5209         * c-parser.c: Include context.h and gimple-expr.h.
5210         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5211         monotonic together with nonmonotonic.
5212         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
5213         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5214         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5215         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5216         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
5217         expressions on combined target teams before the target.
5218         (c_parser_omp_declare_target): If decl has "omp declare target" or
5219         "omp declare target link" attribute, and cgraph or varpool node already
5220         exists, then set corresponding flags.  Call c_finish_omp_clauses
5221         in the parenthesized extended-list syntax case.
5222         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5223         declare target.
5224         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5225         on OMP_CLAUSE_REDUCTION array sections.
5226         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5227         into the constant offset, or for variable low-bound using
5228         POINTER_PLUS_EXPR.  For structure element based array sections use
5229         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5230         (c_finish_omp_clauses): Drop generic_field_head, structure
5231         elements are now always mapped even as array section bases,
5232         diagnose same var in data sharing and mapping clauses.  Diagnose if
5233         linear step on declare simd is neither a constant nor a uniform
5234         parameter.  Look through POINTER_PLUS_EXPR for array section
5235         reductions.  Diagnose the same var or function appearing multiple
5236         times on the same directive.  Fix up wording for the to clause if t
5237         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
5238         modifier on kinds other than dynamic or guided or nonmonotonic
5239         modifier together with ordered clause.
5241 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
5242             Chung-Lin Tang  <cltang@codesourcery.com>
5244         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5246 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
5248         * c-array-notation.c: Reorder #include's and remove duplicates.
5249         * c-aux-info.c: Likewise.
5250         * c-convert.c: Likewise.
5251         * c-decl.c: Likewise.
5252         * c-errors.c: Likewise.
5253         * c-lang.c: Likewise.
5254         * c-objc-common.c: Likewise.
5255         * c-parser.c: Likewise.
5256         * c-typeck.c: Likewise.
5258 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
5260         PR debug/66068
5261         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5262         after calling build_qualified_type.
5264 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
5265             Thomas Schwinge  <thomas@codesourcery.com>
5266             James Norris  <jnorris@codesourcery.com>
5267             Joseph Myers  <joseph@codesourcery.com>
5268             Julian Brown  <julian@codesourcery.com>
5269             Bernd Schmidt  <bschmidt@redhat.com>
5271         * c-parser.c (c_parser_oacc_shape_clause): New.
5272         (c_parser_oacc_simple_clause): New.
5273         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5274         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5276 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
5277             James Norris  <jnorris@codesourcery.com>
5278             Cesar Philippidis  <cesar@codesourcery.com>
5280         PR c/64765
5281         PR c/64880
5282         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5283         parameters, and handle these.  Adjust all users.
5284         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5285         into...
5286         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
5287         all users.
5288         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5289         declare functions.
5290         (c_finish_omp_construct): Declare function.
5291         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5292         Merge functions into...
5293         (c_finish_omp_construct): ... this new function.
5295 2015-10-22  Richard Biener  <rguenther@suse.de>
5297         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5298         before folding a MINUS_EXPR.
5300 2015-10-21  Marek Polacek  <polacek@redhat.com>
5302         PR c/68024
5303         * c-decl.c (start_function): Warn about vararg functions without
5304         a prototype.
5306 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
5308         * c-typeck.c (build_conditional_expr): Use boolean vector
5309         type for vector comparison.
5310         (build_vec_cmp): New.
5311         (build_binary_op): Use build_vec_cmp for comparison.
5313 2015-10-20  Marek Polacek  <polacek@redhat.com>
5315         * c-parser.c (is_cilkplus_vector_p): Don't define here.
5317 2015-10-20  Marek Polacek  <polacek@redhat.com>
5319         PR c/67964
5320         * c-parser.c (c_parser_attributes): Break out of the loop if the
5321         token after an attribute isn't a comma.
5323 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
5324             Aldy Hernandez  <aldyh@redhat.com>
5326         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5327         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5328         (c_parser_omp_variable_list): Handle structure elements for
5329         map, to and from clauses.  Handle array sections in reduction
5330         clause.  Formatting fixes.
5331         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5332         if clause modifiers.
5333         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5334         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5335         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5336         c_parser_omp_clause_is_device_ptr): New functions.
5337         (c_parser_omp_clause_ordered): Parse optional parameter.
5338         (c_parser_omp_clause_reduction): Handle array reductions.
5339         (c_parser_omp_clause_schedule): Parse optional simd modifier.
5340         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5341         functions.
5342         (c_parser_omp_clause_linear): Parse linear clause modifiers.
5343         (c_parser_omp_clause_depend_sink): New function.
5344         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5345         (c_parser_omp_clause_map): Parse release/delete map kinds and
5346         optional always modifier.
5347         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5348         and c_finish_omp_clauses callers.
5349         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
5350         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5351         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5352         (OMP_CRITICAL_CLAUSE_MASK): Define.
5353         (c_parser_omp_critical): Parse critical clauses.
5354         (c_parser_omp_for_loop): Handle doacross loops, adjust
5355         c_finish_omp_for and c_finish_omp_clauses callers.
5356         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5357         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5358         (OMP_FOR_CLAUSE_MASK): Add linear clause.
5359         (c_parser_omp_for): Disallow ordered clause when combined with
5360         distribute.  Disallow linear clause when combined with distribute
5361         and not combined with simd.
5362         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5363         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5364         parse clauses and if depend clause is found, don't parse a body.
5365         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5366         Allow target parallel without for after it.
5367         (OMP_TASK_CLAUSE_MASK): Add priority clause.
5368         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5369         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5370         invalid kinds.
5371         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5372         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5373         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5374         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5375         functions.
5376         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5377         defaultmap and is_device_ptr clauses.
5378         (c_parser_omp_target): Parse target parallel and target simd.  Set
5379         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
5380         and target exit data.  Diagnose invalid map kinds.
5381         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5382         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5383         construct.
5384         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5385         &omp_priv.
5386         (OMP_TASKLOOP_CLAUSE_MASK): Define.
5387         (c_parser_omp_taskloop): New function.
5388         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5389         handle PRAGMA_OMP_TASKLOOP.
5390         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5391         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5392         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5393         Add IS_OMP argument, handle structure element bases, diagnose
5394         bitfields, pass IS_OMP recursively, diagnose known zero length
5395         array sections in depend clauses, handle array sections in reduction
5396         clause, diagnose negative length even for pointers.
5397         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5398         types, pass IS_OMP down to handle_omp_array_sections_1, handle
5399         array sections in reduction clause, set
5400         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5401         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5402         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5403         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5405 2015-10-06  Marek Polacek  <polacek@redhat.com>
5407         * c-parser.c (c_parser_statement_after_labels): Use
5408         protected_set_expr_location.
5409         (c_parser_omp_clause_num_gangs): Likewise.
5410         (c_parser_omp_clause_num_threads): Likewise.
5411         (c_parser_omp_clause_num_workers): Likewise.
5412         (c_parser_omp_clause_vector_length): Likewise.
5413         (c_parser_omp_clause_num_teams): Likewise.
5414         (c_parser_omp_clause_thread_limit): Likewise.
5415         * c-typeck.c (build_c_cast): Likewise.
5416         (c_cast_expr): Likewise.
5418 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
5420         * c-typeck.c (c_tree_equal): Use real_equal instead of
5421         REAL_VALUES_EQUAL.
5423 2015-10-04  Jason Merrill  <jason@redhat.com>
5425         * c-parser.c (c_lex_one_token): Handle @synchronized.
5426         * c-decl.c (match_builtin_function_types): A declaration of a built-in
5427         can change whether the function is transaction_safe.
5429 2015-10-02  Marek Polacek  <polacek@redhat.com>
5431         PR c/67730
5432         * c-typeck.c (convert_for_assignment): Use the expansion point
5433         location throughout.
5435 2015-10-02  Marek Polacek  <polacek@redhat.com>
5437         PR c/64249
5438         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5439         and pass it down to c_parser_if_statement.
5440         (c_parser_else_body): Add CHAIN parameter and pass it down to
5441         c_parser_statement_after_labels.
5442         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
5443         duplicated if-else-if conditions.
5445 2015-10-01  Marek Polacek  <polacek@redhat.com>
5447         * c-typeck.c (convert_for_assignment): Improve commentary.
5449 2015-09-30  Marek Polacek  <polacek@redhat.com>
5451         PR c/67730
5452         * c-typeck.c (c_finish_return): Use the expansion point location for
5453         certain "return with value" warnings.
5455 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5457         * c-parser.c (pragma_lex): Add loc argument.
5459 2015-09-15  Marek Polacek  <polacek@redhat.com>
5461         PR c/67580
5462         * c-decl.c (tag_exists_p): New function.
5463         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5464         struct/union/enum keywords are missing.
5465         * c-tree.h (tag_exists_p): Declare.
5467 2015-09-15  Marek Polacek  <polacek@redhat.com>
5469         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5470         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5471         Return NULL_TREE instead of 0.
5472         (lookup_name): Return NULL_TREE instead of 0.
5473         (lookup_name_in_scope): Likewise.
5474         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5475         (parser_xref_tag): Use false instead of 0.
5476         (start_struct): Use true instead of 1.
5477         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5479 2015-09-14  Marek Polacek  <polacek@redhat.com>
5481         * c-typeck.c (set_nonincremental_init_from_string): Use
5482         HOST_WIDE_INT_M1U when shifting a negative value.
5484 2015-09-09  Mark Wielaard  <mjw@redhat.com>
5486         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5487         parm against NULL.
5489 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
5491         PR c/67502
5492         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5493         into OMP_FOR_PRE_BODY rather than before the loop.
5495 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
5497         PR c/67501
5498         * c-parser.c (c_parser_oacc_all_clauses,
5499         c_parser_omp_all_clauses): Remove invalid clause from
5500         list of clauses even if parser->error is set.
5502         PR c/67500
5503         * c-parser.c (c_parser_omp_clause_aligned,
5504         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5505         test for errors.
5506         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5507         error_mark_node.
5509         PR c/67495
5510         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5511         instead of c_parser_unary_expression.  If the result is !lvalue_p,
5512         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5514 2015-09-04  Marek Polacek  <polacek@redhat.com>
5516         PR sanitizer/67279
5517         * c-typeck.c (build_binary_op): Don't instrument static initializers.
5519 2015-09-03  Martin Sebor  <msebor@redhat.com>
5521         PR c/66516
5522         * c-typeck.c (convert_arguments, parser_build_unary_op,
5523         build_conditional_expr, c_cast_expr, convert_for_assignment,
5524         build_binary_op, _objc_common_truthvalue_conversion): Call
5525         reject_gcc_builtin.
5526         (c_decl_implicit): Define.
5528 2015-09-02  Marek Polacek  <polacek@redhat.com>
5530         PR c/67432
5531         * c-parser.c (c_parser_enum_specifier): Give a better error for
5532         an empty enum.
5534 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
5536         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5538 2015-08-12  Marek Polacek  <polacek@redhat.com>
5540         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5541         LOC to it.
5543 2015-08-03  Marek Polacek  <polacek@redhat.com>
5545         PR c/67088
5546         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5547         Use it.
5548         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5550 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
5552         * c-parser.c (c_parser_if_body): Take token_indent_info
5553         argument. Call warn_for_misleading_indentation even when the
5554         body is a semicolon.  Extract token_indent_infos corresponding
5555         to the guard, body and next tokens.  Adjust call to
5556         warn_for_misleading_indentation accordingly.
5557         (c_parser_else_body): Likewise.
5558         (c_parser_if_statement): Likewise.
5559         (c_parser_while_statement): Likewise.
5560         (c_parser_for_statement): Likewise.
5562 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
5563             Manuel López-Ibáñez  <manu@gcc.gnu.org>
5565         * c-decl.c (get_parm_info): Remove static var. Update warning
5566         message.
5568 2015-07-27  Marek Polacek  <polacek@redhat.com>
5570         PR c++/66555
5571         PR c/54979
5572         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5574 2015-07-20  Marek Polacek  <polacek@redhat.com>
5576         PR c++/55095
5577         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5578         (build_binary_op): Warn about left shift overflows.
5580 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
5582         * c-array-notation.c: Adjust includes for flags.h changes.
5583         * c-objc-common.c: Likewise.
5585 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
5587         * c-array-notation.c: Adjust includes.
5588         * c-aux-info.c: Likewise.
5589         * c-convert.c: Likewise.
5590         * c-decl.c: Likewise.
5591         * c-errors.c: Likewise.
5592         * c-lang.c: Likewise.
5593         * c-objc-common.c: Likewise.
5594         * c-parser.c: Likewise.
5595         * c-typeck.c: Likewise.
5597 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5599         PR fortran/66605
5600         * c-decl.c (finish_function): Call do_warn_unused_parameter.
5602 2015-06-29  Marek Polacek  <polacek@redhat.com>
5604         PR c/66322
5605         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5606         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
5607         about -Wswitch-bool here.
5608         (do_case): Update c_add_case_label call.
5609         (c_finish_case): Update c_do_switch_warnings call.
5611 2015-06-27  Marek Polacek  <polacek@redhat.com>
5613         * c-typeck.c: Use VECTOR_TYPE_P throughout.
5615 2015-06-26  Marek Polacek  <polacek@redhat.com>
5617         * c-array-notation.c (fix_builtin_array_notation_fn): Use
5618         INDIRECT_REF_P.
5619         * c-typeck.c (array_to_pointer_conversion): Likewise.
5620         (build_unary_op): Likewise.
5621         (c_finish_return): Likewise.
5623 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
5625         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5626         * c-parser.c: Likewise.
5628 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
5630         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5631         instead of pointer_hash.
5632         (detect_field_duplicates): Likewise.
5634 2015-06-25  Marek Polacek  <polacek@redhat.com>
5636         * c-array-notation.c: Use VAR_P throughout.
5637         * c-decl.c: Likewise.
5638         * c-objc-common.c: Likewise.
5639         * c-parser.c: Likewise.
5640         * c-typeck.c: Likewise.
5642 2015-06-25  Marek Polacek  <polacek@redhat.com>
5644         * c-decl.c: Use is_global_var throughout.
5645         * c-parser.c: Likewise.
5646         * c-typeck.c: Likewise.
5648 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
5650         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5651         * c-aux-info.c: Likewise.
5652         * c-convert.c: Likewise.
5653         * c-decl.c: Likewise.
5654         * c-errors.c: Likewise.
5655         * c-lang.c: Likewise.
5656         * c-objc-common.c: Likewise.
5657         * c-parser.c: Likewise.
5658         * c-typeck.c: Likewise.
5660 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
5662         PR middle-end/66325
5663         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5664         variants.
5666 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
5668         * c-decl.c (pop_scope): Register the main translation unit
5669         through the new debug hook.
5671 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
5673         * c-array-notation.c : Adjust include files.
5674         * c-aux-info.c : Likewise.
5675         * c-convert.c : Likewise.
5676         * c-decl.c : Likewise.
5677         * c-errors.c : Likewise.
5678         * c-lang.c : Likewise.
5679         * c-lang.h : Likewise.
5680         * c-objc-common.c : Likewise.
5681         * c-parser.c : Likewise.
5682         * c-typeck.c : Likewise.
5684 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
5686         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5687         immediately clobber it.
5688         (c_write_global_declarations_1): Remove call to
5689         check_global_declaration_1.
5690         (c_write_global_declarations_2): Remove.
5691         (c_write_final_cleanups): Rename from c_write_global_declarations.
5692         Remove call to finalize_compilation_unit.
5693         Remove calls to debugging hooks.
5694         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5695         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5696         * c-tree.h: Remove c_write_global_declarations.
5698 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
5700         * c-array-notation.c: Adjust includes for restructured coretypes.h.
5701         * c-aux-info.c: Likewise.
5702         * c-convert.c: Likewise.
5703         * c-decl.c: Likewise.
5704         * c-errors.c: Likewise.
5705         * c-lang.c: Likewise.
5706         * c-objc-common.c: Likewise.
5707         * c-parser.c: Likewise.
5708         * c-typeck.c: Likewise.
5710 2015-06-04  Marek Polacek  <polacek@redhat.com>
5712         PR c/66341
5713         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5714         it is a lvalue.
5716 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5718         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5719         Warn for empty struct.
5720         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5722 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
5724         * c-decl.c (start_function): Call plugin before parsing.
5725         (finish_function): Call plugin after parsing.
5727 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5729         PR c/49551
5730         * c-decl.c (merge_decls): Merge DECL_COMMON.
5732 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
5734         * Make-lang.in (check_gcc_pallelize): Define.
5736 2015-05-22  Marek Polacek  <polacek@redhat.com>
5738         PR c/47043
5739         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5740         attributes.
5742 2015-05-21  Marek Polacek  <polacek@redhat.com>
5744         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5745         DECL_BUILT_IN.
5747 2015-05-20  Marek Polacek  <polacek@redhat.com>
5749         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5750         * c-typeck.c: Likewise.
5752 2015-05-19  Marek Polacek  <polacek@redhat.com>
5754         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5756 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
5758         PR middle-end/66199
5759         * c-parser.c (c_parser_omp_for_loop): Don't add
5760         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5761         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5762         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5763         constructs.
5765 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
5767         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5768         swaps.
5770 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
5772         PR fortran/44054
5773         * c-objc-common.c (c_tree_printer): Replace locus pointer with
5774         accessor function.
5776 2015-05-14  Marek Polacek  <polacek@redhat.com>
5778         PR c/66066
5779         PR c/66127
5780         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5781         rather than with 0.
5783 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
5785         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5786         to add a call to warn_for_misleading_indentation.
5787         (c_parser_else_body): Likewise, adding param "else_loc".
5788         (c_parser_if_statement): Check for misleading indentation.
5789         (c_parser_while_statement): Likewise.
5790         (c_parser_for_statement): Likewise.
5792 2015-05-08  Marek Polacek  <polacek@redhat.com>
5794         PR c/64918
5795         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5796         (output_init_element): Likewise.
5798 2015-05-07  Marek Polacek  <polacek@redhat.com>
5800         PR c/65179
5801         * c-typeck.c (build_binary_op): Warn when left shifting a negative
5802         value.
5804 2015-04-30  Marek Polacek  <polacek@redhat.com>
5806         * c-typeck.c (set_init_label): Call error_at instead of error and
5807         pass LOC to it.
5809         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
5810         the type of a decl.
5812         * c-typeck.c (c_build_va_arg): Clarify the error message.
5814 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
5816         * c-parser.c (c_parser_oacc_enter_exit_data): Use
5817         OMP_STANDALONE_CLAUSES.
5819 2015-04-28  Marek Polacek  <polacek@redhat.com>
5821         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5823 2015-04-28  Marek Polacek  <polacek@redhat.com>
5825         PR c/65901
5826         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5828 2015-04-25  Marek Polacek  <polacek@redhat.com>
5830         PR c/52085
5831         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
5832         attribute.
5834 2015-04-23  Marek Polacek  <polacek@redhat.com>
5836         PR c/65345
5837         * c-decl.c (set_labels_context_r): New function.
5838         (store_parm_decls): Call it via walk_tree_without_duplicates.
5839         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5840         instead of create_tmp_var.  Build TARGET_EXPR instead of
5841         COMPOUND_EXPR.
5842         (build_atomic_assign): Use create_tmp_var_raw instead of
5843         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
5845 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
5847         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5848         (c_parser_omp_target_update): Add missed %> to error_at ().
5850 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
5852         PR target/55143
5853         * c-decl.c (c_default_pointer_mode): Remove definition.
5854         * c-tree.h (c_default_pointer_mode): Remove declaration.
5856 2015-03-27  Tobias Burnus  <burnus@net-b.de>
5858         PR c/65586
5859         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5860         error out.
5861         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5862         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5863         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5865 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
5867         * c-decl.c (c_decl_attributes): Also add "omp declare target"
5868         attribute for DECL_EXTERNAL VAR_DECLs.
5870 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
5872         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5873         argument.
5875 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
5877         PR c/65120
5878         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5879         before preparing arguments to warn_logical_not_parentheses.
5881 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
5883         PR c/65120
5884         * c-typeck.c (parser_build_binary_op): Don't warn for
5885         !!x == y or !b == y where b is _Bool.
5887 2015-03-09  Marek Polacek  <polacek@redhat.com>
5889         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5890         * c-decl.c (grokdeclarator): Likewise.
5891         * c-typeck.c (build_binary_op): Likewise.
5893 2015-02-27  Marek Polacek  <polacek@redhat.com>
5895         PR c/65228
5896         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5898 2015-02-14  Marek Polacek  <polacek@redhat.com>
5900         PR c/64768
5901         * c-decl.c (grokdeclarator): Set the range of a flexible array member
5902         declared through a typedef name.
5904 2015-02-13  Marek Polacek  <polacek@redhat.com>
5906         PR c/65050
5907         * c-decl.c (grokdeclarator): Print also the type when giving
5908         the error message about array's incomplete element type.
5910 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
5912         PR c/64824
5913         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5914         check in the POP macro.
5916 2015-02-09  Marek Polacek  <polacek@redhat.com>
5918         PR c/64856
5919         * c-typeck.c (process_init_element): Don't always wrap
5920         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5921         initializing a range of elements.
5923 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
5925         PR c/64824
5926         PR c/64868
5927         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5929 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
5931         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5932         processing enum declaration.
5934 2015-01-29  Marek Polacek  <polacek@redhat.com>
5936         PR c/64709
5937         * c-typeck.c (pop_init_level): If constructor_elements has
5938         exactly one element with integer_zerop value, set constructor_zeroinit
5939         to 1.  Remove braces around warning_init call.
5941 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
5943         PR c/64766
5944         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5945         of FUNCTION_DECLs with error_mark_node.
5947 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
5949         PR c/64778
5950         * c-typeck.c (convert_arguments): Return -1 if there are
5951         error_args, even if we've diagnosed too many arguments.
5953 2015-01-21  Richard Biener  <rguenther@suse.de>
5955         PR middle-end/64313
5956         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5957         for builtins the user declared correctly.
5959 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
5960             Bernd Schmidt  <bernds@codesourcery.com>
5961             Cesar Philippidis  <cesar@codesourcery.com>
5962             James Norris  <jnorris@codesourcery.com>
5963             Jakub Jelinek  <jakub@redhat.com>
5964             Ilmir Usmanov  <i.usmanov@samsung.com>
5966         * c-parser.c: Include "gomp-constants.h".
5967         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5968         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5969         Use OMP_CLAUSE_SET_MAP_KIND.
5970         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5971         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5972         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5973         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5974         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5975         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5976         "copyout", "create", "delete", "deviceptr", "gang", "host",
5977         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5978         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5979         "present_or_create", "pcreate", "seq", "self", "vector",
5980         "vector_length", "wait", "worker".
5981         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5982         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5983         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5984         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5985         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5986         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5987         (c_parser_oacc_data_clause_deviceptr)
5988         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5989         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5990         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5991         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5992         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5993         (c_parser_oacc_parallel, c_parser_oacc_update)
5994         (c_parser_oacc_wait): New functions.
5995         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5996         (c_finish_oacc_data): New prototypes.
5997         * c-typeck.c: Include "gomp-constants.h".
5998         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
5999         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
6000         OMP_CLAUSE_SET_MAP_KIND.
6001         (c_finish_oacc_parallel, c_finish_oacc_kernels)
6002         (c_finish_oacc_data): New functions.
6003         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6004         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6005         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6006         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6007         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6008         GOMP_MAP_FORCE_DEVICEPTR.
6010 2015-01-09  Michael Collison  <michael.collison@linaro.org>
6012         * c-array-notation.c: Include hash-set.h, machmode.h,
6013         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6014         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6015         * c-aux-info.c: Ditto.
6016         * c-convert.c: Ditto.
6017         * c-decl.c: Ditto.
6018         * c-errors.c: Ditto.
6019         * c-lang.c: Dittoxs.
6020         * c-objc-common.c: Ditto.
6021         * c-parser.c: Ditto.
6022         * c-typeck.c: Include hash-set.h, machmode.h,
6023         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6024         fold-const.h, wide-int.h, inchash.h, real.h and
6025         fixed-value.h due to flattening of tree.h.
6027 2015-01-07  Marek Polacek  <polacek@redhat.com>
6029         PR c/64417
6030         * c-typeck.c (process_init_element): Disallow initialization of
6031         a flexible array member with a string constant if the structure
6032         is in an array.
6034 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
6036         PR sanitizer/64344
6037         * c-typeck.c (convert_for_assignment, c_finish_return): For
6038         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6039         types also set in_late_binary_op around convert call.
6040         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6041         to integral type casts, if not in_late_binary_op, pass c_fully_fold
6042         result on expr as last argument to ubsan_instrument_float_cast,
6043         if in_late_binary_op, don't use c_save_expr but save_expr.
6045         Update copyright years.
6047 2015-01-05  Marek Polacek  <polacek@redhat.com>
6049         PR c/64423
6050         * c-typeck.c (build_array_ref): Pass loc down to
6051         warn_array_subscript_with_type_char.
6053 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
6055         * c-typeck.c: New behavious for pointers to arrays with qualifiers
6056         (common-pointer-type): For pointers to arrays take qualifiers from
6057         element type.
6058         (build_conditional_expr): Add warnings for lost qualifiers.
6059         (comp-target-types): Allow pointers to arrays with different qualifiers.
6060         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
6061         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
6062         to PEDWARN_FOR_QUALIFIERS.
6064 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
6066         PR sanitizer/64289
6067         * c-convert.c: Include ubsan.h.
6068         (convert): For real -> integral casts and
6069         -fsanitize=float-cast-overflow don't call convert_to_integer, but
6070         instead instrument the float cast directly.
6072 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
6074         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6075         c_finish_stmt_expr): Remove NULL last argument from
6076         create_tmp_var_raw and create_tmp_var calls.
6077         * c-array-notation.c (fix_builtin_array_notation_fn,
6078         build_array_notation_expr, fix_conditional_array_notations_1,
6079         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6081 2014-11-28  Marek Polacek  <polacek@redhat.com>
6083         PR c/63862
6084         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6085         convert the right operand to integer type.
6087 2014-11-25  Marek Polacek  <polacek@redhat.com>
6089         PR c/63877
6090         * c-decl.c (start_function): Disable -Wmissing-declarations warning
6091         for inline functions.
6093 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
6095         PR target/63764
6096         * c-typeck.c (build_array_ref): Adjust
6097         convert_vector_to_pointer_for_subscript caller.  If it returns true,
6098         call non_lvalue_loc on the result.
6100 2014-11-11  Richard Biener  <rguenther@suse.de>
6102         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6103         to true.
6105 2014-11-10  Andi Kleen  <ak@linux.intel.com>
6107         PR c/60804
6108         * c-parser.c (c_parser_statement_after_labels): Call
6109         check_no_cilk.
6110         (c_parser_if_statement): Dito.
6111         (c_parser_switch_statement): Dito.
6112         (c_parser_while_statement): Dito.
6113         (c_parser_do_statement): Dito.
6114         (c_parser_for_statement): Dito.
6115         * c-typeck.c (c_finish_loop): Dito.
6117 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
6119         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6120         OPT_Wshift_count_overflow in the warnings.
6122 2014-10-30  Marek Polacek  <polacek@redhat.com>
6124         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6125         print the stripped version as well, if they're not the same.
6127 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
6129         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6130         machine_mode.
6132 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
6134         * c-decl.c: Adjust include files.
6135         * c-parser.c: Ditto.
6137 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
6138             Tom Tromey  <tromey@redhat.com>
6140         * c-tree.h (enum c_oracle_request): New.
6141         (c_binding_oracle_function): New typedef.
6142         (c_binding_oracle, c_pushtag, c_bind): Declare.
6143         * c-decl.c (c_binding_oracle): New global.
6144         (I_SYMBOL_CHECKED): New macro.
6145         (i_symbol_binding): New function.
6146         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6147         (I_TAG_CHECKED): New macro.
6148         (i_tag_binding): New function.
6149         (I_TAG_BINDING, I_TAG_DECL): Redefine.
6150         (I_LABEL_CHECKED): New macro.
6151         (i_label_binding): New function.
6152         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6153         (c_print_identifier): Save and restore c_binding_oracle.
6154         (c_pushtag, c_bind): New functions.
6156 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
6158         * c-typeck.c: Adjust include files.
6160 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6162         PR c++/53061
6163         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6164         initialization here...
6165         (c_initialize_diagnostics): ... but here. Set defaults after
6166         building pretty-printer.
6168 2014-10-23  Marek Polacek  <polacek@redhat.com>
6170         PR c/63626
6171         * c-decl.c (pop_scope): Don't print warning in external_scope.
6173 2014-10-19  Marek Polacek  <polacek@redhat.com>
6175         PR c/63567
6176         * c-typeck.c (output_init_element): Allow initializing objects with
6177         static storage duration with compound literals even in C99 and add
6178         pedwarn for it.
6180 2014-10-17  Marek Polacek  <polacek@redhat.com>
6182         PR c/63567
6183         * c-typeck.c (digest_init): Allow initializing objects with static
6184         storage duration with compound literals even in C99 and add pedwarn
6185         for it.
6187 2014-10-17  Marek Polacek  <polacek@redhat.com>
6189         PR c/63543
6190         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6191         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6192         error multiple times.  Print the type.
6194 2014-10-17  Marek Polacek  <polacek@redhat.com>
6196         PR c/63549
6197         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6198         type.
6200 2014-10-17  Marek Polacek  <polacek@redhat.com>
6202         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6203         (start_function): Use OPT_Wimplicit_int instead of 0.
6204         (store_parm_decls_oldstyle): Likewise.
6206 2014-10-17  Alan Modra  <amodra@gmail.com>
6208         PR middle-end/61848
6209         * c-decl.c (merge_decls): Don't merge section name or tls model
6210         to newdecl symtab node, instead merge to olddecl.  Override
6211         existing olddecl section name.  Set tls_model for all thread-local
6212         vars, not just OMP thread-private ones.  Remove incorrect comment.
6214 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
6216         * c-decl.c: Adjust include files.
6218 2014-10-14  DJ Delorie  <dj@redhat.com>
6220         * c-parser.c (c_parse_init): Add RID entries for each __intN.
6221         (c_token_starts_typename): Check all __intN, not just __int128.
6222         (c_token_starts_declspecs): Likewise.
6223         (c_parser_declspecs): Likewise.
6224         (c_parser_attribute_any_word): Likewise.
6225         (c_parser_objc_selector): Likewise.
6226         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6227         (struct c_declspecs): Add int_n_idx field to record *which* __intN
6228         is specified.
6229         * c-decl.c (declspecs_add_type): Check for all __intN, not just
6230         __int128.
6231         (finish_declspecs): Likewise.
6233 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
6235         * c-parser.c (c_parser_all_labels): New function to replace
6236         the duplicate code.
6237         (c_parser_statement): Call the new function.
6239 2014-10-09  Marek Polacek  <polacek@redhat.com>
6241         PR c/63480
6242         * c-typeck.c (pop_init_level): Don't warn about initializing
6243         with { }.
6245 2014-10-07  Marek Polacek  <polacek@redhat.com>
6247         PR c/59717
6248         * c-decl.c (header_for_builtin_fn): New function.
6249         (implicitly_declare): Suggest which header to include.
6251 2014-10-07  Marek Polacek  <polacek@redhat.com>
6253         * c-convert.c (convert): Use error_operand_p.
6254         * c-typeck.c (require_complete_type): Likewise.
6255         (really_atomic_lvalue): Likewise.
6256         (digest_init): Likewise.
6257         (handle_omp_array_sections_1): Likewise.
6259 2014-10-03  Marek Polacek  <polacek@redhat.com>
6261         PR c/63453
6262         * c-decl.c (pop_scope): Don't warn about "inline function declared
6263         but never defined" for functions marked with gnu_inline attribute.
6265 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
6267         PR c++/63249
6268         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6269         on low_bound and length.
6271 2014-09-24  Marek Polacek  <polacek@redhat.com>
6273         PR c/61405
6274         PR c/53874
6275         * c-parser.c: Don't define CPP_KEYWORD.
6276         (c_parser_switch_statement): Pass original type to c_finish_case.
6277         * c-tree.h (c_finish_case): Update declaration.
6278         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
6279         conditionally to c_do_switch_warnings.
6281 2014-09-03  Marek Polacek  <polacek@redhat.com>
6283         PR c/62024
6284         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6285         conversions.
6287 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
6288             Balaji V. Iyer  <balaji.v.iyer@intel.com>
6289             Igor Zamyatin  <igor.zamyatin@intel.com>
6291         * c-parser.c (c_parser_cilk_for): New function.
6292         (c_parser_cilk_grainsize): Likewise.
6293         (c_get_temp_regvar): Likewise.
6294         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6295         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6296         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6297         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6298         case.
6300 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
6302         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6303         with using HOST_WIDE_INT without truncation to 'int'
6305 2014-08-22  Marek Polacek  <polacek@redhat.com>
6307         PR c++/62199
6308         * c-typeck.c (parser_build_binary_op): Adjust call to
6309         warn_logical_not_parentheses.
6311 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
6313         PR other/62008
6314         * c-parser.c (c_parser_array_notation): Check for correct
6315         type of an array added.
6317 2014-08-19  Marek Polacek  <polacek@redhat.com>
6319         PR c++/62153
6320         * c-typeck.c (build_binary_op): If either operand of a comparison
6321         is a boolean expression, call maybe_warn_bool_compare.
6323 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
6325         PR c/45584
6326         * c-typeck.c (build_c_cast): Do a conversion even when the
6327         TYPE_MAIN_VARIANTs are the same.
6329 2014-08-19  Marek Polacek  <polacek@redhat.com>
6331         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6332         pedwarn_c99 instead of pedwarn.
6333         (grokfield): Likewise.
6334         (warn_defaults_to): New function.
6335         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6336         Unconditionally call pedwarn_c99 instead of pedwarn.
6337         (start_function): Call warn_defaults_to instead of pedwarn_c99.
6338         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6339         check flag_isoc11 before.
6340         * c-errors.c (pedwarn_c99): Change the return type to bool.
6341         Handle -Wc99-c11-compat.
6342         * c-parser.c (disable_extension_diagnostics): Handle
6343         warn_c99_c11_compat.
6344         (restore_extension_diagnostics): Likewise.
6345         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6346         instead of pedwarn, don't check flag_isoc11 before.
6347         (c_parser_declspecs): Likewise.
6348         (c_parser_alignas_specifier): Likewise.
6349         (c_parser_alignof_expression): Likewise.
6350         (c_parser_generic_selection): Likewise.
6351         * c-tree.h (pedwarn_c99): Update declaration.
6352         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6353         of pedwarn_c99.
6355 2014-08-19  Marek Polacek  <polacek@redhat.com>
6357         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6358         to pedwarn_c90.
6359         * c-errors.c: Include "opts.h".
6360         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6361         * c-parser.c (disable_extension_diagnostics): Handle negative value
6362         of warn_c90_c99_compat, too.
6363         (restore_extension_diagnostics): Likewise.
6364         (c_parser_compound_statement_nostart): Pass
6365         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6367 2014-08-12  Marek Polacek  <polacek@redhat.com>
6369         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6370         Add pedwarn.
6371         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6372         Likewise.
6373         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6375 2014-08-10  Marek Polacek  <polacek@redhat.com>
6377         PR c/51849
6378         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6379         Call pedwarn_c90 instead of pedwarn.
6380         (check_bitfield_type_and_width): Likewise.
6381         (declspecs_add_qual): Likewise.
6382         (declspecs_add_type): Likewise.
6383         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6384         Adjust to only call pedwarn_c90.
6385         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
6386         pedwarn_c90 instead of pedwarn.
6387         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6388         * c-parser.c (disable_extension_diagnostics): Handle
6389         warn_c90_c99_compat.
6390         (restore_extension_diagnostics): Likewise.
6391         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
6392         pedwarn_c90 instead of pedwarn.
6393         (c_parser_initelt): Likewise.
6394         (c_parser_postfix_expression): Likewise.
6395         (c_parser_postfix_expression_after_paren_type): Likewise.
6396         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6397         * c-tree.h: Fix formatting.
6398         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
6399         pedwarn_c90 instead of pedwarn.
6401 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
6403         * c-typeck.c: Remove include of pointer-set.h.
6405 2014-08-07  Marek Polacek  <polacek@redhat.com>
6407         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6409 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
6411         * c-typeck.c: Use hash_map instead of pointer_map.
6413 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
6415         * c-decl.c: Use hash_set instead of pointer_set.
6417 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
6419         PR middle-end/61455
6420         * c-array-notation.c (expand_array_notations): Handling
6421         of DECL_EXPR added.
6423 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
6425         PR c++/60517
6426         * c-typeck.c (c_finish_return): Return 0 instead of the address of
6427         a local variable.
6429 2014-07-30  Tom Tromey  <tromey@redhat.com>
6431         * c-typeck.c (struct constructor_stack) <designator_depth>: New
6432         field.
6433         (really_start_incremental_init, push_init_level): Initialize
6434         designator_depth.
6435         (pop_init_level): Set global designator_depth.
6436         (process_init_element): Check for designated_init attribute.
6438 2014-07-20  Marek Polacek  <polacek@redhat.com>
6440         PR c/61852
6441         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
6442         (implicitly_declare): Pass location to implicit_decl_warning.
6444 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
6446         PR middle-end/61294
6447         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6448         If non-NULL, call c_parser_check_literal_zero.
6449         (c_parser_check_literal_zero): New function.
6450         (c_parser_postfix_expression_after_primary): Adjust
6451         c_parser_expr_list caller, handle -Wmemset-transposed-args.
6453 2014-07-06  Marek Polacek  <polacek@redhat.com>
6455         PR c/6940
6456         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6457         * c-tree.h (C_ARRAY_PARAMETER): Define.
6458         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6459         function parameter.
6461 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
6462             Chen Gang  <gang.chen.5i5j@gmail.com>
6464         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6465         releasing symbol.
6467 2014-07-01  Marek Polacek  <polacek@redhat.com>
6469         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6470         instead of 0 to WARN_FOR_ASSIGNMENT.
6472 2014-07-01  Marek Polacek  <polacek@redhat.com>
6474         PR c/58286
6475         * c-typeck.c (convert_for_assignment): Pass
6476         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6478 2014-06-30  Marek Polacek  <polacek@redhat.com>
6480         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6481         has no_sanitize_undefined attribute.
6483 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
6485         PR middle-end/57541
6486         * c-array-notation.c (fix_builtin_array_notation_fn):
6487         Check for 0 arguments in builtin call. Check that bultin argument is
6488         correct.
6489         * c-parser.c (c_parser_array_notation): Check for incorrect initial
6490         index.
6492 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6494         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6495         qualifiers in __auto_type for atomic types.
6496         (c_parser_typeof_specifier): Discard all type qualifiers in
6497         __typeof__ for atomic types.
6499 2014-06-25  Marek Polacek  <polacek@redhat.com>
6501         PR c/61162
6502         * c-parser.c (c_parser_statement_after_labels): Pass the location of
6503         the return expression to c_finish_return.
6505 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
6507         * c-typeck.c (c_finish_omp_clauses): Make sure
6508         OMP_CLAUSE_LINEAR_STEP has correct type.
6510 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
6512         * c-decl.c: Adjust.
6514 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
6516         * c-parser.c (c_parser_omp_for_loop): For
6517         #pragma omp parallel for simd move lastprivate clause from parallel
6518         to for rather than simd.
6520 2014-06-23  Marek Polacek  <polacek@redhat.com>
6522         * c-typeck.c (parser_build_binary_op): Don't call
6523         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6525 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
6527         * c-parser.c (c_parser_omp_threadprivate): Likewise.
6528         * c-decl.c (merge_decls): Likewise.
6530 2014-06-09  Marek Polacek  <polacek@redhat.com>
6532         PR c/36446
6533         * c-typeck.c (error_init): Call inform instead of error_at.
6534         (pedwarn_init): Call inform instead of pedwarn.
6535         (warning_init): Call inform instead of warning_at.
6537 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
6539         * c-decl.c (merge_decls): Use set_decl_section_name.
6540         (duplicate_decls): Remove node if it exists.
6542 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
6544         PR c/53119
6545         * c-typeck.c (push_init_level, process_init_element,
6546         pop_init_level): Correct check for zero initialization, move
6547         missing brace warning to respect zero initialization.
6549 2014-06-05  Marek Polacek  <polacek@redhat.com>
6551         PR c/56724
6552         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6554 2014-06-05  Marek Polacek  <polacek@redhat.com>
6556         PR c/49706
6557         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
6558         on the left hand side operand of a comparison.
6560 2014-06-05  Marek Polacek  <polacek@redhat.com>
6562         PR c/48062
6563         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6564         Print note only if the warning was printed.
6566 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
6568         PR c/58942
6569         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6570         with a pointer.
6572 2014-06-03  Marek Polacek  <polacek@redhat.com>
6574         PR c/60439
6575         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6576         c_start_case.
6577         * c-tree.h (c_start_case): Update.
6578         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
6579         switch condition has boolean value.
6581 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
6583         * c-decl.c: Include builtins.h.
6584         * c-parser.c: Likewise.
6586 2014-05-27  Marek Polacek  <polacek@redhat.com>
6588         PR c/56724
6589         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
6590         error and warning calls to error_at and warning_at.  Pass location of
6591         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
6592         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6593         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
6595 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
6597         PR c/61191
6598         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6599         function parameters.
6601 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
6603         * c-decl.c (merge_decls): Preserve symtab node pointers.
6604         (duplicate_decls): Free new decl.
6606 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
6608         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6609         initialization.
6611         * c-parser.c (c_parser_omp_target): Return bool values.
6613 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
6615         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6616         num_teams_loc variable to num_thread_limit_loc.
6618 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
6620         * c-array-notation.c (expand_array_notations): Use void_node
6621         instead of void_zero_node.
6623 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
6625         * c-decl.c (finish_struct): Adjust.
6626         (finish_enum): Likewise.
6627         (bind): Adjust.
6628         (record_inline_static): Likewise.
6629         (push_scope): Likewise.
6630         (make_label): Likewise.
6631         (lookup_label_for_goto): Likewise.
6632         (finish_struct): Likewise.
6633         (finish_enum): Likewise.
6634         (store_parm_decls): Likewise.
6635         (c_push_function_context): Likewise.
6636         * c-lang.h: Remove usage of variable_size gty attribute.
6637         * c-parser.c (c_parse_init): Adjust.
6638         (c_parse_file): Likewise.
6640 2014-05-13  Marek Polacek  <polacek@redhat.com>
6642         PR c/61162
6643         * c-typeck.c (convert_for_assignment): Pass location to
6644         WARN_FOR_ASSIGNMENT instead of input_location.
6646 2014-05-10  Marek Polacek  <polacek@redhat.com>
6648         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6649         maybe_warn_string_init.
6650         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6651         maybe_warn_string_init.
6652         * c-tree.h (maybe_warn_string_init): Update declaration.
6653         * c-typeck.c (maybe_warn_string_init): Add location parameter.
6654         Call pedwarn_init with loc instead of with input_location.
6655         (digest_init): Pass init_loc to maybe_warn_string_init.
6656         (pop_init_level): Call pedwarn_init with loc instead of with
6657         input_location.
6658         (set_init_index): Likewise.
6659         (process_init_element): Likewise.
6661 2014-05-09  Marek Polacek  <polacek@redhat.com>
6663         PR c/61096
6664         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6665         (c_parser_initelt): Pass location to set_init_label.  Pass array index
6666         location to set_init_index.
6667         * c-tree.h (push_init_level): Update declaration.
6668         (pop_init_level): Likewise.
6669         (set_init_index): Likewise.
6670         (set_init_label): Likewise.
6671         * c-typeck.c (error_init): Add location parameter.  Call error_at
6672         instead of error.
6673         (digest_init): Pass init_loc to error_init.
6674         (really_start_incremental_init):
6675         (push_init_level): Add location parameter.  Pass loc to pop_init_level
6676         and error_init.
6677         (pop_init_level): Likewise.
6678         (set_designator): Add location parameter.  Pass loc to pop_init_level,
6679         push_init_level, and error_init.
6680         (set_init_index): Add location parameter.  Pass loc to error_init and
6681         set_designator.
6682         (set_init_label): Likewise.
6683         (output_init_element): Pass loc to error_init.
6684         (process_init_element): Pass loc to error_init, pop_init_level,
6685         pedwarn_init, and push_init_level.
6687 2014-05-09  Marek Polacek  <polacek@redhat.com>
6689         PR c/50459
6690         * c-parser.c (c_parser_attributes): Parse the arguments as an
6691         expression-list if the attribute takes identifier.
6693 2014-05-08  Marek Polacek  <polacek@redhat.com>
6695         PR c/61053
6696         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6697         TYPE_ALIGN_UNIT.
6699 2014-05-08  Marek Polacek  <polacek@redhat.com>
6701         PR c/61077
6702         * c-decl.c (start_function): Warn for _Atomic-qualified return type
6703         of main.
6705 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
6706             Mike Stump  <mikestump@comcast.net>
6707             Richard Sandiford  <rdsandiford@googlemail.com>
6709         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6710         (finish_enum): Use wide-int interfaces.
6711         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6712         * c-typeck.c (build_c_cast): Likewise.
6713         (set_nonincremental_init_from_string): Likewise.
6714         (c_tree_equal): Likewise.
6716 2014-05-02  Marek Polacek  <polacek@redhat.com>
6718         PR c/25801
6719         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
6720         Return size_one_node when the type is not complete.
6721         (pointer_diff): Remove comment.
6722         (build_unary_op): Improve error messages.
6724 2014-05-02  Marek Polacek  <polacek@redhat.com>
6726         * c-typeck.c (c_finish_return): Separate warning_at calls.
6728 2014-05-02  Marek Polacek  <polacek@redhat.com>
6730         * c-tree.h (error_init): Remove declaration.
6731         (pedwarn_init): Likewise.
6732         * c-typeck.c (error_init): Make static and move above.
6733         (pedwarn_init): Likewise.
6734         (warning_init): Move above.
6735         (maybe_warn_string_init): Likewise.
6737 2014-05-01  Jeff Law  <law@redhat.com>
6739         Revert:
6741         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
6742         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6743         avoid goto.
6745 2014-05-02  Marek Polacek  <polacek@redhat.com>
6747         PR c/60784
6748         * c-typeck.c (push_init_level): Set constructor_designated to
6749         p->designated for structures.
6751 2014-05-01  Marek Polacek  <polacek@redhat.com>
6753         PR c/60915
6754         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6755         function-definition has an attribute after the declarator.
6757 2014-05-01  Marek Polacek  <polacek@redhat.com>
6759         PR c/60257
6760         * c-typeck.c (warning_init): Add location_t parameter.  Call
6761         warning_at instead of warning.
6762         (push_init_level): Pass input_location to warning_init.
6763         (add_pending_init): Add location_t parameter.  Pass loc to
6764         warning_init.
6765         (set_nonincremental_init): Pass input_location to add_pending_init.
6766         (set_nonincremental_init_from_string): Likewise.
6767         (output_init_element): Pass loc to warning_init and to
6768         add_pending_init.
6770 2014-05-01  Marek Polacek  <polacek@redhat.com>
6772         PR c/43395
6773         * c-typeck.c (c_finish_return): Distinguish between label and variable
6774         when warning about returning local address.
6776 2014-05-01  Marek Polacek  <polacek@redhat.com>
6778         PR c/29467
6779         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6780         in C89 mode.
6782 2014-05-01  Marek Polacek  <polacek@redhat.com>
6784         PR c/43245
6785         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6786         instead of 0 to WARN_FOR_QUALIFIERS.
6788 2014-05-01  Marek Polacek  <polacek@redhat.com>
6790         PR c/56989
6791         * c-typeck.c (default_conversion): Use better location for
6792         error call.
6794 2014-04-30  Marek Polacek  <polacek@redhat.com>
6796         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6797         also when SANITIZE_FLOAT_DIVIDE is on.
6799 2014-04-30  Marek Polacek  <polacek@redhat.com>
6801         PR c/60139
6802         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6803         and pedwarn_init.  Use loc insted of input_location.
6805 2014-04-30  Marek Polacek  <polacek@redhat.com>
6807         PR c/60351
6808         * c-typeck.c (build_binary_op): Use location when warning about
6809         shift count.
6811 2014-04-25  Marek Polacek  <polacek@redhat.com>
6813         PR c/18079
6814         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6815         always_inline/noinline and hot/cold attributes.
6817 2014-04-25  Marek Polacek  <polacek@redhat.com>
6819         PR c/60114
6820         * c-parser.c (c_parser_initelt): Pass input_location to
6821         process_init_element.
6822         (c_parser_initval): Pass loc to process_init_element.
6823         * c-tree.h (process_init_element): Adjust declaration.
6824         * c-typeck.c (push_init_level): Pass input_location to
6825         process_init_element.
6826         (pop_init_level): Likewise.
6827         (set_designator): Likewise.
6828         (output_init_element): Add location_t parameter.  Pass loc to
6829         digest_init.
6830         (output_pending_init_elements): Pass input_location to
6831         output_init_element.
6832         (process_init_element): Add location_t parameter.  Pass loc to
6833         output_init_element.
6835 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
6837         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6838         atomic-clause, allow comma in between atomic-clause and
6839         seq_cst.
6841 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
6843         PR c/59073
6844         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6845         fails, don't set OM_PARALLEL_COMBINED and return NULL.
6847 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
6849         PR middle-end/60469
6850         * c-array-notation.c (fix_builtin_array_notation_fn): Use
6851         create_tmp_var instead build_decl for creating temps.
6852         (build_array_notation_expr): Likewise.
6853         (fix_conditional_array_notations_1): Likewise.
6854         (fix_array_notation_expr): Likewise.
6855         (fix_array_notation_call_expr): Likewise.
6857 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
6859         PR c++/60689
6860         * c-tree.h (c_build_function_call_vec): New prototype.
6861         * c-typeck.c (build_function_call_vec): Don't call
6862         resolve_overloaded_builtin here.
6863         (c_build_function_call_vec): New wrapper function around
6864         build_function_call_vec.  Call resolve_overloaded_builtin here.
6865         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6866         Call c_build_function_call_vec instead of build_function_call_vec.
6867         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6868         * c-decl.c (finish_decl): Likewise.
6870 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6872         PR c/55383
6873         * c-typeck.c: Use correct format string in cast-qual warning
6875 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
6877         * c-decl.c (c_decl_attributes): Use
6878         lang_hooks.types.omp_mappable_type.
6879         * c-typeck.c (c_finish_omp_clauses): Likewise.
6881 2014-03-06  Marek Polacek  <polacek@redhat.com>
6883         PR c/60197
6884         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6885         of checking tree code.
6887 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
6889         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6890         (c_parser_parameter_declaration): Likewise.
6892 2014-02-19  Marek Polacek  <polacek@redhat.com>
6894         PR c/60195
6895         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6896         Call mark_exp_read on exp.value.
6897         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
6898         TREE_ADDRESSABLE on old instead of val.
6899         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6901 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
6903         * c-parser.c (c_parser_get_builtin_args): Replace calls to
6904         C_EXPR_APPEND by vec_safe_push.
6905         * c-tree.h (C_EXPR_APPEND): Remove.
6907 2014-01-31  Marek Polacek  <polacek@redhat.com>
6909         PR c/59963
6910         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6911         build_function_call_vec.
6912         (build_function_call): Likewise.
6913         (build_atomic_assign): Likewise.
6914         (build_function_call_vec): Add arg_loc parameter.  Use it.
6915         (convert_arguments): Likewise.
6916         (convert_for_assignment): Rename rhs_loc to expr_loc.
6917         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6918         (c_parser_objc_keywordexpr): Likewise.
6919         (c_parser_postfix_expression_after_primary): Call
6920         build_function_call_vec with expr_loc rather than op_loc.
6921         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
6922         build_function_call_vec.
6923         (c_parser_expr_list): Add locations parameter.  Fill it with locations
6924         of function arguments.
6925         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6927 2014-01-30  Marek Polacek  <polacek@redhat.com>
6929         PR c/59940
6930         * c-typeck.c (build_function_call_vec): Use loc parameter.
6931         (convert_arguments): Add location parameter.  Use it.
6932         (ep_convert_and_check): Likewise.
6933         (build_atomic_assign): Adjust convert_for_assignment call.
6934         (build_modify_expr): Likewise.
6935         (digest_init): Likewise.
6936         (c_finish_return): Likewise.
6937         (build_conditional_expr): Adjust ep_convert_and_check calls.
6938         (convert_for_assignment): Add rhs_loc parameter.  Use it.
6939         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6940         calls.
6942 2014-01-30  Richard Biener  <rguenther@suse.de>
6944         PR c/59905
6945         * c-typeck.c (build_function_call_vec): Do not replace calls
6946         to a function via an incompatible type with a runtime abort.
6948 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6950         * c-parser.c (c_parser_declaration_or_fndef): Replaced
6951         flag_enable_cilkplus with flag_cilkplus.
6952         (c_parser_direct_declarator_inner): Likewise.
6953         (c_parser_attribute_any_word): Likewise.
6954         (c_parser_attributes): Likewise.
6955         (c_parser_compound_statement): Likewise.
6956         (c_parser_statement_after_labels): Likewise.
6957         (c_parser_if_statement): Likewise.
6958         (c_parser_switch_statement): Likewise.
6959         (c_parser_do_statement): Likewise.
6960         (c_parser_for_statement): Likewise.
6961         (c_parser_unary_expression): Likewise.
6962         (c_parser_postfix_expression): Likewise.
6963         (c_parser_postfix_expression_after_primary): Likewise.
6964         (c_parser_postfix_expression_after_primary): Likewise.
6965         (c_parser_omp_clause_name): Likewise.
6966         (c_finish_omp_declare_simd): Likewise.
6967         (c_parser_cilk_verify_simd): Likewise.
6968         * c-typeck.c (build_array_ref): Likewise.
6969         (build_function_call_vec): Likewise.
6970         (convert_arguments): Likewise.
6971         (build_compound_expr): Likewise.
6972         (c_finish_return): Likewise.
6973         (c_finish_if_stmt): Likewise.
6974         (c_finish_loop): Likewise.
6975         (build_binary_op): Likewise.
6977 2014-01-23  Marek Polacek  <polacek@redhat.com>
6979         PR c/59846
6980         * c-typeck.c (parser_build_binary_op): Use location instead of
6981         input_location.
6982         (build_binary_op): Pass location to shorten_compare.
6984 2014-01-23  Marek Polacek  <polacek@redhat.com>
6986         PR c/58346
6987         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6988         an empty aggregate.
6990 2014-01-23  Marek Polacek  <polacek@redhat.com>
6992         PR c/59871
6993         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6994         of a comma expression.
6995         (emit_side_effect_warnings): Likewise.
6997 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6999         PR c/59825
7000         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7001         function to use walk_tree and moved a lot of its functionality to
7002         expand_array_notations.
7003         (expand_array_notations): New function.
7005 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7007         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7008         attribute an attribute without value.
7010 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
7012         PR middle-end/58809
7013         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7014         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7016 2014-01-22  Marek Polacek  <polacek@redhat.com>
7018         PR c/59891
7019         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7020         of remove_c_maybe_const_expr on op1 and op2.
7022 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
7024         PR c/58943
7025         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7026         effects, preevaluate rhs using SAVE_EXPR first.
7028 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7030         PR c++/59631
7031         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7032         statements with if-elseif statements.
7034 2014-01-06  Marek Polacek  <polacek@redhat.com>
7036         PR c/57773
7037         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7038         defined bit-field types only in ISO C.
7040 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
7042         Update copyright years
7044 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
7046         * c-array-notation.c: Use the standard form for the copyright notice.
7048 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7050         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7051         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7052         field in parser is not empty.  If not-empty, call the function
7053         c_parser_finish_omp_declare_simd.
7054         (c_parser_cilk_clause_vectorlength): Modified function to be shared
7055         between SIMD-enabled functions and #pragma simd.  Added new parameter.
7056         (c_parser_cilk_all_clauses): Modified the usage of the function
7057         c_parser_cilk_clause_vectorlength as mentioned above.
7058         (c_parser_cilk_simd_fn_vector_attrs): New function.
7059         (c_finish_cilk_simd_fn_tokens): Likewise.
7060         (is_cilkplus_vector_p): Likewise.
7061         (c_parser_omp_clause_name): Added checking for "vectorlength,"
7062         "nomask," and "mask" strings in clause name.
7063         (c_parser_omp_all_clauses): Added 3 new case statements:
7064         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7065         PRAGMA_CILK_CLAUSE_NOMASK.
7066         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
7067         check for vector attribute and if so call the function
7068         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
7069         called the function c_finish_cilk_simd_fn_tokens.
7070         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7071         parser field is non-empty.  If so, parse them as you would parse
7072         the omp declare simd pragma.
7073         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7074         Added a check when step is a parameter and flag it as error.
7075         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7076         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7077         pragma_omp_clause.
7079 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
7081         * c-parser.c (c_parser_omp_parallel): Fix description.
7083 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7085         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7086         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7087         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7088         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7090 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
7092         PR c/52023
7093         * c-parser.c (c_parser_alignas_specifier): Use
7094         c_sizeof_or_alignof_type instead of c_alignof.
7095         (c_parser_alignof_expression): Likewise, with min_alignof
7096         parameter depending on alignof spelling used.
7098 2013-12-04  Marek Polacek  <polacek@redhat.com>
7100         PR c/54113
7101         * c-decl.c (start_function): Don't warn for missing prototype for
7102         inline functions.
7104 2013-12-03  Marek Polacek  <polacek@redhat.com>
7106         PR c/59351
7107         * c-decl.c (build_compound_literal): Allow compound literals with
7108         empty initial value.
7110 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
7112         PR c/58235
7113         * c-typeck.c (build_modify_expr): Diagnose assignment to
7114         expression with array type.
7116 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
7118         PR c/42262
7119         * c-typeck.c (process_init_element): Do not treat a string as
7120         initializing a whole array when used with a designator for an
7121         individual element.
7123 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
7125         PR c/57574
7126         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7127         an inline function following a static declaration.
7129 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
7131         PR c/59310
7132         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7133         to p_name before calling c_parser_omp_teams instead of after.
7134         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7135         argument.  Remove unused p_name variable.
7137 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
7138             Jakub Jelinek  <jakub@redhat.com>
7140         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7141         external_scope is NULL.
7143 2013-11-27  Tom de Vries  <tom@codesourcery.com>
7144             Marc Glisse  <marc.glisse@inria.fr>
7146         PR c++/59032
7147         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7149 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
7151         * c-typeck.c: Add required include files from gimple.h.
7153 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
7155         * c-decl.c (define_label, shadow_tag_warned)
7156         (check_bitfield_type_and_width, grokdeclarator, grokparms,
7157         store_parm_decls_newstyle, store_parm_decls_oldstyle)
7158         (declspecs_add_type): Remove use of in_system_header macro.
7159         * c-parser.c (c_parser_unary_expression): Likewise.
7160         * c-typeck.c (store_init_value, process_init_element)
7161         (c_start_case): Likewise.
7163         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7164         macro.
7166         * c-parser.c (c_parser_set_source_position_from_token): Remove
7167         reference to in_system_header from comment.
7169 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
7171         * c-decl.c (grokdeclarator): Update comment to refer to
7172         tree_to_[su]hwi rather than tree_low_cst.
7174 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
7176         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7177         tree_to_uhwi throughout.
7179 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
7181         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7182         throughout.
7184 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
7186         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7187         throughout.
7189 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
7191         * c-parser.c (c_parser_cilk_simd): New.
7192         (c_parser_cilk_verify_simd): New.
7193         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7194         (c_parser_omp_for_loop): Add case for NE_EXPR.
7195         Set c_break_label for CILK_SIMD.
7196         (c_parser_cilk_clause_vectorlength): New.
7197         (c_parser_cilk_clause_linear): New.
7198         (c_parser_cilk_clause_name): New.
7199         (c_parser_cilk_all_clauses): New.
7200         * c-typeck.c (build_unary_op): Pass location argument to
7201         readonly_error.
7202         (build_modify_expr): Same.
7203         (build_asm_expr): Same.
7204         (c_finish_bc_stmt): Error on break/continue in loops.
7206 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
7208         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7210 2013-11-14  Diego Novillo  <dnovillo@google.com>
7212         * c-decl.c: Include print-tree.h.
7213         Include stor-layout.h.
7214         Include varasm.h.
7215         Include attribs.h.
7216         Include stringpool.h.
7217         * c-lang.c: Include fold-const.h.
7218         * c-parser.c: Include stringpool.h.
7219         Include attribs.h.
7220         Include stor-layout.h.
7221         Include varasm.h.
7222         Include trans-mem.h.
7223         * c-typeck.c: Include stor-layout.h.
7224         Include trans-mem.h.
7225         Include varasm.h.
7226         Include stmt.h.
7228 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
7230         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7231         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7232         __auto_type.
7233         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7234         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7235         RID_AUTO_TYPE.
7236         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7237         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7238         (c_parser_declarator, c_parser_direct_declarator_inner)
7239         (c_parser_parameter_declaration, c_parser_type_name): All callers
7240         changed.
7241         (c_parser_declaration_or_fndef): Handle declarations with type
7242         determined from the initializer.
7244 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
7246         * c-typeck.c: Include gimplify.h.
7248 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
7250         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7251         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7252         comment.
7253         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7254         or _Thread_local as appropriate in diagnostics.
7255         (build_null_declspecs): Initialize ret->thread_gnu_p.
7256         (declspecs_add_scspec): Handle either __thread or _Thread_local
7257         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
7258         pedantic.  Do not disallow _Thread_local extern and _Thread_local
7259         static.
7261 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
7262             Andrew MacLeod  <amacleod@redhat.com>
7264         * c-aux-info.c (gen_type): Handle atomic qualifier.
7265         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7266         qualifiers when compating types.
7267         (shadow_tag_warned): Handle atomic_p in declspecs.
7268         (quals_from_declspecs): Likewise.
7269         (start_decl): Use c_type_promotes_to when promoting argument
7270         types.
7271         (grokdeclarator): Handle _Atomic.
7272         (get_parm_info): Diagnose any qualifier on "void" as only
7273         parameter.
7274         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7275         comparing types.  Use c_type_promotes_to when promoting argument
7276         types.
7277         (finish_function): Use c_type_promotes_to when promoting argument
7278         types.
7279         (build_null_declspecs): Handle atomic_p in declspecs.
7280         (declspecs_add_qual): Handle RID_ATOMIC.
7281         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7282         (c_token_starts_declspecs): Handle RID_ATOMIC.
7283         (c_parser_declspecs): Handle atomic type specifiers and
7284         qualifiers.
7285         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7286         from types of expressions with atomic type.
7287         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7288         (c_parser_attribute_any_word): Handle RID_ATOMIC.
7289         (c_parser_initializer, c_parser_initelt, c_parser_initval)
7290         (c_parser_statement_after_labels, c_parser_switch_statement)
7291         (c_parser_for_statement, c_parser_expr_no_commas)
7292         (c_parser_conditional_expression, c_parser_binary_expression)
7293         (c_parser_cast_expression, c_parser_unary_expression)
7294         (c_parser_postfix_expression)
7295         (c_parser_postfix_expression_after_primary, c_parser_expression):
7296         Use convert_lvalue_to_rvalue.
7297         (c_parser_expression_conv, c_parser_expr_list): Document
7298         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
7299         (c_parser_objc_synchronized_statement): Use
7300         convert_lvalue_to_rvalue.
7301         (c_parser_objc_selector): Handle RID_ATOMIC.
7302         (c_parser_objc_receiver, c_parser_array_notation): Use
7303         convert_lvalue_to_rvalue.
7304         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7305         _Atomic (type-name).
7306         (struct c_declspecs): Add atomic_p field.
7307         (convert_lvalue_to_rvalue): Declare.
7308         * c-typeck.c (c_type_promotes_to): Promote atomic types to
7309         corresponding atomic types.
7310         (qualify_type): Don't add _Atomic qualifiers from second argument.
7311         (comp_target_types): Do not allow _Atomic mismatches.
7312         (type_lists_compatible_p): Do not remove atomic qualifiers when
7313         comparing types.
7314         (really_atomic_lvalue, convert_lvalue_to_rvalue)
7315         (build_atomic_assign): New functions.
7316         (build_unary_op): Use build_atomic_assign for atomic increment and
7317         decrement.
7318         (build_conditional_expr): Do not treat _Atomic void as a qualified
7319         version of void.
7320         (build_modify_expr): Use build_atomic_assign for atomic LHS.
7321         (find_anonymous_field_with_type, convert_to_anonymous_field)
7322         (convert_for_assignment): Do not remove atomic qualifiers when
7323         comparing types.
7324         (digest_init): Do not accept initialization of arrays of atomic
7325         elements by string constants.
7326         (build_asm_expr): Use convert_lvalue_to_rvalue.
7327         (build_binary_op): Do not treat _Atomic void as a qualified
7328         version of void.
7330 2013-11-06  DJ Delorie  <dj@redhat.com>
7332         * c-decl.c (locate_old_decl): If a previous conflicting decl is
7333         both explicit and builtin, print the location of the explicit one.
7335 2013-11-05  Tobias Burnus  <burnus@net-b.de>
7337         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7338         c_parser_omp_distribute, c_parser_omp_teams,
7339         c_parser_omp_target, c_parser_omp_declare): Handle
7340         -fopenmp-simd.
7342 2013-11-03  Marek Polacek  <polacek@redhat.com>
7344         * c-decl.c (grokdeclarator): Add VLA instrumentation.
7346 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
7348         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7349         check_dup_generic at the end, unless remove is true.
7350         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7351         remove = true;.
7352         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7354 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
7356         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7357         with decl that is not pointer nor array.
7359 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7361         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7362         a spawning function is found.
7363         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7364         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7365         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7366         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7367         case.
7368         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7369         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7370         expr.
7371         (c_finish_return): Added a check to reject _Cilk_spawn in return
7372         expression.
7373         (build_cilk_spawn): New function.
7374         (build_cilk_sync): Likewise.
7375         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
7377 2013-10-27  Tobias Burnus  <burnus@net-b.de>
7379         PR other/33426
7380         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7381         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7382         (c_parser_statement_after_labels): Update calls.
7384 2013-10-24  Tobias Burnus  <burnus@net-b.de>
7386         PR other/33426
7387         * c-parser.c (c_parser_pragma, c_parser_for_statement):
7388         Handle PRAGMA_IVDEP.
7389         (c_parser_statement_after_labels): Update call.
7391 2013-10-24  Marek Polacek  <polacek@redhat.com>
7393         * c-parser.c (c_parser_struct_declaration): Add a comment.
7394         (c_parser_declarator): Don't allow _Alignas here.
7396 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
7398         * c-parser.c: Include omp-low.h.
7399         * c-typeck.c: Likewise.
7401 2013-10-17  Marek Polacek  <polacek@redhat.com>
7403         PR c/58267
7404         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7405         Document syntax of the array-declarator.
7406         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7407         are not permitted.
7408         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7409         (c_parser_struct_declaration): Likewise.
7410         (c_parser_declarator): Likewise.
7411         (c_parser_direct_declarator_inner): Likewise.
7412         (c_parser_parameter_declaration): Likewise.
7413         (c_parser_type_name): Likewise.
7415 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
7417         * c-lang.h (current_omp_declare_target_attribute): New extern
7418         decl.
7419         * c-parser.c: Include c-lang.h.
7420         (struct c_parser): Change tokens to c_token *.
7421         Add tokens_buf field.  Change tokens_avail type to unsigned int.
7422         (c_parser_consume_token): If parser->tokens isn't
7423         &parser->tokens_buf[0], increment parser->tokens.
7424         (c_parser_consume_pragma): Likewise.
7425         (enum pragma_context): Add pragma_struct and pragma_param.
7426         (c_parser_external_declaration): Adjust
7427         c_parser_declaration_or_fndef caller.
7428         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7429         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7430         Adjust recursive call.
7431         (c_parser_struct_or_union_specifier): Use pragma_struct instead
7432         of pragma_external.
7433         (c_parser_parameter_declaration): Use pragma_param instead of
7434         pragma_external.
7435         (c_parser_compound_statement_nostart, c_parser_label,
7436         c_parser_for_statement): Adjust
7437         c_parser_declaration_or_fndef callers.
7438         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7439         it through to c_parser_conditional_expression.
7440         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7441         pass it through to c_parser_binary_expression.  Adjust recursive
7442         call.
7443         (c_parser_binary_expression): Remove prec argument, add
7444         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
7445         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7446         binop matches it, use build2 instead of parser_build_binary_op.
7447         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7448         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7449         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7450         Handle pragma_struct and pragma_param the same as pragma_external.
7451         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7452         (c_parser_omp_variable_list): Parse array sections for
7453         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7454         (c_parser_omp_clause_collapse): Fully fold collapse expression.
7455         (c_parser_omp_clause_reduction): Handle user defined reductions.
7456         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7457         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7458         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7459         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7460         c_parser_omp_clause_depend, c_parser_omp_clause_map,
7461         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7462         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7463         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7464         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
7465         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
7466         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7467         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
7468         (c_parser_omp_for_loop): Add CODE argument, pass it through
7469         to c_finish_omp_for.  Change last argument to cclauses,
7470         and adjust uses to grab parallel clauses from the array of all
7471         the split clauses.  Adjust c_parser_binary_expression,
7472         c_parser_declaration_or_fndef and c_finish_omp_for callers.
7473         (omp_split_clauses): New function.
7474         (c_parser_omp_simd): New function.
7475         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7476         Allow the function to be called also when parsing combined constructs,
7477         and call c_parser_omp_simd when parsing for simd.
7478         (c_parser_omp_sections_scope): If section-sequence doesn't start with
7479         #pragma omp section, require exactly one structured-block instead of
7480         sequence of statements.
7481         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7482         Allow the function to be called also when parsing combined constructs.
7483         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7484         Allow the function to be called also when parsing combined
7485         constructs.
7486         (c_parser_omp_taskgroup, c_parser_omp_cancel,
7487         c_parser_omp_cancellation_point, c_parser_omp_distribute,
7488         c_parser_omp_teams, c_parser_omp_target_data,
7489         c_parser_omp_target_update, c_parser_omp_target,
7490         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7491         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7492         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7493         (c_parser_omp_construct): Add p_name and mask vars.  Handle
7494         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7495         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
7496         and c_parser_omp_sections callers.
7497         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7498         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7499         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7500         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
7501         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
7502         OMP_CLAUSE_DEPEND.
7503         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7504         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7505         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7506         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7507         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7508         * c-typeck.c: Include tree-inline.h.
7509         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7510         handle_omp_array_sections_1, handle_omp_array_sections,
7511         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7512         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7513         user defined reductions.
7514         (c_tree_equal): New function.
7515         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7516         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7517         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7518         c_check_omp_declare_reduction_r): New prototypes.
7519         * c-decl.c (current_omp_declare_target_attribute): New variable.
7520         (c_decl_attributes): New function.
7521         (start_decl, start_function): Use it instead of decl_attributes.
7522         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7523         c_omp_reduction_decl, c_omp_reduction_lookup,
7524         c_check_omp_declare_reduction_r): New functions.
7526 2013-09-25  Tom Tromey  <tromey@redhat.com>
7528         * Make-lang.in (c/gccspec.o): Remove.
7529         (CFLAGS-c/gccspec.o): New variable.
7530         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7531         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7532         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7534 2013-09-25  Tom Tromey  <tromey@redhat.com>
7536         * Make-lang.in (c/gccspec.o): Don't use subshell.
7538 2013-09-18  Marek Polacek  <polacek@redhat.com>
7540         PR sanitize/58443
7541         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7542         Remove unnecessary check.
7544 2013-09-18  Marek Polacek  <polacek@redhat.com>
7546         PR sanitizer/58411
7547         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7548         no_sanitize_undefined attribute.
7550 2013-09-13  Kai Tietz  <ktietz@redhat.com>
7552         PR target/57848
7553         * c-decl.c (c_builtin_function_ext_scope): Remove
7554         wrong assumption that it is never called on prexisting
7555         symbol.
7557 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
7559         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7561 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7563         * c-objc-common.c (c_tree_printer): Tidy.
7565 2013-08-30  Marek Polacek  <polacek@redhat.com>
7567         * c-typeck.c (build_binary_op): Add division by zero and shift
7568         instrumentation.
7570 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
7571             Joseph Myers  <joseph@codesourcery.com>
7573         PR c/35649
7574         * c-typeck.c (c_common_type): Prefer double_type_node over
7575         other REAL_TYPE types with the same precision.
7576         (convert_arguments): Likewise.
7578 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7580         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7581         (c_initialize_diagnostics): Call a destructor for the early printer.
7583 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7585         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7586         printer initialization.
7588 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7590         PR c/57490
7591         * c-array-notation.c (fix_conditional_array_notations_1): Added a
7592         check for truth values.
7593         (expand_array_notation_exprs): Added truth values case.  Removed an
7594         unwanted else.  Added for-loop to walk through subtrees in default
7595         case.
7597 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7599         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7601 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
7603         * c-parser.c (struct c_generic_association): Fix typo.
7605 2013-07-23  Tom Tromey  <tromey@redhat.com>
7606             Joseph Myers  <joseph@codesourcery.com>
7608         * c-parser.c (struct c_generic_association): New.
7609         (c_generic_association_d): New typedef.
7610         (c_parser_generic_selection): New function.
7611         (c_parser_postfix_expression): Handle RID_GENERIC.
7613 2013-07-13  Jason Merrill  <jason@redhat.com>
7615         PR c++/57793
7616         * c-decl.c (finish_struct): Check for too-large class.
7618 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
7620         PR c/57821
7621         * c-typeck.c (set_init_index): When folding, check for index overflow.
7623 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7625         * c-parser.c (c_parser_array_notation): Removed rejection of array
7626         notations in an array of function pointers.
7628 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7630         * c-array-notation.c (make_triplet_val_inv): New function.
7631         (create_cmp_incr): Likewise.
7632         (create_array_refs): Likewise.
7633         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7634         Also modularized common parts between functions and called the function.
7635         (build_array_notation_expr): Likewise.
7636         (fix_conditional_array_notations_1): Likewise.
7637         (fix_array_notation_expr): Likewise.
7638         (fix_array_notation_call_expr): Likewise.
7640 2013-06-18  Marek Polacek  <polacek@redhat.com>
7642         PR c/57630
7643         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7645 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7647         * c-array-notation.c (build_array_notation_expr): Reject array notation
7648         mismatch between LHS and RHS even inside a call_expr.  Also, removed
7649         a couple while statements that were dead code.
7651 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7653         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7654         excessive precision expressions in function parameters.  Also removed
7655         couple unwanted while statements.
7657 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7659         * c-array-notation.c (expand_array_notation_exprs): Added
7660         ARRAY_NOTATION_REF case.
7662 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7664         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7665         function to c-family/array-notation-common.c.
7666         (is_cilkplus_reduce_builtin): Likewise.
7667         (find_rank): Likewise.
7668         (extract_array_notation_exprs): Likewise.
7669         (replace_array_notations): Likewise.
7670         (find_inv_trees): Likewise.
7671         (replace_inv_trees): Likewise.
7672         (contains_array_notation_expr): Likewise.
7673         (find_correct_array_notation_type): Likewise.
7674         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7675         (struct inv_list): Moved this to c-family/array-notation-common.c.
7676         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
7678 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7680         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7681         reduction functions outside the for-loop.  Added a check if the fundecl
7682         is non-NULL.  Finally, removed an unwanted if-statement, and made the
7683         body unconditional.
7685 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7687         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7688         condition of the if-statement matches the rank of else-block and then-
7689         block when array notations are used.
7690         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7691         expression after the entire function body is parsed.
7692         (c_parser_expr_no_commas): Delayed creating array notation expressions
7693         to the end of function parsing.
7694         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7695         whole if-statement instead of just the condition.
7696         (expand_array_notation_exprs): Added MODIFY_EXPR case.
7698 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7700         PR c/57474
7701         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7702         array to NULL_TREE if they are unused.  Also added a check for the
7703         field to be NULL before its fields are used in future.
7705 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7707         PR bootstrap/57450
7708         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7709         (build_array_notation_expr): Likewise.
7711 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7713         * c-typeck.c (build_array_ref): Added a check to see if array's
7714         index is greater than one.  If true, then emit an error.
7715         (build_function_call_vec): Exclude error reporting and checking
7716         for builtin array-notation functions.
7717         (convert_arguments): Likewise.
7718         (c_finish_return): Added a check for array notations as a return
7719         expression.  If true, then emit an error.
7720         (c_finish_loop): Added a check for array notations in a loop
7721         condition.  If true then emit an error.
7722         (lvalue_p): Added a ARRAY_NOTATION_REF case.
7723         (build_binary_op): Added a check for array notation expr inside
7724         op1 and op0.  If present, we call another function to find correct
7725         type.
7726         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7727         * c-parser.c (c_parser_compound_statement): Check if array
7728         notation code is used in tree, if so, then transform them into
7729         appropriate C code.
7730         (c_parser_expr_no_commas): Check if array notation is used in LHS
7731         or RHS, if so, then build array notation expression instead of
7732         regular modify.
7733         (c_parser_postfix_expression_after_primary): Added a check for
7734         colon(s) after square braces, if so then handle it like an array
7735         notation.  Also, break up array notations in unary op if found.
7736         (c_parser_direct_declarator_inner): Added a check for array
7737         notation.
7738         (c_parser_compound_statement): Added a check for array notation in
7739         a stmt.  If one is present, then expand array notation expr.
7740         (c_parser_if_statement): Likewise.
7741         (c_parser_switch_statement): Added a check for array notations in
7742         a switch statement's condition.  If true, then output an error.
7743         (c_parser_while_statement): Similarly, but for a while.
7744         (c_parser_do_statement): Similarly, but for a do-while.
7745         (c_parser_for_statement): Similarly, but for a for-loop.
7746         (c_parser_unary_expression): Check if array notation is used in a
7747         pre-increment or pre-decrement expression.  If true, then expand
7748         them.
7749         (c_parser_array_notation): New function.
7750         * c-array-notation.c: New file.
7751         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7753 2013-05-23  Mike Stump  <mikestump@comcast.net>
7755         * c-typeck.c (convert_for_assignment): Handle references to memory
7756         spaces better.
7758 2013-05-16  Jason Merrill  <jason@redhat.com>
7760         * Make-lang.in (cc1$(exeext)): Use link mutex.
7762 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
7764         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7765         to simply use OPT_Wpointer_arith.
7766         (build_unary_op): Likewise.
7768 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
7770         PR c/19449
7771         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7772         argument.  If set, or it temporarily for parsing of the first
7773         argument into force_folding_builtin_constant_p.
7774         (c_parser_postfix_expression): Adjust callers.
7776 2013-03-21  Richard Biener  <rguenther@suse.de>
7778         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7779         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
7781 2013-02-12  Marek Polacek  <polacek@redhat.com>
7783         PR c/44938
7784         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7785         origtypes to NULL.
7787 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
7789         PR c/56078
7790         * c-typeck.c (set_nonincremental_init_from_string): If
7791         constructor_max_index is NULL, treat it as if tree_int_cst_lt
7792         returned false.
7793         (process_init_element): Likewise.
7795 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
7797         PR c++/55619
7798         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7799         argument, don't call default_function_array_conversion
7800         nor c_fully_fold here.
7801         (c_parser_asm_statement): Adjust callers.
7802         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7803         and outputs here, and call default_function_array_conversion
7804         on inputs that don't need to be addressable.
7806 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
7808         PR c/39464
7809         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7810         warning require that both c_common_unsigned_type as well as
7811         c_common_signed_type is the same for both mvl and mvr types.
7813 2012-11-16  Diego Novillo  <dnovillo@google.com>
7815         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7817         * c-common.c: Use new vec API in vec.h.
7818         * c-common.h: Likewise.
7819         * c-gimplify.c: Likewise.
7820         * c-pragma.c: Likewise.
7821         * c-pretty-print.c: Likewise.
7822         * c-pretty-print.h: Likewise.
7823         * c-semantics.c: Likewise.
7824         * c-decl.c: Likewise.
7825         * c-parser.c: Likewise.
7826         * c-tree.h: Likewise.
7827         * c-typeck.c: Likewise.
7829 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
7831         PR c++/54930
7832         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7834 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7836         PR c/53066
7837         * c-decl.c (warn_if_shadowing): Do not warn if a variable
7838         shadows a function, unless the variable is a function or a
7839         pointer-to-function.
7841 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
7843         PR c/54381
7844         * c-parser.c (struct c_tree_loc_pair): Removed.
7845         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7846         add location_t * and tree * arguments, fill in array of 3
7847         sizeof_arg trees and corresponding locs.
7848         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7849         c_parser_expr_list callers.
7850         (c_parser_postfix_expression_after_primary): Likewise.  Pass
7851         array of 3 sizeof_arg trees and locs (corresponding to first
7852         3 arguments) to sizeof_pointer_memaccess_warning.
7854 2012-10-09  Lawrence Crowl  <crowl@google.com>
7856         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7857         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7858         hash table.
7860 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
7862         PR c++/54194
7863         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7864         call.
7866 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
7868         PR c++/54427
7869         * c-typeck.c: Include c-common.h.
7870         (enum stv_conv): Moved to c-common.h.
7871         (scalar_to_vector): Moved to c-common.c.
7872         (build_binary_op): Adapt to scalar_to_vector's new prototype.
7873         * Make-lang.in: c-typeck.c depends on c-common.h.
7875 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
7877         * c-decl.c (c_write_global_declarations): Fix handling of
7878         -fdump-ada-spec*.
7880 2012-09-30  Sharad Singhai  <singhai@google.com>
7882         * c-decl.c (c_write_global_declarations): Use a different method
7883         to determine if the dump has ben initialized.
7885 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
7887         PR c/54552
7888         * c-typeck.c (c_cast_expr): When casting to a type requiring
7889         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7890         c_fully_fold first.
7892 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
7894         PR c/54103
7895         * c-typeck.c (build_unary_op): Pass original argument of
7896         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7897         any C_MAYBE_CONST_EXPR, if it has integer operands.
7898         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7899         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7900         to c_objc_common_truthvalue_conversion, then remove any
7901         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
7902         c_objc_common_truthvalue_conversion not
7903         c_common_truthvalue_conversion.
7904         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7905         call note_integer_operands for arguments with integer operands
7906         that are not integer constants.
7908 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
7910         PR c/54559
7911         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7912         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7914 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
7916         PR c/54428
7917         * c-convert.c (convert): Don't call fold_convert_loc if
7918         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7919         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
7920         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7922 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
7924         PR c/54355
7925         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7926         for nested and empty_ok arguments in the call to
7927         c_parser_declaration_or_fndef.
7929 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
7931         * c-tree.h (c_last_sizeof_arg): Declare.
7932         * c-parser.c (struct c_tree_loc_pair): New type.
7933         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
7934         non-NULL.
7935         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7936         (c_parser_postfix_expression_after_primary): Likewise.  Call
7937         sizeof_pointer_memaccess_warning if needed.
7938         (sizeof_ptr_memacc_comptypes): New function.
7939         * c-typeck.c (c_last_sizeof_arg): New global variable.
7940         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7942 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
7944         * c-lang.h (lang_decl): Add variable_size GTY option.
7946 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
7948         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7949         * Make-lang.in: Fix dependencies.
7951 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
7953         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7954         and add language Makefile hooks.
7955         * config-lang.in: New file.
7956         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7957         add the required "normal" config-lang.in rules.
7958         * c-lang.h: Moved from gcc/ to here.
7959         * c-tree.h: Likewise.
7960         * c-objc-common.c: Likewise.
7961         * c-objc-common.h: Likewise.
7962         * c-typeck.c: Likewise.
7963         * c-convert.c: Likewise.
7964         * c-lang.c: Likewise.
7965         * c-aux-info.c: Likewise.
7966         * c-errors.c: Likewise.
7967         * gccspec.c: Likewise.
7968         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
7969         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
7971 Copyright (C) 2012-2021 Free Software Foundation, Inc.
7973 Copying and distribution of this file, with or without modification,
7974 are permitted in any medium without royalty provided the copyright
7975 notice and this notice are preserved.