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