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