PR c/71171: Fix uninitialized source_range in c_parser_postfix_expression
[platform/upstream/gcc.git] / gcc / c / ChangeLog
1 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
2
3         PR c/71171
4         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5         in error-handling.
6         (c_parser_postfix_expression): Likewise.
7         * c-tree.h (c_expr::set_error): New method.
8         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
9         that result's range is initialized.
10
11 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
12
13         * c-typeck.c (parser_build_unary_op): Fix formatting.
14
15 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
16
17         * c-decl.c (grokdeclarator): Remove errmsg and use of
18         targetm.invalid_return_type.
19         (grokparms): Remove errmsg and use of
20         targetm.invalid_parameter_type.
21
22 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
23
24         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
25         function return type.
26
27 2016-05-12  Marek Polacek  <polacek@redhat.com>
28
29         PR c/70756
30         * c-decl.c (build_compound_literal): Pass LOC down to
31         c_incomplete_type_error.
32         * c-tree.h (require_complete_type): Adjust declaration.
33         (c_incomplete_type_error): Likewise.
34         * c-typeck.c (require_complete_type): Add location parameter, pass it
35         down to c_incomplete_type_error.
36         (c_incomplete_type_error): Add location parameter, pass it down to
37         error_at.
38         (build_component_ref): Pass location down to c_incomplete_type_error.
39         (default_conversion): Pass location down to require_complete_type.
40         (build_array_ref): Likewise.
41         (build_function_call_vec): Likewise.
42         (convert_arguments): Likewise.
43         (build_unary_op): Likewise.
44         (build_c_cast): Likewise.
45         (build_modify_expr): Likewise.
46         (convert_for_assignment): Likewise.
47         (c_finish_omp_clauses): Likewise.
48
49 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
50
51         PR c/43651
52         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
53         is enabled.
54         * c-errors.c (pedwarn_c90): Return true if warned.
55         * c-tree.h (pedwarn_c90): Change return type to bool.
56         (enum c_declspec_word): Add new enumerator cdw_atomic.
57
58 2016-05-11  Marek Polacek  <polacek@redhat.com>
59
60         PR c++/71024
61         * c-decl.c (diagnose_mismatched_decls): Factor out code to
62         diagnose_mismatched_attributes and call it.
63
64 2016-05-10  Marek Polacek  <polacek@redhat.com>
65
66         PR c/70255
67         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
68         on a declaration following the definition.
69
70 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
71
72         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
73         parse it through to c_parser_c99_block_statement.
74         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
75         caller.
76
77 2016-05-04  Marek Polacek  <polacek@redhat.com>
78
79         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
80         OPT_Wdangling_else.
81
82 2016-05-04  Marek Polacek  <polacek@redhat.com>
83
84         PR c/48778
85         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
86         for macro expansions.
87
88 2016-05-03  Marek Polacek  <polacek@redhat.com>
89
90         PR c/70859
91         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
92         check_builtin_function_arguments.
93
94 2016-05-03  Richard Biener  <rguenther@suse.de>
95
96         * Make-lang.in (cc1-checksum.c): For stage-final re-use
97         the checksum from the previous stage.
98
99 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
100
101         * c-parser.c (c_parser_oacc_all_clauses): Update call to
102         c_finish_omp_clauses.
103         (c_parser_omp_all_clauses): Likewise.
104         (c_parser_oacc_cache): Likewise.
105         (c_parser_oacc_loop): Likewise.
106         (omp_split_clauses): Likewise.
107         (c_parser_omp_declare_target): Likewise.
108         (c_parser_cilk_all_clauses): Likewise.
109         (c_parser_cilk_for): Likewise.
110         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
111         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
112
113 2016-05-02  Marek Polacek  <polacek@redhat.com>
114
115         PR c/70851
116         * c-decl.c (grokdeclarator): Diagnose when array's size has an
117         incomplete type.
118
119 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
120
121         PR middle-end/70626
122         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
123         OACC_LOOP_CLAUSE_MASK.
124         (c_parser_oacc_kernels_parallel): Update call to
125         c_oacc_split_loop_clauses.
126
127 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
128
129         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
130         argument to build_modify_expr in two cases.
131
132 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
133
134         * c-parser.c (c_parser_postfix_expression_after_primary): Call
135         warn_for_memset instead of warning directly here.
136
137 2016-04-26  Marek Polacek  <polacek@redhat.com>
138
139         PR c/67784
140         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
141         out of ...
142         (c_parser_for_statement): ... here.
143         (c_parser_if_statement): Use it.
144         (c_parser_switch_statement): Use it.
145         (c_parser_while_statement): Use it.
146
147         PR c/70791
148         * c-decl.c (pushdecl): Pass LOCUS down to warning.
149
150 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
151
152         PR c++/69363
153         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
154         instead of c_finish_cilk_clauses.
155         * c-tree.h (c_finish_omp_clauses): Add new default argument.
156         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
157         floating-point variables in the linear clause for Cilk Plus.
158
159 2016-04-18  Michael Matz  <matz@suse.de>
160
161         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
162         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
163
164 2016-04-15  Marek Polacek  <polacek@redhat.com>
165
166         PR c/70671
167         * c-typeck.c (build_unary_op): Pass location down to error and
168         warning call.
169
170 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
171
172         PR c/70436
173         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
174         where needed.
175         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
176         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
177         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
178         Adjust c_parser_pragma callers.
179         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
180         caller.
181         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
182         c_parser_statement.
183         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
184         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
185         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
186         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
187         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
188         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
189         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
190         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
191         down where needed.
192         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
193         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
194         calls.
195
196 2016-04-13  Marek Polacek  <polacek@redhat.com>
197
198         PR c/70436
199         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
200         adjust callers.
201         (c_parser_statement): Likewise.
202         (c_parser_c99_block_statement): Likewise.
203         (c_parser_while_statement): Likewise.
204         (c_parser_for_statement): Likewise.
205         (c_parser_if_body): Don't set IF_P here.
206         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
207         about dangling else here.
208         * c-tree.h (c_finish_if_stmt): Adjust declaration.
209         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
210         warn about dangling else here.
211
212 2016-04-04  Marek Polacek  <polacek@redhat.com>
213
214         PR c/70307
215         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
216
217 2016-03-31  Marek Polacek  <polacek@redhat.com>
218
219         PR c/70297
220         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
221
222 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
223
224         PR c/70281
225         * c-parser.c (c_parser_postfix_expression): Set the source range
226         for uses of "__builtin_types_compatible_p".
227
228 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
229
230         PR c/70280
231         * c-typeck.c (composite_type): Don't count void_list_node
232         into len, if the list is terminated by void_list_node, start
233         with void_list_node instead of NULL for newargs.  Stop
234         at void_list_node.
235
236 2016-03-16  Marek Polacek  <polacek@redhat.com>
237
238         PR c/70093
239         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
240         nested functions returning VM types.
241
242 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
243
244         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
245         when calling c_finish_omp_clauses.
246
247 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
248
249         PR c/69824
250         * c-decl.c (get_parm_info): Don't queue implicit function declarations
251         for later.
252
253 2016-03-04  Marek Polacek  <polacek@redhat.com>
254
255         PR c/69798
256         * c-parser.c (c_parser_postfix_expression): Call
257         c_parser_cast_expression rather than c_parser_postfix_expression.
258
259 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
260
261         PR c/69796
262         PR c/69974
263         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
264         of incomplete decls to error_mark_node.
265
266 2016-02-24  Marek Polacek  <polacek@redhat.com>
267
268         PR c/69819
269         * c-decl.c (finish_decl): Don't update the copy of the type of a
270         different decl type.
271
272 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
273
274         PR objc/69844
275         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
276         in id_kind reclassification.
277
278 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
279
280         PR c/69835
281         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
282
283 2016-02-16  James Norris  <jnorris@codesourcery.com>
284
285         PR c/64748
286         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
287
288 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
289
290         * c-decl.c (build_null_declspecs): Zero the entire struct.
291
292         PR c/69522
293         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
294         callers changed.  If nested_p is true, use it to call
295         finish_implicit_inits.
296         * c-tree.h (finish_implicit_inits): Declare.
297         * c-typeck.c (finish_implicit_inits): New function.  Move code
298         from ...
299         (push_init_level): ... here.
300         (set_designator, process_init_element): Call finish_implicit_inits.
301
302 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
303
304         PR c/69768
305         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
306         arguments for -Waddress warning.
307
308 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
309
310         PR c/69669
311         * c-decl.c (finish_enum): When honoring mode attribute,
312         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
313
314 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
315
316         PR debug/69518
317         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
318         all type variants, not just TYPE_MAIN_VARIANT.
319
320 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
321
322         PR debug/66869
323         * c-decl.c (c_write_global_declarations_1): Warn with
324         warn_unused_function if static prototype without definition
325         is not C_DECL_USED.
326
327 2016-01-27  Marek Polacek  <polacek@redhat.com>
328
329         PR c/68062
330         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
331         to unsigned, if needed.  Add -Wsign-compare warning.
332
333 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
334
335         PR tree-optimization/69483
336         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
337
338 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
339
340         PR c/24293
341         * c-tree.h (incomplete_record_decls): Declare.
342         * c-parser.c (incomplete_record_decls): Define.
343         (c_parser_translation_unit): Iterate through incomplete_record_decls and
344         report error if any decl has zero size.
345         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
346         or enum type to incomplete_record_decls.
347
348 2016-01-14  Tom de Vries  <tom@codesourcery.com>
349
350         PR tree-optimization/68773
351         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
352         set force_output.
353
354 2016-01-14  Marek Polacek  <polacek@redhat.com>
355
356         PR c/69262
357         * c-decl.c (grokdeclarator): Provide more information for invalid
358         array declarations.
359
360 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
361
362         * c-parser.c (c_parser_unary_expression): For dereferences, build
363         a combined location before calling build_indirect_ref, so that
364         error reports cover the full range, manually updating the c_expr
365         src_range.
366
367 2016-01-06  Marek Polacek  <polacek@redhat.com>
368
369         PR sanitizer/69099
370         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
371         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
372         NULL.
373
374 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
375
376         Update copyright years.
377
378 2016-01-04  Marek Polacek  <polacek@redhat.com>
379
380         PR c/68908
381         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
382         optimization to use __atomic_fetch_* built-in if possible.
383
384 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
385
386         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
387         into...
388         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
389         all users.
390
391 2015-12-22  Marek Polacek  <polacek@redhat.com>
392
393         PR c/69002
394         * c-typeck.c (build_component_ref): Warn when acessing elements of
395         atomic structures or unions.
396
397 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
398
399         * c-typeck.c: Include "gcc-rich-location.h".
400         (build_binary_op): In the two places that call binary_op_error,
401         create a gcc_rich_location and populate it with the location of
402         the binary op and its two operands.
403
404 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
405
406         * c-parser.c (c_parser_statement_after_labels): When calling
407         c_finish_return, Use the return expression's location if it has
408         one, falling back to the location of the first token within it.
409         * c-typeck.c (c_finish_return): When issuing warnings about
410         the incorrect presence/absence of a return value, issue a note
411         showing the declaration of the function.
412
413 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
414
415         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
416         to 4.
417         (c_parser_peek_nth_token): New function.
418         (c_parser_peek_conflict_marker): New function.
419         (c_parser_error): Detect conflict markers and report them as such.
420
421 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
422
423         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
424         to preserve range information for the primary expression
425         in the call to c_parser_postfix_expression_after_primary.
426
427 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
428
429         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
430         expression location, falling back on the first token location,
431         rather than always using the latter.
432
433 2015-12-16  Marek Polacek  <polacek@redhat.com>
434
435         PR c/64637
436         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
437         available.
438
439 2015-12-15  Marek Polacek  <polacek@redhat.com>
440
441         PR c/68907
442         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
443         artificial decl.
444
445 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
446
447         * c-parser.c (c_parser_alignof_expression): Capture location of
448         closing parenthesis (if any), or of end of unary expression, and
449         use it to build a src_range for the expression.
450
451 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
452
453         PR c/68757
454         * c-parser.c (c_parser_get_builtin_args): Add
455         "out_close_paren_loc" param, and write back to it.
456         (c_parser_postfix_expression): Capture the closing
457         parenthesis location for RID_CHOOSE_EXPR,
458         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
459         RID_BUILTIN_SHUFFLE and use it to set the source range
460         for such expressions; within RID_BUILTIN_COMPLEX set
461         the underlying location.
462
463 2015-12-07  Marek Polacek  <polacek@redhat.com>
464
465         PR c/68668
466         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
467         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
468
469 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
470
471         * c-tree.h (c_build_va_arg): Adjust prototype.
472         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
473         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
474         parameter, adjust throughout and issue an error if EXPR is a component
475         with reverse storage order.
476
477 2015-12-02  Jason Merrill  <jason@redhat.com>
478
479         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
480         (c_fully_fold_internal, decl_constant_value_for_optimization):
481         Move from c-common.c.
482         * c-tree.h: Declare decl_constant_value_for_optimization.
483         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
484
485 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
486
487         PR c/68162
488         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
489         following link from declarator to next declarator.  Track original
490         qualified type and pass it to c_build_qualified_type.
491         * c-typeck.c (c_build_qualified_type): Add arguments
492         orig_qual_type and orig_qual_indirect.
493
494 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
495
496         * c-parser.c (c_parser_omp_clause_name)
497         (c_parser_oacc_all_clauses): Alphabetical sorting.
498
499 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
500
501         PR c/68533
502         * c-decl.c (get_parm_info): Use b->locus instead of input_location
503         for diagnostics.
504
505 2015-12-01  Julian Brown  <julian@codesourcery.com>
506             Cesar Philippidis  <cesar@codesourcery.com>
507             James Norris  <James_Norris@mentor.com>
508
509         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
510         (c_parser_oacc_clause_use_device): New function.
511         (c_parser_oacc_all_clauses): Add use_device support.
512         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
513         (c_parser_oacc_host_data): New function.
514         (c_parser_omp_construct): Add host_data support.
515         * c-tree.h (c_finish_oacc_host_data): Add prototype.
516         * c-typeck.c (c_finish_oacc_host_data): New function.
517         (c_finish_omp_clauses): Add use_device support.
518
519 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
520
521         PR c/67106
522         * c-decl.c: Set TYPE_PACKED in variants.
523
524 2015-11-27  Martin Liska  <mliska@suse.cz>
525
526         PR c++/68312
527         * c-array-notation.c (fix_builtin_array_notation_fn):
528         Use release_vec_vec instead of vec::release.
529         (build_array_notation_expr): Likewise.
530         (fix_conditional_array_notations_1): Likewise.
531         (fix_array_notation_expr): Likewise.
532         (fix_array_notation_call_expr): Likewise.
533
534 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
535
536         PR c/63326
537         * c-parser.c (c_parser_compound_statement_nostart): If
538         last_label is true, use pragma_stmt instead of pragma_compound
539         as second c_parser_pragma argument.
540         (c_parser_omp_ordered, c_parser_omp_target_update,
541         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
542         false as second argument to c_parser_skip_to_pragma_eol after
543         diagnosing standalone directives used in pragma_stmt context.
544
545 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
546
547         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
548         with "if (ENABLE_OFFLOADING)".
549
550 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
551
552         PR objc/68438
553         * c-parser.c (c_parser_postfix_expression): Set up source ranges
554         for various Objective-C constructs: Class.name syntax,
555         @selector(), @protocol(), @encode(), and [] message syntax.
556
557 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
558
559         PR 62314
560         * c-typeck.c (should_suggest_deref_p): New function.
561         (build_component_ref): Special-case POINTER_TYPE when
562         generating a "not a structure of union"  error message, and
563         suggest a "->" rather than a ".", providing a fix-it hint.
564
565 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
566
567         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
568         candidate into a new function, find_closest_identifier.
569
570 2015-11-19  Marek Polacek  <polacek@redhat.com>
571
572         PR c/68412
573         * c-typeck.c (parser_build_binary_op): Properly handle
574         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
575
576 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
577
578         * c-parser.c (set_c_expr_source_range): Bulletproof both
579         overloaded implementations against NULL expr->value.
580         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
581         values.
582         (c_parser_unary_expression): Likewise when handling addresses of
583         labels.
584         (c_parser_postfix_expression): Likewise for statement expressions,
585         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
586         __builtin_va_arg, and for __builtin_offset_of.
587         (c_parser_postfix_expression_after_paren_type): Initialize expr's
588         src_range using the range of the braced initializer.
589         (c_parser_transaction_expression): Set src_range for "ret" to a
590         sane pair of values.
591
592 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
593
594         * c-parser.c (c_finish_omp_declare_simd): Look for
595         "simd" attribute as well. Update error message.
596
597 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
598
599         * c-parser.c (c_parser_omp_declare_target): Adjust.
600
601 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
602
603         * c-typeck.c (c_finish_omp_clauses): Don't mark
604         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
605
606 2015-11-14  Marek Polacek  <polacek@redhat.com>
607
608         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
609         * c-typeck.c: Likewise.
610
611 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
612
613         * c-decl.c (warn_defaults_to): Pass line_table to
614         rich_location ctor.
615         * c-errors.c (pedwarn_c99): Likewise.
616         (pedwarn_c90): Likewise.
617         * c-parser.c (set_c_expr_source_range): New functions.
618         (c_token::get_range): New method.
619         (c_token::get_finish): New method.
620         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
621         based on the range from the start of the LHS to the end of the
622         RHS.
623         (c_parser_conditional_expression): Likewise, based on the range
624         from the start of the cond.value to the end of exp2.value.
625         (c_parser_binary_expression): Call set_c_expr_source_range on
626         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
627         (c_parser_cast_expression): Call set_c_expr_source_range on ret
628         based on the cast_loc through to the end of the expr.
629         (c_parser_unary_expression): Likewise, based on the
630         op_loc through to the end of op.
631         (c_parser_sizeof_expression) Likewise, based on the start of the
632         sizeof token through to either the closing paren or the end of
633         expr.
634         (c_parser_postfix_expression): Likewise, using the token range,
635         or from the open paren through to the close paren for
636         parenthesized expressions.
637         (c_parser_postfix_expression_after_primary): Likewise, for
638         various kinds of expression.
639         * c-tree.h (struct c_expr): Add field "src_range".
640         (c_expr::get_start): New method.
641         (c_expr::get_finish): New method.
642         (set_c_expr_source_range): New decls.
643         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
644         on ret for prefix unary ops.
645         (parser_build_binary_op): Likewise, running from the start of
646         arg1.value through to the end of arg2.value.
647
648 2015-11-13  Marek Polacek  <polacek@redhat.com>
649
650         PR c/68320
651         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
652
653 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
654
655         * c-typeck.c: Include spellcheck.h.
656         (lookup_field_fuzzy_find_candidates): New function.
657         (lookup_field_fuzzy): New function.
658         (build_component_ref): If the field was not found, try using
659         lookup_field_fuzzy and potentially offer a suggestion.
660
661 2015-11-12  James Norris  <jnorris@codesourcery.com>
662             Joseph Myers  <joseph@codesourcery.com>
663
664         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
665         (c_parser_omp_clause_name): Handle 'device_resident' clause.
666         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
667         and PRAGMA_OMP_CLAUSE_LINK.
668         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
669         and PRAGMA_OACC_CLAUSE_LINK.
670         (OACC_DECLARE_CLAUSE_MASK): New definition.
671         (c_parser_oacc_declare): New function.
672
673 2015-11-12  Marek Polacek  <polacek@redhat.com>
674
675         PR c/67784
676         * c-parser.c (c_parser_for_statement): Reclassify the token in
677         a correct scope.
678
679 2015-11-11  Marek Polacek  <polacek@redhat.com>
680
681         PR c/68107
682         PR c++/68266
683         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
684         checking the size of an array.
685
686 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
687
688         * c-array-notation.c: Remove unused header files.
689         * c-aux-info.c: Likewise.
690         * c-convert.c: Likewise.
691         * c-decl.c: Likewise.
692         * c-errors.c: Likewise.
693         * c-lang.c: Likewise.
694         * c-objc-common.c: Likewise.
695         * c-parser.c: Likewise.
696         * c-typeck.c: Likewise.
697         * gccspec.c: Likewise.
698
699 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
700             Cesar Philippidis  <cesar@codesourcery.com>
701             James Norris  <jnorris@codesourcery.com>
702             Julian Brown  <julian@codesourcery.com>
703             Nathan Sidwell  <nathan@codesourcery.com>
704
705         c/
706         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
707         routine arg.
708         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
709         (c_parser_pragma): Parse 'acc routine'.
710         (OACC_ROUTINE_CLAUSE_MARK): Define.
711         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
712
713 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
714
715         PR debug/67192
716         * c-typeck.c (c_finish_loop): For unconditional loops, set the
717         location of the backward-goto to the start of the loop body.
718
719 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
720
721         PR debug/67192
722         * c-parser.c (c_parser_while_statement): Finish the loop before
723         parsing ahead for misleading indentation.
724         (c_parser_for_statement): Likewise.
725
726 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
727
728         * c-decl.c (finish_struct): If the structure has reverse storage
729         order, rewrite the type of array fields with scalar component.  Call
730         maybe_apply_pragma_scalar_storage_order on entry.
731         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
732         errors on bit-fields and reverse SSO here and not...
733         (c_mark_addressable): ...here.
734         (output_init_element): Adjust call to initializer_constant_valid_p.
735         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
736
737 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
738
739         * c-decl.c (warn_defaults_to): Update for change in signature
740         of diagnostic_set_info.
741         * c-errors.c (pedwarn_c99): Likewise.
742         (pedwarn_c90): Likewise.
743         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
744         for textinfo::set_location.
745
746 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
747             Thomas Schwinge  <thomas@codesourcery.com>
748             James Norris  <jnorris@codesourcery.com>
749
750         * c-parser.c (c_parser_omp_clause_name): Add support for
751         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
752         (c_parser_omp_clause_default): Add is_oacc argument. Handle
753         default(none) in OpenACC.
754         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
755         arguments.
756         (c_parser_oacc_clause_tile): New function.
757         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
758         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
759         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
760         TILE}.
761         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
762         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
763         FIRSTPRIVATE}.
764         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
765         (c_parser_oacc_update): Update the error message for missing clauses.
766         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
767         and OMP_CLAUSE_INDEPENDENT.
768
769 2015-11-05  Marek Polacek  <polacek@redhat.com>
770
771         PR c/68090
772         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
773         deal with pre-evaluation on invalid types.
774
775 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
776             Ilya Verbin  <ilya.verbin@intel.com>
777
778         * c-parser.c: Include context.h and gimple-expr.h.
779         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
780         monotonic together with nonmonotonic.
781         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
782         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
783         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
784         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
785         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
786         expressions on combined target teams before the target.
787         (c_parser_omp_declare_target): If decl has "omp declare target" or
788         "omp declare target link" attribute, and cgraph or varpool node already
789         exists, then set corresponding flags.  Call c_finish_omp_clauses
790         in the parenthesized extended-list syntax case.
791         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
792         declare target.
793         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
794         on OMP_CLAUSE_REDUCTION array sections.
795         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
796         into the constant offset, or for variable low-bound using
797         POINTER_PLUS_EXPR.  For structure element based array sections use
798         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
799         (c_finish_omp_clauses): Drop generic_field_head, structure
800         elements are now always mapped even as array section bases,
801         diagnose same var in data sharing and mapping clauses.  Diagnose if
802         linear step on declare simd is neither a constant nor a uniform
803         parameter.  Look through POINTER_PLUS_EXPR for array section
804         reductions.  Diagnose the same var or function appearing multiple
805         times on the same directive.  Fix up wording for the to clause if t
806         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
807         modifier on kinds other than dynamic or guided or nonmonotonic
808         modifier together with ordered clause.
809
810 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
811             Chung-Lin Tang  <cltang@codesourcery.com>
812
813         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
814
815 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
816
817         * c-array-notation.c: Reorder #include's and remove duplicates.
818         * c-aux-info.c: Likewise.
819         * c-convert.c: Likewise.
820         * c-decl.c: Likewise.
821         * c-errors.c: Likewise.
822         * c-lang.c: Likewise.
823         * c-objc-common.c: Likewise.
824         * c-parser.c: Likewise.
825         * c-typeck.c: Likewise.
826
827 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
828
829         PR debug/66068
830         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
831         after calling build_qualified_type.
832
833 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
834             Thomas Schwinge  <thomas@codesourcery.com>
835             James Norris  <jnorris@codesourcery.com>
836             Joseph Myers  <joseph@codesourcery.com>
837             Julian Brown  <julian@codesourcery.com>
838             Bernd Schmidt  <bschmidt@redhat.com>
839
840         * c-parser.c (c_parser_oacc_shape_clause): New.
841         (c_parser_oacc_simple_clause): New.
842         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
843         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
844
845 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
846             James Norris  <jnorris@codesourcery.com>
847             Cesar Philippidis  <cesar@codesourcery.com>
848
849         PR c/64765
850         PR c/64880
851         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
852         parameters, and handle these.  Adjust all users.
853         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
854         into...
855         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
856         all users.
857         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
858         declare functions.
859         (c_finish_omp_construct): Declare function.
860         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
861         Merge functions into...
862         (c_finish_omp_construct): ... this new function.
863
864 2015-10-22  Richard Biener  <rguenther@suse.de>
865
866         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
867         before folding a MINUS_EXPR.
868
869 2015-10-21  Marek Polacek  <polacek@redhat.com>
870
871         PR c/68024
872         * c-decl.c (start_function): Warn about vararg functions without
873         a prototype.
874
875 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
876
877         * c-typeck.c (build_conditional_expr): Use boolean vector
878         type for vector comparison.
879         (build_vec_cmp): New.
880         (build_binary_op): Use build_vec_cmp for comparison.
881
882 2015-10-20  Marek Polacek  <polacek@redhat.com>
883
884         * c-parser.c (is_cilkplus_vector_p): Don't define here.
885
886 2015-10-20  Marek Polacek  <polacek@redhat.com>
887
888         PR c/67964
889         * c-parser.c (c_parser_attributes): Break out of the loop if the
890         token after an attribute isn't a comma.
891
892 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
893             Aldy Hernandez  <aldyh@redhat.com>
894
895         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
896         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
897         (c_parser_omp_variable_list): Handle structure elements for
898         map, to and from clauses.  Handle array sections in reduction
899         clause.  Formatting fixes.
900         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
901         if clause modifiers.
902         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
903         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
904         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
905         c_parser_omp_clause_is_device_ptr): New functions.
906         (c_parser_omp_clause_ordered): Parse optional parameter.
907         (c_parser_omp_clause_reduction): Handle array reductions.
908         (c_parser_omp_clause_schedule): Parse optional simd modifier.
909         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
910         functions.
911         (c_parser_omp_clause_linear): Parse linear clause modifiers.
912         (c_parser_omp_clause_depend_sink): New function.
913         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
914         (c_parser_omp_clause_map): Parse release/delete map kinds and
915         optional always modifier.
916         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
917         and c_finish_omp_clauses callers.
918         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
919         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
920         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
921         (OMP_CRITICAL_CLAUSE_MASK): Define.
922         (c_parser_omp_critical): Parse critical clauses.
923         (c_parser_omp_for_loop): Handle doacross loops, adjust
924         c_finish_omp_for and c_finish_omp_clauses callers.
925         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
926         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
927         (OMP_FOR_CLAUSE_MASK): Add linear clause.
928         (c_parser_omp_for): Disallow ordered clause when combined with
929         distribute.  Disallow linear clause when combined with distribute
930         and not combined with simd.
931         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
932         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
933         parse clauses and if depend clause is found, don't parse a body.
934         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
935         Allow target parallel without for after it.
936         (OMP_TASK_CLAUSE_MASK): Add priority clause.
937         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
938         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
939         invalid kinds.
940         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
941         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
942         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
943         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
944         functions.
945         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
946         defaultmap and is_device_ptr clauses.
947         (c_parser_omp_target): Parse target parallel and target simd.  Set
948         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
949         and target exit data.  Diagnose invalid map kinds.
950         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
951         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
952         construct.
953         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
954         &omp_priv.
955         (OMP_TASKLOOP_CLAUSE_MASK): Define.
956         (c_parser_omp_taskloop): New function.
957         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
958         handle PRAGMA_OMP_TASKLOOP.
959         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
960         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
961         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
962         Add IS_OMP argument, handle structure element bases, diagnose
963         bitfields, pass IS_OMP recursively, diagnose known zero length
964         array sections in depend clauses, handle array sections in reduction
965         clause, diagnose negative length even for pointers.
966         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
967         types, pass IS_OMP down to handle_omp_array_sections_1, handle
968         array sections in reduction clause, set
969         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
970         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
971         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
972         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
973
974 2015-10-06  Marek Polacek  <polacek@redhat.com>
975
976         * c-parser.c (c_parser_statement_after_labels): Use
977         protected_set_expr_location.
978         (c_parser_omp_clause_num_gangs): Likewise.
979         (c_parser_omp_clause_num_threads): Likewise.
980         (c_parser_omp_clause_num_workers): Likewise.
981         (c_parser_omp_clause_vector_length): Likewise.
982         (c_parser_omp_clause_num_teams): Likewise.
983         (c_parser_omp_clause_thread_limit): Likewise.
984         * c-typeck.c (build_c_cast): Likewise.
985         (c_cast_expr): Likewise.
986
987 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
988
989         * c-typeck.c (c_tree_equal): Use real_equal instead of
990         REAL_VALUES_EQUAL.
991
992 2015-10-04  Jason Merrill  <jason@redhat.com>
993
994         * c-parser.c (c_lex_one_token): Handle @synchronized.
995         * c-decl.c (match_builtin_function_types): A declaration of a built-in
996         can change whether the function is transaction_safe.
997
998 2015-10-02  Marek Polacek  <polacek@redhat.com>
999
1000         PR c/67730
1001         * c-typeck.c (convert_for_assignment): Use the expansion point
1002         location throughout.
1003
1004 2015-10-02  Marek Polacek  <polacek@redhat.com>
1005
1006         PR c/64249
1007         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1008         and pass it down to c_parser_if_statement.
1009         (c_parser_else_body): Add CHAIN parameter and pass it down to
1010         c_parser_statement_after_labels.
1011         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
1012         duplicated if-else-if conditions.
1013
1014 2015-10-01  Marek Polacek  <polacek@redhat.com>
1015
1016         * c-typeck.c (convert_for_assignment): Improve commentary.
1017
1018 2015-09-30  Marek Polacek  <polacek@redhat.com>
1019
1020         PR c/67730
1021         * c-typeck.c (c_finish_return): Use the expansion point location for
1022         certain "return with value" warnings.
1023
1024 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1025
1026         * c-parser.c (pragma_lex): Add loc argument.
1027
1028 2015-09-15  Marek Polacek  <polacek@redhat.com>
1029
1030         PR c/67580
1031         * c-decl.c (tag_exists_p): New function.
1032         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1033         struct/union/enum keywords are missing.
1034         * c-tree.h (tag_exists_p): Declare.
1035
1036 2015-09-15  Marek Polacek  <polacek@redhat.com>
1037
1038         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1039         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1040         Return NULL_TREE instead of 0.
1041         (lookup_name): Return NULL_TREE instead of 0.
1042         (lookup_name_in_scope): Likewise.
1043         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1044         (parser_xref_tag): Use false instead of 0.
1045         (start_struct): Use true instead of 1.
1046         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1047
1048 2015-09-14  Marek Polacek  <polacek@redhat.com>
1049
1050         * c-typeck.c (set_nonincremental_init_from_string): Use
1051         HOST_WIDE_INT_M1U when shifting a negative value.
1052
1053 2015-09-09  Mark Wielaard  <mjw@redhat.com>
1054
1055         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1056         parm against NULL.
1057
1058 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
1059
1060         PR c/67502
1061         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1062         into OMP_FOR_PRE_BODY rather than before the loop.
1063
1064 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
1065
1066         PR c/67501
1067         * c-parser.c (c_parser_oacc_all_clauses,
1068         c_parser_omp_all_clauses): Remove invalid clause from
1069         list of clauses even if parser->error is set.
1070
1071         PR c/67500
1072         * c-parser.c (c_parser_omp_clause_aligned,
1073         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1074         test for errors.
1075         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1076         error_mark_node.
1077
1078         PR c/67495
1079         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1080         instead of c_parser_unary_expression.  If the result is !lvalue_p,
1081         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1082
1083 2015-09-04  Marek Polacek  <polacek@redhat.com>
1084
1085         PR sanitizer/67279
1086         * c-typeck.c (build_binary_op): Don't instrument static initializers.
1087
1088 2015-09-03  Martin Sebor  <msebor@redhat.com>
1089
1090         PR c/66516
1091         * c-typeck.c (convert_arguments, parser_build_unary_op,
1092         build_conditional_expr, c_cast_expr, convert_for_assignment,
1093         build_binary_op, _objc_common_truthvalue_conversion): Call
1094         reject_gcc_builtin.
1095         (c_decl_implicit): Define.
1096
1097 2015-09-02  Marek Polacek  <polacek@redhat.com>
1098
1099         PR c/67432
1100         * c-parser.c (c_parser_enum_specifier): Give a better error for
1101         an empty enum.
1102
1103 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
1104
1105         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1106
1107 2015-08-12  Marek Polacek  <polacek@redhat.com>
1108
1109         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1110         LOC to it.
1111
1112 2015-08-03  Marek Polacek  <polacek@redhat.com>
1113
1114         PR c/67088
1115         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1116         Use it.
1117         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1118
1119 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
1120
1121         * c-parser.c (c_parser_if_body): Take token_indent_info
1122         argument. Call warn_for_misleading_indentation even when the
1123         body is a semicolon.  Extract token_indent_infos corresponding
1124         to the guard, body and next tokens.  Adjust call to
1125         warn_for_misleading_indentation accordingly.
1126         (c_parser_else_body): Likewise.
1127         (c_parser_if_statement): Likewise.
1128         (c_parser_while_statement): Likewise.
1129         (c_parser_for_statement): Likewise.
1130
1131 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
1132             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1133
1134         * c-decl.c (get_parm_info): Remove static var. Update warning
1135         message.
1136
1137 2015-07-27  Marek Polacek  <polacek@redhat.com>
1138
1139         PR c++/66555
1140         PR c/54979
1141         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1142
1143 2015-07-20  Marek Polacek  <polacek@redhat.com>
1144
1145         PR c++/55095
1146         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1147         (build_binary_op): Warn about left shift overflows.
1148
1149 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
1150
1151         * c-array-notation.c: Adjust includes for flags.h changes.
1152         * c-objc-common.c: Likewise.
1153
1154 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
1155
1156         * c-array-notation.c: Adjust includes.
1157         * c-aux-info.c: Likewise.
1158         * c-convert.c: Likewise.
1159         * c-decl.c: Likewise.
1160         * c-errors.c: Likewise.
1161         * c-lang.c: Likewise.
1162         * c-objc-common.c: Likewise.
1163         * c-parser.c: Likewise.
1164         * c-typeck.c: Likewise.
1165
1166 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1167
1168         PR fortran/66605
1169         * c-decl.c (finish_function): Call do_warn_unused_parameter.
1170
1171 2015-06-29  Marek Polacek  <polacek@redhat.com>
1172
1173         PR c/66322
1174         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1175         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
1176         about -Wswitch-bool here.
1177         (do_case): Update c_add_case_label call.
1178         (c_finish_case): Update c_do_switch_warnings call.
1179
1180 2015-06-27  Marek Polacek  <polacek@redhat.com>
1181
1182         * c-typeck.c: Use VECTOR_TYPE_P throughout.
1183
1184 2015-06-26  Marek Polacek  <polacek@redhat.com>
1185
1186         * c-array-notation.c (fix_builtin_array_notation_fn): Use
1187         INDIRECT_REF_P.
1188         * c-typeck.c (array_to_pointer_conversion): Likewise.
1189         (build_unary_op): Likewise.
1190         (c_finish_return): Likewise.
1191
1192 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
1193
1194         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1195         * c-parser.c: Likewise.
1196
1197 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
1198
1199         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1200         instead of pointer_hash.
1201         (detect_field_duplicates): Likewise.
1202
1203 2015-06-25  Marek Polacek  <polacek@redhat.com>
1204
1205         * c-array-notation.c: Use VAR_P throughout.
1206         * c-decl.c: Likewise.
1207         * c-objc-common.c: Likewise.
1208         * c-parser.c: Likewise.
1209         * c-typeck.c: Likewise.
1210
1211 2015-06-25  Marek Polacek  <polacek@redhat.com>
1212
1213         * c-decl.c: Use is_global_var throughout.
1214         * c-parser.c: Likewise.
1215         * c-typeck.c: Likewise.
1216
1217 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
1218
1219         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1220         * c-aux-info.c: Likewise.
1221         * c-convert.c: Likewise.
1222         * c-decl.c: Likewise.
1223         * c-errors.c: Likewise.
1224         * c-lang.c: Likewise.
1225         * c-objc-common.c: Likewise.
1226         * c-parser.c: Likewise.
1227         * c-typeck.c: Likewise.
1228
1229 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
1230
1231         PR middle-end/66325
1232         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1233         variants.
1234
1235 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
1236
1237         * c-decl.c (pop_scope): Register the main translation unit
1238         through the new debug hook.
1239
1240 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
1241
1242         * c-array-notation.c : Adjust include files.
1243         * c-aux-info.c : Likewise.
1244         * c-convert.c : Likewise.
1245         * c-decl.c : Likewise.
1246         * c-errors.c : Likewise.
1247         * c-lang.c : Likewise.
1248         * c-lang.h : Likewise.
1249         * c-objc-common.c : Likewise.
1250         * c-parser.c : Likewise.
1251         * c-typeck.c : Likewise.
1252
1253 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
1254
1255         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1256         immediately clobber it.
1257         (c_write_global_declarations_1): Remove call to
1258         check_global_declaration_1.
1259         (c_write_global_declarations_2): Remove.
1260         (c_write_final_cleanups): Rename from c_write_global_declarations.
1261         Remove call to finalize_compilation_unit.
1262         Remove calls to debugging hooks.
1263         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1264         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1265         * c-tree.h: Remove c_write_global_declarations.
1266
1267 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
1268
1269         * c-array-notation.c: Adjust includes for restructured coretypes.h.
1270         * c-aux-info.c: Likewise.
1271         * c-convert.c: Likewise.
1272         * c-decl.c: Likewise.
1273         * c-errors.c: Likewise.
1274         * c-lang.c: Likewise.
1275         * c-objc-common.c: Likewise.
1276         * c-parser.c: Likewise.
1277         * c-typeck.c: Likewise.
1278
1279 2015-06-04  Marek Polacek  <polacek@redhat.com>
1280
1281         PR c/66341
1282         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1283         it is a lvalue.
1284
1285 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1286
1287         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1288         Warn for empty struct.
1289         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1290
1291 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
1292
1293         * c-decl.c (start_function): Call plugin before parsing.
1294         (finish_function): Call plugin after parsing.
1295
1296 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1297
1298         PR c/49551
1299         * c-decl.c (merge_decls): Merge DECL_COMMON.
1300
1301 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
1302
1303         * Make-lang.in (check_gcc_pallelize): Define.
1304
1305 2015-05-22  Marek Polacek  <polacek@redhat.com>
1306
1307         PR c/47043
1308         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1309         attributes.
1310
1311 2015-05-21  Marek Polacek  <polacek@redhat.com>
1312
1313         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1314         DECL_BUILT_IN.
1315
1316 2015-05-20  Marek Polacek  <polacek@redhat.com>
1317
1318         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1319         * c-typeck.c: Likewise.
1320
1321 2015-05-19  Marek Polacek  <polacek@redhat.com>
1322
1323         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1324
1325 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
1326
1327         PR middle-end/66199
1328         * c-parser.c (c_parser_omp_for_loop): Don't add
1329         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1330         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1331         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1332         constructs.
1333
1334 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
1335
1336         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1337         swaps.
1338
1339 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1340
1341         PR fortran/44054
1342         * c-objc-common.c (c_tree_printer): Replace locus pointer with
1343         accessor function.
1344
1345 2015-05-14  Marek Polacek  <polacek@redhat.com>
1346
1347         PR c/66066
1348         PR c/66127
1349         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1350         rather than with 0.
1351
1352 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
1353
1354         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1355         to add a call to warn_for_misleading_indentation.
1356         (c_parser_else_body): Likewise, adding param "else_loc".
1357         (c_parser_if_statement): Check for misleading indentation.
1358         (c_parser_while_statement): Likewise.
1359         (c_parser_for_statement): Likewise.
1360
1361 2015-05-08  Marek Polacek  <polacek@redhat.com>
1362
1363         PR c/64918
1364         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1365         (output_init_element): Likewise.
1366
1367 2015-05-07  Marek Polacek  <polacek@redhat.com>
1368
1369         PR c/65179
1370         * c-typeck.c (build_binary_op): Warn when left shifting a negative
1371         value.
1372
1373 2015-04-30  Marek Polacek  <polacek@redhat.com>
1374
1375         * c-typeck.c (set_init_label): Call error_at instead of error and
1376         pass LOC to it.
1377
1378         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
1379         the type of a decl.
1380
1381         * c-typeck.c (c_build_va_arg): Clarify the error message.
1382
1383 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
1384
1385         * c-parser.c (c_parser_oacc_enter_exit_data): Use
1386         OMP_STANDALONE_CLAUSES.
1387
1388 2015-04-28  Marek Polacek  <polacek@redhat.com>
1389
1390         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1391
1392 2015-04-28  Marek Polacek  <polacek@redhat.com>
1393
1394         PR c/65901
1395         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1396
1397 2015-04-25  Marek Polacek  <polacek@redhat.com>
1398
1399         PR c/52085
1400         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
1401         attribute.
1402
1403 2015-04-23  Marek Polacek  <polacek@redhat.com>
1404
1405         PR c/65345
1406         * c-decl.c (set_labels_context_r): New function.
1407         (store_parm_decls): Call it via walk_tree_without_duplicates.
1408         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1409         instead of create_tmp_var.  Build TARGET_EXPR instead of
1410         COMPOUND_EXPR.
1411         (build_atomic_assign): Use create_tmp_var_raw instead of
1412         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
1413
1414 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1415
1416         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1417         (c_parser_omp_target_update): Add missed %> to error_at ().
1418
1419 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
1420
1421         PR target/55143
1422         * c-decl.c (c_default_pointer_mode): Remove definition.
1423         * c-tree.h (c_default_pointer_mode): Remove declaration.
1424
1425 2015-03-27  Tobias Burnus  <burnus@net-b.de>
1426
1427         PR c/65586
1428         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1429         error out.
1430         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1431         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1432         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1433
1434 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
1435
1436         * c-decl.c (c_decl_attributes): Also add "omp declare target"
1437         attribute for DECL_EXTERNAL VAR_DECLs.
1438
1439 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
1440
1441         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1442         argument.
1443
1444 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
1445
1446         PR c/65120
1447         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1448         before preparing arguments to warn_logical_not_parentheses.
1449
1450 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
1451
1452         PR c/65120
1453         * c-typeck.c (parser_build_binary_op): Don't warn for
1454         !!x == y or !b == y where b is _Bool.
1455
1456 2015-03-09  Marek Polacek  <polacek@redhat.com>
1457
1458         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1459         * c-decl.c (grokdeclarator): Likewise.
1460         * c-typeck.c (build_binary_op): Likewise.
1461
1462 2015-02-27  Marek Polacek  <polacek@redhat.com>
1463
1464         PR c/65228
1465         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1466
1467 2015-02-14  Marek Polacek  <polacek@redhat.com>
1468
1469         PR c/64768
1470         * c-decl.c (grokdeclarator): Set the range of a flexible array member
1471         declared through a typedef name.
1472
1473 2015-02-13  Marek Polacek  <polacek@redhat.com>
1474
1475         PR c/65050
1476         * c-decl.c (grokdeclarator): Print also the type when giving
1477         the error message about array's incomplete element type.
1478
1479 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
1480
1481         PR c/64824
1482         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1483         check in the POP macro.
1484
1485 2015-02-09  Marek Polacek  <polacek@redhat.com>
1486
1487         PR c/64856
1488         * c-typeck.c (process_init_element): Don't always wrap
1489         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1490         initializing a range of elements.
1491
1492 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
1493
1494         PR c/64824
1495         PR c/64868
1496         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1497
1498 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
1499
1500         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1501         processing enum declaration.
1502
1503 2015-01-29  Marek Polacek  <polacek@redhat.com>
1504
1505         PR c/64709
1506         * c-typeck.c (pop_init_level): If constructor_elements has
1507         exactly one element with integer_zerop value, set constructor_zeroinit
1508         to 1.  Remove braces around warning_init call.
1509
1510 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
1511
1512         PR c/64766
1513         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1514         of FUNCTION_DECLs with error_mark_node.
1515
1516 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
1517
1518         PR c/64778
1519         * c-typeck.c (convert_arguments): Return -1 if there are
1520         error_args, even if we've diagnosed too many arguments.
1521
1522 2015-01-21  Richard Biener  <rguenther@suse.de>
1523
1524         PR middle-end/64313
1525         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1526         for builtins the user declared correctly.
1527
1528 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
1529             Bernd Schmidt  <bernds@codesourcery.com>
1530             Cesar Philippidis  <cesar@codesourcery.com>
1531             James Norris  <jnorris@codesourcery.com>
1532             Jakub Jelinek  <jakub@redhat.com>
1533             Ilmir Usmanov  <i.usmanov@samsung.com>
1534
1535         * c-parser.c: Include "gomp-constants.h".
1536         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1537         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1538         Use OMP_CLAUSE_SET_MAP_KIND.
1539         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1540         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1541         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1542         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1543         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1544         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1545         "copyout", "create", "delete", "deviceptr", "gang", "host",
1546         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1547         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1548         "present_or_create", "pcreate", "seq", "self", "vector",
1549         "vector_length", "wait", "worker".
1550         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1551         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1552         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1553         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1554         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1555         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1556         (c_parser_oacc_data_clause_deviceptr)
1557         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1558         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1559         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1560         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1561         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1562         (c_parser_oacc_parallel, c_parser_oacc_update)
1563         (c_parser_oacc_wait): New functions.
1564         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1565         (c_finish_oacc_data): New prototypes.
1566         * c-typeck.c: Include "gomp-constants.h".
1567         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
1568         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
1569         OMP_CLAUSE_SET_MAP_KIND.
1570         (c_finish_oacc_parallel, c_finish_oacc_kernels)
1571         (c_finish_oacc_data): New functions.
1572         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1573         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1574         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1575         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1576         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1577         GOMP_MAP_FORCE_DEVICEPTR.
1578
1579 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1580
1581         * c-array-notation.c: Include hash-set.h, machmode.h,
1582         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1583         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1584         * c-aux-info.c: Ditto.
1585         * c-convert.c: Ditto.
1586         * c-decl.c: Ditto.
1587         * c-errors.c: Ditto.
1588         * c-lang.c: Dittoxs.
1589         * c-objc-common.c: Ditto.
1590         * c-parser.c: Ditto.
1591         * c-typeck.c: Include hash-set.h, machmode.h,
1592         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1593         fold-const.h, wide-int.h, inchash.h, real.h and
1594         fixed-value.h due to flattening of tree.h.
1595
1596 2015-01-07  Marek Polacek  <polacek@redhat.com>
1597
1598         PR c/64417
1599         * c-typeck.c (process_init_element): Disallow initialization of
1600         a flexible array member with a string constant if the structure
1601         is in an array.
1602
1603 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1604
1605         PR sanitizer/64344
1606         * c-typeck.c (convert_for_assignment, c_finish_return): For
1607         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1608         types also set in_late_binary_op around convert call.
1609         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1610         to integral type casts, if not in_late_binary_op, pass c_fully_fold
1611         result on expr as last argument to ubsan_instrument_float_cast,
1612         if in_late_binary_op, don't use c_save_expr but save_expr.
1613
1614         Update copyright years.
1615
1616 2015-01-05  Marek Polacek  <polacek@redhat.com>
1617
1618         PR c/64423
1619         * c-typeck.c (build_array_ref): Pass loc down to
1620         warn_array_subscript_with_type_char.
1621
1622 2014-12-20  Martin Uecker <uecker@eecs.berkeley.edu>
1623
1624         * c-typeck.c: New behavious for pointers to arrays with qualifiers
1625         (common-pointer-type): For pointers to arrays take qualifiers from
1626         element type.
1627         (build_conditional_expr): Add warnings for lost qualifiers.
1628         (comp-target-types): Allow pointers to arrays with different qualifiers.
1629         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1630         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1631         to PEDWARN_FOR_QUALIFIERS.
1632
1633 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
1634
1635         PR sanitizer/64289
1636         * c-convert.c: Include ubsan.h.
1637         (convert): For real -> integral casts and
1638         -fsanitize=float-cast-overflow don't call convert_to_integer, but
1639         instead instrument the float cast directly.
1640
1641 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
1642
1643         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1644         c_finish_stmt_expr): Remove NULL last argument from
1645         create_tmp_var_raw and create_tmp_var calls.
1646         * c-array-notation.c (fix_builtin_array_notation_fn,
1647         build_array_notation_expr, fix_conditional_array_notations_1,
1648         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1649
1650 2014-11-28  Marek Polacek  <polacek@redhat.com>
1651
1652         PR c/63862
1653         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1654         convert the right operand to integer type.
1655
1656 2014-11-25  Marek Polacek  <polacek@redhat.com>
1657
1658         PR c/63877
1659         * c-decl.c (start_function): Disable -Wmissing-declarations warning
1660         for inline functions.
1661
1662 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
1663
1664         PR target/63764
1665         * c-typeck.c (build_array_ref): Adjust
1666         convert_vector_to_pointer_for_subscript caller.  If it returns true,
1667         call non_lvalue_loc on the result.
1668
1669 2014-11-11  Richard Biener  <rguenther@suse.de>
1670
1671         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1672         to true.
1673
1674 2014-11-10  Andi Kleen  <ak@linux.intel.com>
1675
1676         PR c/60804
1677         * c-parser.c (c_parser_statement_after_labels): Call
1678         check_no_cilk.
1679         (c_parser_if_statement): Dito.
1680         (c_parser_switch_statement): Dito.
1681         (c_parser_while_statement): Dito.
1682         (c_parser_do_statement): Dito.
1683         (c_parser_for_statement): Dito.
1684         * c-typeck.c (c_finish_loop): Dito.
1685
1686 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
1687
1688         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1689         OPT_Wshift_count_overflow in the warnings.
1690
1691 2014-10-30  Marek Polacek  <polacek@redhat.com>
1692
1693         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1694         print the stripped version as well, if they're not the same.
1695
1696 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
1697
1698         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1699         machine_mode.
1700
1701 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
1702
1703         * c-decl.c: Adjust include files.
1704         * c-parser.c: Ditto.
1705
1706 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
1707             Tom Tromey  <tromey@redhat.com>
1708
1709         * c-tree.h (enum c_oracle_request): New.
1710         (c_binding_oracle_function): New typedef.
1711         (c_binding_oracle, c_pushtag, c_bind): Declare.
1712         * c-decl.c (c_binding_oracle): New global.
1713         (I_SYMBOL_CHECKED): New macro.
1714         (i_symbol_binding): New function.
1715         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1716         (I_TAG_CHECKED): New macro.
1717         (i_tag_binding): New function.
1718         (I_TAG_BINDING, I_TAG_DECL): Redefine.
1719         (I_LABEL_CHECKED): New macro.
1720         (i_label_binding): New function.
1721         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1722         (c_print_identifier): Save and restore c_binding_oracle.
1723         (c_pushtag, c_bind): New functions.
1724
1725 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
1726
1727         * c-typeck.c: Adjust include files.
1728
1729 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1730
1731         PR c++/53061
1732         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1733         initialization here...
1734         (c_initialize_diagnostics): ... but here. Set defaults after
1735         building pretty-printer.
1736
1737 2014-10-23  Marek Polacek  <polacek@redhat.com>
1738
1739         PR c/63626
1740         * c-decl.c (pop_scope): Don't print warning in external_scope.
1741
1742 2014-10-19  Marek Polacek  <polacek@redhat.com>
1743
1744         PR c/63567
1745         * c-typeck.c (output_init_element): Allow initializing objects with
1746         static storage duration with compound literals even in C99 and add
1747         pedwarn for it.
1748
1749 2014-10-17  Marek Polacek  <polacek@redhat.com>
1750
1751         PR c/63567
1752         * c-typeck.c (digest_init): Allow initializing objects with static
1753         storage duration with compound literals even in C99 and add pedwarn
1754         for it.
1755
1756 2014-10-17  Marek Polacek  <polacek@redhat.com>
1757
1758         PR c/63543
1759         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1760         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1761         error multiple times.  Print the type.
1762
1763 2014-10-17  Marek Polacek  <polacek@redhat.com>
1764
1765         PR c/63549
1766         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1767         type.
1768
1769 2014-10-17  Marek Polacek  <polacek@redhat.com>
1770
1771         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1772         (start_function): Use OPT_Wimplicit_int instead of 0.
1773         (store_parm_decls_oldstyle): Likewise.
1774
1775 2014-10-17  Alan Modra  <amodra@gmail.com>
1776
1777         PR middle-end/61848
1778         * c-decl.c (merge_decls): Don't merge section name or tls model
1779         to newdecl symtab node, instead merge to olddecl.  Override
1780         existing olddecl section name.  Set tls_model for all thread-local
1781         vars, not just OMP thread-private ones.  Remove incorrect comment.
1782
1783 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
1784
1785         * c-decl.c: Adjust include files.
1786
1787 2014-10-14  DJ Delorie  <dj@redhat.com>
1788
1789         * c-parser.c (c_parse_init): Add RID entries for each __intN.
1790         (c_token_starts_typename): Check all __intN, not just __int128.
1791         (c_token_starts_declspecs): Likewise.
1792         (c_parser_declspecs): Likewise.
1793         (c_parser_attribute_any_word): Likewise.
1794         (c_parser_objc_selector): Likewise.
1795         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1796         (struct c_declspecs): Add int_n_idx field to record *which* __intN
1797         is specified.
1798         * c-decl.c (declspecs_add_type): Check for all __intN, not just
1799         __int128.
1800         (finish_declspecs): Likewise.
1801
1802 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
1803
1804         * c-parser.c (c_parser_all_labels): New function to replace
1805         the duplicate code.
1806         (c_parser_statement): Call the new function.
1807
1808 2014-10-09  Marek Polacek  <polacek@redhat.com>
1809
1810         PR c/63480
1811         * c-typeck.c (pop_init_level): Don't warn about initializing
1812         with { }.
1813
1814 2014-10-07  Marek Polacek  <polacek@redhat.com>
1815
1816         PR c/59717
1817         * c-decl.c (header_for_builtin_fn): New function.
1818         (implicitly_declare): Suggest which header to include.
1819
1820 2014-10-07  Marek Polacek  <polacek@redhat.com>
1821
1822         * c-convert.c (convert): Use error_operand_p.
1823         * c-typeck.c (require_complete_type): Likewise.
1824         (really_atomic_lvalue): Likewise.
1825         (digest_init): Likewise.
1826         (handle_omp_array_sections_1): Likewise.
1827
1828 2014-10-03  Marek Polacek  <polacek@redhat.com>
1829
1830         PR c/63453
1831         * c-decl.c (pop_scope): Don't warn about "inline function declared
1832         but never defined" for functions marked with gnu_inline attribute.
1833
1834 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
1835
1836         PR c++/63249
1837         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1838         on low_bound and length.
1839
1840 2014-09-24  Marek Polacek  <polacek@redhat.com>
1841
1842         PR c/61405
1843         PR c/53874
1844         * c-parser.c: Don't define CPP_KEYWORD.
1845         (c_parser_switch_statement): Pass original type to c_finish_case.
1846         * c-tree.h (c_finish_case): Update declaration.
1847         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
1848         conditionally to c_do_switch_warnings.
1849
1850 2014-09-03  Marek Polacek  <polacek@redhat.com>
1851
1852         PR c/62024
1853         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1854         conversions.
1855
1856 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
1857             Balaji V. Iyer  <balaji.v.iyer@intel.com>
1858             Igor Zamyatin  <igor.zamyatin@intel.com>
1859
1860         * c-parser.c (c_parser_cilk_for): New function.
1861         (c_parser_cilk_grainsize): Likewise.
1862         (c_get_temp_regvar): Likewise.
1863         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1864         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1865         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1866         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1867         case.
1868
1869 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
1870
1871         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1872         with using HOST_WIDE_INT without truncation to 'int'
1873
1874 2014-08-22  Marek Polacek  <polacek@redhat.com>
1875
1876         PR c++/62199
1877         * c-typeck.c (parser_build_binary_op): Adjust call to
1878         warn_logical_not_parentheses.
1879
1880 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
1881
1882         PR other/62008
1883         * c-parser.c (c_parser_array_notation): Check for correct
1884         type of an array added.
1885
1886 2014-08-19  Marek Polacek  <polacek@redhat.com>
1887
1888         PR c++/62153
1889         * c-typeck.c (build_binary_op): If either operand of a comparison
1890         is a boolean expression, call maybe_warn_bool_compare.
1891
1892 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
1893
1894         PR c/45584
1895         * c-typeck.c (build_c_cast): Do a conversion even when the
1896         TYPE_MAIN_VARIANTs are the same.
1897
1898 2014-08-19  Marek Polacek  <polacek@redhat.com>
1899
1900         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1901         pedwarn_c99 instead of pedwarn.
1902         (grokfield): Likewise.
1903         (warn_defaults_to): New function.
1904         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1905         Unconditionally call pedwarn_c99 instead of pedwarn.
1906         (start_function): Call warn_defaults_to instead of pedwarn_c99.
1907         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1908         check flag_isoc11 before.
1909         * c-errors.c (pedwarn_c99): Change the return type to bool.
1910         Handle -Wc99-c11-compat.
1911         * c-parser.c (disable_extension_diagnostics): Handle
1912         warn_c99_c11_compat.
1913         (restore_extension_diagnostics): Likewise.
1914         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1915         instead of pedwarn, don't check flag_isoc11 before.
1916         (c_parser_declspecs): Likewise.
1917         (c_parser_alignas_specifier): Likewise.
1918         (c_parser_alignof_expression): Likewise.
1919         (c_parser_generic_selection): Likewise.
1920         * c-tree.h (pedwarn_c99): Update declaration.
1921         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1922         of pedwarn_c99.
1923
1924 2014-08-19  Marek Polacek  <polacek@redhat.com>
1925
1926         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1927         to pedwarn_c90.
1928         * c-errors.c: Include "opts.h".
1929         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1930         * c-parser.c (disable_extension_diagnostics): Handle negative value
1931         of warn_c90_c99_compat, too.
1932         (restore_extension_diagnostics): Likewise.
1933         (c_parser_compound_statement_nostart): Pass
1934         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1935
1936 2014-08-12  Marek Polacek  <polacek@redhat.com>
1937
1938         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1939         Add pedwarn.
1940         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1941         Likewise.
1942         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1943
1944 2014-08-10 Marek Polacek  <polacek@redhat.com>
1945
1946         PR c/51849
1947         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1948         Call pedwarn_c90 instead of pedwarn.
1949         (check_bitfield_type_and_width): Likewise.
1950         (declspecs_add_qual): Likewise.
1951         (declspecs_add_type): Likewise.
1952         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1953         Adjust to only call pedwarn_c90.
1954         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
1955         pedwarn_c90 instead of pedwarn.
1956         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1957         * c-parser.c (disable_extension_diagnostics): Handle
1958         warn_c90_c99_compat.
1959         (restore_extension_diagnostics): Likewise.
1960         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
1961         pedwarn_c90 instead of pedwarn.
1962         (c_parser_initelt): Likewise.
1963         (c_parser_postfix_expression): Likewise.
1964         (c_parser_postfix_expression_after_paren_type): Likewise.
1965         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1966         * c-tree.h: Fix formatting.
1967         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
1968         pedwarn_c90 instead of pedwarn.
1969
1970 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
1971
1972         * c-typeck.c: Remove include of pointer-set.h.
1973
1974 2014-08-07  Marek Polacek  <polacek@redhat.com>
1975
1976         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1977
1978 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1979
1980         * c-typeck.c: Use hash_map instead of pointer_map.
1981
1982 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1983
1984         * c-decl.c: Use hash_set instead of pointer_set.
1985
1986 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
1987
1988         PR middle-end/61455
1989         * c-array-notation.c (expand_array_notations): Handling
1990         of DECL_EXPR added.
1991
1992 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
1993
1994         PR c++/60517
1995         * c-typeck.c (c_finish_return): Return 0 instead of the address of
1996         a local variable.
1997
1998 2014-07-30  Tom Tromey  <tromey@redhat.com>
1999
2000         * c-typeck.c (struct constructor_stack) <designator_depth>: New
2001         field.
2002         (really_start_incremental_init, push_init_level): Initialize
2003         designator_depth.
2004         (pop_init_level): Set global designator_depth.
2005         (process_init_element): Check for designated_init attribute.
2006
2007 2014-07-20  Marek Polacek  <polacek@redhat.com>
2008
2009         PR c/61852
2010         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
2011         (implicitly_declare): Pass location to implicit_decl_warning.
2012
2013 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
2014
2015         PR middle-end/61294
2016         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2017         If non-NULL, call c_parser_check_literal_zero.
2018         (c_parser_check_literal_zero): New function.
2019         (c_parser_postfix_expression_after_primary): Adjust
2020         c_parser_expr_list caller, handle -Wmemset-transposed-args.
2021
2022 2014-07-06  Marek Polacek  <polacek@redhat.com>
2023
2024         PR c/6940
2025         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2026         * c-tree.h (C_ARRAY_PARAMETER): Define.
2027         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2028         function parameter.
2029
2030 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
2031             Chen Gang <gang.chen.5i5j@gmail.com>
2032
2033         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2034         releasing symbol.
2035
2036 2014-07-01  Marek Polacek  <polacek@redhat.com>
2037
2038         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2039         instead of 0 to WARN_FOR_ASSIGNMENT.
2040
2041 2014-07-01  Marek Polacek  <polacek@redhat.com>
2042
2043         PR c/58286
2044         * c-typeck.c (convert_for_assignment): Pass
2045         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2046
2047 2014-06-30  Marek Polacek  <polacek@redhat.com>
2048
2049         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2050         has no_sanitize_undefined attribute.
2051
2052 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
2053
2054         PR middle-end/57541
2055         * c-array-notation.c (fix_builtin_array_notation_fn):
2056         Check for 0 arguments in builtin call. Check that bultin argument is
2057         correct.
2058         * c-parser.c (c_parser_array_notation): Check for incorrect initial
2059         index.
2060
2061 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2062
2063         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2064         qualifiers in __auto_type for atomic types.
2065         (c_parser_typeof_specifier): Discard all type qualifiers in
2066         __typeof__ for atomic types.
2067
2068 2014-06-25  Marek Polacek  <polacek@redhat.com>
2069
2070         PR c/61162
2071         * c-parser.c (c_parser_statement_after_labels): Pass the location of
2072         the return expression to c_finish_return.
2073
2074 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
2075
2076         * c-typeck.c (c_finish_omp_clauses): Make sure
2077         OMP_CLAUSE_LINEAR_STEP has correct type.
2078
2079 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
2080
2081         * c-decl.c: Adjust.
2082
2083 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
2084
2085         * c-parser.c (c_parser_omp_for_loop): For
2086         #pragma omp parallel for simd move lastprivate clause from parallel
2087         to for rather than simd.
2088
2089 2014-06-23  Marek Polacek  <polacek@redhat.com>
2090
2091         * c-typeck.c (parser_build_binary_op): Don't call
2092         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2093
2094 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
2095
2096         * c-parser.c (c_parser_omp_threadprivate): Likewise.
2097         * c-decl.c (merge_decls): Likewise.
2098
2099 2014-06-09  Marek Polacek  <polacek@redhat.com>
2100
2101         PR c/36446
2102         * c-typeck.c (error_init): Call inform instead of error_at.
2103         (pedwarn_init): Call inform instead of pedwarn.
2104         (warning_init): Call inform instead of warning_at.
2105
2106 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
2107
2108         * c-decl.c (merge_decls): Use set_decl_section_name.
2109         (duplicate_decls): Remove node if it exists.
2110
2111 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
2112
2113         PR c/53119
2114         * c-typeck.c (push_init_level, process_init_element,
2115         pop_init_level): Correct check for zero initialization, move
2116         missing brace warning to respect zero initialization.
2117
2118 2014-06-05  Marek Polacek  <polacek@redhat.com>
2119
2120         PR c/56724
2121         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2122
2123 2014-06-05  Marek Polacek  <polacek@redhat.com>
2124
2125         PR c/49706
2126         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2127         on the left hand side operand of a comparison. 
2128
2129 2014-06-05  Marek Polacek  <polacek@redhat.com>
2130
2131         PR c/48062
2132         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2133         Print note only if the warning was printed.
2134
2135 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
2136
2137         PR c/58942
2138         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2139         with a pointer.
2140
2141 2014-06-03  Marek Polacek  <polacek@redhat.com>
2142
2143         PR c/60439
2144         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2145         c_start_case.
2146         * c-tree.h (c_start_case): Update.
2147         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
2148         switch condition has boolean value.
2149
2150 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
2151
2152         * c-decl.c: Include builtins.h.
2153         * c-parser.c: Likewise.
2154
2155 2014-05-27  Marek Polacek  <polacek@redhat.com>
2156
2157         PR c/56724
2158         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
2159         error and warning calls to error_at and warning_at.  Pass location of
2160         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
2161         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2162         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
2163
2164 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
2165
2166         PR c/61191
2167         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2168         function parameters.
2169
2170 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
2171
2172         * c-decl.c (merge_decls): Preserve symtab node pointers.
2173         (duplicate_decls): Free new decl.
2174
2175 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
2176
2177         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2178         initialization.
2179
2180         * c-parser.c (c_parser_omp_target): Return bool values.
2181
2182 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
2183
2184         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2185         num_teams_loc variable to num_thread_limit_loc.
2186
2187 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
2188
2189         * c-array-notation.c (expand_array_notations): Use void_node
2190         instead of void_zero_node.
2191
2192 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
2193
2194         * c-decl.c (finish_struct): Adjust.
2195         (finish_enum): Likewise.
2196         (bind): Adjust.
2197         (record_inline_static): Likewise.
2198         (push_scope): Likewise.
2199         (make_label): Likewise.
2200         (lookup_label_for_goto): Likewise.
2201         (finish_struct): Likewise.
2202         (finish_enum): Likewise.
2203         (store_parm_decls): Likewise.
2204         (c_push_function_context): Likewise.
2205         * c-lang.h: Remove usage of variable_size gty attribute.
2206         * c-parser.c (c_parse_init): Adjust.
2207         (c_parse_file): Likewise.
2208
2209 2014-05-13  Marek Polacek  <polacek@redhat.com>
2210
2211         PR c/61162
2212         * c-typeck.c (convert_for_assignment): Pass location to
2213         WARN_FOR_ASSIGNMENT instead of input_location.
2214
2215 2014-05-10  Marek Polacek  <polacek@redhat.com>
2216
2217         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2218         maybe_warn_string_init.
2219         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2220         maybe_warn_string_init.
2221         * c-tree.h (maybe_warn_string_init): Update declaration.
2222         * c-typeck.c (maybe_warn_string_init): Add location parameter.
2223         Call pedwarn_init with loc instead of with input_location.
2224         (digest_init): Pass init_loc to maybe_warn_string_init.
2225         (pop_init_level): Call pedwarn_init with loc instead of with
2226         input_location.
2227         (set_init_index): Likewise.
2228         (process_init_element): Likewise.
2229
2230 2014-05-09  Marek Polacek  <polacek@redhat.com>
2231
2232         PR c/61096
2233         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2234         (c_parser_initelt): Pass location to set_init_label.  Pass array index
2235         location to set_init_index.
2236         * c-tree.h (push_init_level): Update declaration.
2237         (pop_init_level): Likewise.
2238         (set_init_index): Likewise.
2239         (set_init_label): Likewise.
2240         * c-typeck.c (error_init): Add location parameter.  Call error_at
2241         instead of error.
2242         (digest_init): Pass init_loc to error_init.
2243         (really_start_incremental_init):
2244         (push_init_level): Add location parameter.  Pass loc to pop_init_level
2245         and error_init.
2246         (pop_init_level): Likewise.
2247         (set_designator): Add location parameter.  Pass loc to pop_init_level,
2248         push_init_level, and error_init.
2249         (set_init_index): Add location parameter.  Pass loc to error_init and
2250         set_designator.
2251         (set_init_label): Likewise.
2252         (output_init_element): Pass loc to error_init.
2253         (process_init_element): Pass loc to error_init, pop_init_level,
2254         pedwarn_init, and push_init_level.
2255
2256 2014-05-09  Marek Polacek  <polacek@redhat.com>
2257
2258         PR c/50459
2259         * c-parser.c (c_parser_attributes): Parse the arguments as an
2260         expression-list if the attribute takes identifier.
2261
2262 2014-05-08  Marek Polacek  <polacek@redhat.com>
2263
2264         PR c/61053
2265         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2266         TYPE_ALIGN_UNIT.
2267
2268 2014-05-08  Marek Polacek  <polacek@redhat.com>
2269
2270         PR c/61077
2271         * c-decl.c (start_function): Warn for _Atomic-qualified return type
2272         of main.
2273
2274 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
2275             Mike Stump  <mikestump@comcast.net>
2276             Richard Sandiford  <rdsandiford@googlemail.com>
2277
2278         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2279         (finish_enum): Use wide-int interfaces.
2280         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2281         * c-typeck.c (build_c_cast): Likewise.
2282         (set_nonincremental_init_from_string): Likewise.
2283         (c_tree_equal): Likewise.
2284
2285 2014-05-02  Marek Polacek  <polacek@redhat.com>
2286
2287         PR c/25801
2288         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
2289         Return size_one_node when the type is not complete.
2290         (pointer_diff): Remove comment.
2291         (build_unary_op): Improve error messages.
2292
2293 2014-05-02  Marek Polacek  <polacek@redhat.com>
2294
2295         * c-typeck.c (c_finish_return): Separate warning_at calls.
2296
2297 2014-05-02  Marek Polacek  <polacek@redhat.com>
2298
2299         * c-tree.h (error_init): Remove declaration.
2300         (pedwarn_init): Likewise.
2301         * c-typeck.c (error_init): Make static and move above.
2302         (pedwarn_init): Likewise.
2303         (warning_init): Move above.
2304         (maybe_warn_string_init): Likewise.
2305
2306 2014-05-01  Jeff Law  <law@redhat.com>
2307
2308         Revert:
2309
2310         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
2311         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2312         avoid goto.
2313
2314 2014-05-02  Marek Polacek  <polacek@redhat.com>
2315
2316         PR c/60784
2317         * c-typeck.c (push_init_level): Set constructor_designated to
2318         p->designated for structures.
2319
2320 2014-05-01  Marek Polacek  <polacek@redhat.com>
2321
2322         PR c/60915
2323         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2324         function-definition has an attribute after the declarator.
2325
2326 2014-05-01  Marek Polacek  <polacek@redhat.com>
2327
2328         PR c/60257
2329         * c-typeck.c (warning_init): Add location_t parameter.  Call
2330         warning_at instead of warning.
2331         (push_init_level): Pass input_location to warning_init.
2332         (add_pending_init): Add location_t parameter.  Pass loc to
2333         warning_init.
2334         (set_nonincremental_init): Pass input_location to add_pending_init.
2335         (set_nonincremental_init_from_string): Likewise.
2336         (output_init_element): Pass loc to warning_init and to
2337         add_pending_init.
2338
2339 2014-05-01  Marek Polacek  <polacek@redhat.com>
2340
2341         PR c/43395
2342         * c-typeck.c (c_finish_return): Distinguish between label and variable
2343         when warning about returning local address.
2344
2345 2014-05-01  Marek Polacek  <polacek@redhat.com>
2346
2347         PR c/29467
2348         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2349         in C89 mode.
2350
2351 2014-05-01  Marek Polacek  <polacek@redhat.com>
2352
2353         PR c/43245
2354         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2355         instead of 0 to WARN_FOR_QUALIFIERS.
2356
2357 2014-05-01  Marek Polacek  <polacek@redhat.com>
2358
2359         PR c/56989
2360         * c-typeck.c (default_conversion): Use better location for
2361         error call.
2362
2363 2014-04-30  Marek Polacek  <polacek@redhat.com>
2364
2365         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2366         also when SANITIZE_FLOAT_DIVIDE is on.
2367
2368 2014-04-30  Marek Polacek  <polacek@redhat.com>
2369
2370         PR c/60139
2371         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2372         and pedwarn_init.  Use loc insted of input_location.
2373
2374 2014-04-30  Marek Polacek  <polacek@redhat.com>
2375
2376         PR c/60351
2377         * c-typeck.c (build_binary_op): Use location when warning about
2378         shift count.
2379
2380 2014-04-25  Marek Polacek  <polacek@redhat.com>
2381
2382         PR c/18079
2383         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2384         always_inline/noinline and hot/cold attributes.
2385
2386 2014-04-25  Marek Polacek  <polacek@redhat.com>
2387
2388         PR c/60114
2389         * c-parser.c (c_parser_initelt): Pass input_location to
2390         process_init_element.
2391         (c_parser_initval): Pass loc to process_init_element.
2392         * c-tree.h (process_init_element): Adjust declaration.
2393         * c-typeck.c (push_init_level): Pass input_location to
2394         process_init_element.
2395         (pop_init_level): Likewise.
2396         (set_designator): Likewise.
2397         (output_init_element): Add location_t parameter.  Pass loc to
2398         digest_init.
2399         (output_pending_init_elements): Pass input_location to
2400         output_init_element.
2401         (process_init_element): Add location_t parameter.  Pass loc to
2402         output_init_element.
2403
2404 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
2405
2406         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2407         atomic-clause, allow comma in between atomic-clause and
2408         seq_cst.
2409
2410 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
2411
2412         PR c/59073
2413         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2414         fails, don't set OM_PARALLEL_COMBINED and return NULL.
2415
2416 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
2417
2418         PR middle-end/60469
2419         * c-array-notation.c (fix_builtin_array_notation_fn): Use
2420         create_tmp_var instead build_decl for creating temps.
2421         (build_array_notation_expr): Likewise.
2422         (fix_conditional_array_notations_1): Likewise.
2423         (fix_array_notation_expr): Likewise.
2424         (fix_array_notation_call_expr): Likewise.
2425
2426 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
2427
2428         PR c++/60689
2429         * c-tree.h (c_build_function_call_vec): New prototype.
2430         * c-typeck.c (build_function_call_vec): Don't call
2431         resolve_overloaded_builtin here.
2432         (c_build_function_call_vec): New wrapper function around
2433         build_function_call_vec.  Call resolve_overloaded_builtin here.
2434         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2435         Call c_build_function_call_vec instead of build_function_call_vec.
2436         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2437         * c-decl.c (finish_decl): Likewise.
2438
2439 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2440
2441         PR c/55383
2442         * c-typeck.c: Use correct format string in cast-qual warning
2443
2444 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
2445
2446         * c-decl.c (c_decl_attributes): Use
2447         lang_hooks.types.omp_mappable_type.
2448         * c-typeck.c (c_finish_omp_clauses): Likewise.
2449
2450 2014-03-06  Marek Polacek  <polacek@redhat.com>
2451
2452         PR c/60197
2453         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2454         of checking tree code.
2455
2456 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
2457
2458         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2459         (c_parser_parameter_declaration): Likewise.
2460
2461 2014-02-19  Marek Polacek  <polacek@redhat.com>
2462
2463         PR c/60195
2464         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2465         Call mark_exp_read on exp.value.
2466         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
2467         TREE_ADDRESSABLE on old instead of val.
2468         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2469
2470 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
2471
2472         * c-parser.c (c_parser_get_builtin_args): Replace calls to
2473         C_EXPR_APPEND by vec_safe_push.
2474         * c-tree.h (C_EXPR_APPEND): Remove.
2475
2476 2014-01-31  Marek Polacek  <polacek@redhat.com>
2477
2478         PR c/59963
2479         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2480         build_function_call_vec.
2481         (build_function_call): Likewise.
2482         (build_atomic_assign): Likewise.
2483         (build_function_call_vec): Add arg_loc parameter.  Use it.
2484         (convert_arguments): Likewise.
2485         (convert_for_assignment): Rename rhs_loc to expr_loc.
2486         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2487         (c_parser_objc_keywordexpr): Likewise.
2488         (c_parser_postfix_expression_after_primary): Call
2489         build_function_call_vec with expr_loc rather than op_loc.
2490         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
2491         build_function_call_vec.
2492         (c_parser_expr_list): Add locations parameter.  Fill it with locations
2493         of function arguments.
2494         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2495
2496 2014-01-30  Marek Polacek  <polacek@redhat.com>
2497
2498         PR c/59940
2499         * c-typeck.c (build_function_call_vec): Use loc parameter.
2500         (convert_arguments): Add location parameter.  Use it.
2501         (ep_convert_and_check): Likewise.
2502         (build_atomic_assign): Adjust convert_for_assignment call.
2503         (build_modify_expr): Likewise.
2504         (digest_init): Likewise.
2505         (c_finish_return): Likewise.
2506         (build_conditional_expr): Adjust ep_convert_and_check calls.
2507         (convert_for_assignment): Add rhs_loc parameter.  Use it.
2508         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2509         calls.
2510
2511 2014-01-30  Richard Biener  <rguenther@suse.de>
2512
2513         PR c/59905
2514         * c-typeck.c (build_function_call_vec): Do not replace calls
2515         to a function via an incompatible type with a runtime abort.
2516
2517 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2518
2519         * c-parser.c (c_parser_declaration_or_fndef): Replaced
2520         flag_enable_cilkplus with flag_cilkplus.
2521         (c_parser_direct_declarator_inner): Likewise.
2522         (c_parser_attribute_any_word): Likewise.
2523         (c_parser_attributes): Likewise.
2524         (c_parser_compound_statement): Likewise.
2525         (c_parser_statement_after_labels): Likewise.
2526         (c_parser_if_statement): Likewise.
2527         (c_parser_switch_statement): Likewise.
2528         (c_parser_do_statement): Likewise.
2529         (c_parser_for_statement): Likewise.
2530         (c_parser_unary_expression): Likewise.
2531         (c_parser_postfix_expression): Likewise.
2532         (c_parser_postfix_expression_after_primary): Likewise.
2533         (c_parser_postfix_expression_after_primary): Likewise.
2534         (c_parser_omp_clause_name): Likewise.
2535         (c_finish_omp_declare_simd): Likewise.
2536         (c_parser_cilk_verify_simd): Likewise.
2537         * c-typeck.c (build_array_ref): Likewise.
2538         (build_function_call_vec): Likewise.
2539         (convert_arguments): Likewise.
2540         (build_compound_expr): Likewise.
2541         (c_finish_return): Likewise.
2542         (c_finish_if_stmt): Likewise.
2543         (c_finish_loop): Likewise.
2544         (build_binary_op): Likewise.
2545
2546 2014-01-23  Marek Polacek  <polacek@redhat.com>
2547
2548         PR c/59846
2549         * c-typeck.c (parser_build_binary_op): Use location instead of
2550         input_location.
2551         (build_binary_op): Pass location to shorten_compare.
2552
2553 2014-01-23  Marek Polacek  <polacek@redhat.com>
2554
2555         PR c/58346
2556         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2557         an empty aggregate.
2558
2559 2014-01-23  Marek Polacek  <polacek@redhat.com>
2560
2561         PR c/59871
2562         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2563         of a comma expression.
2564         (emit_side_effect_warnings): Likewise.
2565
2566 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2567
2568         PR c/59825
2569         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2570         function to use walk_tree and moved a lot of its functionality to
2571         expand_array_notations.
2572         (expand_array_notations): New function.
2573
2574 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2575
2576         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2577         attribute an attribute without value.
2578
2579 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
2580
2581         PR middle-end/58809
2582         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2583         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2584
2585 2014-01-22  Marek Polacek  <polacek@redhat.com>
2586
2587         PR c/59891
2588         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2589         of remove_c_maybe_const_expr on op1 and op2.
2590
2591 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
2592
2593         PR c/58943
2594         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2595         effects, preevaluate rhs using SAVE_EXPR first.
2596
2597 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2598
2599         PR c++/59631
2600         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2601         statements with if-elseif statements.
2602
2603 2014-01-06  Marek Polacek  <polacek@redhat.com>
2604
2605         PR c/57773
2606         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2607         defined bit-field types only in ISO C.
2608
2609 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
2610
2611         Update copyright years
2612
2613 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
2614
2615         * c-array-notation.c: Use the standard form for the copyright notice.
2616
2617 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2618
2619         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2620         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2621         field in parser is not empty.  If not-empty, call the function
2622         c_parser_finish_omp_declare_simd.
2623         (c_parser_cilk_clause_vectorlength): Modified function to be shared
2624         between SIMD-enabled functions and #pragma simd.  Added new parameter.
2625         (c_parser_cilk_all_clauses): Modified the usage of the function
2626         c_parser_cilk_clause_vectorlength as mentioned above.
2627         (c_parser_cilk_simd_fn_vector_attrs): New function.
2628         (c_finish_cilk_simd_fn_tokens): Likewise.
2629         (is_cilkplus_vector_p): Likewise.
2630         (c_parser_omp_clause_name): Added checking for "vectorlength,"
2631         "nomask," and "mask" strings in clause name.
2632         (c_parser_omp_all_clauses): Added 3 new case statements:
2633         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2634         PRAGMA_CILK_CLAUSE_NOMASK.
2635         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
2636         check for vector attribute and if so call the function
2637         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
2638         called the function c_finish_cilk_simd_fn_tokens.
2639         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2640         parser field is non-empty.  If so, parse them as you would parse
2641         the omp declare simd pragma.
2642         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2643         Added a check when step is a parameter and flag it as error.
2644         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2645         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2646         pragma_omp_clause.
2647
2648 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
2649
2650         * c-parser.c (c_parser_omp_parallel): Fix description.
2651
2652 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2653
2654         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2655         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2656         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2657         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2658
2659 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
2660
2661         PR c/52023
2662         * c-parser.c (c_parser_alignas_specifier): Use
2663         c_sizeof_or_alignof_type instead of c_alignof.
2664         (c_parser_alignof_expression): Likewise, with min_alignof
2665         parameter depending on alignof spelling used.
2666
2667 2013-12-04  Marek Polacek  <polacek@redhat.com>
2668
2669         PR c/54113
2670         * c-decl.c (start_function): Don't warn for missing prototype for
2671         inline functions.
2672
2673 2013-12-03  Marek Polacek  <polacek@redhat.com>
2674
2675         PR c/59351
2676         * c-decl.c (build_compound_literal): Allow compound literals with
2677         empty initial value.
2678
2679 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
2680
2681         PR c/58235
2682         * c-typeck.c (build_modify_expr): Diagnose assignment to
2683         expression with array type.
2684
2685 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
2686
2687         PR c/42262
2688         * c-typeck.c (process_init_element): Do not treat a string as
2689         initializing a whole array when used with a designator for an
2690         individual element.
2691
2692 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
2693
2694         PR c/57574
2695         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2696         an inline function following a static declaration.
2697
2698 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
2699
2700         PR c/59310
2701         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2702         to p_name before calling c_parser_omp_teams instead of after.
2703         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2704         argument.  Remove unused p_name variable.
2705
2706 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
2707             Jakub Jelinek  <jakub@redhat.com>
2708
2709         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2710         external_scope is NULL.
2711
2712 2013-11-27  Tom de Vries  <tom@codesourcery.com>
2713             Marc Glisse  <marc.glisse@inria.fr>
2714
2715         PR c++/59032
2716         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2717
2718 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
2719
2720         * c-typeck.c: Add required include files from gimple.h.
2721
2722 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
2723
2724         * c-decl.c (define_label, shadow_tag_warned)
2725         (check_bitfield_type_and_width, grokdeclarator, grokparms,
2726         store_parm_decls_newstyle, store_parm_decls_oldstyle)
2727         (declspecs_add_type): Remove use of in_system_header macro.
2728         * c-parser.c (c_parser_unary_expression): Likewise.
2729         * c-typeck.c (store_init_value, process_init_element)
2730         (c_start_case): Likewise.
2731
2732         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2733         macro.
2734
2735         * c-parser.c (c_parser_set_source_position_from_token): Remove
2736         reference to in_system_header from comment.
2737
2738 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
2739
2740         * c-decl.c (grokdeclarator): Update comment to refer to
2741         tree_to_[su]hwi rather than tree_low_cst.
2742
2743 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
2744
2745         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2746         tree_to_uhwi throughout.
2747
2748 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
2749
2750         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2751         throughout.
2752
2753 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
2754
2755         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2756         throughout.
2757
2758 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
2759
2760         * c-parser.c (c_parser_cilk_simd): New.
2761         (c_parser_cilk_verify_simd): New.
2762         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2763         (c_parser_omp_for_loop): Add case for NE_EXPR.
2764         Set c_break_label for CILK_SIMD.
2765         (c_parser_cilk_clause_vectorlength): New.
2766         (c_parser_cilk_clause_linear): New.
2767         (c_parser_cilk_clause_name): New.
2768         (c_parser_cilk_all_clauses): New.
2769         * c-typeck.c (build_unary_op): Pass location argument to
2770         readonly_error.
2771         (build_modify_expr): Same.
2772         (build_asm_expr): Same.
2773         (c_finish_bc_stmt): Error on break/continue in loops.
2774
2775 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
2776
2777         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2778
2779 2013-11-14  Diego Novillo  <dnovillo@google.com>
2780
2781         * c-decl.c: Include print-tree.h.
2782         Include stor-layout.h.
2783         Include varasm.h.
2784         Include attribs.h.
2785         Include stringpool.h.
2786         * c-lang.c: Include fold-const.h.
2787         * c-parser.c: Include stringpool.h.
2788         Include attribs.h.
2789         Include stor-layout.h.
2790         Include varasm.h.
2791         Include trans-mem.h.
2792         * c-typeck.c: Include stor-layout.h.
2793         Include trans-mem.h.
2794         Include varasm.h.
2795         Include stmt.h.
2796
2797 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
2798
2799         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2800         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2801         __auto_type.
2802         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2803         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2804         RID_AUTO_TYPE.
2805         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2806         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2807         (c_parser_declarator, c_parser_direct_declarator_inner)
2808         (c_parser_parameter_declaration, c_parser_type_name): All callers
2809         changed.
2810         (c_parser_declaration_or_fndef): Handle declarations with type
2811         determined from the initializer.
2812
2813 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
2814
2815         * c-typeck.c: Include gimplify.h.
2816
2817 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
2818
2819         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2820         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2821         comment.
2822         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2823         or _Thread_local as appropriate in diagnostics.
2824         (build_null_declspecs): Initialize ret->thread_gnu_p.
2825         (declspecs_add_scspec): Handle either __thread or _Thread_local
2826         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
2827         pedantic.  Do not disallow _Thread_local extern and _Thread_local
2828         static.
2829
2830 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
2831             Andrew MacLeod  <amacleod@redhat.com>
2832
2833         * c-aux-info.c (gen_type): Handle atomic qualifier.
2834         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2835         qualifiers when compating types.
2836         (shadow_tag_warned): Handle atomic_p in declspecs.
2837         (quals_from_declspecs): Likewise.
2838         (start_decl): Use c_type_promotes_to when promoting argument
2839         types.
2840         (grokdeclarator): Handle _Atomic.
2841         (get_parm_info): Diagnose any qualifier on "void" as only
2842         parameter.
2843         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2844         comparing types.  Use c_type_promotes_to when promoting argument
2845         types.
2846         (finish_function): Use c_type_promotes_to when promoting argument
2847         types.
2848         (build_null_declspecs): Handle atomic_p in declspecs.
2849         (declspecs_add_qual): Handle RID_ATOMIC.
2850         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2851         (c_token_starts_declspecs): Handle RID_ATOMIC.
2852         (c_parser_declspecs): Handle atomic type specifiers and
2853         qualifiers.
2854         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2855         from types of expressions with atomic type.
2856         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2857         (c_parser_attribute_any_word): Handle RID_ATOMIC.
2858         (c_parser_initializer, c_parser_initelt, c_parser_initval)
2859         (c_parser_statement_after_labels, c_parser_switch_statement)
2860         (c_parser_for_statement, c_parser_expr_no_commas)
2861         (c_parser_conditional_expression, c_parser_binary_expression)
2862         (c_parser_cast_expression, c_parser_unary_expression)
2863         (c_parser_postfix_expression)
2864         (c_parser_postfix_expression_after_primary, c_parser_expression):
2865         Use convert_lvalue_to_rvalue.
2866         (c_parser_expression_conv, c_parser_expr_list): Document
2867         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
2868         (c_parser_objc_synchronized_statement): Use
2869         convert_lvalue_to_rvalue.
2870         (c_parser_objc_selector): Handle RID_ATOMIC.
2871         (c_parser_objc_receiver, c_parser_array_notation): Use
2872         convert_lvalue_to_rvalue.
2873         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2874         _Atomic (type-name).
2875         (struct c_declspecs): Add atomic_p field.
2876         (convert_lvalue_to_rvalue): Declare.
2877         * c-typeck.c (c_type_promotes_to): Promote atomic types to
2878         corresponding atomic types.
2879         (qualify_type): Don't add _Atomic qualifiers from second argument.
2880         (comp_target_types): Do not allow _Atomic mismatches.
2881         (type_lists_compatible_p): Do not remove atomic qualifiers when
2882         comparing types.
2883         (really_atomic_lvalue, convert_lvalue_to_rvalue)
2884         (build_atomic_assign): New functions.
2885         (build_unary_op): Use build_atomic_assign for atomic increment and
2886         decrement.
2887         (build_conditional_expr): Do not treat _Atomic void as a qualified
2888         version of void.
2889         (build_modify_expr): Use build_atomic_assign for atomic LHS.
2890         (find_anonymous_field_with_type, convert_to_anonymous_field)
2891         (convert_for_assignment): Do not remove atomic qualifiers when
2892         comparing types.
2893         (digest_init): Do not accept initialization of arrays of atomic
2894         elements by string constants.
2895         (build_asm_expr): Use convert_lvalue_to_rvalue.
2896         (build_binary_op): Do not treat _Atomic void as a qualified
2897         version of void.
2898
2899 2013-11-06  DJ Delorie  <dj@redhat.com>
2900
2901         * c-decl.c (locate_old_decl): If a previous conflicting decl is
2902         both explicit and builtin, print the location of the explicit one.
2903
2904 2013-11-05  Tobias Burnus  <burnus@net-b.de>
2905
2906         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2907         c_parser_omp_distribute, c_parser_omp_teams,
2908         c_parser_omp_target, c_parser_omp_declare): Handle
2909         -fopenmp-simd.
2910
2911 2013-11-03  Marek Polacek  <polacek@redhat.com>
2912
2913         * c-decl.c (grokdeclarator): Add VLA instrumentation.
2914
2915 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
2916
2917         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2918         check_dup_generic at the end, unless remove is true.
2919         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2920         remove = true;.
2921         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2922
2923 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
2924
2925         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2926         with decl that is not pointer nor array.
2927
2928 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2929
2930         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2931         a spawning function is found.
2932         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2933         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2934         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2935         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2936         case.
2937         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2938         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2939         expr.
2940         (c_finish_return): Added a check to reject _Cilk_spawn in return
2941         expression.
2942         (build_cilk_spawn): New function.
2943         (build_cilk_sync): Likewise.
2944         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2945         
2946 2013-10-27  Tobias Burnus  <burnus@net-b.de>
2947
2948         PR other/33426
2949         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2950         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2951         (c_parser_statement_after_labels): Update calls.
2952
2953 2013-10-24  Tobias Burnus  <burnus@net-b.de>
2954
2955         PR other/33426
2956         * c-parser.c (c_parser_pragma, c_parser_for_statement):
2957         Handle PRAGMA_IVDEP.
2958         (c_parser_statement_after_labels): Update call.
2959
2960 2013-10-24  Marek Polacek  <polacek@redhat.com>
2961
2962         * c-parser.c (c_parser_struct_declaration): Add a comment.
2963         (c_parser_declarator): Don't allow _Alignas here.
2964
2965 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
2966
2967         * c-parser.c: Include omp-low.h.
2968         * c-typeck.c: Likewise.
2969
2970 2013-10-17  Marek Polacek  <polacek@redhat.com>
2971
2972         PR c/58267
2973         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2974         Document syntax of the array-declarator.
2975         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2976         are not permitted.
2977         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2978         (c_parser_struct_declaration): Likewise.
2979         (c_parser_declarator): Likewise.
2980         (c_parser_direct_declarator_inner): Likewise.
2981         (c_parser_parameter_declaration): Likewise.
2982         (c_parser_type_name): Likewise.
2983
2984 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
2985
2986         * c-lang.h (current_omp_declare_target_attribute): New extern
2987         decl.
2988         * c-parser.c: Include c-lang.h.
2989         (struct c_parser): Change tokens to c_token *.
2990         Add tokens_buf field.  Change tokens_avail type to unsigned int.
2991         (c_parser_consume_token): If parser->tokens isn't
2992         &parser->tokens_buf[0], increment parser->tokens.
2993         (c_parser_consume_pragma): Likewise.
2994         (enum pragma_context): Add pragma_struct and pragma_param.
2995         (c_parser_external_declaration): Adjust
2996         c_parser_declaration_or_fndef caller.
2997         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2998         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2999         Adjust recursive call.
3000         (c_parser_struct_or_union_specifier): Use pragma_struct instead
3001         of pragma_external.
3002         (c_parser_parameter_declaration): Use pragma_param instead of
3003         pragma_external.
3004         (c_parser_compound_statement_nostart, c_parser_label,
3005         c_parser_for_statement): Adjust
3006         c_parser_declaration_or_fndef callers.
3007         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3008         it through to c_parser_conditional_expression.
3009         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3010         pass it through to c_parser_binary_expression.  Adjust recursive
3011         call.
3012         (c_parser_binary_expression): Remove prec argument, add
3013         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
3014         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3015         binop matches it, use build2 instead of parser_build_binary_op.
3016         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3017         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3018         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3019         Handle pragma_struct and pragma_param the same as pragma_external.
3020         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3021         (c_parser_omp_variable_list): Parse array sections for
3022         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3023         (c_parser_omp_clause_collapse): Fully fold collapse expression.
3024         (c_parser_omp_clause_reduction): Handle user defined reductions.
3025         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3026         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3027         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3028         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3029         c_parser_omp_clause_depend, c_parser_omp_clause_map,
3030         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3031         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3032         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3033         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
3034         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
3035         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3036         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
3037         (c_parser_omp_for_loop): Add CODE argument, pass it through
3038         to c_finish_omp_for.  Change last argument to cclauses,
3039         and adjust uses to grab parallel clauses from the array of all
3040         the split clauses.  Adjust c_parser_binary_expression,
3041         c_parser_declaration_or_fndef and c_finish_omp_for callers.
3042         (omp_split_clauses): New function.
3043         (c_parser_omp_simd): New function.
3044         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3045         Allow the function to be called also when parsing combined constructs,
3046         and call c_parser_omp_simd when parsing for simd.
3047         (c_parser_omp_sections_scope): If section-sequence doesn't start with
3048         #pragma omp section, require exactly one structured-block instead of
3049         sequence of statements.
3050         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3051         Allow the function to be called also when parsing combined constructs.
3052         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3053         Allow the function to be called also when parsing combined
3054         constructs.
3055         (c_parser_omp_taskgroup, c_parser_omp_cancel,
3056         c_parser_omp_cancellation_point, c_parser_omp_distribute,
3057         c_parser_omp_teams, c_parser_omp_target_data,
3058         c_parser_omp_target_update, c_parser_omp_target,
3059         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3060         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3061         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3062         (c_parser_omp_construct): Add p_name and mask vars.  Handle
3063         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3064         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
3065         and c_parser_omp_sections callers.
3066         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3067         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3068         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3069         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
3070         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
3071         OMP_CLAUSE_DEPEND.
3072         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3073         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3074         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3075         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3076         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3077         * c-typeck.c: Include tree-inline.h.
3078         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3079         handle_omp_array_sections_1, handle_omp_array_sections,
3080         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3081         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3082         user defined reductions.
3083         (c_tree_equal): New function.
3084         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3085         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3086         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3087         c_check_omp_declare_reduction_r): New prototypes.
3088         * c-decl.c (current_omp_declare_target_attribute): New variable.
3089         (c_decl_attributes): New function.
3090         (start_decl, start_function): Use it instead of decl_attributes.
3091         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3092         c_omp_reduction_decl, c_omp_reduction_lookup,
3093         c_check_omp_declare_reduction_r): New functions.
3094
3095 2013-09-25  Tom Tromey  <tromey@redhat.com>
3096
3097         * Make-lang.in (c/gccspec.o): Remove.
3098         (CFLAGS-c/gccspec.o): New variable.
3099         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3100         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3101         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3102
3103 2013-09-25  Tom Tromey  <tromey@redhat.com>
3104
3105         * Make-lang.in (c/gccspec.o): Don't use subshell.
3106
3107 2013-09-18  Marek Polacek  <polacek@redhat.com>
3108
3109         PR sanitize/58443
3110         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3111         Remove unnecessary check.
3112
3113 2013-09-18  Marek Polacek  <polacek@redhat.com>
3114
3115         PR sanitizer/58411
3116         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3117         no_sanitize_undefined attribute.
3118
3119 2013-09-13  Kai Tietz  <ktietz@redhat.com>
3120
3121         PR target/57848
3122         * c-decl.c (c_builtin_function_ext_scope): Remove
3123         wrong assumption that it is never called on prexisting
3124         symbol.
3125
3126 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
3127
3128         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3129
3130 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3131
3132         * c-objc-common.c (c_tree_printer): Tidy.
3133
3134 2013-08-30  Marek Polacek  <polacek@redhat.com>
3135
3136         * c-typeck.c (build_binary_op): Add division by zero and shift
3137         instrumentation.
3138
3139 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
3140             Joseph Myers  <joseph@codesourcery.com>
3141
3142         PR c/35649
3143         * c-typeck.c (c_common_type): Prefer double_type_node over
3144         other REAL_TYPE types with the same precision.
3145         (convert_arguments): Likewise.
3146
3147 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3148
3149         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3150         (c_initialize_diagnostics): Call a destructor for the early printer.
3151
3152 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3153
3154         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3155         printer initialization.
3156
3157 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3158
3159         PR c/57490
3160         * c-array-notation.c (fix_conditional_array_notations_1): Added a
3161         check for truth values.
3162         (expand_array_notation_exprs): Added truth values case.  Removed an
3163         unwanted else.  Added for-loop to walk through subtrees in default
3164         case.
3165
3166 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3167
3168         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3169
3170 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
3171
3172         * c-parser.c (struct c_generic_association): Fix typo.
3173
3174 2013-07-23  Tom Tromey  <tromey@redhat.com>
3175             Joseph Myers  <joseph@codesourcery.com>
3176
3177         * c-parser.c (struct c_generic_association): New.
3178         (c_generic_association_d): New typedef.
3179         (c_parser_generic_selection): New function.
3180         (c_parser_postfix_expression): Handle RID_GENERIC.
3181
3182 2013-07-13  Jason Merrill  <jason@redhat.com>
3183
3184         PR c++/57793
3185         * c-decl.c (finish_struct): Check for too-large class.
3186
3187 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
3188
3189         PR c/57821
3190         * c-typeck.c (set_init_index): When folding, check for index overflow.
3191
3192 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3193
3194         * c-parser.c (c_parser_array_notation): Removed rejection of array
3195         notations in an array of function pointers.
3196
3197 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3198
3199         * c-array-notation.c (make_triplet_val_inv): New function.
3200         (create_cmp_incr): Likewise.
3201         (create_array_refs): Likewise.
3202         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3203         Also modularized common parts between functions and called the function.
3204         (build_array_notation_expr): Likewise.
3205         (fix_conditional_array_notations_1): Likewise.
3206         (fix_array_notation_expr): Likewise.
3207         (fix_array_notation_call_expr): Likewise.
3208
3209 2013-06-18  Marek Polacek  <polacek@redhat.com>
3210
3211         PR c/57630
3212         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3213
3214 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3215
3216         * c-array-notation.c (build_array_notation_expr): Reject array notation
3217         mismatch between LHS and RHS even inside a call_expr.  Also, removed
3218         a couple while statements that were dead code.
3219
3220 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3221
3222         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3223         excessive precision expressions in function parameters.  Also removed
3224         couple unwanted while statements.
3225
3226 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3227
3228         * c-array-notation.c (expand_array_notation_exprs): Added
3229         ARRAY_NOTATION_REF case.
3230         
3231 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3232
3233         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3234         function to c-family/array-notation-common.c.
3235         (is_cilkplus_reduce_builtin): Likewise.
3236         (find_rank): Likewise.
3237         (extract_array_notation_exprs): Likewise.
3238         (replace_array_notations): Likewise.
3239         (find_inv_trees): Likewise.
3240         (replace_inv_trees): Likewise.
3241         (contains_array_notation_expr): Likewise.
3242         (find_correct_array_notation_type): Likewise.
3243         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3244         (struct inv_list): Moved this to c-family/array-notation-common.c.
3245         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3246         
3247 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3248
3249         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3250         reduction functions outside the for-loop.  Added a check if the fundecl
3251         is non-NULL.  Finally, removed an unwanted if-statement, and made the
3252         body unconditional.
3253
3254 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3255
3256         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3257         condition of the if-statement matches the rank of else-block and then-
3258         block when array notations are used.
3259         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3260         expression after the entire function body is parsed.
3261         (c_parser_expr_no_commas): Delayed creating array notation expressions
3262         to the end of function parsing.
3263         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3264         whole if-statement instead of just the condition.
3265         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
3266
3267 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3268
3269         PR c/57474
3270         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3271         array to NULL_TREE if they are unused.  Also added a check for the
3272         field to be NULL before its fields are used in future.
3273         
3274 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3275
3276         PR bootstrap/57450
3277         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3278         (build_array_notation_expr): Likewise.
3279
3280 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3281
3282         * c-typeck.c (build_array_ref): Added a check to see if array's
3283         index is greater than one.  If true, then emit an error.
3284         (build_function_call_vec): Exclude error reporting and checking
3285         for builtin array-notation functions.
3286         (convert_arguments): Likewise.
3287         (c_finish_return): Added a check for array notations as a return
3288         expression.  If true, then emit an error.
3289         (c_finish_loop): Added a check for array notations in a loop
3290         condition.  If true then emit an error.
3291         (lvalue_p): Added a ARRAY_NOTATION_REF case.
3292         (build_binary_op): Added a check for array notation expr inside
3293         op1 and op0.  If present, we call another function to find correct
3294         type.
3295         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3296         * c-parser.c (c_parser_compound_statement): Check if array
3297         notation code is used in tree, if so, then transform them into
3298         appropriate C code.
3299         (c_parser_expr_no_commas): Check if array notation is used in LHS
3300         or RHS, if so, then build array notation expression instead of
3301         regular modify.
3302         (c_parser_postfix_expression_after_primary): Added a check for
3303         colon(s) after square braces, if so then handle it like an array
3304         notation.  Also, break up array notations in unary op if found.
3305         (c_parser_direct_declarator_inner): Added a check for array
3306         notation.
3307         (c_parser_compound_statement): Added a check for array notation in
3308         a stmt.  If one is present, then expand array notation expr.
3309         (c_parser_if_statement): Likewise.
3310         (c_parser_switch_statement): Added a check for array notations in
3311         a switch statement's condition.  If true, then output an error.
3312         (c_parser_while_statement): Similarly, but for a while.
3313         (c_parser_do_statement): Similarly, but for a do-while.
3314         (c_parser_for_statement): Similarly, but for a for-loop.
3315         (c_parser_unary_expression): Check if array notation is used in a
3316         pre-increment or pre-decrement expression.  If true, then expand
3317         them.
3318         (c_parser_array_notation): New function.
3319         * c-array-notation.c: New file.
3320         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3321         
3322 2013-05-23  Mike Stump  <mikestump@comcast.net>
3323
3324         * c-typeck.c (convert_for_assignment): Handle references to memory
3325         spaces better.
3326
3327 2013-05-16  Jason Merrill  <jason@redhat.com>
3328
3329         * Make-lang.in (cc1$(exeext)): Use link mutex.
3330
3331 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
3332
3333         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3334         to simply use OPT_Wpointer_arith.
3335         (build_unary_op): Likewise.
3336
3337 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
3338
3339         PR c/19449
3340         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3341         argument.  If set, or it temporarily for parsing of the first
3342         argument into force_folding_builtin_constant_p.
3343         (c_parser_postfix_expression): Adjust callers.
3344
3345 2013-03-21  Richard Biener  <rguenther@suse.de>
3346
3347         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3348         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
3349
3350 2013-02-12  Marek Polacek  <polacek@redhat.com>
3351
3352         PR c/44938
3353         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3354         origtypes to NULL.
3355
3356 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
3357
3358         PR c/56078
3359         * c-typeck.c (set_nonincremental_init_from_string): If
3360         constructor_max_index is NULL, treat it as if tree_int_cst_lt
3361         returned false.
3362         (process_init_element): Likewise.
3363
3364 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
3365
3366         PR c++/55619
3367         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3368         argument, don't call default_function_array_conversion
3369         nor c_fully_fold here.
3370         (c_parser_asm_statement): Adjust callers.
3371         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3372         and outputs here, and call default_function_array_conversion
3373         on inputs that don't need to be addressable.
3374
3375 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
3376
3377         PR c/39464
3378         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3379         warning require that both c_common_unsigned_type as well as
3380         c_common_signed_type is the same for both mvl and mvr types.
3381
3382 2012-11-16  Diego Novillo  <dnovillo@google.com>
3383
3384         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3385
3386         * c-common.c: Use new vec API in vec.h.
3387         * c-common.h: Likewise.
3388         * c-gimplify.c: Likewise.
3389         * c-pragma.c: Likewise.
3390         * c-pretty-print.c: Likewise.
3391         * c-pretty-print.h: Likewise.
3392         * c-semantics.c: Likewise.
3393         * c-decl.c: Likewise.
3394         * c-parser.c: Likewise.
3395         * c-tree.h: Likewise.
3396         * c-typeck.c: Likewise.
3397
3398 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
3399
3400         PR c++/54930
3401         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3402
3403 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3404
3405         PR c/53066
3406         * c-decl.c (warn_if_shadowing): Do not warn if a variable
3407         shadows a function, unless the variable is a function or a
3408         pointer-to-function.
3409
3410 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
3411
3412         PR c/54381
3413         * c-parser.c (struct c_tree_loc_pair): Removed.
3414         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3415         add location_t * and tree * arguments, fill in array of 3
3416         sizeof_arg trees and corresponding locs.
3417         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3418         c_parser_expr_list callers.
3419         (c_parser_postfix_expression_after_primary): Likewise.  Pass
3420         array of 3 sizeof_arg trees and locs (corresponding to first
3421         3 arguments) to sizeof_pointer_memaccess_warning.
3422
3423 2012-10-09  Lawrence Crowl  <crowl@google.com>
3424
3425         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3426         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3427         hash table.
3428
3429 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
3430
3431         PR c++/54194
3432         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3433         call.
3434
3435 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
3436
3437         PR c++/54427
3438         * c-typeck.c: Include c-common.h.
3439         (enum stv_conv): Moved to c-common.h.
3440         (scalar_to_vector): Moved to c-common.c.
3441         (build_binary_op): Adapt to scalar_to_vector's new prototype.
3442         * Make-lang.in: c-typeck.c depends on c-common.h.
3443
3444 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
3445
3446         * c-decl.c (c_write_global_declarations): Fix handling of
3447         -fdump-ada-spec*.
3448
3449 2012-09-30  Sharad Singhai  <singhai@google.com>
3450
3451         * c-decl.c (c_write_global_declarations): Use a different method
3452         to determine if the dump has ben initialized.
3453
3454 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
3455
3456         PR c/54552
3457         * c-typeck.c (c_cast_expr): When casting to a type requiring
3458         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3459         c_fully_fold first.
3460
3461 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
3462
3463         PR c/54103
3464         * c-typeck.c (build_unary_op): Pass original argument of
3465         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3466         any C_MAYBE_CONST_EXPR, if it has integer operands.
3467         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3468         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3469         to c_objc_common_truthvalue_conversion, then remove any
3470         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
3471         c_objc_common_truthvalue_conversion not
3472         c_common_truthvalue_conversion.
3473         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3474         call note_integer_operands for arguments with integer operands
3475         that are not integer constants.
3476
3477 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
3478
3479         PR c/54559
3480         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3481         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3482
3483 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
3484
3485         PR c/54428
3486         * c-convert.c (convert): Don't call fold_convert_loc if
3487         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3488         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
3489         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3490
3491 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
3492
3493         PR c/54355
3494         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3495         for nested and empty_ok arguments in the call to
3496         c_parser_declaration_or_fndef.
3497
3498 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
3499
3500         * c-tree.h (c_last_sizeof_arg): Declare.
3501         * c-parser.c (struct c_tree_loc_pair): New type.
3502         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
3503         non-NULL.
3504         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3505         (c_parser_postfix_expression_after_primary): Likewise.  Call
3506         sizeof_pointer_memaccess_warning if needed.
3507         (sizeof_ptr_memacc_comptypes): New function.
3508         * c-typeck.c (c_last_sizeof_arg): New global variable.
3509         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3510
3511 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
3512
3513         * c-lang.h (lang_decl): Add variable_size GTY option.
3514
3515 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
3516
3517         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3518         * Make-lang.in: Fix dependencies.
3519
3520 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
3521
3522         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3523         and add language Makefile hooks.
3524         * config-lang.in: New file.
3525         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3526         add the required "normal" config-lang.in rules.
3527         * c-lang.h: Moved from gcc/ to here.
3528         * c-tree.h: Likewise.
3529         * c-objc-common.c: Likewise.
3530         * c-objc-common.h: Likewise.
3531         * c-typeck.c: Likewise.
3532         * c-convert.c: Likewise.
3533         * c-lang.c: Likewise.
3534         * c-aux-info.c: Likewise.
3535         * c-errors.c: Likewise.
3536         * gccspec.c: Likewise.
3537         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
3538         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
3539 \f
3540 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3541
3542 Copying and distribution of this file, with or without modification,
3543 are permitted in any medium without royalty provided the copyright
3544 notice and this notice are preserved.