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