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