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