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