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