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