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