Daily bump.
[official-gcc.git] / gcc / c / ChangeLog
blobb1c887b91240234c3e0a7f5939f2a37e86017ef4
1 2024-01-21  Martin Uecker  <uecker@tugraz.at>
3         PR c/113492
4         * c-decl.cc (grokdeclarator): Use c_common_unsigned_type instead of
5         unsigned_type_for to create the unsigned type for bitfields declared
6         with int when using -funsigned-bitfields.
8 2024-01-12  Jakub Jelinek  <jakub@redhat.com>
10         PR c/113315
11         * c-typeck.cc (build_array_ref): If index has BITINT_TYPE type with
12         precision larger than sizetype precision, convert it to sizetype.
14 2024-01-11  Julian Brown  <julian@codesourcery.com>
16         * c-parser.cc (c_parser_braced_init, c_parser_conditional_expression):
17         Don't allow OpenMP array section.
18         (c_parser_postfix_expression): Don't allow array section in statement
19         expression.
20         (c_parser_postfix_expression_after_primary): Add support for OpenMP
21         array section parsing.
22         (c_parser_expr_list): Don't allow OpenMP array section here.
23         (c_parser_omp_variable_list): Change ALLOW_DEREF parameter to
24         MAP_LVALUE.  Support parsing of general lvalues in "map", "to" and
25         "from" clauses.
26         (c_parser_omp_var_list_parens): Change ALLOW_DEREF parameter to
27         MAP_LVALUE.  Update call to c_parser_omp_variable_list.
28         (c_parser_oacc_data_clause): Update calls to
29         c_parser_omp_var_list_parens.
30         (c_parser_omp_clause_reduction): Use OMP_ARRAY_SECTION tree node
31         instead of TREE_LIST for array sections.
32         (c_parser_omp_target): Allow GOMP_MAP_ATTACH.
33         * c-tree.h (c_omp_array_section_p): Add extern declaration.
34         (build_omp_array_section): Add prototype.
35         * c-typeck.cc (c_omp_array_section_p): Add flag.
36         (mark_exp_read): Support OMP_ARRAY_SECTION.
37         (build_omp_array_section): Add function.
38         (build_external_ref): Tweak error path for OpenMP array sections.
39         (handle_omp_array_sections_1): Use OMP_ARRAY_SECTION tree code instead
40         of TREE_LIST.  Handle more kinds of expressions.
41         (c_oacc_check_attachments): Use OMP_ARRAY_SECTION instead of TREE_LIST
42         for array sections.
43         (c_finish_omp_clauses): Use OMP_ARRAY_SECTION instead of TREE_LIST.
44         Check for supported expression types.
46 2024-01-09  Tamar Christina  <tamar.christina@arm.com>
48         PR c/113267
49         * c-parser.cc (c_parser_for_statement): Skip the pragma is no cond.
51 2024-01-03  Kwok Cheung Yeung  <kcy@codesourcery.com>
53         * c-parser.cc (c_parser_omp_clause_name): Move handling of indirect
54         clause to correspond to alphabetical order.
56 2023-12-30  Martin Uecker  <uecker@tugraz.at>
58         * c-typeck.cc (tagged_types_tu_compatible_p): Revise.
60 2023-12-22  Martin Uecker  <uecker@tugraz.at>
62         * c-typeck.cc (composite_type_internal): Adapted from
63         composite_type to support structs and unions.
64         (composite_type): New wrapper function.
65         (build_conditional_operator): Return composite type.
66         * c-decl.cc (finish_struct): Allow NULL for
67         enclosing_struct_parse_info.
69 2023-12-21  Martin Uecker  <uecker@tugraz.at>
71         * c-decl.cc (c_struct_hasher): Hash stable for struct
72         types.
73         (c_struct_hasher::hash, c_struct_hasher::equal): New
74         functions.
75         (finish_struct): Set TYPE_CANONICAL to first struct in
76         equivalence class.
77         * c-objc-common.cc (c_get_alias_set): Let structs or
78         unions with variable size alias anything.
79         * c-tree.h (comptypes_equiv): New prototype.
80         * c-typeck.cc (comptypes_equiv): New function.
81         (comptypes_internal): Implement equivalence mode.
82         (tagged_types_tu_compatible): Implement equivalence mode.
84 2023-12-21  Martin Uecker  <uecker@tugraz.at>
86         * c-tree.h (c_parser_enum_specifier): Add parameter.
87         * c-decl.cc (start_enum): Allow redefinition.
88         (finish_enum): Diagnose conflicts.
89         (build_enumerator): Set context.
90         (diagnose_mismatched_decls): Diagnose conflicting enumerators.
91         (push_decl): Preserve context for enumerators.
92         * c-typeck.cc (tagged_types_tu_compatible_p): Adapt.
93         * c-parser.cc (c_parser_enum_specifier): Remember when
94         seen is from an enum type which is not yet defined.
96 2023-12-21  Martin Uecker  <uecker@tugraz.at>
98         * c-decl.cc (previous_tag): New function.
99         (parser_xref_tag): Find earlier definition.
100         (get_parm_info): Turn off warning for C23.
101         (start_struct): Allow redefinitons.
102         (finish_struct): Diagnose conflicts.
103         * c-tree.h (comptypes_same_p): Add prototype.
104         * c-typeck.cc (comptypes_same_p): New function.
105         (comptypes_internal): Activate comparison of tagged types.
106         (convert_for_assignment): Ignore qualifiers.
107         (digest_init): Add error.
108         (initialized_elementwise_p): Allow compatible types.
110 2023-12-20  Jakub Jelinek  <jakub@redhat.com>
112         * c-parser.cc (c_parser_postfix_expression_after_primary): Grow
113         sizeof_arg and sizeof_arg_loc arrays to 6 elements.  Call
114         warn_for_calloc if warn_calloc_transposed_args for functions with
115         alloc_size type attribute with 2 arguments.
116         (c_parser_expr_list): Use 6 instead of 3.
117         * c-typeck.cc (build_c_cast): Call warn_for_alloc_size for casts
118         of calls to functions with alloc_size type attribute.
119         (convert_for_assignment): Likewise.
121 2023-12-19  Sandra Loosemore  <sandra@codesourcery.com>
123         * c-parser.cc (omp_construct_selectors): Delete.
124         (omp_device_selectors): Delete.
125         (omp_implementation_selectors): Delete.
126         (omp_user_selectors): Delete.
127         (c_parser_omp_context_selector): Adjust for new representations
128         and simplify dispatch logic.  Uniformly warn instead of sometimes
129         error when an unknown selector is found.  Adjust error messages
130         for extraneous/incorrect score.
131         (c_parser_omp_context_selector_specification): Likewise.
132         (c_finish_omp_declare_variant): Adjust for new representations.
134 2023-12-19  Sandra Loosemore  <sandra@codesourcery.com>
136         * c-parser.cc (c_parser_omp_context_selector): Adjust for new
137         namelist property representation.
139 2023-12-19  Sandra Loosemore  <sandra@codesourcery.com>
141         * c-parser.cc (c_parser_omp_context_selector): Use new constructors.
143 2023-12-18  Richard Biener  <rguenther@suse.de>
145         PR c/111975
146         * gimple-parser.cc (c_parser_gimple_postfix_expression):
147         Parse TARGET_MEM_REF extended operands for __MEM.
149 2023-12-13  Jason Merrill  <jason@redhat.com>
151         * c-typeck.cc (convert_for_assignment): Adjust call to
152         warn_for_address_of_packed_member.
154 2023-12-13  Julian Brown  <julian@codesourcery.com>
156         * c-parser.cc (c_parser_oacc_all_clauses): Add TARGET_P parameter. Use
157         to select region type for c_finish_omp_clauses call.
158         (c_parser_oacc_loop): Update calls to c_parser_oacc_all_clauses.
159         (c_parser_oacc_compute): Likewise.
160         (c_parser_omp_target_data, c_parser_omp_target_enter_data): Support
161         ATTACH kind.
162         (c_parser_omp_target_exit_data): Support DETACH kind.
163         (check_clauses): Handle GOMP_MAP_POINTER and GOMP_MAP_ATTACH here.
164         * c-typeck.cc (handle_omp_array_sections_1,
165         handle_omp_array_sections, c_finish_omp_clauses): Use
166         c_omp_address_inspector class and OMP address tokenizer to analyze and
167         expand map clause expressions.  Fix some diagnostics.  Fix "is OpenACC"
168         condition for C_ORT_ACC_TARGET addition.
170 2023-12-13  Julian Brown  <julian@codesourcery.com>
172         * c-typeck.cc (c_finish_omp_clauses): Add braces and reindent
173         OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza.
175 2023-12-11  Martin Uecker  <uecker@tugraz.at>
177         PR c/112488
178         * c-decl.cc (add_decl_expr): Revise.
179         (finish_struct): Create DECL_EXPR.
180         * c-parser.cc (c_parser_struct_or_union_specifier): Call
181         finish_struct with expression for VLA sizes.
182         * c-tree.h (finish_struct): Add argument.
184 2023-12-11  Tobias Burnus  <tobias@codesourcery.com>
186         * c-parser.cc (c_parser_omp_requires): Handle acquires/release
187         in atomic_default_mem_order clause.
188         (c_parser_omp_atomic): Update.
190 2023-12-05  Richard Sandiford  <richard.sandiford@arm.com>
192         * c-decl.cc (std_attribute_table): Add extra braces to work
193         around PR 16333 in older compilers.
195 2023-12-05  Richard Biener  <rguenther@suse.de>
197         PR c/86869
198         * c-typeck.cc (c_build_qualified_type): Preserve address-space
199         info for ARRAY_TYPE.
201 2023-12-02  Richard Sandiford  <richard.sandiford@arm.com>
203         * c-tree.h (std_attribute_table): Declare.
204         * c-decl.cc (std_attribute_table): Change type to
205         scoped_attribute_specs, using...
206         (std_attributes): ...this as the underlying array.
207         (c_init_decl_processing): Remove call to register_scoped_attributes.
208         * c-objc-common.h (c_objc_attribute_table): New global.
209         (LANG_HOOKS_ATTRIBUTE_TABLE): Use it.
210         (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
211         (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
213 2023-12-01  Florian Weimer  <fweimer@redhat.com>
215         PR other/44209
216         * c-decl.cc (grokparms): Issue permerror for
217         OPT_Wdeclaration_missing_parameter_type instead of a pedwarn.
219 2023-12-01  Florian Weimer  <fweimer@redhat.com>
221         PR c/96284
222         * c-typeck.cc (build_conditional_expr): Upgrade most pointer
223         type mismatches to a permerror.
224         (convert_for_assignment): Use permerror_opt and
225         permerror_init for OPT_Wincompatible_pointer_types warnings.
227 2023-12-01  Florian Weimer  <fweimer@redhat.com>
229         PR c/96284
230         * c-typeck.cc (c_finish_return): Use permerrors
231         for OPT_Wreturn_mismatch diagnostics.
233 2023-12-01  Florian Weimer  <fweimer@redhat.com>
235         * c-decl.cc (grokdeclarator): Do not skip -Wimplicit-int
236         warnings or errors in system headers.
238 2023-12-01  Florian Weimer  <fweimer@redhat.com>
240         * c-decl.cc (warn_defaults_to): Remove.
241         (grok_declarator, start_function): Call permerror_opt
242         instead of warn_defaults_to.
243         (store_parm_decls_oldstyle): Call permerror_opt for
244         OPT_Wimplicit_int.
246 2023-12-01  Florian Weimer  <fweimer@redhat.com>
248         PR c/91092
249         PR c/96284
250         * c-decl.cc (implicit_decl_permerror): Rename from
251         implicit_decl_warning.  Call permerror_opt instead of
252         pedwarn and warning_at.
253         (implicitly_declare): Adjust callers.
255 2023-12-01  Florian Weimer  <fweimer@redhat.com>
257         PR c/96284
258         PR c/106416
259         * c-typeck.cc (build_conditional_expr): Use permerror_opt for
260         pointer/integer type mismatches, based on -Wint-conversion.
261         (pedwarn_permerror_init, permerror_init): New function.
262         (pedwarn_init): Call pedwarn_permerror_init.
263         (convert_for_assignment): Use permerror_opt and
264         permerror_init for -Wint-conversion warnings.
266 2023-11-29  Alexandre Oliva  <oliva@adacore.com>
268         * c-typeck.cc (convert_lvalue_to_rvalue): Decay hardbools.
269         * c-convert.cc (convert): Convert to hardbool through
270         truthvalue.
271         * c-decl.cc (check_bitfield_type_and_width): Skip enumeral
272         truncation warnings for hardbool.
273         (finish_struct): Propagate hardbool attribute to bitfield
274         types.
275         (digest_init): Convert to hardbool.
277 2023-11-28  Jason Merrill  <jason@redhat.com>
279         PR c++/94264
280         PR c++/53220
281         * c-typeck.cc (array_to_pointer_conversion): Adjust -Wc++-compat
282         diagnostic.
284 2023-11-28  Richard Biener  <rguenther@suse.de>
286         PR middle-end/112741
287         * gimple-parser.cc (c_parser_parse_gimple_body): Also
288         set DECL_SEEN_IN_BIND_EXPR_Pfor locals.
290 2023-11-27  Alex Coplan  <alex.coplan@arm.com>
291             Iain Sandoe  <iain@sandoe.co.uk>
293         PR c++/60512
294         * c-lang.cc (c_family_register_lang_features): New.
295         * c-objc-common.cc (struct c_feature_info): New.
296         (c_register_features): New.
297         * c-objc-common.h (c_register_features): New.
299 2023-11-24  Tobias Burnus  <tobias@codesourcery.com>
301         * c-parser.cc (c_parser_omp_clause_num_threads,
302         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
303         c_parser_omp_clause_priority, c_parser_omp_clause_schedule,
304         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
305         c_parser_omp_clause_dist_schedule, c_parser_omp_depobj,
306         c_parser_omp_scan_loop_body, c_parser_omp_assumption_clauses):
307         Add OPT_Wopenmp to warning_at.
309 2023-11-24  Tobias Burnus  <tobias@codesourcery.com>
311         * c-parser.cc (c_parser_omp_depobj): Accept optionally an argument
312         to the destroy clause.
314 2023-11-23  Jakub Jelinek  <jakub@redhat.com>
316         * c-parser.cc (c_parser_postfix_expression): Handle RID_BUILTIN_STDC.
317         * c-decl.cc (names_builtin_p): Likewise.
319 2023-11-14  Jakub Jelinek  <jakub@redhat.com>
321         PR c/111309
322         * c-typeck.cc (convert_arguments): Don't promote first argument
323         of BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
325 2023-11-10  Martin Uecker  <uecker@tugraz.at>
327         * c-typeck.cc (struct comptypes_data): Add anon_field flag.
328         (comptypes, comptypes_check_unum_int,
329         comptypes_check_different_types): Remove old cache.
330         (tagged_tu_types_compatible_p): Rewrite.
332 2023-11-09  Florian Weimer  <fweimer@redhat.com>
334         * c-typeck.cc (c_finish_return): Use pedwarn with
335         OPT_Wreturn_mismatch for missing/extra return expressions.
337 2023-11-07  Kwok Cheung Yeung  <kcy@codesourcery.com>
339         * c-decl.cc (c_decl_attributes): Add attribute for indirect
340         functions.
341         * c-lang.h (c_omp_declare_target_attr): Add indirect field.
342         * c-parser.cc (c_parser_omp_clause_name): Handle indirect clause.
343         (c_parser_omp_clause_indirect): New.
344         (c_parser_omp_all_clauses): Handle indirect clause.
345         (OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
346         (c_parser_omp_declare_target): Handle indirect clause.  Emit error
347         message if device_type or indirect clauses used alone.  Emit error
348         if indirect clause used with device_type that is not 'any'.
349         (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
350         (c_parser_omp_begin): Handle indirect clause.
351         * c-typeck.cc (c_finish_omp_clauses): Handle indirect clause.
353 2023-11-07  Joseph Myers  <joseph@codesourcery.com>
355         * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p
356         instead of c2x_auto_p.  Refer to C23 instead of C2X in diagnostics
357         and comments.
358         * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and
359         warn_c11_c23_compat instead of warn_c11_c2x_compat.  Refer to C23
360         instead of C2X in comments.
361         * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x,
362         warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p
363         instead of c2x_auto_p and D_C23 instead of D_C2X.  Refer to C23
364         instead of C2X in diagnostics and comments.
365         * c-tree.h: Refer to C23 instead of C2X in comments.
366         (struct c_declspecs): Rename c2x_auto_p to c23_auto_p.
367         * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and
368         warn_c11_c23_compat instead of warn_c11_c2x_compat.  Refer to C23
369         instead of C2X in diagnostics and comments.
371 2023-11-06  Joseph Myers  <joseph@codesourcery.com>
373         PR c/107954
374         * c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
375         OPT_Wc11_c2x_compat.
376         * c-typeck.cc (build_conditional_expr, convert_for_assignment):
377         Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.
379 2023-11-04  Jakub Jelinek  <jakub@redhat.com>
381         * c-parser.h (c_maybe_parse_omp_decl): Declare.
382         * c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
383         (c_parser_std_attribute): Uncoment omp::decl handling.
384         (c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
385         don't expect any arguments, instead create clause or TREE_LIST for
386         that decl.
387         (c_maybe_parse_omp_decl): New function.
388         (c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
389         first token isn't name or comma invoke c_parser_omp_var_list_parens.
390         * c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
391         use *node rather than non-existing *decl.
393 2023-11-04  Jakub Jelinek  <jakub@redhat.com>
395         * c-tree.def: New file.
396         * c-tree.h (struct c_tree_token_vec): Forward declare.
397         (c_tree_size): Declare.
398         * c-lang.h (struct c_omp_declare_target_attr): Add attr_syntax member.
399         (struct c_omp_begin_assumes_data): New type.
400         (current_omp_begin_assumes): Change type from int to
401         vec<c_omp_begin_assumes_data, va_gc> *.
402         * c-lang.cc: Include c-family/c-pragma.h and c-parser.h.
403         * c-parser.h (struct c_tree_token_vec_struct): New type.
404         (C_TOKEN_VEC_TOKENS): New macro.
405         * c-parser.cc (struct c_parser): Add omp_attrs_forbidden_p and
406         in_omp_attribute_pragma members.
407         (c_parser_skip_until_found): Handle CPP_PRAGMA_EOL when
408         parser->in_omp_attribute_pragma.
409         (c_parser_skip_to_pragma_eol): Likewise.
410         (c_parser_translation_unit): Adjust for current_omp_begin_assumes
411         being a vector rather than counter.
412         (c_parser_declaration_or_fndef): Handle omp::directive and
413         omp::sequence attributes on attribute declaration and declare simd
414         or declare variant directives in those on function declarations.
415         (c_parser_check_balanced_raw_token_sequence): Forward declare.
416         (c_parser_omp_directive_args, c_parser_omp_sequence_args): New
417         functions.
418         (c_parser_std_attribute): Handle omp::directive and omp::sequence
419         attributes.
420         (struct c_omp_attribute_data): New type.
421         (c_parser_handle_statement_omp_attributes,
422         c_parser_handle_directive_omp_attributes): New functions.
423         (c_parser_compound_statement_nostart): Handle omp::directive and
424         omp::sequence attributes on statements.  Formatting fix.
425         (c_parser_all_labels): Handle omp::directive and omp::sequence
426         attributes on statements.
427         (c_parser_statement): Clear parser->omp_attrs_forbidden_p.
428         (c_parser_omp_variable_list): Handle parser->tokens
429         != &parser->tokens_buf[0] by saving/restoring it.
430         (c_parser_omp_structured_block): Set parser->omp_attrs_forbidden_p.
431         (c_parser_omp_section_scan): New function.
432         (c_parser_omp_structured_block_sequence, c_parser_omp_sections_scope):
433         Use it.
434         (c_parser_omp_parallel): Set parser->omp_attrs_forbidden_p.
435         (c_parser_omp_task): Likewise.
436         (c_parser_omp_declare_simd): Handle function declaration after
437         std attributes.
438         (c_finish_omp_declare_simd): Don't assert all kinds are the same.
439         (c_parser_omp_declare_target): Also push attr_syntax flag.
440         (c_parser_omp_begin): Likewise.  Adjust for current_omp_begin_assumes
441         type change.
442         (c_parser_omp_end): Adjust for current_omp_begin_assumes type
443         change.  Diagnose mixing of attribute vs. pragma syntax on end assumes
444         or end declare target.
445         (c_parser_omp_declare_reduction): Handle parser->tokens
446         != &parser->tokens_buf[0] by saving/restoring it.
447         * c-decl.cc: Include c-parser.h.
448         (current_omp_begin_assumes): Change type from int to
449         vec<c_omp_begin_assumes_data, va_gc> *.
450         (struct c_tree_token_vec): New type.  Add static assertions
451         for sizeof and offsetof.
452         (union lang_tree_node): Add c_token_vec member and adjust GTY
453         desc for it.
454         (c_tree_size): New function.
455         (c_decl_attributes): Diagnose invalid omp::directive attribute
456         uses.
457         * c-objc-common.h (LANG_HOOKS_TREE_SIZE): Redefine.
459 2023-11-02  Martin Uecker  <uecker@tugraz.at>
461         PR c/112347
462         * c-typeck.cc (convert_for_assignment): Add missing check.
464 2023-11-01  Martin Uecker  <uecker@tugraz.at>
466         PR c/71219
467         * c-typeck.cc (convert_for_assignment): Add warning.
469 2023-10-26  liuhongt  <hongtao.liu@intel.com>
471         * c-typeck.cc (build_vec_cmp): Pass type of arg0 to
472         truth_type_for.
474 2023-10-25  Thomas Schwinge  <thomas@codesourcery.com>
476         * c-parser.cc (c_parser_omp_clause_name): Return
477         'PRAGMA_OACC_CLAUSE_SELF' for "self".
478         (c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
479         (c_parser_oacc_all_clauses): Remove 'bool compute_p' formal
480         parameter, and instead locally determine whether we're called for
481         an OpenACC compute construct or OpenACC 'update' directive.
482         (c_parser_oacc_compute): Adjust.
484 2023-10-25  Chung-Lin Tang  <cltang@codesourcery.com>
486         * c-parser.cc (c_parser_oacc_compute_clause_self): New function.
487         (c_parser_oacc_all_clauses): Add new 'bool compute_p = false'
488         parameter, add parsing of self clause when compute_p is true.
489         (OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
490         (OACC_PARALLEL_CLAUSE_MASK): Likewise,
491         (OACC_SERIAL_CLAUSE_MASK): Likewise.
492         (c_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
493         set compute_p argument to true.
494         * c-typeck.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case.
496 2023-10-20  Florian Weimer  <fweimer@redhat.com>
498         PR c/109827
499         PR other/44209
500         * c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
501         for pointer/integer mismatch warnings.
503 2023-10-20  Florian Weimer  <fweimer@redhat.com>
505         PR c/109826
506         PR other/44209
507         * c-typeck.cc (build_conditional_expr): Use
508         OPT_Wincompatible_pointer_types for pointer mismatches.
509         Emit location information for the operand.
511 2023-10-19  Andrew Pinski  <pinskia@gmail.com>
513         PR c/100532
514         * c-typeck.cc (convert_argument): After erroring out
515         about an incomplete type return error_mark_node.
517 2023-10-19  Andrew Pinski  <pinskia@gmail.com>
519         PR c/104822
520         * c-typeck.cc (convert_for_assignment): Check for null pointer
521         before warning about an incompatible scalar storage order.
523 2023-10-18  Andrew Pinski  <pinskia@gmail.com>
525         PR c/101364
526         * c-decl.cc (diagnose_arglist_conflict): Test for
527         error mark before calling of c_type_promotes_to.
529 2023-10-18  Andrew Pinski  <pinskia@gmail.com>
531         PR c/101285
532         * c-typeck.cc (c_safe_arg_type_equiv_p): Return true for error
533         operands early.
535 2023-10-17  Martin Uecker  <uecker@tugraz.at>
537         PR c/111708
538         * c-decl.cc (grokdeclarator): Add error.
540 2023-10-03  David Malcolm  <dmalcolm@redhat.com>
542         * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
543         text_info fields.
545 2023-09-30  Eugene Rozenfeld  <erozen@microsoft.com>
547         * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
549 2023-09-20  Jakub Jelinek  <jakub@redhat.com>
551         * c-parser.cc (c_parser_postfix_expression_after_primary): Parse
552         __builtin_classify_type call with typename as argument.
554 2023-09-19  Richard Biener  <rguenther@suse.de>
556         PR c/111468
557         * gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
559 2023-09-19  Richard Biener  <rguenther@suse.de>
561         PR c/111468
562         * gimple-parser.cc (c_parser_gimple_binary_expression): Add
563         return type argument.
564         (c_parser_gimple_statement): Adjust.
565         (c_parser_gimple_paren_condition): Likewise.
566         (c_parser_gimple_binary_expression): Use passed in return type,
567         add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
568         __UNORDERED and __ORDERED.
570 2023-09-12  Tobias Burnus  <tobias@codesourcery.com>
572         * c-parser.cc (struct c_omp_loc_tree): New.
573         (c_check_omp_allocate_allocator_r): New; checking moved from ...
574         (c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
575         ICE with tree_to_shwi for invalid too-large value.
577 2023-09-12  Tobias Burnus  <tobias@codesourcery.com>
579         * c-parser.cc (c_parser_omp_construct): Move call to
580         c_parser_omp_allocate to ...
581         (c_parser_pragma): ... here.
582         (c_parser_omp_allocate): Avoid ICE is allocator could not be
583         parsed; set 'omp allocate' attribute for stack/automatic variables
584         and only reject static variables; add several additional
585         restriction checks.
586         * c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
587         * c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
588         (c_mark_decl_jump_unsafe_in_current_scope): New.
589         (warn_about_goto, c_check_switch_jump_warnings): Add error for
590         omp-allocated decls.
592 2023-09-12  Martin Uecker  <uecker@tugraz.at>
594         * c-typeck.cc (struct comptypes_data): Add structure.
595         (tagged_types_tu_compatible_p,
596         function_types_compatible_p, type_lists_compatible_p,
597         comptypes_internal): Add structure to interface, change
598         return type to bool, and adapt calls.
599         (comptarget_types): Change return type too bool.
600         (comptypes, comptypes_check_enum_int,
601         comptypes_check_different_types): Adapt calls.
603 2023-09-06  Jakub Jelinek  <jakub@redhat.com>
605         PR c/102989
606         * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
607         * c-typeck.cc (c_common_type): Emit sorry for common type between
608         _Complex integer and larger _BitInt and return the _Complex integer.
610 2023-09-06  Jakub Jelinek  <jakub@redhat.com>
612         PR c/102989
613         * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
614         * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
615         bit-fields.
616         (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
617         if possible.
618         (declspecs_add_type): Formatting fixes.  Handle cts_bitint.  Adjust
619         for added union in *specs.  Handle RID_BITINT.
620         (finish_declspecs): Handle cts_bitint.  Adjust for added union
621         in *specs.
622         * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
623         c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
624         RID_BITINT.
625         (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
626         * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
627         Add cts_bitint enumerator.
628         (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
629         and add bitint_prec there as well.
630         * c-typeck.cc (c_common_type, comptypes_internal):
631         Handle BITINT_TYPE.
632         (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
633         their declared type.
634         (build_array_ref, build_unary_op, build_conditional_expr,
635         build_c_cast, convert_for_assignment, digest_init, build_binary_op):
636         Handle BITINT_TYPE.
637         * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
638         INTEGER_TYPE.
639         * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
641 2023-09-06  Jakub Jelinek  <jakub@redhat.com>
643         * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
644         for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
645         text.
647 2023-09-05  Tobias Burnus  <tobias@codesourcery.com>
649         * c-parser.cc (c_parser_omp_clause_allocate): Handle
650         error_mark_node.
652 2023-08-25  Sandra Loosemore  <sandra@codesourcery.com>
654         * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
655         (struct omp_for_parse_data): New.
656         (check_omp_intervening_code): New.
657         (add_structured_block_stmt): New.
658         (c_parser_compound_statement_nostart): Recognize intervening code,
659         nested loops, and other things that need special handling in
660         OpenMP loop constructs.
661         (c_parser_while_statement): Error on loop in intervening code.
662         (c_parser_do_statement): Likewise.
663         (c_parser_for_statement): Likewise.
664         (c_parser_postfix_expression_after_primary): Error on calls to
665         the OpenMP runtime in intervening code.
666         (c_parser_pragma): Error on OpenMP pragmas in intervening code.
667         (c_parser_omp_loop_nest): New.
668         (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
669         c_parser_omp_loop_nest to do the heavy lifting.
671 2023-08-24  Richard Sandiford  <richard.sandiford@arm.com>
673         * c-parser.cc (c_parser_std_attribute): Conditionally allow
674         two colons to be used in place of ::.
675         (c_parser_std_attribute_list): New function, split out from...
676         (c_parser_std_attribute_specifier): ...here.  Allow the attribute-list
677         to start with __extension__.  When it does, also allow two colons
678         to be used in place of ::.
680 2023-08-22  Tobias Burnus  <tobias@codesourcery.com>
682         * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
683         'all' as category.
685 2023-08-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
687         PR c/106537
688         * c-typeck.cc (build_binary_op): Warning on comparing distinct
689         pointer types only when -Wcompare-distinct-pointer-types.
691 2023-08-15  Chung-Lin Tang  <cltang@codesourcery.com>
692             Thomas Schwinge  <thomas@codesourcery.com>
694         * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
696 2023-08-11  Jakub Jelinek  <jakub@redhat.com>
698         * c-parser.cc (c_parser_typeof_specifier): Handle
699         __typeof_unqual and __typeof_unqual__ as !is_std.
701 2023-08-11  Martin Uecker  <uecker@tugraz.at>
703         PR c/84510
704         * c-typeck.cc (build_c_cast): Add warning.
706 2023-08-05  Martin Uecker  <uecker@tugraz.at>
708         * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
709         warnings branches that are known not be taken during parsing.
711 2023-08-04  Tamar Christina  <tamar.christina@arm.com>
713         * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
714         c_parser_for_statement, c_parser_statement_after_labels,
715         c_parse_pragma_novector, c_parser_pragma): Wire through novector and
716         default to false.
718 2023-08-02  Eric Feng  <ef2648@columbia.edu>
720         PR analyzer/107646
721         * c-parser.cc: New functions on stashing values for the
722         analyzer.
724 2023-08-01  Lewis Hyatt  <lhyatt@gmail.com>
726         * c-parser.cc (pragma_lex_discard_to_eol): New function.
727         (c_init_preprocess): New function.
729 2023-07-31  Hamza Mahfooz  <someguy@effective-light.com>
731         PR c/65213
732         * c-decl.cc (start_decl): Handle
733         -Wmissing-variable-declarations.
735 2023-07-31  Chung-Lin Tang  <cltang@codesourcery.com>
737         * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
738         host_data construct to have an use_device clause.
740 2023-06-29  Qing Zhao  <qing.zhao@oracle.com>
742         PR c/77650
743         * c-decl.cc (finish_struct): Issue warnings for new option.
745 2023-06-29  Qing Zhao  <qing.zhao@oracle.com>
747         * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
748         struct/union type.
750 2023-06-29  Richard Biener  <rguenther@suse.de>
752         PR c/110454
753         * c-typeck.cc (convert_argument): Sink formal_prec compute
754         to where TYPE_PRECISION is valid to use.
756 2023-06-29  Eugene Rozenfeld  <erozen@microsoft.com>
758         * Make-lang.in: Pass correct stage cc1 when processing
759         profile data collected while building target libraries
761 2023-06-16  David Malcolm  <dmalcolm@redhat.com>
763         PR c/107583
764         * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
765         name" error.
767 2023-06-12  Tobias Burnus  <tobias@codesourcery.com>
769         * c-parser.cc (c_parser_omp_clause_map): Reword error message for
770         clearness especially with 'omp target (enter/exit) data.'
772 2023-06-06  Kwok Cheung Yeung  <kcy@codesourcery.com>
773             Tobias Burnus  <tobias@codesourcery.com>
775         * c-parser.cc (c_parser_omp_clause_defaultmap,
776         c_parser_omp_clause_map): Parse 'present'.
777         (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
778         (c_parser_omp_clause_from_to): New; parse to/from clauses with
779         optional present modifer.
780         (c_parser_omp_all_clauses): Update call.
781         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
782         c_parser_omp_target_exit_data): Handle new map enum values
783         for 'present' mapping.
785 2023-05-30  Tobias Burnus  <tobias@codesourcery.com>
787         PR c/109999
788         * c-parser.cc (c_parser_oacc_all_clauses,
789         c_parser_omp_all_clauses): Improve error wording.
791 2023-05-23  Martin Uecker  <uecker@tugraz.at>
793         PR c/109450
794         * c-decl.cc (add_decl_expr): New function.
795         (grokdeclarator): Add decl expr for size expression in
796         types pointed to by parameters declared as arrays.
798 2023-05-23  Martin Uecker  <uecker@tugraz.at>
800         PR c/70418
801         PR c/106465
802         PR c/107557
803         PR c/108423
804         * c-decl.cc (start_decl): Make sure size expression are
805         evaluated only in correct context.
806         (grokdeclarator): Size expression in fields may need a bind
807         expression, make sure DECL_EXPR is always created.
808         (grokfield, declspecs_add_type): Pass along size expressions.
809         (finish_struct): Remove unneeded DECL_EXPR.
810         (start_function): Evaluate size expressions for nested functions.
811         * c-parser.cc (c_parser_struct_declarations,
812         c_parser_struct_or_union_specifier): Pass along size expressions.
813         (c_parser_declaration_or_fndef): Evaluate size expression.
814         (c_parser_objc_at_property_declaration,
815         c_parser_objc_class_instance_variables): Adapt.
816         * c-tree.h (grokfield): Adapt declaration.
818 2023-05-19  Martin Uecker  <uecker@tugraz.at>
820         * c-decl.cc (set_type_context): Remove.
821         (pop_scope, diagnose_mismatched_decls, pushdecl):
822         Remove dead code.
823         * c-typeck.cc (comptypes_internal): Remove dead code.
824         (same_translation_unit_p): Remove.
825         (tagged_types_tu_compatible_p): Some fixes.
827 2023-05-19  Joseph Myers  <joseph@codesourcery.com>
829         * c-decl.cc (diagnose_mismatched_decls): Do not handle
830         thread-local declarations as tentative definitions for C2x.
831         (finish_decl): Do not allow thread-local definition with
832         incomplete type for C2x.
834 2023-05-18  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
836         * c-convert.cc (c_convert): Ditto.
837         * c-decl.cc (merge_decls): Ditto.
838         * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
839         (c_parser_omp_declare_reduction): Ditto.
840         * c-typeck.cc (build_component_ref): Ditto.
841         (convert_argument): Ditto.
842         (pointer_diff): Ditto.
843         (build_unary_op): Ditto.
844         (build_c_cast): Ditto.
845         (build_modify_expr): Ditto.
846         (store_init_value): Ditto.
847         (constexpr_init_fits_real_type): Ditto.
848         (check_constexpr_init): Ditto.
849         (c_finish_return): Ditto.
850         (handle_omp_array_sections_1): Ditto.
851         (c_finish_omp_clauses): Ditto.
852         * gimple-parser.cc (c_finish_gimple_return): Ditto.
854 2023-05-16  Joseph Myers  <joseph@codesourcery.com>
856         * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
857         diagnostics.
859 2023-05-15  Joseph Myers  <joseph@codesourcery.com>
861         * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
862         type for C2x.
864 2023-04-30  Andrew Pinski  <apinski@marvell.com>
866         * c-typeck.cc (process_init_element): Print out array type
867         for excessive elements.
869 2023-04-30  Andrew Pinski  <apinski@marvell.com>
871         PR c/107926
872         * c-typeck.cc (process_init_element): Move the check
873         for string cst until after the error message.
875 2023-04-28  Eugene Rozenfeld  <erozen@microsoft.com>
877         * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
879 2023-04-27  Jakub Jelinek  <jakub@redhat.com>
881         PR c/109409
882         * c-parser.cc (c_parser_initializer): Move diagnostics about
883         initialization of variable sized object with non-empty initializer
884         after c_parser_expr_no_commas call and ret.set_error (); after it.
886 2023-04-27  Jakub Jelinek  <jakub@redhat.com>
888         PR c/107682
889         PR c/109412
890         * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
891         reject empty initializer as invalid.
893 2023-04-26  Richard Biener  <rguenther@suse.de>
895         * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
896         last_stmt.
898 2023-04-25  Tobias Burnus  <tobias@codesourcery.com>
900         * c-parser.cc (c_parser_omp_scan_loop_body): Handle
901         zero exec statements before/after 'omp scan'.
903 2023-04-20  Jakub Jelinek  <jakub@redhat.com>
905         PR c/107041
906         * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
907         warning on acc_on_device declaration.
909 2023-03-28  David Malcolm  <dmalcolm@redhat.com>
911         PR c/107002
912         * c-typeck.cc (parser_build_binary_op): Update for new param of
913         check_for_xor_used_as_pow.
915 2023-03-10  Jakub Jelinek  <jakub@redhat.com>
917         PR c/108079
918         * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
919         after diagnosing it.
921 2023-02-28  Jakub Jelinek  <jakub@redhat.com>
923         PR sanitizer/108894
924         * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
925         and rename to c_strict_flex_array_level_of.
926         (is_flexible_array_member_p): Adjust caller.
928 2023-02-18  Martin Uecker  <uecker@tugraz.at>
930         PR c/108375
931         * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
932         (diagnose_mismatched_decl): Dito.
933         (warn_about_goto): Dito:
934         (c_check_switch_jump_warnings): Dito.
935         (finish_decl): Dito.
936         (finish_struct): Dito.
937         (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
938         (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
939         * c-objc-common.cc (c_var_mod_p): New function.
940         (c_var_unspec_p): Remove.
941         * c-objc-common.h: Set lang hook.
942         * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
943         (c_parser_typeof_specifier): Dito.
944         (c_parser_has_attribute_expression): Dito.
945         (c_parser_generic_selection): Dito.
946         * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
947         * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
949 2023-02-16  Patrick Palka  <ppalka@redhat.com>
951         * c-parser.h: Mechanically drop static from static inline
952         functions via s/^static inline/inline/g.
954 2023-02-10  Joseph Myers  <joseph@codesourcery.com>
956         * c-convert.cc (c_convert): Allow conversion of a null pointer
957         constant to nullptr_t.
958         * c-typeck.cc (null_pointer_constant_p): Remove static.
959         (convert_for_assignment): Allow conversion of a null pointer
960         constant to nullptr_t.
961         (digest_init): Handle NULLPTR_TYPE among scalar conversions.
962         * c-tree.h (null_pointer_constant_p): Declare.
964 2023-02-09  Tobias Burnus  <tobias@codesourcery.com>
966         * c-parser.cc (c_parser_omp_allocate): Parse align
967         clause and check for restrictions.
969 2023-02-08  Joseph Myers  <joseph@codesourcery.com>
971         * c-typeck.cc (check_constexpr_init): Remove argument
972         null_pointer_constant.  Only check pointer initializers for being
973         null.
974         (digest_init): Update calls to check_constexpr_init.
976 2023-02-02  Joseph Myers  <joseph@codesourcery.com>
978         * c-typeck.cc (build_binary_op): Allow comparisons between
979         pointers and nullptr_t values that are not null pointer constants.
981 2023-02-02  Joseph Myers  <joseph@codesourcery.com>
983         * c-typeck.cc: Include "realmpfr.h".
984         (constexpr_init_fits_real_type): Do not allow signaling NaN
985         conversions to different types with the same mode.  Handle
986         conversions from binary to decimal types.
987         (check_constexpr_init): Do not disallow real initializers for
988         complex types.  Do not disallow binary initializers for decimal
989         floating types.
991 2023-01-31  Marek Polacek  <polacek@redhat.com>
993         PR c++/107593
994         PR c++/108597
995         * c-objc-common.cc (instantiation_dependent_expression_p): New.
997 2023-01-27  Joseph Myers  <joseph@codesourcery.com>
999         * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
1000         around auto initializer.
1002 2023-01-16  Jakub Jelinek  <jakub@redhat.com>
1004         PR c++/105593
1005         * c-parser.cc (c_parser_initializer): Check warning_enabled_at
1006         at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
1007         of warn_init_self.
1009 2023-01-14  Jakub Jelinek  <jakub@redhat.com>
1011         PR c++/108365
1012         * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
1013         division or modulo.
1015 2023-01-13  Qing Zhao  <qing.zhao@oracle.com>
1017         * c-decl.cc (strict_flex_array_level_of): ... here.
1019 2023-01-11  Jakub Jelinek  <jakub@redhat.com>
1021         PR c/105972
1022         * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
1023         markers for K&R function parameter declarations of nested functions.
1025 2023-01-09  Joseph Myers  <joseph@codesourcery.com>
1027         * c-decl.cc (build_compound_literal): Call record_inline_static.
1029 2023-01-06  Joseph Myers  <joseph@codesourcery.com>
1031         * c-parser.cc (c_parser_postfix_expression): Handle integer
1032         generic arguments to functions passed to __builtin_tgmath as
1033         _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
1034         Do not handle integer arguments to some narrowing functions as
1035         _Float64.
1037 2022-12-19  Jakub Jelinek  <jakub@redhat.com>
1039         PR c/108043
1040         * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
1041         compound literals with function type.
1043 2022-12-07  Joseph Myers  <joseph@codesourcery.com>
1045         * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
1046         auto, constexpr and a type used together.
1048 2022-12-06  Qing Zhao  <qing.zhao@oracle.com>
1050         * c-decl.cc (is_flexible_array_member_p): Call new function
1051         strict_flex_array_level_of.
1053 2022-11-24  Florian Weimer  <fweimer@redhat.com>
1055         PR c/107805
1056         * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
1057         from type to specs.
1059 2022-11-17  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
1061         * c-decl.cc (start_function): Set the result decl source
1062         location to the location of the typespec.
1064 2022-11-17  David Malcolm  <dmalcolm@redhat.com>
1066         PR analyzer/107711
1067         * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
1068         to cpp_create_reader, rather than ident_hash, so that the new
1069         reader gets its own hash table.
1071 2022-11-15  David Malcolm  <dmalcolm@redhat.com>
1073         PR analyzer/106302
1074         * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
1075         (class ana::c_translation_unit): New.
1076         (c_parser_translation_unit): Call ana::on_finish_translation_unit.
1078 2022-11-12  Joseph Myers  <joseph@codesourcery.com>
1080         * c-decl.cc (start_underspecified_init)
1081         (finish_underspecified_init): Handle name == NULL_TREE for
1082         compound literals.
1083         (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
1084         (shadow_tag_warned): Check for constexpr.
1085         (start_decl): Add parameter do_push.
1086         (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
1087         (grokdeclarator): Handle constexpr.
1088         (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
1089         (declspecs_add_scspec): Handle constexpr.
1090         * c-parser.cc (c_token_starts_compound_literal)
1091         (c_token_starts_declspecs, c_parser_declaration_or_fndef)
1092         (c_parser_declspecs, c_parser_gnu_attribute_any_word)
1093         (c_parser_compound_literal_scspecs)
1094         (c_parser_postfix_expression_after_paren_type): Handle constexpr.
1095         Update calls to start_init.
1096         (c_parser_declaration_or_fndef, c_parser_initializer)
1097         (c_parser_initval): Pass true for new argument of
1098         convert_lvalue_to_rvalue.  Call convert_lvalue_to_rvalue for
1099         constexpr compound literals.
1100         (c_parser_static_assert_declaration_no_semi)
1101         (c_parser_enum_specifier, c_parser_struct_declaration)
1102         (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
1103         Call convert_lvalue_to_rvalue on expressions required to be
1104         integer constant expressions.
1105         (c_parser_omp_declare_reduction): Update call to start_init.
1106         * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
1107         (C_DECL_DECLARED_CONSTEXPR): New macros.
1108         (struct c_declspecs): Add constexpr_p.
1109         (start_decl, convert_lvalue_to_rvalue, start_init): Update
1110         prototypes.
1111         * c-typeck.cc (require_constant_value, require_constant_elements):
1112         Change to bool.
1113         (require_constexpr_value, maybe_get_constexpr_init)
1114         (constexpr_init_fits_real_type, check_constexpr_init): New.
1115         (convert_lvalue_to_rvalue): Add new parameter for_init.  Call
1116         maybe_get_constexpr_init.
1117         (store_init_value): Update call to digest_init.
1118         (digest_init): Add parameters int_const_expr, arith_const_expr and
1119         require_constexpr.  Check constexpr initializers.
1120         (constructor_top_level): Remove.
1121         (struct initializer_stack): Remove top_level.  Add
1122         require_constexpr_value.
1123         (start_init): Remove parameter top_level.  Add parameters
1124         init_require_constant and init_require_constexpr.  Save
1125         require_constexpr_value on stack.
1126         (pop_init_level): Use a null pointer constant for zero initializer
1127         of pointer initialized with {}.
1128         (output_init_element): Update call to digest_init.  Avoid passing
1129         null pointer constants of pointer type through digest_init a
1130         second time when initializing a constexpr object.
1132 2022-11-03  Joseph Myers  <joseph@codesourcery.com>
1134         * c-decl.cc (in_underspecified_init, start_underspecified_init)
1135         (finish_underspecified_init): New.
1136         (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
1137         Give errors inside initializers of underspecified declarations.
1138         (grokdeclarator): Handle (erroneous) case of C2X auto on a
1139         parameter.
1140         (declspecs_add_type): Handle c2x_auto_p case.
1141         (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
1142         C2X mode.
1143         (finish_declspecs): Handle c2x_auto_p.
1144         * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
1145         * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
1146         (struct c_declspecs): Add c2x_auto_p.
1147         (start_underspecified_init, finish_underspecified_init): New
1148         prototypes.
1149         * c-typeck.cc (build_external_ref): Give error for underspecified
1150         declaration referenced in its initializer.
1152 2022-10-28  Joseph Myers  <joseph@codesourcery.com>
1154         * c-decl.cc (grokdeclarator): Pass
1155         arg_info->no_named_args_stdarg_p to build_function_type.
1156         (grokparms): Check arg_info->no_named_args_stdarg_p before
1157         converting () to (void).
1158         (build_arg_info): Initialize no_named_args_stdarg_p.
1159         (get_parm_info): Set no_named_args_stdarg_p.
1160         (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
1161         build_function_type.
1162         (store_parm_decls): Count (...) functions as prototyped.
1163         * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
1164         parenthesis to start parameter list.
1165         (c_parser_parms_list_declarator): Always allow '...' with no
1166         arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
1167         * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
1168         * c-typeck.cc (composite_type): Handle
1169         TYPE_NO_NAMED_ARGS_STDARG_P.
1170         (function_types_compatible_p): Compare
1171         TYPE_NO_NAMED_ARGS_STDARG_P.
1173 2022-10-28  Jakub Jelinek  <jakub@redhat.com>
1175         * c-parser.cc (c_parser_omp_all_clauses): Allow optional
1176         comma before the first clause.
1177         (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
1178         c_parser_omp_flush, c_parser_omp_scan_loop_body,
1179         c_parser_omp_ordered, c_finish_omp_declare_variant,
1180         c_parser_omp_declare_target, c_parser_omp_declare_reduction,
1181         c_parser_omp_requires, c_parser_omp_error,
1182         c_parser_omp_assumption_clauses): Likewise.
1184 2022-10-28  Joseph Myers  <joseph@codesourcery.com>
1186         PR c/61469
1187         * c-convert.cc (c_convert): Handle enums with underlying boolean
1188         type like bool.
1189         * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
1190         enums with enum type specifier, but give errors for storage class
1191         specifiers, qualifiers or alignment specifiers in non-definition
1192         declarations of such enums.
1193         (grokdeclarator): Give error for non-definition use of type
1194         specifier with an enum type specifier.
1195         (parser_xref_tag): Add argument has_enum_type_specifier.  Pass it
1196         to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
1197         (xref_tag): Update call to parser_xref_tag.
1198         (start_enum): Add argument fixed_underlying_type.  Complete enum
1199         type with a fixed underlying type given in the definition.  Give
1200         error for defining without a fixed underlying type in the
1201         definition if one was given in a prior declaration.  Do not mark
1202         enums with fixed underlying type as packed for -fshort-enums.
1203         Store the enum type in the_enum.
1204         (finish_enum): Do not adjust types of values or check their range
1205         for an enum with a fixed underlying type.  Set underlying type of
1206         enum and variants.
1207         (build_enumerator): Check enumeration constants for enum with
1208         fixed underlying type against that type and convert to that type.
1209         Increment in the underlying integer type, with handling for bool.
1210         (c_simulate_enum_decl): Update call to start_enum.
1211         (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
1212         * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
1213         rather than recomputing an underlying type based on size.
1214         * c-parser.cc (c_parser_declspecs)
1215         (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
1216         Set has_enum_type_specifier for type specifiers.
1217         (c_parser_enum_specifier): Handle enum type specifiers.
1218         (c_parser_struct_or_union_specifier): Update call to
1219         parser_xref_tag.
1220         (c_parser_omp_atomic): Check for boolean increment or decrement
1221         using C_BOOLEAN_TYPE_P.
1222         * c-tree.h (C_BOOLEAN_TYPE_P): New.
1223         (struct c_typespec): Add has_enum_type_specifier.
1224         (struct c_declspecs): Add enum_type_specifier_ref_p.
1225         (struct c_enum_contents): Add enum_type.
1226         (start_enum, parser_xref_tag): Update prototypes.
1227         * c-typeck.cc (composite_type): Allow for enumerated types
1228         compatible with bool.
1229         (common_type, comptypes_internal, perform_integral_promotions):
1230         Use ENUM_UNDERLYING_TYPE.
1231         (parser_build_binary_op, build_unary_op, convert_for_assignment)
1232         (c_finish_return, c_start_switch, build_binary_op): Check for
1233         boolean types using C_BOOLEAN_TYPE_P.
1235 2022-10-24  Jakub Jelinek  <jakub@redhat.com>
1237         PR c++/107358
1238         * c-typeck.cc (build_binary_op): Pass operands before excess precision
1239         promotions to scalar_to_vector call.
1241 2022-10-24  Arsen Arsenović  <arsen@aarsen.me>
1243         * c-decl.cc (finish_function): Ignore hosted when deciding
1244         whether to implicitly return zero, but check noreturn.
1245         * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
1246         requirements to just MAIN_NAME_P when hosted, or `int main'
1247         otherwise.
1249 2022-10-20  Richard Biener  <rguenther@suse.de>
1251         PR c/107305
1252         PR c/107306
1253         * gimple-parser.cc (c_parser_parse_gimple_body): Verify
1254         the parsed IL and zap the body on error.
1256 2022-10-18  Joseph Myers  <joseph@codesourcery.com>
1258         PR c/107164
1259         * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
1260         with previous declaration visible.
1262 2022-10-18  Joseph Myers  <joseph@codesourcery.com>
1264         PR c/36113
1265         * c-decl.cc (finish_enum): If any enumerators do not fit in int,
1266         convert all to the type of the enumeration.  pedwarn if no integer
1267         type fits all enumerators and default to
1268         widest_integer_literal_type_node in that case.  Otherwise pedwarn
1269         for type wider than intmax_t.
1270         (build_enumerator): pedwarn for enumerators outside the range of
1271         uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
1272         enumerators outside the range of int.  On overflow, attempt to
1273         find a wider type that can hold the value of the next enumerator.
1274         Do not convert value to type determined with
1275         c_common_type_for_size.
1277 2022-10-14  Jakub Jelinek  <jakub@redhat.com>
1279         * c-typeck.cc (convert_arguments): Don't promote __bf16 to
1280         double.
1282 2022-10-14  Joseph Myers  <joseph@codesourcery.com>
1284         * c-decl.cc (build_compound_literal): Add parameter scspecs.
1285         Handle storage class specifiers.
1286         * c-parser.cc (c_token_starts_compound_literal)
1287         (c_parser_compound_literal_scspecs): New.
1288         (c_parser_postfix_expression_after_paren_type): Add parameter
1289         scspecs.  Call pedwarn_c11 for use of storage class specifiers.
1290         Update call to build_compound_literal.
1291         (c_parser_cast_expression, c_parser_sizeof_expression)
1292         (c_parser_alignof_expression): Handle storage class specifiers for
1293         compound literals.  Update calls to
1294         c_parser_postfix_expression_after_paren_type.
1295         (c_parser_postfix_expression): Update syntax comment.
1296         * c-tree.h (build_compound_literal): Update prototype.
1297         * c-typeck.cc (c_mark_addressable): Diagnose taking address of
1298         register compound literal.
1300 2022-10-07  Qing Zhao  <qing.zhao@oracle.com>
1302         * c-decl.cc (flexible_array_member_type_p): New function.
1303         (one_element_array_type_p): Likewise.
1304         (zero_length_array_type_p): Likewise.
1305         (add_flexible_array_elts_to_size): Call new utility
1306         routine flexible_array_member_type_p.
1307         (is_flexible_array_member_p): New function.
1308         (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
1310 2022-10-06  Joseph Myers  <joseph@codesourcery.com>
1312         * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
1313         and not C2x.
1314         (c_keyword_starts_typename, c_token_starts_declspecs)
1315         (c_parser_declspecs, c_parser_objc_selector): Handle
1316         RID_TYPEOF_UNQUAL.
1317         (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
1318         Distinguish typeof for C2x from __typeof__ for all standard
1319         versions and typeof before C2x.
1320         * c-typeck.cc (build_function_call_vec): Use unqualified version
1321         of non-void return type.
1322         (build_unary_op): Use unqualified type for increment and
1323         decrement.
1325 2022-10-06  Jakub Jelinek  <jakub@redhat.com>
1327         * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
1328         call for holds clause on assume construct.
1330 2022-10-06  Jakub Jelinek  <jakub@redhat.com>
1332         PR c++/106654
1333         * c-parser.cc (handle_assume_attribute): New function.
1334         (c_parser_declaration_or_fndef): Handle assume attribute.
1335         (c_parser_attribute_arguments): Add assume_attr argument,
1336         if true, parse first argument as conditional expression.
1337         (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
1338         c_parser_attribute_arguments callers.
1339         (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
1340         assume attribute.
1342 2022-10-04  Jakub Jelinek  <jakub@redhat.com>
1344         * c-lang.h (struct c_omp_declare_target_attr): New type.
1345         (current_omp_declare_target_attribute): Change type from
1346         int to vec<c_omp_declare_target_attr, va_gc> *.
1347         * c-parser.cc (c_parser_translation_unit): Adjust for that change.
1348         If last pushed directive was begin declare target, use different
1349         wording and simplify format strings for easier translations.
1350         (c_parser_omp_clause_device_type): Uncomment
1351         check_no_duplicate_clause call.
1352         (c_parser_omp_declare_target): Adjust for the
1353         current_omp_declare_target_attribute type change, push { -1 }.
1354         Use error_at rather than warning_at for declare target with
1355         only device_type clauses.
1356         (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
1357         (c_parser_omp_begin): Add begin declare target support.
1358         (c_parser_omp_end): Adjust for the
1359         current_omp_declare_target_attribute type change, adjust
1360         diagnostics wording and simplify format strings for easier
1361         translations.
1362         * c-decl.cc (current_omp_declare_target_attribute): Change type from
1363         int to vec<c_omp_declare_target_attr, va_gc> *.
1364         (c_decl_attributes): Adjust for the
1365         current_omp_declare_target_attribute type change.  If device_type
1366         was present on begin declare target, add "omp declare target host"
1367         and/or "omp declare target nohost" attributes.
1369 2022-09-29  Joseph Myers  <joseph@codesourcery.com>
1371         * c-decl.cc (handle_std_noreturn_attribute): New function.
1372         (std_attribute_table): Add _Noreturn and noreturn.
1374 2022-09-27  Jakub Jelinek  <jakub@redhat.com>
1376         * c-lang.h (current_omp_begin_assumes): Declare.
1377         * c-parser.cc: Include bitmap.h.
1378         (c_parser_omp_end_declare_target): Rename to ...
1379         (c_parser_omp_end): ... this.  Handle also end assumes.
1380         (c_parser_omp_begin, c_parser_omp_assumption_clauses,
1381         c_parser_omp_assumes, c_parser_omp_assume): New functions.
1382         (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
1383         without corresponding #pragma omp end assumes.
1384         (c_parser_pragma): Use %s in may only be used at file scope
1385         diagnostics to decrease number of translatable messages.  Handle
1386         PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES.  Handle PRAGMA_OMP_END
1387         rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
1388         for it rather than c_parser_omp_end_declare_target.
1389         (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
1390         * c-decl.cc (current_omp_begin_assumes): Define.
1392 2022-09-24  Jakub Jelinek  <jakub@redhat.com>
1394         PR c/106981
1395         * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
1396         start.  For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
1397         t2 have different types.
1399 2022-09-22  David Malcolm  <dmalcolm@redhat.com>
1401         PR c/106830
1402         * c-parser.cc (c_parser_initelt): Initialize m_decimal.
1403         (c_parser_cast_expression): Likewise.
1404         (c_parser_alignof_expression): Likewise.
1405         (c_parser_postfix_expression_after_paren_type): Likewise.
1406         (c_parser_postfix_expression_after_primary): Likewise.
1407         (c_parser_expression): Likewise.
1408         (c_parser_omp_variable_list): Likewise.
1409         (c_parser_transaction_expression): Likewise.
1410         * c-tree.h (c_expr::set_error): Likewise.
1411         * c-typeck.cc (c_expr_sizeof_expr): Likewise.
1412         (parser_build_unary_op): Likewise.
1413         (parser_build_binary_op): Likewise.
1414         (digest_init): Likewise.
1415         (pop_init_level): Likewise.
1416         * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
1418 2022-09-19  Marek Polacek  <polacek@redhat.com>
1420         PR c/106947
1421         * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
1422         notes.
1424 2022-09-15  Richard Biener  <rguenther@suse.de>
1426         * c-decl.cc (build_void_list_node): Remove.
1428 2022-09-14  Julian Brown  <julian@codesourcery.com>
1430         * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
1431         on error.
1433 2022-09-07  Joseph Myers  <joseph@codesourcery.com>
1435         * c-parser.cc (c_parser_static_assert_declaration_no_semi)
1436         (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
1437         for C2x spellings of keywords.
1438         (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
1440 2022-09-06  Jakub Jelinek  <jakub@redhat.com>
1442         * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
1443         in omp_cur_iteration - 1 has integer_type_node type.
1445 2022-09-03  Jakub Jelinek  <jakub@redhat.com>
1447         * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
1448         (c_parser_omp_clause_depend_sink): Renamed to ...
1449         (c_parser_omp_clause_doacross_sink): ... this.  Add depend_p argument.
1450         Handle parsing of doacross(sink:omp_cur_iteration-1).  Use
1451         OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
1452         OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
1453         of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
1454         (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
1455         OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
1456         OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
1457         and set OMP_CLAUSE_DOACROSS_DEPEND on it.
1458         (c_parser_omp_clause_doacross): New function.
1459         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
1460         (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
1461         OMP_CLAUSE_DEPEND_SOURCE.
1462         (c_parser_omp_for_loop): Don't diagnose here linear clause together
1463         with ordered with argument.
1464         (c_parser_omp_simd): Don't diagnose ordered clause with argument on
1465         for simd.
1466         (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1467         (c_parser_omp_ordered): Handle also doacross and adjust for it
1468         diagnostic wording.
1469         * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
1470         Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
1472 2022-09-02  David Malcolm  <dmalcolm@redhat.com>
1474         PR c/90885
1475         * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
1476         (c_parser_expr_no_commas): Likewise.
1477         (c_parser_conditional_expression): Likewise.
1478         (c_parser_binary_expression): Clear m_decimal when popping the
1479         stack.
1480         (c_parser_unary_expression): Clear ret.m_decimal.
1481         (c_parser_has_attribute_expression): Likewise for result.
1482         (c_parser_predefined_identifier): Likewise for expr.
1483         (c_parser_postfix_expression): Likewise for expr.
1484         Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
1485         token.
1486         * c-tree.h (c_expr::m_decimal): New bitfield.
1487         * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
1488         (parser_build_binary_op): Call check_for_xor_used_as_pow.
1490 2022-09-01  Joseph Myers  <joseph@codesourcery.com>
1492         * c-decl.cc (grokparms): Handle () in a function declaration the
1493         same as (void) for C2X.
1495 2022-08-31  Joseph Myers  <joseph@codesourcery.com>
1497         * c-parser.cc (c_parser_label): Pass attributes to do_case.
1498         * c-typeck.cc (do_case): Add argument ATTRS.  Pass it to
1499         c_add_case_label.
1501 2022-08-26  Jakub Jelinek  <jakub@redhat.com>
1503         * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
1505 2022-08-25  Marek Polacek  <polacek@redhat.com>
1507         * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
1508         Give a better diagnostic when converting to nullptr_t.
1509         * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
1510         initialization.
1511         * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
1512         (c_parser_postfix_expression): Handle RID_NULLPTR.
1513         * c-typeck.cc (null_pointer_constant_p): Return true when expr is
1514         nullptr_node.
1515         (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
1516         (build_conditional_expr): Handle the case when the second/third operand
1517         is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
1518         (convert_for_assignment): Handle converting an expression of type
1519         nullptr_t to pointer/bool.
1520         (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
1521         <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
1523 2022-08-25  Joseph Myers  <joseph@codesourcery.com>
1525         * c-decl.cc (start_decl): Do not diagnose initialization of
1526         variable-sized objects here.
1527         * c-parser.cc (c_parser_braced_init): Add argument DECL.  All
1528         callers changed.
1529         (c_parser_initializer): Diagnose initialization of variable-sized
1530         objects other than with braced initializer.
1531         (c_parser_braced_init): Use pedwarn_c11 for empty initializer
1532         braces and update diagnostic text.  Diagnose initialization of
1533         variable-sized objects with nonempty braces.
1534         * c-typeck.cc (digest_init): Update diagnostic for initialization
1535         of variable-sized objects.
1536         (really_start_incremental_init, set_designator)
1537         (process_init_element): Update comments.
1538         (pop_init_level): Allow scalar empty initializers.
1540 2022-08-17  Tobias Burnus  <tobias@codesourcery.com>
1541             Chung-Lin Tang  <cltang@codesourcery.com>
1543         PR c++/104493
1544         * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
1545         instead of removed langhook.
1546         * c-typeck.cc (c_finish_omp_clauses): Likewise.
1548 2022-08-11  Marek Polacek  <polacek@redhat.com>
1550         PR middle-end/102633
1551         * c-parser.cc (c_parser_initializer): Add new tree parameter.  Use it.
1552         Call suppress_warning.
1553         (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
1554         (c_parser_omp_declare_reduction): Pass omp_priv down to
1555         c_parser_initializer.
1557 2022-08-08  Tom Honermann  <tom@honermann.net>
1559         * c-parser.cc (c_parser_string_literal): Use char8_t as the type
1560         of CPP_UTF8STRING when char8_t support is enabled.
1561         * c-typeck.cc (digest_init): Allow initialization of an array
1562         of character type by a string literal with type array of
1563         char8_t.
1565 2022-08-01  David Malcolm  <dmalcolm@redhat.com>
1567         * c-typeck.cc (build_c_cast): Quote names of address spaces in
1568         diagnostics.
1569         (convert_for_assignment): Add a note to address space mismatch
1570         diagnostics, specifying the expected and actual types.
1572 2022-07-10  Lewis Hyatt  <lhyatt@gmail.com>
1574         PR preprocessor/97498
1575         * c-parser.cc (c_parser_pragma): Set input_location to the
1576         location of the pragma, rather than the start of the line.
1578 2022-07-04  Tobias Burnus  <tobias@codesourcery.com>
1579             Chung-Lin Tang  <cltang@codesourcery.com>
1580             Thomas Schwinge  <thomas@codesourcery.com>
1582         * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
1583         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
1584         OMP_REQUIRES_TARGET_USED.
1585         (c_parser_omp_requires): Remove sorry.
1587 2022-07-01  Tobias Burnus  <tobias@codesourcery.com>
1589         * c-parser.cc (c_parser_omp_target_enter_data,
1590         c_parser_omp_target_exit_data): Accept tofrom
1591         map-type modifier but use 'to' / 'from' internally.
1593 2022-06-16  David Malcolm  <dmalcolm@redhat.com>
1595         * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
1596         group the warning with any note.
1597         (warn_about_goto): Likewise to group error or warning with note.
1598         Bail out if the warning wasn't emitted, to avoid emitting orphan
1599         notes.
1600         (lookup_label_for_goto): Add auto_diagnostic_group to
1601         group the error with the note.
1602         (check_earlier_gotos): Likewise.
1603         (c_check_switch_jump_warnings): Likewise for any error/warning.
1604         Conditionalize emission of the notes.
1605         (diagnose_uninitialized_cst_member): Likewise for warning,
1606         conditionalizing emission of the note.
1607         (grokdeclarator): Add auto_diagnostic_group to group the "array
1608         type has incomplete element type" error with any note.
1609         (parser_xref_tag): Add auto_diagnostic_group to group warnings
1610         with their notes.  Conditionalize emission of notes.
1611         (start_struct): Add auto_diagnostic_group to group the
1612         "redefinition of" errors with any note.
1613         (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
1614         (check_for_loop_decls): Likewise for pre-C99 error.
1616 2022-06-07  Jakub Jelinek  <jakub@redhat.com>
1618         * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
1619         style linear clause modifiers.  Set
1620         OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
1621         old style modifiers are used.
1622         * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
1623         with val modifier on simd or for if the old style modifiers are
1624         used.
1626 2022-06-02  David Malcolm  <dmalcolm@redhat.com>
1628         * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
1629         (c_get_sarif_source_language): New.
1630         * c-tree.h (c_get_sarif_source_language): New decl.
1632 2022-05-31  Jason Merrill  <jason@redhat.com>
1634         * Make-lang.in (c.tags): Look at *.cc.
1636 2022-05-31  Jakub Jelinek  <jakub@redhat.com>
1638         * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
1639         clauses.
1641 2022-05-28  Jakub Jelinek  <jakub@redhat.com>
1643         * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
1644         seen first, use "%<to%>" or "%<enter%>" depending on
1645         OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
1646         "%<to%> or %<enter%>" wording.
1648 2022-05-27  Jakub Jelinek  <jakub@redhat.com>
1650         * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
1651         (c_parser_omp_all_clauses): For to clause on declare target, use
1652         OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
1653         OMP_CLAUSE_TO_DECLARE clause.  Handle PRAGMA_OMP_CLAUSE_ENTER.
1654         (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
1655         (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
1656         OMP_CLAUSE_TO_DECLARE.
1657         * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
1658         of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
1659         name in diagnostics instead of
1660         omp_clause_code_name[OMP_CLAUSE_CODE (c)].
1662 2022-05-25  Jakub Jelinek  <jakub@redhat.com>
1664         PR c/91134
1665         * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
1666         * c-typeck.cc (build_component_ref): Likewise.  If DATUM is
1667         INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
1668         diagnostic and fixit hint if DATUM has pointer type.
1669         * c-parser.cc (c_parser_postfix_expression,
1670         c_parser_omp_variable_list): Adjust build_component_ref callers.
1671         * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
1672         Likewise.
1674 2022-05-24  Jakub Jelinek  <jakub@redhat.com>
1676         PR c/105378
1677         * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
1679 2022-05-18  Marek Polacek  <polacek@redhat.com>
1681         PR c/105131
1682         * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
1683         mismatches.
1684         * c-tree.h (comptypes_check_enum_int): Declare.
1685         * c-typeck.cc (comptypes): No longer static.
1687 2022-05-17  Marek Polacek  <polacek@redhat.com>
1689         * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
1690         its value.
1692 2022-05-17  Jakub Jelinek  <jakub@redhat.com>
1694         * c-parser.cc (c_parser_omp_clause_depend): Parse
1695         inoutset depend-kind.
1696         (c_parser_omp_depobj): Likewise.
1698 2022-05-16  Martin Liska  <mliska@suse.cz>
1700         * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
1702 2022-05-12  Jakub Jelinek  <jakub@redhat.com>
1704         * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
1705         if flag_openmp.
1706         (c_parser_postfix_expression): Diagnose uses of omp_all_memory
1707         in postfix expressions.
1708         (c_parser_omp_variable_list): Handle omp_all_memory in depend
1709         clause.
1710         * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
1711         keyword in depend clause as null_pointer_node, diagnose invalid
1712         uses.
1714 2022-05-09  Martin Liska  <mliska@suse.cz>
1716         * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
1717         macros.
1718         (c_parser_binary_expression): Likewise.
1720 2022-05-07  Marek Polacek  <polacek@redhat.com>
1722         PR c++/101833
1723         PR c++/47634
1724         * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1726 2022-04-08  Jakub Jelinek  <jakub@redhat.com>
1728         PR c/105149
1729         * c-typeck.cc (c_build_va_arg): Reject function types.
1731 2022-03-22  Marek Polacek  <polacek@redhat.com>
1733         PR c/82283
1734         PR c/84685
1735         * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1736         (start_init): Set it.
1737         (finish_init): Restore constructor_designated.
1738         (push_init_level): Set constructor_designated to the value of
1739         constructor_designated in the upper constructor_stack.
1741 2022-03-12  Thomas Schwinge  <thomas@codesourcery.com>
1743         PR other/65095
1744         * c-typeck.cc (handle_omp_array_sections_1)
1745         (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1746         instead of 'c_omp_map_clause_name'.
1748 2022-03-09  Joseph Myers  <joseph@codesourcery.com>
1750         * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1751         differently from earlier standards for unprototyped function type
1752         compatibility.
1754 2022-03-09  Jakub Jelinek  <jakub@redhat.com>
1756         PR c/104711
1757         * c-fold.cc (c_fully_fold_internal): Don't emit
1758         -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1759         * c-typeck.cc (build_binary_op): Likewise.
1761 2022-03-07  Jakub Jelinek  <jakub@redhat.com>
1763         * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1764         literal.
1766 2022-02-23  Richard Biener  <rguenther@suse.de>
1768         * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1769         SSA names without definition.
1770         (c_parser_gimple_declaration): Handle pointer typed SSA names.
1772 2022-02-17  Jakub Jelinek  <jakub@redhat.com>
1774         PR c/104532
1775         * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1776         convert_lvalue_to_rvalue and build_indirect_ref instead of
1777         build_simple_mem_ref.
1779 2022-02-11  Richard Biener  <rguenther@suse.de>
1781         * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1782         VEC_COND_EXPRs.
1784 2022-02-10  Marcel Vollweiler  <marcel@codesourcery.com>
1786         * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1787         clause.
1788         (c_parser_omp_variable_list): Handle array sections.
1789         (c_parser_omp_clause_has_device_addr): Added.
1790         (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1791         case.
1792         (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1793         OMP_CLAUSE_MASK.
1794         * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1795         (c_finish_omp_clauses): Handle array sections.
1797 2022-02-09  Jakub Jelinek  <jakub@redhat.com>
1799         PR c/104427
1800         * c-parser.cc (c_parser_postfix_expression)
1801         <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1802         instead of build1_loc to build PAREN_EXPR.
1803         * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1804         * c-fold.cc (c_fully_fold_internal): Likewise.
1806 2022-01-17  Martin Liska  <mliska@suse.cz>
1808         * Make-lang.in: Rename .c names to .cc.
1809         * c-convert.cc: Likewise.
1810         * c-decl.cc (struct lang_identifier): Likewise.
1811         (pop_scope): Likewise.
1812         (finish_decl): Likewise.
1813         * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1814         * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1815         * c-parser.h (GCC_C_PARSER_H): Likewise.
1816         * c-tree.h (c_keyword_starts_typename): Likewise.
1817         (finish_declspecs): Likewise.
1818         (c_get_alias_set): Likewise.
1819         (enum c_oracle_request): Likewise.
1820         (tag_exists_p): Likewise.
1821         (set_c_expr_source_range): Likewise.
1822         * c-typeck.cc (c_common_type): Likewise.
1823         (c_finish_omp_clauses): Likewise.
1824         * config-lang.in: Likewise.
1826 2022-01-17  Martin Liska  <mliska@suse.cz>
1828         * c-aux-info.c: Moved to...
1829         * c-aux-info.cc: ...here.
1830         * c-convert.c: Moved to...
1831         * c-convert.cc: ...here.
1832         * c-decl.c: Moved to...
1833         * c-decl.cc: ...here.
1834         * c-errors.c: Moved to...
1835         * c-errors.cc: ...here.
1836         * c-fold.c: Moved to...
1837         * c-fold.cc: ...here.
1838         * c-lang.c: Moved to...
1839         * c-lang.cc: ...here.
1840         * c-objc-common.c: Moved to...
1841         * c-objc-common.cc: ...here.
1842         * c-parser.c: Moved to...
1843         * c-parser.cc: ...here.
1844         * c-typeck.c: Moved to...
1845         * c-typeck.cc: ...here.
1846         * gccspec.c: Moved to...
1847         * gccspec.cc: ...here.
1848         * gimple-parser.c: Moved to...
1849         * gimple-parser.cc: ...here.
1851 2022-01-17  Andrew Stubbs  <ams@codesourcery.com>
1853         * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1855 2022-01-14  Chung-Lin Tang  <cltang@codesourcery.com>
1857         PR c++/103705
1858         * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1859         outer node for ARRAY_REFs.
1861 2022-01-01  Jakub Jelinek  <jakub@redhat.com>
1863         PR objc/103639
1864         * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1865         ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1867 2021-12-17  Marek Polacek  <polacek@redhat.com>
1869         PR c/103649
1870         * c-decl.c (c_warn_unused_attributes): Don't warn for
1871         attribute_ignored_p.
1872         * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1873         arguments when the attribute is ignored.
1875 2021-12-14  Jakub Jelinek  <jakub@redhat.com>
1877         PR c/103587
1878         * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1879         consume the pragma and silently skip to the pragma eol.
1881 2021-12-12  Jonathan Wakely  <jwakely@redhat.com>
1883         * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1884         * c-parser.c: Likewise.
1886 2021-12-09  Jakub Jelinek  <jakub@redhat.com>
1888         PR pch/71934
1889         * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1890         to resort_data.new_value.
1892 2021-12-08  Chung-Lin Tang  <cltang@codesourcery.com>
1894         * c-parser.c (struct omp_dim): New struct type for use inside
1895         c_parser_omp_variable_list.
1896         (c_parser_omp_variable_list): Allow multiple levels of array and
1897         component accesses in array section base-pointer expression.
1898         (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1899         c_parser_omp_var_list_parens.
1900         (c_parser_omp_clause_from): Likewise.
1901         * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1902         of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1903         POINTER_PLUS_EXPR.
1904         (c_finish_omp_clauses): Extend allowed ranged of expressions
1905         involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1907 2021-12-08  Chung-Lin Tang  <cltang@codesourcery.com>
1909         PR middle-end/92120
1910         * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1911         call to c_parser_omp_variable_list to 'true'.
1912         * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1913         array base handling.
1914         (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1916 2021-11-30  Thomas Schwinge  <thomas@codesourcery.com>
1918         * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1919         orphan loop" checking.
1921 2021-11-30  Cesar Philippidis  <cesar@codesourcery.com>
1922             Thomas Schwinge  <thomas@codesourcery.com>
1924         * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1925         OpenACC gang reductions.
1927 2021-11-30  Richard Biener  <rguenther@suse.de>
1929         * gimple-parser.c (c_parser_gimple_postfix_expression):
1930         avoid unreachable code after break.
1932 2021-11-29  Eric Gallager  <egallager@gcc.gnu.org>
1934         PR other/103021
1935         * Make-lang.in: Use ETAGS variable in TAGS target.
1937 2021-11-29  Richard Biener  <rguenther@suse.de>
1939         * c-typeck.c (c_tree_equal): Remove unreachable return.
1940         * c-parser.c (get_matching_symbol): Likewise.
1942 2021-11-23  Jakub Jelinek  <jakub@redhat.com>
1944         * c-typeck.c (c_clone_omp_udr): Don't initialize
1945         id.transform_lang_insert_block.
1947 2021-11-19  Martin Sebor  <msebor@redhat.com>
1949         PR c++/33925
1950         PR c/102867
1951         * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
1952         code resulting from macro expansion.
1954 2021-11-19  Martin Liska  <mliska@suse.cz>
1956         Revert:
1957         2021-11-19  Martin Liska  <mliska@suse.cz>
1959         * c-parser.c (add_debug_begin_stmt): Use option directly.
1961 2021-11-18  Matthias Kretz  <m.kretz@gsi.de>
1963         * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1964         * c-parser.c (c_parser_postfix_expression): Likewise.
1966 2021-11-18  Martin Liska  <mliska@suse.cz>
1968         * c-parser.c (add_debug_begin_stmt): Use option directly.
1970 2021-11-17  Martin Sebor  <msebor@redhat.com>
1972         PR c/101702
1973         * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1974         bounds before deciding if they're constant.
1976 2021-11-15  Jakub Jelinek  <jakub@redhat.com>
1978         * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1979         PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1981 2021-11-11  Jakub Jelinek  <jakub@redhat.com>
1983         * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1984         lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1985         Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1986         OMP_CLAUSE_NUM_TEAMS_EXPR.
1987         (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1988         combined target teams even lower-bound expression.
1990 2021-11-11  Richard Biener  <rguenther@suse.de>
1992         * gimple-parser.c: Shuffle bitmap.h include.
1994 2021-11-03  Joseph Myers  <joseph@codesourcery.com>
1996         PR c/103031
1997         * c-convert.c (c_convert): New function, based on convert.
1998         (convert): Make into wrapper of c_convert.
1999         (convert_init): New function.
2000         * c-typeck.c (enum impl_conv): Add ic_init_const.
2001         (convert_for_assignment): Handle ic_init_const like ic_init.  Add
2002         new argument to convert_and_check call.
2003         (digest_init): Pass ic_init_const to convert_for_assignment for
2004         initializers required to be constant.
2006 2021-11-02  Richard Sandiford  <richard.sandiford@arm.com>
2008         * c-tree.h (c_simulate_record_decl): Declare.
2009         * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
2010         * c-decl.c (c_simulate_record_decl): New function.
2012 2021-10-22  Eric Gallager  <egallager@gcc.gnu.org>
2014         PR other/102663
2015         * Make-lang.in: Add dummy c.install-dvi target.
2017 2021-10-15  Richard Biener  <rguenther@suse.de>
2019         PR c/102763
2020         * gimple-parser.c
2021         (c_parser_gimple_postfix_expression_after_primary): Check
2022         for a pointer do be dereferenced by ->.
2024 2021-10-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
2026         * c-parser.c (c_finish_omp_declare_variant): Change call from
2027         c_omp_check_context_selector to omp_check_context_selector. Change
2028         call from c_omp_mark_declare_variant to omp_mark_declare_variant.
2030 2021-10-09  Jakub Jelinek  <jakub@redhat.com>
2032         * c-parser.c (c_parser_omp_structured_block_sequence): New function.
2033         (c_parser_omp_scan_loop_body): Use it.
2034         (c_parser_omp_sections_scope): Likewise.
2036 2021-10-07  Richard Biener  <rguenther@suse.de>
2038         * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
2040 2021-10-05  Richard Biener  <rguenther@suse.de>
2042         PR c/102605
2043         * gimple-parser.c (c_parser_gimple_postfix_expression):
2044         Accept more address _Literals.
2046 2021-10-04  Marek Polacek  <polacek@redhat.com>
2048         PR c++/97573
2049         * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
2051 2021-10-01  Martin Sebor  <msebor@redhat.com>
2053         PR c/102103
2054         * c-typeck.c (maybe_warn_for_null_address): New function.
2055         (build_binary_op): Call it.
2057 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
2058             Richard Biener  <rguenther@suse.de>
2060         PR sanitizer/102515
2061         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2062         for division even for SANITIZE_SI_OVERFLOW.
2064 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
2066         * c-parser.c (c_parser_omp_clause_order): Set
2067         OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
2069 2021-09-28  Andrew Pinski  <apinski@marvell.com>
2071         PR c/32122
2072         * c-parser.c (c_parser_statement_after_labels): Pass
2073         the c_expr instead of the tree to c_finish_goto_ptr.
2074         * c-typeck.c (c_finish_goto_ptr): Change the second
2075         argument type to c_expr.
2076         * c-tree.h (c_finish_goto_ptr): Likewise.
2077         Error out if the expression was not of a pointer type.
2079 2021-09-22  Jakub Jelinek  <jakub@redhat.com>
2081         * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
2082         modifiers.
2084 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
2086         * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
2087         and reproducible modifiers.
2088         (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
2090 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
2092         * c-parser.c (c_parser_omp_clause_default): Handle private and
2093         firstprivate arguments, adjust diagnostics on unknown argument.
2095 2021-09-17  Jakub Jelinek  <jakub@redhat.com>
2097         * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
2098         is true.
2100 2021-09-10  Jakub Jelinek  <jakub@redhat.com>
2102         * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
2103         cond.value is >, < or == with omp_atomic_lhs as one of the operands,
2104         don't call build_conditional_expr, instead build a COND_EXPR directly.
2105         (c_parser_binary_expression): Avoid calling parser_build_binary_op
2106         if omp_atomic_lhs even in more cases for >, < or ==.
2107         (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
2108         parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
2109         acq_rel on atomic read/write and acq_rel/acquire clauses on update.
2110         * c-typeck.c (build_binary_op): For flag_openmp only handle
2111         MIN_EXPR/MAX_EXPR.
2113 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
2115         * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
2116         directive.
2118 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
2120         * c-decl.c (enum deprecated_states): Add unavailable state.
2121         (merge_decls): Copy unavailability.
2122         (quals_from_declspecs): Handle unavailable case.
2123         (start_decl): Amend the logic handling suppression of nested
2124         deprecation states to include unavailability.
2125         (smallest_type_quals_location): Amend comment.
2126         (grokdeclarator): Handle the unavailable deprecation state.
2127         (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
2128         * c-tree.h (struct c_declspecs): Add unavailable_p.
2129         * c-typeck.c (build_component_ref): Handle unavailability.
2130         (build_external_ref): Likewise.
2132 2021-09-01  Roger Sayle  <roger@nextmovesoftware.com>
2133             Joseph Myers  <joseph@codesourcery.com>
2135         PR c/79412
2136         * c-decl.c (duplicate_decls): On significant mismatches, mark the
2137         types of both (non-function) decls as error_mark_node, so that the
2138         middle-end can see the code is malformed.
2139         (free_attr_access_data): Don't process if the type has been set to
2140         error_mark_node.
2142 2021-08-31  Marcel Vollweiler  <marcel@codesourcery.com>
2144         * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
2145         and 'ancestor' in 'target device' clauses.
2147 2021-08-23  Jakub Jelinek  <jakub@redhat.com>
2149         * c-parser.c (c_parser_omp_clause_num_tasks,
2150         c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
2152 2021-08-22  Martin Uecker  <muecker@gwdg.de>
2154         PR c/98397
2155         * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
2156         for pointers to arrays with qualifiers.
2157         (build_conditional_expr): For C23 don't lose qualifiers for pointers
2158         to arrays when the other pointer is a void pointer. Update warnings.
2159         (convert_for_assignment): Update warnings for C2X when converting from
2160         void* with qualifiers to a pointer to array with the same qualifiers.
2162 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
2164         * c-parser.c (c_parser_omp_error): New function.
2165         (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
2167 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
2169         * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
2170         comma at the end of list.
2171         (c_parser_omp_requires): Likewise.
2173 2021-08-19  Jakub Jelinek  <jakub@redhat.com>
2175         * c-parser.c (c_parser_omp_requires): Don't call
2176         c_parser_peek_2nd_token and optionally consume token if current
2177         token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
2179 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
2181         * c-parser.c (c_parser_omp_nothing): New function.
2182         (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
2184 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
2186         * c-parser.c (c_parser_statement_after_labels): Add restart label
2187         near the start of the function.  If c_parser_pragma returns false,
2188         goto restart.
2189         (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
2190         c_parser_omp_cancellation_point returned.  For PRAGMA_OMP_DECLARE
2191         return what c_parser_omp_declare returned.  Return true instead of
2192         false after emitting errors that the directive is not allowed in
2193         pragma_stmt context.
2194         (c_parser_omp_ordered): Return true instead of
2195         false after emitting errors that the directive is not allowed in
2196         pragma_stmt context.
2197         (c_parser_omp_target_update): Likewise.
2198         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
2199         Change return type from tree to bool, return false if the
2200         directive should be ignored in pragma_stmt contexts.
2201         (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
2202         return their result directly.
2203         (c_parser_omp_cancellation_point): Change return type from void to
2204         bool, return false if the directive should be ignored in pragma_stmt
2205         contexts.
2206         (c_parser_omp_declare): Likewise.
2208 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
2210         * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
2211         (c_parser_omp_scope): New function.
2212         (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
2214 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
2216         * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
2217         (c_parser_omp_clause_filter): New function.
2218         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
2219         (OMP_MASKED_CLAUSE_MASK): Define.
2220         (c_parser_omp_masked): New function.
2221         (c_parser_omp_parallel): Handle parallel masked.
2222         (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
2223         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
2225 2021-08-12  Martin Uecker  <muecker@gwdg.de>
2227         PR c/101838
2228         PR c/29970
2229         * c-typeck.c (c_expr_sizeof_type): Evaluate
2230         size expressions for structs of variable size.
2232 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
2234         * c-parser.c (c_parser_omp_clause_proc_bind): Accept
2235         'primary' as alias for 'master'.
2237 2021-08-10  Martin Uecker  <muecker@gwdg.de>
2239         PR c/29970
2240         * c-typeck.c (c_expr_sizeof_expr): Evaluate
2241         size expressions for structs of variable size.
2243 2021-08-06  Tamar Christina  <tamar.christina@arm.com>
2245         * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
2246         * c-tree.h (c_simulate_enum_decl): Likewise.
2248 2021-08-06  Martin Sebor  <msebor@redhat.com>
2250         * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
2251         vec arguments to by-reference.
2252         (c_finish_omp_declare_simd): Same.
2253         (c_parser_compound_statement_nostart): Same.
2254         (c_parser_for_statement): Same.
2255         (c_parser_objc_methodprotolist): Same.
2256         (c_parser_oacc_routine): Same.
2257         (c_parser_omp_for_loop): Same.
2258         (c_parser_omp_declare_simd): Same.
2260 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
2261             Joseph Myers  <joseph@codesourcery.com>
2262             Cesar Philippidis  <cesar@codesourcery.com>
2264         * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
2265         (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
2266         (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
2267         * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
2269 2021-07-20  Martin Sebor  <msebor@redhat.com>
2271         * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
2272         by-const-reference.
2273         * c-typeck.c (c_build_function_call_vec): Same.
2275 2021-07-15  Martin Sebor  <msebor@redhat.com>
2277         PR c/101289
2278         PR c/97548
2279         * c-decl.c (get_parm_array_spec): Strip nops.
2281 2021-07-06  Martin Sebor  <msebor@redhat.com>
2283         * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
2285 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
2287         PR c/101297
2288         * c-parser.c (c_parser_omp_atomic): Consume comma only if it
2289         appears before a CPP_NAME.
2291 2021-06-25  Martin Sebor  <msebor@redhat.com>
2293         * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
2294         warning_suppressed_p, suppress_warning, and copy_no_warning.
2295         (diagnose_mismatched_decls): Same.
2296         (duplicate_decls): Same.
2297         (grokdeclarator): Same.
2298         (finish_function): Same.
2299         (c_write_global_declarations_1): Same.
2300         * c-fold.c (c_fully_fold_internal): Same.
2301         * c-parser.c (c_parser_expr_no_commas): Same.
2302         (c_parser_postfix_expression): Same.
2303         * c-typeck.c (array_to_pointer_conversion): Same.
2304         (function_to_pointer_conversion): Same.
2305         (default_function_array_conversion): Same.
2306         (convert_lvalue_to_rvalue): Same.
2307         (default_conversion): Same.
2308         (build_indirect_ref): Same.
2309         (build_function_call_vec): Same.
2310         (build_atomic_assign): Same.
2311         (build_unary_op): Same.
2312         (c_finish_return): Same.
2313         (emit_side_effect_warnings): Same.
2314         (c_finish_stmt_expr): Same.
2315         (c_omp_clause_copy_ctor): Same.
2317 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
2319         PR c/101176
2320         * c-parser.c (c_parser_has_attribute_expression): Set source range for
2321         the result.
2323 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
2325         PR c/101171
2326         * c-typeck.c (build_c_cast): Don't call note_integer_operands on
2327         error_mark_node.
2329 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
2331         * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
2332         C_ORT_OMP for clauses on target construct.
2333         (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
2334         (c_parser_omp_target): For non-combined target add
2335         map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION.  Pass
2336         C_ORT_OMP_TARGET to c_finish_omp_clauses.
2337         * c-typeck.c (handle_omp_array_sections): Adjust ort handling
2338         for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
2339         never present on C_ORT_*DECLARE_SIMD.
2340         (c_finish_omp_clauses): Likewise.  Handle OMP_CLAUSE_IN_REDUCTION
2341         on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
2342         corresponding map clauses.
2344 2021-06-21  Jakub Jelinek  <jakub@redhat.com>
2346         PR inline-asm/100785
2347         * c-typeck.c (c_mark_addressable): Diagnose trying to make
2348         bit-fields addressable.
2350 2021-06-15  Robin Dapp  <rdapp@linux.ibm.com>
2352         * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
2353         similar.
2355 2021-06-14  Tobias Burnus  <tobias@codesourcery.com>
2357         PR c/100913
2358         * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
2359         var in the error case.
2361 2021-06-07  Eric Botcazou  <ebotcazou@adacore.com>
2363         PR c/100920
2364         * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
2365         spot built-in functions.
2367 2021-06-06  Jakub Jelinek  <jakub@redhat.com>
2369         PR c/100902
2370         * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
2371         even when target is combined with other constructs.
2373 2021-06-06  Eric Botcazou  <ebotcazou@adacore.com>
2375         PR c/100920
2376         * c-decl.c (finish_struct): Fix thinko in previous change.
2377         * c-typeck.c (convert_for_assignment): Do not warn on pointer
2378         assignment and initialization for storage order purposes if the
2379         RHS is a call to a DECL_IS_MALLOC function.
2381 2021-06-04  Martin Sebor  <msebor@redhat.com>
2383         PR c/100783
2384         * c-objc-common.c (print_type): Handle erroneous types.
2386 2021-06-03  Jakub Jelinek  <jakub@redhat.com>
2388         PR c++/100859
2389         * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
2390         after depend only cases.
2392 2021-05-31  Richard Biener  <rguenther@suse.de>
2394         PR c++/88601
2395         * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
2396         * c-parser.c (c_parser_postfix_expression): Likewise.
2398 2021-05-28  Richard Biener   <rguenther@suse.de>
2400         PR c/100803
2401         * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
2402         invalid if conditions.
2404 2021-05-28  Jakub Jelinek  <jakub@redhat.com>
2406         PR middle-end/99928
2407         * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
2408         (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2409         marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT.  Add
2410         map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
2411         maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
2412         present too.  For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
2413         if present in map_head, map_field_head or map_firstprivate_head
2414         bitmaps.
2416 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
2418         * c-parser.c (c_parser_omp_clause_affinity): New.
2419         (c_parser_omp_clause_name, c_parser_omp_variable_list,
2420         c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
2421         * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
2422         c_finish_omp_clauses): Likewise.
2424 2021-05-26  Eric Botcazou  <ebotcazou@adacore.com>
2426         PR c/100653
2427         * c-decl.c (finish_struct): Warn for a union containing an aggregate
2428         field with a differing scalar storage order.
2430 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
2432         PR middle-end/99928
2433         * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
2434         OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain.  Don't error
2435         if a decl is mentioned both in map clause and in such firstprivate
2436         clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
2438 2021-05-19  Jakub Jelinek  <jakub@redhat.com>
2440         PR middle-end/99928
2441         * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
2442         master when combined with taskloop.
2443         (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
2444         parallel master when not combined with taskloop.
2446 2021-05-18  Richard Biener  <rguenther@suse.de>
2448         PR c/100522
2449         * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
2450         Diagnose calls to non-functions.
2451         (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
2453 2021-05-17  Richard Biener  <rguenther@suse.de>
2455         PR c/100625
2456         * gimple-parser.c (c_parser_gimple_label): Avoid building
2457         a GIMPLE label with NULL label decl.
2459 2021-05-13  Martin Sebor  <msebor@redhat.com>
2461         PR c/100550
2462         * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
2464 2021-05-12  Marcel Vollweiler  <marcel@codesourcery.com>
2466         * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
2467         'close'.
2469 2021-05-10  Martin Liska  <mliska@suse.cz>
2471         * c-aux-info.c (affix_data_type): Use startswith
2472         function instead of strncmp.
2473         * c-typeck.c (build_function_call_vec): Likewise.
2474         * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
2476 2021-05-07  Eric Botcazou  <ebotcazou@adacore.com>
2478         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
2479         on the address of a pointer field in a record with reverse SSO.
2481 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
2483         * c-typeck.c (c_finish_omp_clauses): Accept float + complex
2484         for || and && reductions.
2486 2021-04-29  Joseph Myers  <joseph@codesourcery.com>
2488         * c-typeck.c (function_types_compatible_p): For C2X, treat
2489         unprototyped function as compatible with non-variadic prototyped
2490         function even if some argument types are changed by the default
2491         argument promotions.
2493 2021-04-15  Martin Sebor  <msebor@redhat.com>
2495         PR c/99420
2496         PR c/99972
2497         * c-decl.c (pushdecl): Always propagate type attribute.
2499 2021-04-15  Richard Sandiford  <richard.sandiford@arm.com>
2501         PR c/98852
2502         * c-typeck.c (c_common_type): Do not drop attributes that
2503         affect type identity.
2505 2021-04-10  Jakub Jelinek  <jakub@redhat.com>
2507         PR c/99990
2508         * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
2509         error_mark_node.
2511 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
2513         PR c++/99565
2514         * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
2515         to operand_equal_p.
2517 2021-03-19  Jakub Jelinek  <jakub@redhat.com>
2519         PR c/99588
2520         * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
2521         with modifycode NOP_EXPR produces and mark the _Atomic var as read
2522         if found.
2523         (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
2524         rather than STATEMENT_LIST.  Otherwise call mark_exp_read on lhs.
2525         Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
2527 2021-03-15  Tobias Burnus  <tobias@codesourcery.com>
2529         PR c++/99509
2530         * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
2531         ensure that the varpool node is marked as offloadable.
2533 2021-03-05  Tobias Burnus  <tobias@codesourcery.com>
2535         PR c/99137
2536         * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
2538 2021-02-24  Martin Sebor  <msebor@redhat.com>
2540         PR middle-end/97172
2541         * c-decl.c (free_attr_access_data): Clear attribute arg spec.
2543 2021-02-18  Jakub Jelinek  <jakub@redhat.com>
2545         PR c/99136
2546         * c-typeck.c (c_finish_return): Don't wrap retval into
2547         EXCESS_PRECISION_EXPR in functions that return void.
2549 2021-02-11  Marek Polacek  <polacek@redhat.com>
2551         * c-parser.c (c_parser_if_statement): Use vec_free.
2553 2021-02-04  Martin Sebor  <msebor@redhat.com>
2555         PR c/97882
2556         * c-decl.c (locate_old_decl): Add type to diagnostic output.
2557         (diagnose_mismatched_decls): Same.
2558         (start_function): Introduce temporaries for better readability.
2559         * c-typeck.c (comptypes_internal): Only consider complete enum
2560         types in comparisons with integers.
2562 2021-02-01  Martin Sebor  <msebor@redhat.com>
2564         PR middle-end/97172
2565         * c-decl.c (free_attr_access_data): New function.
2566         (c_parse_final_cleanups): Call free_attr_access_data.
2568 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
2570         * c-parser.c (c_parser_omp_clause_detach): New.
2571         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
2572         (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2573         * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
2574         clause.  Prevent use of detach with mergeable and overriding the
2575         data sharing mode of the event handle.
2577 2021-01-15  Jakub Jelinek  <jakub@redhat.com>
2579         * c-typeck.c (c_finish_omp_clauses): For reduction build array with
2580         unqualified element type and then call c_build_qualified_type on the
2581         ARRAY_TYPE.
2583 2021-01-07  Richard Biener  <rguenther@suse.de>
2585         * gimple-parser.c (c_parser_gimple_compound_statement): Only
2586         reallocate loop array if it is too small.
2588 2020-12-16  Martin Uecker  <muecker@gwdg.de>
2590         PR c/98047
2591         * c-typeck.c (build_modify_expr): Drop qualifiers.
2593 2020-12-16  Martin Uecker  <muecker@gwdg.de>
2595         PR c/98260
2596         * c-parser.c (c_parser_expression): Look into
2597         nop expression when marking expressions as read.
2599 2020-12-14  Martin Liska  <mliska@suse.cz>
2601         PR sanitizer/98204
2602         * c-typeck.c (pointer_diff): Do not emit a top-level
2603         sanitization.
2604         (build_binary_op): Likewise.
2606 2020-12-09  Tobias Burnus  <tobias@codesourcery.com>
2608         * c-parser.c (c_parser_omp_allocate): New.
2609         (c_parser_omp_construct): Call it.
2611 2020-12-09  Richard Biener  <rguenther@suse.de>
2613         PR c/98200
2614         * gimple-parser.c (c_parser_gimple_postfix_expression): Return
2615         early on error.
2617 2020-12-07  Martin Uecker  <muecker@gwdg.de>
2619         PR c/97981
2620         * c-typeck.c (convert_lvalue_to_rvalue): Move the code
2621         that drops qualifiers to the end of the function.
2623 2020-11-26  Martin Uecker  <muecker@gwdg.de>
2625         PR c/65455
2626         PR c/92935
2627         * c-parser.c (c_parser_declaration_or_fndef): Remove
2628         redundant code to drop qualifiers of _Atomic types for __auto_type.
2629         (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
2630         types for __typeof__.
2632 2020-11-24  Jakub Jelinek  <jakub@redhat.com>
2634         PR c/97958
2635         * c-parser.c (c_parser_binary_expression): For omp atomic binary
2636         expressions, use make_node instead of build2 to avoid checking build2
2637         performs.
2639 2020-11-23  Joseph Myers  <joseph@codesourcery.com>
2641         PR c/95630
2642         * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
2643         for comparisons of complete and incomplete pointers.
2645 2020-11-21  Aaron Sawdey  <acsawdey@linux.ibm.com>
2647         * c-aux-info.c (gen_type): Support opaque types.
2649 2020-11-20  Martin Sebor  <msebor@redhat.com>
2651         PR middle-end/97879
2652         * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2654 2020-11-20  Jakub Jelinek  <jakub@redhat.com>
2656         PR other/97911
2657         * Make-lang.in (c.serial): Change from goal to a variable.
2658         (.PHONY): Drop c.serial.
2660 2020-11-20  Martin Uecker  <muecker@gwdg.de>
2662         * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2664 2020-11-19  Jakub Jelinek  <jakub@redhat.com>
2666         PR c/97860
2667         * c-decl.c (get_parm_array_spec): Bail out of nelts is
2668         error_operand_p.
2670 2020-11-18  Jakub Jelinek  <jakub@redhat.com>
2672         * Make-lang.in (c.serial): New goal.
2673         (.PHONY): Add c.serial c.prev.
2674         (cc1$(exeext)): Call LINK_PROGRESS.
2676 2020-11-13  Vladimir N. Makarov  <vmakarov@redhat.com>
2678         * c-parser.c (c_parser_asm_statement): Parse outputs for asm
2679         goto too.
2680         * c-typeck.c (build_asm_expr): Remove an assert checking output
2681         absence for asm goto.
2683 2020-11-13  Jakub Jelinek  <jakub@redhat.com>
2685         * c-typeck.c (c_finish_omp_clauses): Don't clear
2686         OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2688 2020-11-13  Iain Sandoe  <iain@sandoe.co.uk>
2690         PR objc/77404
2691         * c-parser.c (c_parser_objc_class_definition): Pass the
2692         location of the class name to the interface declaration.
2694 2020-11-10  Strager Neds  <strager.nds@gmail.com>
2696         * c-decl.c (merge_decls): Use new overload of
2697         set_decl_section_name.
2699 2020-11-10  Chung-Lin Tang  <cltang@codesourcery.com>
2701         * c-parser.c (c_parser_omp_target_data): Add use of
2702         new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
2703         handled map clause kind.
2704         (c_parser_omp_target_enter_data): Likewise.
2705         (c_parser_omp_target_exit_data): Likewise.
2706         (c_parser_omp_target): Likewise.
2707         * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
2708         use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
2709         (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
2710         same struct field access to co-exist on OpenMP construct.
2712 2020-11-07  Martin Uecker  <muecker@gwdg.de>
2714         * c-parser.c (c_parser_label): Implement mixing of labels and code.
2715         (c_parser_all_labels): Likewise.
2717 2020-11-06  Iain Sandoe  <iain@sandoe.co.uk>
2719         * c-parser.c (c_parser_objc_at_property_declaration):
2720         Improve parsing fidelity. Associate better location info
2721         with @property attributes.  Clean up the interface to
2722         objc_add_property_declaration ().
2724 2020-11-06  Nathan Sidwell  <nathan@acm.org>
2726         * c-decl.c (diagnose_mismatched_decls): Rename
2727         DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2728         (warn_if_shadowing, implicitly_declare, names_builtin_p)
2729         (collect_source_refs): Likewise.
2730         * c-typeck.c (inform_declaration, inform_for_arg)
2731         (convert_for_assignment): Likewise.
2733 2020-11-06  Tobias Burnus  <tobias@codesourcery.com>
2735         * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2736         OpenACC matching.
2737         (c_parser_omp_construct): Update call.
2739 2020-11-04  Jakub Jelinek  <jakub@redhat.com>
2741         PR c++/97670
2742         * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2743         find underlying decl to clear in the aligned_head bitmap.
2745 2020-11-04  Joseph Myers  <joseph@codesourcery.com>
2747         * c-decl.c (handle_nodiscard_attribute): New.
2748         (std_attribute_table): Add nodiscard.
2749         * c-parser.c (c_parser_std_attribute): Expect argument to
2750         nodiscard attribute to be a string.  Do not special-case ignoring
2751         nodiscard.
2752         * c-typeck.c (maybe_warn_nodiscard): New.
2753         (build_compound_expr, emit_side_effect_warnings): Call
2754         maybe_warn_nodiscard.
2755         (c_process_expr_stmt, c_finish_stmt_expr): Also call
2756         emit_side_effect_warnings if warn_unused_result.
2758 2020-10-29  Asher Gordon  <AsDaGo@posteo.net>
2760         * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2761         with XDELETE.
2762         (finish_init): Likewise.
2763         (pop_init_level): Likewise.
2765 2020-10-28  Joseph Myers  <joseph@codesourcery.com>
2767         * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2768         error_at for omitted parameter name.
2770 2020-10-28  Jakub Jelinek  <jakub@redhat.com>
2772         * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2773         (c_parser_omp_clause_allocate): New function.
2774         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2775         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2776         OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2777         OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2778         OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2779         OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2780         PRAGMA_OMP_CLAUSE_ALLOCATE.
2781         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2783 2020-10-27  Joseph Myers  <joseph@codesourcery.com>
2785         * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2786         standard attributes.
2788 2020-10-23  Marek Polacek  <polacek@redhat.com>
2790         PR c++/91741
2791         * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2792         (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2793         (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2794         * c-tree.h (char_type_p): Declare.
2795         * c-typeck.c (char_type_p): No longer static.
2797 2020-10-23  Martin Sebor  <msebor@redhat.com>
2799         PR middle-end/97552
2800         * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2802 2020-09-19  Martin Sebor  <msebor@redhat.com>
2804         PR c/50584
2805         * c-decl.c (lookup_last_decl): Define new function.
2806         (c_decl_attributes): Call it.
2807         (start_decl): Add argument and use it.
2808         (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2809         (get_parm_array_spec): Define new function.
2810         (push_parm_decl): Call get_parm_array_spec.
2811         (start_function): Call warn_parm_array_mismatch.  Build attribute
2812         access and add it to current function.
2813         * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2814         in forms of array parameters.
2815         * c-tree.h (start_decl): Add argument.
2817 2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
2819         * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2820         with...
2821         (in_statement): New.
2822         (start_function): Adjust for above change.
2823         (c_push_function_context, c_pop_function_context): Likewise.
2824         * c-lang.h (struct language_function): Likewise.
2825         * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2826         * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2827         New.
2828         (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2829         (c_parser_switch_statement): Adjust break/switch context handling
2830         and calls to renamed functions.
2831         (c_parser_while_statement): Adjust break/switch context handling and
2832         build a WHILE_STMT.
2833         (c_parser_do_statement): Ditto, with DO_STMT respectively.
2834         (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2835         (c_parser_omp_for_loop): Adjust break/switch context handling.
2836         * c-tree.h (c_break_label, c_cont_label): Delete.
2837         (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2838         (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2839         (in_statement, switch_statement_break_seen_p): Declare.
2840         (c_start_case, c_finish_case): Renamed to...
2841         (c_start_switch, c_finish_switch).
2842         (c_finish_bc_stmt): Adjust arguments.
2843         * c-typeck.c (build_function_call_vec): Don't try to print
2844         statements with %qE format.
2845         (struct c_switch):  Rename switch_expr field to switch_stmt.
2846         Add break_stmt_seen_p field.
2847         (c_start_case): Rename to c_start_switch.  Build a SWITCH_STMT
2848         instead of a SWITCH_EXPR.  Update for changes to struct c_switch.
2849         (do_case): Update for changes to struct c_switch.
2850         (c_finish_case): Rename to c_finish_switch.  Update for changes to
2851         struct c_switch and change of representation from SWITCH_EXPR to
2852         SWITCH_STMT.
2853         (c_finish_loop): Delete.
2854         (c_finish_bc_stmt): Update to reflect changes to break/continue
2855         state representation.  Build a BREAK_STMT or CONTINUE_STMT instead
2856         of a GOTO_EXPR except for objc foreach loops.
2858 2020-09-01  Jakub Jelinek  <jakub@redhat.com>
2860         PR c++/96867
2861         * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2862         only on PARM_DECLs.
2864 2020-08-28  Martin Sebor  <msebor@redhat.com>
2866         PR c/96596
2867         * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2868         argument type.
2870 2020-08-27  Martin Liska  <mliska@suse.cz>
2872         * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2873         growth function to true.
2875 2020-08-25  Tobias Burnus  <tobias@codesourcery.com>
2877         PR c/96678
2878         * c-typeck.c (handle_omp_array_sections_1): Talk about
2879         array function parameter in the error message.
2881 2020-08-18  Jakub Jelinek  <jakub@redhat.com>
2883         PR c/96571
2884         * c-parser.c (c_parser_generic_selection): Change match_found from bool
2885         to int, holding index of the match.  Call mark_exp_read on the selector
2886         expression and on expressions other than the selected one.
2888 2020-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2890         PR c/96377
2891         * c-typeck.c (process_init_element): Split test for whether to
2892         recurse into a record, union or array into...
2893         (initialize_elementwise_p): ...this new function.  Don't recurse
2894         into a vector type if the initialization value is also a vector.
2896 2020-07-31  Richard Biener  <rguenther@suse.de>
2898         PR debug/96383
2899         * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2900         Define to c_common_finalize_early_debug.
2902 2020-07-22  Tobias Burnus  <tobias@codesourcery.com>
2904         * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2905         (c_parser_omp_critical): Permit hint(0) clause without named critical.
2906         (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2908 2020-07-21  Sunil K Pandey  <skpgkp2@gmail.com>
2910         PR target/95237
2911         * c-decl.c (finish_decl): Call target hook
2912         lower_local_decl_alignment to lower local decl alignment.
2914 2020-07-09  Julian Brown  <julian@codesourcery.com>
2915             Thomas Schwinge  <thomas@codesourcery.com>
2917         PR middle-end/95270
2918         * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2919         for standalone attach/detach clauses.
2921 2020-07-08  Eric Botcazou  <ebotcazou@adacore.com>
2923         * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2924         set, warn for conversion between pointers that point to incompatible
2925         scalar storage orders.
2927 2020-07-07  Kaipeng Zhou  <zhoukaipeng3@huawei.com>
2929         * c-parser.c (c_parser_statement_after_labels): Pass correct
2930         parameters to c_parser_do_statement.
2932 2020-06-16  Jakub Jelinek  <jakub@redhat.com>
2934         * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
2935         c_in_omp_for.
2936         (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
2937         premature c_fully_fold.  Defer explicit c_fully_fold calls to after
2938         c_finish_omp_for.
2939         * c-tree.h (c_in_omp_for): Declare.
2940         * c-typeck.c (c_in_omp_for): Define.
2941         (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
2942         (digest_init): Likewise.
2943         (build_binary_op): Likewise.
2945 2020-06-16  Jakub Jelinek  <jakub@redhat.com>
2947         * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
2948         from kind by comma rather than colon.
2950 2020-06-05  Mark Wielaard  <mark@klomp.org>
2952         * c-decl.c (implicit_decl_warning): When warned and olddecl is
2953         an undeclared builtin, then add a fixit header hint, if found.
2954         (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
2955         warning_at about implicit builtin declaration type mismatch.
2957 2020-06-03  Mark Wielaard  <mark@klomp.org>
2959         * c-parser.c (struct c_parser): Add seen_string_literal
2960         bitfield.
2961         (c_parser_consume_token): Reset seen_string_literal.
2962         (c_parser_error_richloc): Add name_hint if seen_string_literal
2963         and next token is a CPP_NAME and we have a missing header
2964         suggestion for the name.
2965         (c_parser_string_literal): Set seen_string_literal.
2967 2020-06-03  Mark Wielaard  <mark@klomp.org>
2969         * c-parser.c (c_parser_postfix_expression_after_primary): Add
2970         scope with matching_parens after CPP_OPEN_PAREN.
2972 2020-06-03  Tobias Burnus  <tobias@codesourcery.com>
2974         * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2976 2020-05-28  Nicolas Bértolo  <nicolasbertolo@gmail.com>
2978         * Make-lang.in: Remove extra slash.
2980 2020-05-19  Martin Liska  <mliska@suse.cz>
2982         * c-parser.c: Fix typo.
2984 2020-05-14  Jakub Jelinek  <jakub@redhat.com>
2986         * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2988 2020-05-07  Richard Biener  <rguenther@suse.de>
2990         PR middle-end/94703
2991         * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2992         DECL_GIMPLE_REG_P.
2994 2020-04-30  Jakub Jelinek  <jakub@redhat.com>
2996         PR c/94842
2997         * c-decl.c (set_labels_context_r): In addition to context-less
2998         LABEL_DECLs adjust also LABEL_DECLs with context equal to
2999         parent function if any.
3000         (store_parm_decls): Adjust comment.
3002 2020-04-19  Jakub Jelinek  <jakub@redhat.com>
3004         PR objc/94637
3005         * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
3006         two CPP_COLON tokens.
3008 2020-04-17  Jakub Jelinek  <jakub@redhat.com>
3010         PR other/94629
3011         * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
3012         to data.clauses.
3014 2020-04-15  Jakub Jelinek  <jakub@redhat.com>
3016         PR c/94593
3017         * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
3018         requires directive when not at file scope.
3020 2020-04-08  Tobias Burnus  <tobias@codesourcery.com>
3022         PR middle-end/94120
3023         * c-decl.c (c_check_in_current_scope): New function.
3024         * c-tree.h (c_check_in_current_scope): Declare it.
3025         * c-parser.c (c_parser_oacc_declare): Add check that variables
3026         are declared in the same scope as the directive. Fix handling
3027         of namespace vars.
3029 2020-04-07  Jakub Jelinek  <jakub@redhat.com>
3031         PR c++/94512
3032         * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
3033         if c_parser_omp_master succeeded.
3035 2020-03-23  Jakub Jelinek  <jakub@redhat.com>
3037         PR gcov-profile/94029
3038         PR c/94239
3039         * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
3040         the function_start_locus location.  Don't do that afterwards for the
3041         __GIMPLE body parsing.
3043 2020-03-19  Jakub Jelinek  <jakub@redhat.com>
3045         PR gcov-profile/94029
3046         * c-tree.h (finish_function): Add location_t argument defaulted to
3047         input_location.
3048         * c-parser.c (c_parser_compound_statement): Add endlocp argument and
3049         set it to the locus of closing } if non-NULL.
3050         (c_parser_compound_statement_nostart): Return locus of closing }.
3051         (c_parser_parse_rtl_body): Likewise.
3052         (c_parser_declaration_or_fndef): Propagate locus of closing } to
3053         finish_function.
3054         * c-decl.c (finish_function): Add end_loc argument, use it instead of
3055         input_location to set function_end_locus.
3057 2020-03-17  Jakub Jelinek  <jakub@redhat.com>
3059         PR c/94172
3060         * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
3061         instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
3062         (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
3063         * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
3064         ENUMERAL_TYPEs.
3065         (finish_incomplete_vars): New function, moved from finish_struct.  Use
3066         relayout_decl instead of layout_decl.
3067         (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
3068         being TYPE_VFIELD.  Use finish_incomplete_vars.
3069         (finish_enum): Clear C_TYPE_INCOMPLETE_VARS.  Call
3070         finish_incomplete_vars.
3071         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3072         also on ENUMERAL_TYPEs.
3074 2020-03-16  Jakub Jelinek  <jakub@redhat.com>
3076         PR c/94179
3077         * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
3079 2020-03-13  Martin Sebor  <msebor@redhat.com>
3081         PR c/94040
3082         * c-decl.c (builtin_structptr_type_count): New constant.
3083         (match_builtin_function_types): Reject decls that are incompatible
3084         in types pointed to by pointers.
3085         (diagnose_mismatched_decls): Adjust comments.
3087 2020-03-05  Joseph Myers  <joseph@codesourcery.com>
3089         PR c/93577
3090         * c-typeck.c (pop_init_level): Do not diagnose initializers as
3091         empty when initialized type is error_mark_node.
3092         (set_designator, process_init_element): Ignore initializers for
3093         elements of a variable-size type or of error_mark_node.
3095 2020-03-01  Martin Sebor  <msebor@redhat.com>
3097         PR middle-end/93926
3098         * c-decl.c (types_close_enough_to_match): New function.
3099         (match_builtin_function_types):
3100         (diagnose_mismatched_decls): Add missing inform call to a warning.
3102 2020-03-01  Martin Sebor  <msebor@redhat.com>
3104         PR c/93812
3105         * c-typeck.c (build_functype_attribute_variant): New function.
3106         (composite_type): Call it.
3108 2020-02-25  Jakub Jelinek  <jakub@redhat.com>
3110         PR other/93912
3111         * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
3112         Rename last argument from probablity to probability.
3114 2020-02-13  Jakub Jelinek  <jakub@redhat.com>
3116         PR c/93576
3117         * c-decl.c (grokdeclarator): If this_size_varies, only push size into
3118         *expr if it has side effects.
3120 2020-01-30  Jeff Law  <law@redhat.com>
3122         PR c/88660
3123         * c-parser.c (c_parser_switch_statement): Make sure to request
3124         marking the switch expr as used.
3126 2020-01-22  Joseph Myers  <joseph@codesourcery.com>
3128         PR c/93348
3129         * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
3130         argument with integer operands.
3132 2020-01-16  Kerem Kat  <keremkat@gmail.com>
3134         PR c/92833
3135         * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
3136         to support 4 available tokens.
3138 2020-01-15  Joseph Myers  <joseph@codesourcery.com>
3140         PR c/93072
3141         * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
3142         determine whether to set DECL_CONTEXT.
3144 2020-01-13  Joseph Myers  <joseph@codesourcery.com>
3146         PR c/93241
3147         * c-typeck.c (build_c_cast): Check for expressions with integer
3148         operands that can occur in an unevaluated part of an integer
3149         constant expression and call note_integer_operands as needed.
3151 2019-01-08  Richard Biener  <rguenther@suse.de>
3153         PR middle-end/93199
3154         * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
3155         permanently.
3157 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
3159         Update copyright years.
3161 2019-12-20  Eric Botcazou  <ebotcazou@adacore.com>
3163         * c-decl.c (collect_source_ref_cb): Delete.
3164         (for_each_global_decl): Rename into...
3165         (collect_source_refs): ...this.  Call collect_source_ref directly.
3166         (c_parse_final_cleanups): Always call collect_source_ref on the main
3167         input filename.
3169 2019-12-19  Julian Brown  <julian@codesourcery.com>
3170             Cesar Philippidis  <cesar@codesourcery.com>
3172         * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
3173         detach clauses.
3174         (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
3175         Allow deref (->) in variable lists if true.
3176         (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
3177         Pass to c_parser_omp_variable_list.
3178         (c_parser_oacc_data_clause): Support attach and detach clauses.  Update
3179         call to c_parser_omp_variable_list.
3180         (c_parser_oacc_all_clauses): Support attach and detach clauses.
3181         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
3182         OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
3183         OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
3184         (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
3185         * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
3186         and detach.  Support deref.
3187         (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
3188         GOMP_MAP_ALWAYS_POINTER for OpenACC.
3189         (c_oacc_check_attachments): New function.
3190         (c_finish_omp_clauses): Check attach/detach arguments for being
3191         pointers using above.  Support deref.
3193 2019-12-19  Julian Brown  <julian@codesourcery.com>
3194             Maciej W. Rozycki  <macro@codesourcery.com>
3195             Tobias Burnus  <tobias@codesourcery.com>
3196             Thomas Schwinge  <thomas@codesourcery.com>
3198         * c-parser.c (c_parser_omp_clause_name): Support no_create.
3199         (c_parser_oacc_data_clause): Likewise.
3200         (c_parser_oacc_all_clauses): Likewise.
3201         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3202         (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
3203         PRAGMA_OACC_CLAUSE_NO_CREATE.
3204         * c-typeck.c (handle_omp_array_sections): Support
3205         GOMP_MAP_NO_ALLOC.
3207 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
3209         * c-objc-common.c (range_label_for_type_mismatch::get_text):
3210         Replace label_text ctor calls.
3212 2019-12-04  Joseph Myers  <joseph@codesourcery.com>
3214         PR c/36941
3215         PR c/88827
3216         * c-typeck.c (convert_lvalue_to_rvalue): Call
3217         require_complete_type for arguments not of void types.
3218         (build_indirect_ref): Do not diagnose dereferencing pointers to
3219         incomplete types.
3220         * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
3222 2019-12-03  Joseph Myers  <joseph@codesourcery.com>
3224         PR c/88704
3225         * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
3226         old-style parameter definitions.
3228 2019-12-01  Sandra Loosemore  <sandra@codesourcery.com>
3230         PR target/92499
3232         * c-decl.c (flexible_array_type_p): Move to common code.
3234 2019-11-30  Richard Sandiford  <richard.sandiford@arm.com>
3236         * c-decl.c (start_decl): Allow initialization of variables whose
3237         size is a POLY_INT_CST.
3238         (finish_decl): Use verify_type_context to check whether the target
3239         allows variables with a particular type to have static or thread-local
3240         storage duration.  Don't raise a second error if such variables do
3241         not have a constant size.
3242         (grokdeclarator): Use verify_type_context to check whether the
3243         target allows fields or array elements to have a particular type.
3244         * c-typeck.c (pointer_diff): Use verify_type_context to test whether
3245         the target allows pointer difference for the types involved.
3246         (build_unary_op): Likewise for pointer increment and decrement.
3248 2019-11-29  Joseph Myers  <joseph@codesourcery.com>
3250         * c-parser.c (struct c_parser): Add members raw_tokens and
3251         raw_tokens_used.
3252         (c_lex_one_token): Add argument raw.  Handle lexing raw tokens and
3253         using previously-lexed raw tokens.
3254         (c_parser_peek_nth_token_raw)
3255         (c_parser_check_balanced_raw_token_sequence): New functions.
3256         (c_parser_nth_token_starts_std_attributes): Use
3257         c_parser_check_balanced_raw_token_sequence for Objective-C.
3259 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
3261         PR c/91985
3262         * c-decl.c (finish_declspecs): Use int instead of decimal
3263         floating-point types if decimal floating-point not supported.
3265 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
3267         * c-tree.h (struct c_declarator): Use a structure for id member.
3268         * c-decl.c (grokdeclarator): Extract attributes from cdk_id
3269         declarators at the start, not when handling individual declarators
3270         later.  Use u.id.id instead of u.id.
3271         (grokfield): Use u.id.id instead of u.id.
3272         (build_id_declarator): Set u.id.id and u.id.attrs.
3273         (finish_declspecs): Handle postfix attributes in case of typedef
3274         name or typeof used.
3275         * c-parser.c (c_parser_direct_declarator)
3276         (c_parser_direct_declarator_inner): Place declarator for
3277         attributes inside that for function or array, not outside.  Set
3278         u.id.attrs for identifiers.
3279         (c_parser_parameter_declaration): Use u.id.id instead of u.id.
3280         * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
3281         instead of u.id.
3283 2019-11-22  Jakub Jelinek  <jakub@redhat.com>
3285         PR c/90677
3286         * c-decl.c (identifier_global_tag): Define.
3288 2019-11-20  Richard Biener  <rguenther@suse.de>
3290         PR c/92088
3291         * c-decl.c (grokdeclarator): Prevent inlining of nested
3292         function with VLA arguments.
3294 2019-11-20  Joseph Myers  <joseph@codesourcery.com>
3296         * c-decl.c (c_warn_type_attributes): New function.
3297         (groktypename, grokdeclarator, finish_declspecs): Call
3298         c_warn_type_attributes before applying attributes to types.
3299         * c-tree.h (c_warn_type_attributes): Declare.
3301 2019-11-19  Joseph Myers  <joseph@codesourcery.com>
3303         * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
3304         standard attributes.
3305         * c-parser.c (c_parser_std_attribute): Take argument for_tm.  Use
3306         pedwarn for unknown standard attributes and return error_mark_node
3307         for them.
3309 2019-11-18  Matthew Malcomson  <matthew.malcomson@arm.com>
3311         * c-parser.c (c_parser_parse_rtl_body): Always call
3312         run_rtl_passes, even if startwith pass is not provided.
3314 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
3316         * c-parser.c (c_parser_std_attribute_specifier): Diagnose
3317         duplicate standard attributes.
3319 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
3321         * c-decl.c (std_attribute_table): Add maybe_unused.
3323 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
3325         * c-decl.c (std_attribute_table): Add fallthrough.
3326         * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
3327         attribute at top level.
3329 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
3331         * c-decl.c (std_attribute_table): New.
3332         (c_init_decl_processing): Register attributes from
3333         std_attribute_table.
3334         * c-parser.c (c_parser_attribute_arguments): Add arguments
3335         require_string and allow_empty_args.  All callers changed.
3336         (c_parser_std_attribute): Set require_string argument for
3337         "deprecated" attribute.
3339 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
3341         * c-parser.c (c_parser_postfix_expression)
3342         (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
3343         * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
3345 2019-11-14  Richard Sandiford  <richard.sandiford@arm.com>
3347         * c-typeck.c (build_conditional_expr): Use truth_type_for instead
3348         of build_same_sized_truth_vector_type.
3349         (build_vec_cmp): Likewise.
3351 2019-11-14  Jakub Jelinek  <jakub@redhat.com>
3353         * c-parser.c (c_parser_omp_context_selector): Don't require score
3354         argument to fit into shwi, just to be INTEGER_CST.  Diagnose
3355         negative score.
3357         * c-parser.c (c_parser_omp_context_selector): Rename
3358         CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
3359         Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
3360         identifier in that.  For CTX_PROPERTY_NAME_LIST, allow identifiers
3361         and string literals.
3363 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
3365         * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
3366         ctsk_tagfirstref_attrs.
3367         (struct c_declspecs): Update description of attrs.  Add
3368         postfix_attrs and non_std_attrs_seen_p.  Increase size of
3369         typespec_kind bit-field.
3370         (c_warn_unused_attributes): New declaration.
3371         (parser_xref_tag): Update prototype.
3372         * c-decl.c (c_warn_unused_attributes): New function.
3373         (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
3374         ctsk_tagref_attrs.  Handle attribute declarations.
3375         (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
3376         (grokdeclarator): Handle standard attributes.
3377         (parser_xref_tag): Add arguments have_std_attrs and attrs.  Apply
3378         attributes to incomplete type reference.
3379         (xref_tag): Update call to parser_xref_tag.
3380         (declspecs_add_addrspace, declspecs_add_type)
3381         (declspecs_add_scspec, declspecs_add_attrs): Set
3382         non_std_attrs_seen_p.
3383         (finish_declspecs): Apply postfix standard attributes to type.
3384         * c-parser.c (c_token_starts_declspecs)
3385         (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
3386         (c_parser_next_tokens_start_declaration): Update comments.
3387         (c_parser_consume_token, c_parser_consume_pragma): Handle moving
3388         parser->tokens[2] to parser->tokens[1].
3389         (c_parser_nth_token_starts_std_attributes)
3390         (c_parser_std_attribute_specifier_sequence): New functions.
3391         (c_parser_declaration_or_fndef): Add arguments have_attrs and
3392         attrs.  All callers changed.  Handle standard attributes.
3393         (c_parser_parms_declarator, c_parser_parms_list_declarator)
3394         (c_parser_parameter_declaration): Add argument have_gnu_attrs.
3395         All callers changed.
3396         (c_parser_declspecs): Add arguments start_std_attr_ok and
3397         end_std_attr_ok.  All callers changed.  Handle standard
3398         attributes.
3399         (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3400         (c_parser_direct_declarator, c_parser_direct_declarator_inner)
3401         (c_parser_compound_statement_nostart, c_parser_all_labels)
3402         (c_parser_label, c_parser_statement, c_parser_for_statement):
3403         Handle standard attributes.
3404         * c-parser.h (c_parser_declspecs): Update prototype.
3405         * gimple-parser.c (c_parser_gimple_declaration): Update call to
3406         c_parser_declspecs.
3408 2019-11-12  Martin Liska  <mliska@suse.cz>
3410         * gimple-parser.c: Do not include params.h.
3412 2019-11-12  Martin Liska  <mliska@suse.cz>
3414         * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
3415         with the new one, include opts.h if needed.  Use SET_OPTION_IF_UNSET
3416         macro.
3418 2019-11-12  Maciej W. Rozycki  <macro@codesourcery.com>
3419             Frederik Harwath  <frederik@codesourcery.com>
3421         gcc/c/
3422         * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
3423         (c_parser_oacc_kernels_parallel): Rename function to...
3424         (c_parser_oacc_compute): ... this.  Handle PRAGMA_OACC_SERIAL.
3425         (c_parser_omp_construct): Update accordingly.
3428 2019-11-11  Jakub Jelinek  <jakub@redhat.com>
3430         * c-parser.c (c_parser_translation_unit): Diagnose declare target
3431         without corresponding end declare target.
3433 2019-11-08  Richard Sandiford  <richard.sandiford@arm.com>
3435         * c-convert.c (convert): Only handle vector conversions if one of
3436         the types satisfies gnu_vector_type_p or if -flax-vector-conversions
3437         allows it.
3438         * c-typeck.c (build_array_ref): Only allow vector indexing if the
3439         vectors satisfy gnu_vector_type_p.
3440         (build_unary_op): Only allow unary operators to be applied to
3441         vectors if they satisfy gnu_vector_type_p.
3442         (digest_init): Only allow by-element initialization of vectors
3443         if they satisfy gnu_vector_type_p.
3444         (really_start_incremental_init): Likewise.
3445         (push_init_level): Likewise.
3446         (pop_init_level): Likewise.
3447         (process_init_element): Likewise.
3448         (build_binary_op): Only allow binary operators to be applied to
3449         vectors if they satisfy gnu_vector_type_p.
3451 2019-11-08  Joseph Myers  <joseph@codesourcery.com>
3453         * c-decl.c (grokparms): Convert () in a function definition to
3454         (void) for C2x.
3455         (store_parm_decls_oldstyle): Pedwarn for C2x.
3456         (store_parm_decls): Update comment about () not generating a
3457         prototype.
3459 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
3461         * c-parser.c (c_parser_attribute_arguments): New function.
3462         Factored out of c_parser_gnu_attribute.
3463         (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
3464         (c_parser_balanced_token_sequence, c_parser_std_attribute)
3465         (c_parser_std_attribute_specifier): New functions.
3466         (c_parser_transaction_attributes): Use
3467         c_parser_std_attribute_specifier.
3469 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
3471         * c-parser.c (c_parser): Remove lex_untranslated_string.  Add
3472         lex_joined_string and translate_strings_p.
3473         (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
3474         c_lex_with_flags.
3475         (c_parser_string_literal): New function.
3476         (c_parser_static_assert_declaration_no_semi): Use
3477         c_parser_string_literal.  Do not set lex_untranslated_string.
3478         (c_parser_asm_string_literal): Use c_parser_string_literal.
3479         (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
3480         (c_parser_gnu_attributes): Set and restore translate_strings_p
3481         instead of lex_untranslated_string.
3482         (c_parser_asm_statement): Do not set lex_untranslated_string.
3483         (c_parser_asm_operands): Likewise.
3484         (c_parser_has_attribute_expression): Set and restore
3485         translate_strings_p instead of lex_untranslated_string.
3486         (c_parser_postfix_expression): Use c_parser_string_literal.
3487         (pragma_lex): Likewise.
3488         (c_parser_pragma_pch_preprocess): Set lex_joined_string.
3489         (c_parse_file): Set translate_strings_p.
3490         * gimple-parser.c (c_parser_gimple_postfix_expression)
3491         (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
3492         * c-parser.c (c_parser_string_literal): Declare function.
3494 2019-11-02  Jakub Jelinek  <jakub@redhat.com>
3496         * c-parser.c (c_finish_omp_declare_variant): Use
3497         omp_get_context_selector instead of c_omp_get_context_selector.
3499 2019-10-29  Richard Sandiford  <richard.sandiford@arm.com>
3501         * c-tree.h (c_simulate_enum_decl): Declare.
3502         * c-decl.c (c_simulate_enum_decl): New function.
3503         * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
3505 2019-10-29  Richard Sandiford  <richard.sandiford@arm.com>
3507         * c-tree.h (c_simulate_builtin_function_decl): Declare.
3508         * c-decl.c (c_simulate_builtin_function_decl): New function.
3509         * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
3510         to the above.
3512 2019-10-28  Martin Sebor  <msebor@redhat.com>
3514         PR c/66970
3515         * c-decl.c (names_builtin_p): Define a new function.
3517 2019-10-28  Richard Biener  <rguenther@suse.de>
3519         PR c/92249
3520         * gimple-parser.c (c_parser_parse_gimple_body): Make
3521         current_bb the entry block initially to easier recover
3522         from errors.
3523         (c_parser_gimple_compound_statement): Adjust.
3525 2019-10-24  Jakub Jelinek  <jakub@redhat.com>
3527         * c-parser.c (c_finish_omp_declare_variant): Use
3528         omp_context_selector_matches instead of
3529         c_omp_context_selector_matches.
3530         * c-decl.c (c_decl_attributes): Add "omp declare target block"
3531         attribute in between declare target and end declare target
3532         pragmas.
3534 2019-10-15  Joseph Myers  <joseph@codesourcery.com>
3536         * c-parser.c (c_parser_attribute_any_word): Rename to
3537         c_parser_gnu_attribute_any_word.  All callers changed.
3538         (c_parser_attribute): Rename to c_parser_gnu_attribute.  All
3539         callers changed.
3540         (c_parser_attributes): Rename to c_parser_gnu_attributes.  All
3541         callers changed.
3542         (c_parser_declaration_or_fndef, c_parser_declspecs)
3543         (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3544         (c_parser_struct_declaration, c_parser_declarator)
3545         (c_parser_gnu_attribute, c_parser_compound_statement)
3546         (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
3547         (c_parser_transaction_attributes): Add "gnu-" prefix to names of
3548         attribute-related syntax productions.
3550 2019-10-14  Richard Sandiford  <richard.sandiford@arm.com>
3552         * c-objc-common.c (useful_aka_type_p): Replace with...
3553         (get_aka_type): ...this new function.  Given the original type,
3554         decide which aka type to print (if any).  Only look through typedefs
3555         if user_facing_original_type_p.
3556         (print_type): Update accordingly.
3558 2019-10-14  Jakub Jelinek  <jakub@redhat.com>
3560         * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
3561         into int NESTED, if it is 2, diagnose missing commas in between
3562         clauses.
3563         (c_parser_omp_context_selector): Pass 2 as last argument to
3564         c_parser_omp_all_clauses.
3566 2019-10-12  Jakub Jelinek  <jakub@redhat.com>
3568         * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
3569         For simd properties, put them directly into TREE_VALUE.
3570         (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
3571         If c_omp_context_selector_matches is 0, don't add attribute, otherwise
3572         add "omp declare variant base" attribute rather than
3573         "omp declare variant".
3575 2019-10-11  Joseph Myers  <joseph@codesourcery.com>
3577         * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
3579 2019-10-10  Jakub Jelinek  <jakub@redhat.com>
3581         * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
3582         true, terminate processing on closing paren and don't skip to end of
3583         pragma line.
3584         (c_parser_omp_declare_simd): Handle also declare variant.
3585         (omp_construct_selectors, omp_device_selectors,
3586         omp_implementation_selectors, omp_user_selectors): New variables.
3587         (c_parser_omp_context_selector,
3588         c_parser_omp_context_selector_specification,
3589         c_finish_omp_declare_variant): New functions.
3590         (c_finish_omp_declare_simd): Handle both declare simd and
3591         declare variant.
3592         (c_parser_omp_declare): Handle declare variant.
3594 2019-10-02  Joseph Myers  <joseph@codesourcery.com>
3596         * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
3597         CPP_COLON tokens.
3599 2019-10-01  Richard Sandiford  <richard.sandiford@arm.com>
3601         * c-objc-common.c (useful_aka_type_p): New function.
3602         (print_type): Use it to decide whether an aka type is worth printing.
3604 2019-09-27  Jakub Jelinek  <jakub@redhat.com>
3606         PR c++/88203
3607         * c-parser.c (c_parser_predefined_identifier): New function.
3608         (c_parser_postfix_expression): Use it.
3609         (c_parser_omp_variable_list): Parse predefined identifiers.
3610         * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
3611         in shared and firstprivate clauses, even when they are predetermined
3612         shared.
3614 2019-09-27  Richard Sandiford  <richard.sandiford@arm.com>
3616         * c-typeck.c (build_function_call_vec): Take the original function
3617         decl as an optional final parameter.  Pass all built-in calls to
3618         check_builtin_function_arguments.
3620 2019-09-20  Eric Botcazou  <ebotcazou@adacore.com>
3622         PR c/91815
3623         * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
3624         of identifiers in the external scope only for variables and functions.
3626 2019-09-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3628         PR c/78736
3629         * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
3631 2019-08-23  Iain Sandoe  <iain@sandoe.co.uk>
3633         PR pch/61250
3634         * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
3635         after determining that the first token is not
3636         PRAGMA_GCC_PCH_PREPROCESS.
3638 2019-08-22  Eric Botcazou  <ebotcazou@adacore.com>
3640         * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
3641         FUNCTION_DECL to the right value in the presence of nested declarators.
3643 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
3645         PR middle-end/91421
3646         * c-decl.c (merge_decls): Use copy_decl_built_in_function.
3648 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
3650         PR middle-end/91421
3651         * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
3652         of a built_in_function.
3653         (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
3655 2019-08-10  Jakub Jelinek  <jakub@redhat.com>
3657         * c-parser.c (c_parser_omp_clause_name): Parse device_type.
3658         (c_parser_omp_clause_device_type): New function.
3659         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3660         (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3661         (c_parser_omp_declare_target): Handle device_type clauses.  Remove
3662         diagnostics for declare target with clauses nested in clause-less
3663         declare target declaration-definition-seq.
3664         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
3666 2019-08-09  Jakub Jelinek  <jakub@redhat.com>
3668         * c-parser.c (check_no_duplicate_clause): Simplify using
3669         omp_find_clause.
3670         (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
3671         directive name modifiers.
3672         (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
3674         PR c/91401
3675         * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
3676         check_no_duplicate_clause call.  Comment it out, instead emit a
3677         warning for duplicate dist_schedule clauses.
3679 2019-08-08  Richard Sandiford  <richard.sandiford@arm.com>
3681         * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
3683 2019-08-08  Jakub Jelinek  <jakub@redhat.com>
3685         * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
3686         OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
3687         instead of generic_head to track duplicates.
3689 2019-08-07  Jakub Jelinek  <jakub@redhat.com>
3691         * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
3692         (c_parser_omp_clause_use_device_addr): New function.
3693         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3694         (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3695         (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
3696         like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
3697         map or use_device_* clauses.
3698         * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
3699         in OpenMP, require pointer type rather than pointer or array type.
3700         Handle OMP_CLAUSE_USE_DEVICE_ADDR.
3702 2019-07-31  Jakub Jelinek  <jakub@redhat.com>
3704         PR c/91192
3705         * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
3706         even if finish is UNKNOWN_LOCATION, just use start as finish in that
3707         case.
3709 2019-07-25  Martin Liska  <mliska@suse.cz>
3710             Dominik Infuhr  <dominik.infuehr@theobroma-systems.com>
3712         PR c++/23383
3713         * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
3715 2019-07-25  Martin Liska  <mliska@suse.cz>
3717         * c-decl.c (merge_decls): Use new macros
3718         (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
3720 2019-07-23  Richard Biener  <rguenther@suse.de>
3722         PR tree-optimization/83518
3723         * gimple-parser.c (c_parser_parse_gimple_body): When we have
3724         a CFG also rebuild cgraph edges.
3726 2019-07-20  Jakub Jelinek  <jakub@redhat.com>
3728         * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3729         (c_parser_omp_clause_bind): New function.
3730         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3731         (OMP_LOOP_CLAUSE_MASK): Define.
3732         (c_parser_omp_loop): New function.
3733         (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3734         loop combined with parallel or teams.
3735         (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3736         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3738 2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>
3740         PR c/53633
3741         * c-decl.c (finish_function): Check targetm.warn_func_return
3742         before issuing a -Wreturn-type warning.
3744 2019-07-12  Alexandre Oliva  <oliva@adacore.com>
3746         * gimple-parser.c (c_parser_gimple_try_stmt): New.
3747         (c_parser_compound_statement): Call it.
3749 2019-07-12  Jakub Jelinek  <jakub@redhat.com>
3751         * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3752         (c_parser_omp_clause_order): New function.
3753         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3754         (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3755         PRAGMA_OMP_CLAUSE_ORDER.
3756         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3758 2019-07-10  Richard Biener  <rguenther@suse.de>
3760         * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3761         _Literal (int *) &x for address literals.
3763 2019-07-09  Martin Sebor  <msebor@redhat.com>
3765         PR c++/61339
3766         * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3767         to class.
3768         (field_decl_cmp): Same.
3769         * c-parser.c (c_parser_struct_or_union_specifier): Same.
3770         * c-tree.h: Same.
3771         * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3773 2019-07-09  Martin Sebor  <msebor@redhat.com>
3775         PR c++/61339
3776         * c-decl.c: Change class-key from class to struct and vice versa
3777         to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3778         * gimple-parser.c: Same.
3780 2019-07-01  Richard Biener  <rguenther@suse.de>
3782         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3783         _Literal (char *) &"foo" for address literals pointing to
3784         STRING_CSTs.
3786 2019-06-25  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3788         * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3789         * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3790         C incompatibility if alternate "__intN__" form is used.
3792 2019-06-24  Martin Sebor  <msebor@redhat.com>
3794         * c-typeck.c (build_binary_op): Hyphenate floating-point.
3796 2019-06-10  Jakub Jelinek  <jakub@redhat.com>
3798         * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3799         (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3800         (c_parser_omp_scan_loop_body): New function.
3801         (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3802         inscan reduction clauses.
3803         * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3804         non-inscan reductions on the same construct, or inscan reductions with
3805         ordered or schedule clauses, or inscan array reductions.
3807 2019-06-05  Martin Sebor  <msebor@redhat.com>
3809         PR c/90737
3810         * c-typeck.c (c_finish_return): Only consider functions returning
3811         pointers as candidates for -Wreturn-local-addr.
3813 2019-06-05  Martin Sebor  <msebor@redhat.com>
3815         * c-decl.c (start_decl): Adjust quoting and hyphenation
3816         in diagnostics.
3817         (finish_decl): Same.
3818         (finish_enum): Same.
3819         (start_function): Same.
3820         (declspecs_add_type): Same.
3821         * c-parser.c (warn_for_abs): Same.
3822         * c-typeck.c (build_binary_op): Same.
3824 2019-05-17  Thomas Schwinge  <thomas@codesourcery.com>
3826         PR c/89433
3827         * c-parser.c (c_finish_oacc_routine): Rework checking if already
3828         marked with an OpenACC 'routine' directive.
3830         PR c/89433
3831         * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3832         (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3834         PR c/89433
3835         * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3836         clauses from "omp declare target" attribute.
3838 2019-05-16  Martin Sebor  <msebor@redhat.com>
3840         * c-decl.c (start_decl): Quote keywords, operators, and
3841         types in diagnostics.
3842         (finish_decl): Same.
3843         * c-parser.c (c_parser_asm_statement): Same.
3844         (c_parser_conditional_expression): Same.
3845         (c_parser_transaction_cancel): Same.
3846         * c-typeck.c (c_common_type): Same.
3847         (build_conditional_expr): Same.
3848         (digest_init): Same.
3849         (process_init_element): Same.
3850         (build_binary_op): Same.
3852 2019-05-17  Richard Biener  <rguenther@suse.de>
3854         * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3855         (c_parser_gimple_unary_expression): Likewise.
3856         (c_parser_gimple_parentized_ternary_expression): New function.
3858 2019-05-16  Richard Biener  <rguenther@suse.de>
3860         * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3861         (c_parser_gimple_unary_expression): Likewise.
3863 2019-05-15  Richard Biener  <rguenther@suse.de>
3865         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3866         __BIT_FIELD_REF.
3868 2019-05-14  Richard Biener  <rguenther@suse.de>
3870         * gimple-parser.c (c_parser_gimple_statement): Remove
3871         questionable auto-promotion to VIEW_CONVERT_EXPR.
3872         (c_parser_gimple_typespec): Split out from __MEM parsing.
3873         (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3874         * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3875         as __VIEW_CONVERT with -gimple.
3877 2019-05-09  Martin Liska  <mliska@suse.cz>
3879         * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3880         __MAX.
3881         (c_parser_gimple_unary_expression): Parse also binary expression
3882         __MIN and __MAX.
3883         (c_parser_gimple_parentized_binary_expression): New function.
3885 2019-05-09  Martin Liska  <mliska@suse.cz>
3887         * gimple-parser.c (struct gimple_parser): Add probability.
3888         for gimple_parser_edge.
3889         (gimple_parser::push_edge): Add new argument probability.
3890         (c_parser_gimple_parse_bb_spec): Parse also probability
3891         if present.
3892         (c_parser_parse_gimple_body): Set edge probability.
3893         (c_parser_gimple_compound_statement): Consume token
3894         before calling c_parser_gimple_goto_stmt.
3895         Parse BB counts.
3896         (c_parser_gimple_statement): Pass new argument.
3897         (c_parser_gimple_goto_stmt): Likewise.
3898         (c_parser_gimple_if_stmt): Likewise.
3899         (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3900         * c-parser.c (c_parser_declaration_or_fndef): Pass
3901         hot_bb_threshold argument.
3902         * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3903         field.
3904         (c_parser_gimple_parse_bb_spec_edge_probability): New.
3906 2019-04-26  Jakub Jelinek  <jakub@redhat.com>
3908         PR debug/90197
3909         * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3910         * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3911         (c_parser_do_statement): Likewise.
3912         (c_parser_for_statement): Likewise.  Formatting fixes.
3913         * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3914         emit DEBUG_BEGIN_STMTs if needed.
3916 2019-04-19  Jakub Jelinek  <jakub@redhat.com>
3918         PR c/89888
3919         * c-typeck.c (struct c_switch): Remove outside_range_p member.
3920         (c_start_case): Don't clear it.
3921         (do_case): Adjust c_add_case_label caller.
3922         (c_finish_case): Adjust c_do_switch_warnings caller.
3924         PR c++/90108
3925         * c-decl.c (merge_decls): If remove is main variant and
3926         DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3927         variant that has newdecl as TYPE_NAME if any.
3929 2019-04-12  Jakub Jelinek  <jakub@redhat.com>
3931         PR c/89933
3932         * c-decl.c (merge_decls): When newdecl's type is its main variant,
3933         don't try to remove it from the variant list, but instead assert
3934         it has no variants.
3936 2019-04-01  Richard Biener  <rguenther@suse.de>
3938         PR c/71598
3939         * c-tree.h (c_get_alias_set): Declare.
3940         * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
3941         * c-objc-common.c (c_get_alias_set): Treat enumeral types
3942         as the underlying integer type.
3944 2019-03-19  Martin Sebor  <msebor@redhat.com>
3946         PR tree-optimization/89688
3947         * c-decl.c (finish_decl): Call braced_lists_to_string for more
3948         kinds of initializers.
3950 2019-03-19  Jakub Jelinek  <jakub@redhat.com>
3952         PR c/89734
3953         * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
3954         return type even if quals_used is 0.  Formatting fixes.
3956 2019-03-14  Richard Biener  <rguenther@suse.de>
3958         * c-tree.h (enum c_declspec_il): New.
3959         (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
3960         enum bitfield.
3961         * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
3962         Pass start pass and declspec_il to c_parser_parse_gimple_body.
3963         (c_parser_declspecs): Adjust.
3964         * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3965         gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3966         and bitmap.h.
3967         (struct gimple_parser): New.
3968         (gimple_parser::push_edge): New method.
3969         (c_parser_gimple_parse_bb_spec): New helper.
3970         (c_parser_parse_gimple_body): Get start pass and IL specification.
3971         Initialize SSA and CFG.
3972         (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3973         Build a gimple_parser parsing state and pass it along.
3974         (c_parser_gimple_statement): Change intermittend __PHI internal
3975         function argument for the edge.
3976         (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3977         (c_parser_gimple_goto_stmt): Record edges to build.
3978         (c_parser_gimple_if_stmt): Likewise.
3979         * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3980         (c_parser_gimple_or_rtl_pass_list): Likewise.
3982 2019-03-11  Martin Liska  <mliska@suse.cz>
3984         * c-decl.c (check_for_loop_decls): Wrap an option name
3985         in a string format message and fix GNU coding style.
3986         * c-parser.c (c_parser_declspecs): Likewise.
3988 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
3990         PR tree-optimization/89550
3991         * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3992         returned true.
3993         (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3994         or warning returned true.
3996 2019-02-28  Jakub Jelinek  <jakub@redhat.com>
3998         PR c/89525
3999         * c-typeck.c (convert_arguments): Call inform_declaration only if
4000         the previous warning_at call returned true.
4002 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
4004         * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
4005         parameter.  Adjust all users.
4006         (c_parser_oacc_simple_clause): Replace parser with loc formal
4007         parameter.  Adjust all users.
4009 2019-02-19  Chung-Lin Tang  <cltang@codesourcery.com>
4011         PR c/87924
4012         * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
4013         clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
4015 2019-02-15  Jakub Jelinek  <jakub@redhat.com>
4017         PR c/89340
4018         * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
4019         before c_decl_attributes rather than after it.
4021 2019-02-06  Jakub Jelinek  <jakub@redhat.com>
4023         PR c/89211
4024         * c-parser.c (c_parser_declaration_or_fndef): Don't update
4025         DECL_ARGUMENTS of d if it has been defined already.  Use a single if
4026         instead of 3 nested ifs.
4028 2019-02-06  Joseph Myers  <joseph@codesourcery.com>
4030         PR c/88584
4031         * c-decl.c (finish_decl): Do not complete array types for arrays
4032         with external linkage not at file scope.
4034 2019-02-05  Richard Biener  <rguenther@suse.de>
4036         PR c/88606
4037         * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
4038         all type variants when not supported.
4040 2019-01-30  Jakub Jelinek  <jakub@redhat.com>
4042         PR c/89061
4043         * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
4044         * c-decl.c (decl_jump_unsafe): Return false for
4045         C_DECL_COMPOUND_LITERAL_P decls.
4046         (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
4048 2019-01-29  Jakub Jelinek  <jakub@redhat.com>
4050         PR c/89045
4051         * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
4052         scope.
4054         PR c/86125
4055         * c-decl.c (last_fileptr_type): Remove.
4056         (last_structptr_types): New variable.
4057         (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
4058         {old,new}rettype instead of the types themselves.  Assert
4059         last_structptr_types array has the same number of elements
4060         as builtin_structptr_types array.  Use TYPE_MAIN_VARIANT for
4061         argument oldtype and newtype.  Instead of handling
4062         just fileptr_type_node specially, handle all builtin_structptr_types
4063         pointer nodes.  Formatting fix.
4065 2019-01-24  Martin Sebor  <msebor@redhat.com>
4067         PR c/86125
4068         PR c/88886
4069         PR middle-end/86308
4070         * c-decl.c (match_builtin_function_types): Add arguments.
4071         (diagnose_mismatched_decls): Diagnose mismatched declarations
4072         of built-ins more strictly.
4074 2019-01-24  Jakub Jelinek  <jakub@redhat.com>
4076         PR c++/88976
4077         * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
4078         on #pragma omp cancel with different modifiers.
4080 2019-01-18  H.J. Lu  <hongjiu.lu@intel.com>
4082         PR c/51628
4083         PR c/88664
4084         * c-typeck.c (convert_for_assignment): Upate the
4085         warn_for_address_or_pointer_of_packed_member call.
4087 2019-01-16  Tom Honermann  <tom@honermann.net>
4088             Jason Merrill  <jason@redhat.com>
4090         * c-typeck.c (digest_init): Revised the error message produced for
4091         ill-formed cases of array initialization with a string literal.
4092         (error_init): Make variadic.
4094 2019-01-12  Jakub Jelinek  <jakub@redhat.com>
4096         * c-typeck.c (convert_for_assignment): Fix a comment typo.
4098 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
4100         PR c/88701
4101         * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
4102         if current_function_decl is non-NULL.
4104 2019-01-07  Joseph Myers  <joseph@codesourcery.com>
4106         PR c/88720
4107         PR c/88726
4108         * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
4109         whether a function is nested, not DECL_EXTERNAL.  Diagnose inline
4110         functions declared but never defined only for external scope, not
4111         for other scopes.
4113 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
4115         PR c++/85052
4116         * c-parser.c (c_parser_postfix_expression): Parse
4117         __builtin_convertvector.
4119 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
4121         Update copyright years.
4123 2018-12-20  H.J. Lu  <hongjiu.lu@intel.com>
4125         PR c/51628
4126         * c-typeck.c (convert_for_assignment): Call
4127         warn_for_address_or_pointer_of_packed_member.
4129 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
4131         * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
4132         a more specific error message (instead of just falling through).
4134 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
4136         * c-parser.c (c_parser_asm_statement): Keep track of the location each
4137         asm qualifier is first seen; use that to give nicer "duplicate asm
4138         qualifier" messages.  Delete 'quals" variable, instead pass the
4139         "is_volatile_ flag to build_asm_stmt directly.
4140         * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
4141         * c-typeck.c (build_asm_stmt): Ditto; adjust.
4143 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
4145         * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
4146         "done" boolean variable.
4148 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
4150         PR c++/87504
4151         * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
4152         Move from here to gcc-rich-location.h and gcc-rich-location.c.
4153         (build_binary_op): Use struct op_location_t and
4154         class binary_op_rich_location.
4156 2018-12-11  Jakub Jelinek  <jakub@redhat.com>
4158         PR sanitizer/88426
4159         * c-convert.c (convert): Call c_fully_fold before calling
4160         ubsan_instrument_float_cast.
4162 2018-12-08  Segher Boessenkool  <segher@kernel.crashing.org>
4164         * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
4165         setting "quals".
4167 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
4169         * c-parser.c (c_parser_asm_statement): Detect the inline keyword
4170         after asm.  Pass a flag for it to build_asm_expr.
4171         * c-tree.h (build_asm_expr): Update declaration.
4172         * c-typeck.c (build_asm_stmt): Add is_inline parameter.  Use it to
4173         set ASM_INLINE_P.
4175 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
4177         PR inline-asm/55681
4178         * c-parser.c (c_parser_asm_statement): Update grammar.  Allow any
4179         combination of volatile and goto, in any order, without repetitions.
4181 2018-12-04  James Norris  <jnorris@codesourcery.com>
4182             Cesar Philippidis  <cesar@codesourcery.com>
4183             Julian Brown  <julian@codesourcery.com>
4185         * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
4186         code.
4188 2018-11-30  Richard Biener  <rguenther@suse.de>
4190         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4191         _Literal (type) { ... } as empty aggregate or vector constructor.
4193 2018-11-29  Martin Sebor  <msebor@redhat.com>
4195         PR c/88091
4196         * c-typeck.c (convert_argument): Add a parameter.  Adjust indentation.
4197         (convert_arguments): Add comments.  Pass additional argument to
4198         the function above.
4200 2018-11-29  Martin Sebor  <msebor@redhat.com>
4202         PR c/88172
4203         PR testsuite/88208
4204         * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
4206 2018-11-23  Martin Sebor  <msebor@redhat.com>
4208         PR testsuite/88098
4209         * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
4210         (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
4212 2018-11-20  Martin Sebor  <msebor@redhat.com>
4214         * c-parser.c (c_parser_has_attribute_expression): New function.
4215         (c_parser_attribute): New function.
4216         (c_parser_attributes): Move code into c_parser_attribute.
4217         (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
4219 2018-11-15  Martin Sebor  <msebor@redhat.com>
4221         PR c/83656
4222         * c-decl.c (header_for_builtin_fn): Declare.
4223         (diagnose_mismatched_decls): Diagnose declarations of built-in
4224         functions without a prototype.
4225         * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
4226         (convert_argument): Same.
4227         (convert_arguments): Factor code out into convert_argument.
4228         Detect mismatches between built-in formal arguments in calls
4229         to built-in without prototype.
4230         (build_conditional_expr): Same.
4231         (type_or_builtin_type): New function.
4232         (convert_for_assignment): Add argument.  Conditionally issue
4233         warnings instead of errors for mismatches.
4235 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
4237         * c-decl.c: Replace "source_location" with "location_t".
4238         * c-tree.h: Likewise.
4239         * c-typeck.c: Likewise.
4240         * gimple-parser.c: Likewise.
4242 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
4244         * c-parser.c (c_parser_omp_clause_final): Use
4245         c_parser_expr_no_commas, convert_lvalue_to_rvalue,
4246         c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
4247         parsing instead of c_parser_paren_condition.
4248         (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
4249         convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
4250         c_fully_fold instead of c_parser_condition.
4251         (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
4252         c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
4253         c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
4254         c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
4255         c_parser_expr_no_commas instead of c_parser_expression.
4257         * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
4258         reduction clause with inscan modifier.
4260         * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
4261         clauses other than atomic_default_mem_order.
4263 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
4265         * c-parser.c: Include memmode.h.
4266         (c_parser_omp_depobj, c_parser_omp_requires): New functions.
4267         (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
4268         (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
4269         task_reduction clauses.
4270         (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
4271         For OMP_CLAUSE_DEPEND, parse clause operands as either an array
4272         section, or lvalue assignment expression.
4273         (c_parser_omp_clause_if): Handle cancel and simd modifiers.
4274         (c_parser_omp_clause_lastprivate): Parse optional
4275         conditional: modifier.
4276         (c_parser_omp_clause_hint): Require constant integer expression rather
4277         than just integer expression.
4278         (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
4279         clause.
4280         (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
4281         Parse reduction modifiers.  Pass KIND to c_parser_omp_variable_list.
4282         (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
4283         functions.
4284         (c_parser_omp_clause_depend): Parse iterator modifier and handle
4285         iterators.  Parse mutexinoutset and depobj kinds.
4286         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
4287         callers.
4288         (c_parser_omp_all_clauses): Likewise.  Handle
4289         PRAGMA_OMP_CLAUSE_NONTEMPORAL and
4290         PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4291         (c_parser_omp_atomic): Parse hint and memory order clauses.  Handle
4292         default memory order from requires directive if any.  Adjust
4293         c_finish_omp_atomic caller.
4294         (c_parser_omp_critical): Allow comma in between (name) and hint clause.
4295         (c_parser_omp_flush): Parse flush with memory-order-clause.
4296         (c_parser_omp_for_loop): Allow NE_EXPR even in
4297         OpenMP loops, adjust c_finish_omp_for caller.
4298         (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
4299         (c_parser_omp_master): Add p_name, mask and cclauses arguments.
4300         Allow to be called while parsing combined parallel master.
4301         Parse combined master taskloop{, simd}.
4302         (c_parser_omp_parallel): Parse combined
4303         parallel master{, taskloop{, simd}} constructs.
4304         (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
4305         (OMP_TASKGROUP_CLAUSE_MASK): Define.
4306         (c_parser_omp_taskgroup): Add LOC argument.  Parse taskgroup clauses.
4307         (OMP_TASKWAIT_CLAUSE_MASK): Define.
4308         (c_parser_omp_taskwait): Handle taskwait with depend clauses.
4309         (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
4310         around teams body.  Use SET_EXPR_LOCATION.
4311         (c_parser_omp_target_data): Allow target data
4312         with only use_device_ptr clauses.
4313         (c_parser_omp_target): Use SET_EXPR_LOCATION.  Set
4314         OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
4315         (c_parser_omp_requires): New function.
4316         (c_finish_taskloop_clauses): New function.
4317         (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
4318         (c_parser_omp_taskloop): Use c_finish_taskloop_clauses.  Add forward
4319         declaration.  Disallow in_reduction clause when combined with parallel
4320         master.
4321         (c_parser_omp_construct): Adjust c_parser_omp_master and
4322         c_parser_omp_taskgroup callers.
4323         * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
4324         other than cancel.
4325         (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
4326         like OMP_CLAUSE_REDUCTION.
4327         (handle_omp_array_sections): Likewise.  Call save_expr on array
4328         reductions before calling build_index_type.  Handle depend clauses
4329         with iterators.
4330         (struct c_find_omp_var_s): New type.
4331         (c_find_omp_var_r, c_omp_finish_iterators): New functions.
4332         (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
4333         with static, runtime or auto schedule kinds.  Call save_expr for whole
4334         array reduction sizes.  Diagnose reductions with zero sized elements
4335         or variable length structures.  Diagnose nogroup clause used with
4336         reduction clause(s).  Handle depend clause with
4337         OMP_CLAUSE_DEPEND_DEPOBJ.  Diagnose bit-fields.  Require
4338         omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
4339         some different type for other kinds.  Use build_unary_op with
4340         ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
4341         Handle depend clauses with iterators.  Remove no longer needed special
4342         case that predetermined const qualified vars may be specified in
4343         firstprivate clause.  Complain if const qualified vars are mentioned
4344         in data-sharing clauses other than firstprivate or shared.  Use
4345         error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
4346         error.  Formatting fix.  Handle OMP_CLAUSE_NONTEMPORAL and
4347         OMP_CLAUSE_{IN,TASK}_REDUCTION.  Allow any lvalue as
4348         OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
4350 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
4352         * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
4353         logic for change to name_hint::operator bool.
4354         (undeclared_variable): Likewise.
4355         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4356         (c_parser_parameter_declaration): Likewise.
4358 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
4360         * c-errors.c (pedwarn_c11): New function.
4361         * c-parser.c (disable_extension_diagnostics): Save
4362         warn_c11_c2x_compat and set it to 0.
4363         (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
4364         (c_parser_static_assert_declaration_no_semi): Handle
4365         _Static_assert without string constant.
4366         * c-tree.h (pedwarn_c11): New prototype.
4368 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
4370         * Make-lang.in (selftest-c): New.
4371         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4372         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
4373         from gcc/Makefile.in.
4375 2018-10-02  Richard Biener  <rguenther@suse.de>
4377         * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
4379 2018-09-26  Joseph Myers  <joseph@codesourcery.com>
4381         PR c/87390
4382         * c-typeck.c (build_binary_op): Use excess precision for
4383         comparisons of integers and floating-point for C11 and later.
4385 2018-09-26  Martin Jambor  <mjambor@suse.cz>
4387         PR c/87347
4388         * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL.  Fix
4389         comment.
4391 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
4393         * c-objc-common.c (range_label_for_type_mismatch::get_text):
4394         Update for new param.
4395         * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
4396         Likewise.
4398 2018-09-17  Martin Jambor  <mjambor@suse.cz>
4400         PR c/63886
4401         * c-parser.c: (warn_for_abs): New function.
4402         (c_parser_postfix_expression_after_primary): Call it.
4404 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4406         * c-typeck.c (digest_init): Shorten overlength strings.
4408 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4410         * c-decl.c (finish_decl): Call complete_flexible_array_elts.
4412 2018-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4414         * c-decl.c (finish_decl): Call braced_list_to_string here ...
4415         * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
4417 2018-08-30  Alexander Monakov  <amonakov@ispras.ru>
4419         * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
4420         "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
4422 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
4424         PR 87091
4425         * c-decl.c (implicitly_declare): Update call to
4426         maybe_add_include_fixit to suggest overriding the location, as it
4427         is for a note.
4428         * c-objc-common.c (c_tree_printer): Update for conversion of
4429         show_caret_p to a tri-state.
4431 2018-08-27  Martin Liska  <mliska@suse.cz>
4433         * c-decl.c (locate_old_decl): Use new function
4434         fndecl_built_in_p and remove check for FUNCTION_DECL if
4435         possible.
4436         (diagnose_mismatched_decls): Likewise.
4437         (merge_decls): Likewise.
4438         (warn_if_shadowing): Likewise.
4439         (pushdecl): Likewise.
4440         (implicitly_declare): Likewise.
4441         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4442         * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
4443         * c-typeck.c (build_function_call_vec): Likewise.
4444         (convert_arguments): Likewise.
4446 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
4448         PR other/84889
4449         * c-decl.c (pushtag): Add auto_diagnostic_group instance.
4450         (diagnose_mismatched_decls): Likewise, in various places.
4451         (warn_if_shadowing): Likewise.
4452         (implicit_decl_warning): Likewise.
4453         (implicitly_declare): Likewise.
4454         (undeclared_variable): Likewise.
4455         (declare_label): Likewise.
4456         (grokdeclarator): Likewise.
4457         (start_function): Likewise.
4458         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4459         (c_parser_parameter_declaration): Likewise.
4460         (c_parser_binary_expression): Likewise.
4461         * c-typeck.c (c_expr_sizeof_expr): Likewise.
4462         (parser_build_binary_op): Likewise.
4463         (build_unary_op): Likewise.
4464         (error_init): Likewise.
4465         (pedwarn_init): Likewise.
4466         (warning_init): Likewise.
4467         (convert_for_assignment): Likewise.
4469 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
4471         * c-objc-common.c: Include "gcc-rich-location.h".
4472         (c_tree_printer): Move implemenation of '%T' to...
4473         (print_type): ...this new function.
4474         (range_label_for_type_mismatch::get_text): New function.
4475         * c-typeck.c (convert_for_assignment): Add type labels to the rhs
4476         range for the various ic_argpass cases.
4477         (class maybe_range_label_for_tree_type_mismatch): New class.
4478         (build_binary_op): Use it when calling binary_op_error.
4480 2018-08-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4482         * c-decl.c (start_decl): Do not warn if variables is named as main
4483         and is a local variable.
4485 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4487         PR c/19315
4488         * c-decl.c (finish_decl): Don't add the 'extern' storage class to
4489         objects of unknown size.
4491 2018-08-13  Martin Sebor  <msebor@redhat.com>
4493         PR tree-optimization/71625
4494         * c-parser.c (c_parser_declaration_or_fndef): Call
4495         braced_list_to_string.
4497 2018-08-03  Bogdan Harjoc  <harjoc@gmail.com>
4499         PR c/86690
4500         * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
4501         errors.
4503 2018-08-01  Martin Sebor  <msebor@redhat.com>
4505         PR tree-optimization/86650
4506         * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
4507         and TREE_BLOCK (t) from within percent_K_format to this callsite.
4509 2018-08-01  Jakub Jelinek  <jakub@redhat.com>
4511         PR c/85704
4512         * c-typeck.c (init_field_decl_cmp): New function.
4513         (output_pending_init_elements): Use it for field comparisons
4514         instead of pure bit_position comparisons.
4516 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
4518         * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
4519         type here, instead add "omp declare target implicit" attribute.
4520         (finish_decl): Diagnose vars without mappable type here.
4522 2018-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
4523             Thomas Schwinge  <thomas@codesourcery.com>
4524             Cesar Philippidis  <cesar@codesourcery.com>
4526         * c-parser.c (c_parser_omp_clause_name): Add support for finalize
4527         and if_present. Make present_or_{copy,copyin,copyout,create} aliases
4528         to their non-present_or_* counterparts. Make 'self' an alias to
4529         PRAGMA_OACC_CLAUSE_HOST.
4530         (c_parser_oacc_data_clause): Update GOMP mappings for
4531         PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
4532         PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
4533         (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
4534         Remove support for present_or_* clauses.
4535         (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4536         (OACC_PARALLEL_CLAUSE_MASK): Likewise.
4537         (OACC_DECLARE_CLAUSE_MASK): Likewise.
4538         (OACC_DATA_CLAUSE_MASK): Likewise.
4539         (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4540         (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
4541         (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
4542         (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
4543         * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
4545 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
4547         * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
4548         * gimple-parser.c (c_parser_gimple_statement): Likewise.
4549         (c_parser_gimple_unary_expression): Likewise.
4551 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
4553         PR c/86093
4554         * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
4555         before doing POINTER_DIFF_EXPR.
4557 2018-06-07  Marek Polacek  <polacek@redhat.com>
4559         PR c/85318
4560         * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
4561         for loop initial declarations.
4563 2018-05-30  David Pagan  <dave.pagan@oracle.com>
4565         PR c/55976
4566         * c-decl.c (grokdeclarator): Update check for return type warnings.
4567         (start_function): Likewise.
4568         (finish_function): Likewise.
4569         * c-typeck.c (c_finish_return): Update check for return type warnings.
4570         Pass OPT_Wreturn_type to pedwarn when appropriate.
4572 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
4574         * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
4575         __FMA_EXPR handlng.
4577 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
4579         * gimple-parser.c: Include internal-fn.h.
4580         (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
4581         (c_parser_gimple_call_internal): New function.
4582         (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
4583         Fix typos in comment.
4585 2018-05-10  Jakub Jelinek  <jakub@redhat.com>
4587         PR c++/85662
4588         * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
4589         fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
4590         fold_convert_loc.
4591         * c-typeck.c (build_unary_op): Use fold_offsetof rather than
4592         fold_offsetof_1, pass argtype as TYPE to it and drop the
4593         fold_convert_loc.
4595 2018-05-02  David Pagan  <dave.pagan@oracle.com>
4597         PR c/30552
4598         * c-decl.c (old_style_parameter_scope): New function.
4599         * c-parser.c (c_parser_postfix_expression): Check for statement
4600         expressions in old-style function parameter list declarations.
4601         * c-parser.h (old_style_parameter_scope): New extern declaration.
4603 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
4605         PR sanitizer/84307
4606         * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
4607         it is not TREE_STATIC.
4608         * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
4609         not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
4610         its COMPOUND_LITERAL_EXPR_DECL.
4612 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
4614         * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4615         where all functions return the same _FloatN or _FloatNx type,
4616         treat integer types as _Float64 instead of double.
4618 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
4620         PR c/84999
4621         * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
4622         building vector comparison, diagnose it and return error_mark_node.
4624 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
4626         PR c/84853
4627         * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
4628         If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
4629         INTEGER_TYPE element type.
4631 2018-03-13  David Pagan  <dave.pagan@oracle.com>
4633         PR c/46921
4634         * c-typeck.c (output_init_element): Ensure field initializer
4635         expression is always evaluated if there are side effects.
4637 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
4639         PR c/84721
4640         * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
4641         !building_stmt_list_p ().
4643 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
4645         PR c/84305
4646         * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
4647         in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
4648         and include the BIND_EXPR in the list of things that need to be
4649         pre-evaluated.
4651 2018-02-09  Nathan Sidwell  <nathan@acm.org>
4653         PR c/84293
4654         * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
4655         to strict_aliasing_warning.
4657 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
4659         * c-typeck.c (really_start_incremental_init, push_init_level,
4660         set_nonincremental_init, output_init_element, process_init_element):
4661         Use DECL_UNNAMED_BIT_FIELD.
4663 2018-01-31  Marek Polacek  <polacek@redhat.com>
4665         PR c/81779
4666         * c-parser.c (c_parser_compound_statement_nostart): Call
4667         expansion_point_location_if_in_system_header.
4669 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
4671         PR c++/83814
4672         * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
4673         the C part.
4675 2018-01-13  Jakub Jelinek  <jakub@redhat.com>
4677         PR c/83801
4678         * c-tree.h (decl_constant_value_1): Add a bool argument.
4679         * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
4680         returning a CONSTRUCTOR if it is true.  Use error_operand_p.
4681         (decl_constant_value): Adjust caller.
4682         * c-fold.c (c_fully_fold_internal): If in_init, pass true to
4683         decl_constant_value_1 as IN_INIT.  Otherwise, punt if
4684         decl_constant_value returns initializer that has BLKmode or
4685         array type.
4686         (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
4688 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
4689             Alan Hayward  <alan.hayward@arm.com>
4690             David Sherwood  <david.sherwood@arm.com>
4692         * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
4693         TYPE_VECTOR_SUBPARTS.
4695 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
4697         Update copyright years.
4699 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
4701         PR c/83595
4702         * c-parser.c (c_parser_braced_init, c_parser_initelt,
4703         c_parser_conditional_expression, c_parser_cast_expression,
4704         c_parser_sizeof_expression, c_parser_alignof_expression,
4705         c_parser_postfix_expression, c_parser_omp_declare_reduction,
4706         c_parser_transaction_expression): Use set_error () method instead
4707         of setting value member to error_mark_node.
4709 2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
4711         * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4712         and _Float<N>X built-in functions.
4714 2017-12-22  Jakub Jelinek  <jakub@redhat.com>
4716         PR debug/83550
4717         * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
4718         TYPE_STUB_DECL and call rest_of_type_compilation before processing
4719         incomplete vars rather than after it.
4721         PR debug/83547
4722         * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4723         indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4724         and consider empty ones if there are no other stmts.  For
4725         -Wunused-value walk all statements before the one only followed by
4726         DEBUG_BEGIN_STMTs.
4728 2017-12-22  Mike Stump  <mikestump@comcast.net>
4729             Eric Botcazou  <ebotcazou@adacore.com>
4731         * c-parser.c (c_parser_while_statement): Add unroll parameter and
4732         build ANNOTATE_EXPR if present.  Add 3rd operand to ANNOTATE_EXPR.
4733         (c_parser_do_statement): Likewise.
4734         (c_parser_for_statement): Likewise.
4735         (c_parser_statement_after_labels): Adjust calls to above.
4736         (c_parse_pragma_ivdep): New static function.
4737         (c_parser_pragma_unroll): Likewise.
4738         (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4739         <PRAGMA_UNROLL>: New case.
4741 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
4743         * c-typeck.c (comptypes_internal, function_types_compatible_p,
4744         perform_integral_promotions, digest_init): Replace Yoda conditions
4745         with typical order conditions.
4746         * c-decl.c (check_bitfield_type_and_width): Likewise.
4748 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4750         * c-typeck.c (c_safe_arg_type_equiv_p,
4751         c_safe_function_type_cast_p): New function.
4752         (build_c_cast): Implement -Wcast-function-type.
4754 2017-12-14  Richard Biener  <rguenther@suse.de>
4756         PR c/83415
4757         * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4758         like REALPART_EXPR for the behavior of whether its operand
4759         is an lvalue.
4761 2017-12-12  Marek Polacek  <polacek@redhat.com>
4763         PR c/82679
4764         * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4766 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
4768         * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4769         * c-parser.c (add_debug_begin_stmt): New.
4770         (c_parser_declaration_or_fndef): Call it.
4771         (c_parser_compound_statement_nostart): Likewise.
4772         (c_parser_statement_after_labels): Likewise.
4773         * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4775 2017-12-07  Joseph Myers  <joseph@codesourcery.com>
4777         * c-decl.c (build_compound_literal): Add parameter alignas_align
4778         and set alignment of decl if nonzero.
4779         * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4780         (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4781         qualifier.
4782         (c_parser_struct_declaration): Update syntax comment.
4783         (c_parser_type_name): Add alignas_ok argument and pass it to
4784         c_parser_declspecs.
4785         (c_parser_cast_expression): Pass true to c_parser_type_name and
4786         give error if a cast used an _Alignas specifier.
4787         (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4788         give error if sizeof (type-name) used an _Alignas specifier.
4789         (c_parser_alignof_expression): Pass true to c_parser_type_name and
4790         give error if _Alignof (type-name) used an _Alignas specifier.
4791         (c_parser_postfix_expression_after_paren_type): Check specified
4792         alignment for a compound literal and pass it to
4793         build_compound_literal.
4794         * c-parser.h (c_parser_type_name): Update prototype.
4795         * c-tree.h (build_compound_literal): Update prototype.
4797 2017-12-07  Martin Sebor  <msebor@redhat.com>
4799         PR c/81544
4800         * c-decl.c (c_decl_attributes): Look up existing declaration and
4801         pass it to decl_attributes.
4803 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
4805         PR c/83236
4806         * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4807         reserved for use by the implementation.
4809 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
4811         * c-decl.c: Include "c-family/c-spellcheck.h".
4813 2017-12-05  Martin Liska  <mliska@suse.cz>
4814             Jakub Jelinek  <jakub@redhat.com>
4816         * c-typeck.c (pointer_diff): Add new argument and instrument
4817         pointer subtraction.
4818         (build_binary_op): Similar for pointer comparison.
4820 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
4822         PR c/79153
4823         * c-parser.c: Include tree-iterator.h.
4824         (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4825         into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4826         on it.
4828         PR c/83222
4829         * c-tree.h (decl_constant_value_1): Declare.
4830         * c-typeck.c (decl_constant_value_1): New function.
4831         (decl_constant_value): Use it.
4832         * c-fold.c (c_fully_fold_internal): If in_init, use
4833         decl_constant_value_1 instead of decl_constant_value.
4835 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
4837         * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4839 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4841         PR sanitizer/81275
4842         * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4843         c_switch_covers_all_cases_p returns true.
4845 2017-11-28  Julia Koval  <julia.koval@intel.com>
4846             Sebastian Peryt  <sebastian.peryt@intel.com>
4848         * Make-lang.in (c/c-array-notation.o): Remove.
4849         * c-array-notation.c: Delete.
4850         * c-decl.c: Remove cilkplus condition.
4851         * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4852         c_parser_cilk_verify_simd, c_parser_array_notation,
4853         c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4854         c_parser_cilk_simd_fn_vector_attrs,
4855         c_finish_cilk_simd_fn_tokens): Delete.
4856         (c_parser_declaration_or_fndef): Remove cilkplus condition.
4857         (c_parser_direct_declarator_inner): Ditto.
4858         (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4859         (c_parser_attributes, c_parser_compound_statement,
4860         c_parser_statement_after_labels, c_parser_if_statement,
4861         c_parser_switch_statement, c_parser_while_statement,
4862         c_parser_do_statement, c_parser_for_statement,
4863         c_parser_unary_expression, c_parser_postfix_expression,
4864         c_parser_postfix_expression_after_primary,
4865         c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4866         c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4867         support.
4868         * c-typeck.c (build_array_ref, build_function_call_vec,
4869         convert_arguments,
4870         lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4871         c_finish_loop, build_binary_op): Remove cilkplus support.
4873 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4875         * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4876         of build3.
4878 2017-11-14  Boris Kolpackov  <boris@codesynthesis.com>
4880         * Make-lang.in (c.install-plugin): Install backend import library.
4882 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
4884         * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4885         pragma_stmt context.
4887 2017-11-23  Mike Stump  <mikestump@comcast.net>
4888             Eric Botcazou  <ebotcazou@adacore.com>
4890         * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4891         ANNOTATE_EXPR.
4892         (c_parser_do_statement): Likewise.
4893         (c_parser_for_statement): Likewise.
4895 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
4897         PR c++/62170
4898         * c-objc-common.c (c_tree_printer): Convert penultimate param from
4899         bool to bool *.  Within '%T' handling, if showing an "aka", use
4900         "quoted" param to add appropriate quoting.
4902 2017-11-22  Marek Polacek  <polacek@redhat.com>
4904         PR c++/60336
4905         PR middle-end/67239
4906         PR target/68355
4907         * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4909 2017-11-21  David Malcolm  <dmalcolm@redhat.com>
4911         PR c/83056
4912         * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4913         earlier failed lookups.
4915 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
4917         * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4918         * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4920 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
4922         PR c/81404
4923         * c-decl.c: Include "c-family/known-headers.h".
4924         (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4925         to known-headers.cc.
4926         (class suggest_missing_header): Move to known-header.h.
4927         (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4928         than get_c_name_hint.
4930 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
4932         * c-decl.c (get_c_name_hint): New function.
4933         (class suggest_missing_header): New class.
4934         (lookup_name_fuzzy): Call get_c_name_hint and use it to
4935         suggest missing headers to the user.
4937 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
4939         * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4940         Include "c-family/name-hint.h"
4941         (implicit_decl_warning): Convert "hint" from
4942         const char * to name_hint.  Pass location to
4943         lookup_name_fuzzy.  Suppress any deferred diagnostic if the
4944         warning was not printed.
4945         (undeclared_variable): Likewise for "guessed_id".
4946         (lookup_name_fuzzy): Convert return type from const char *
4947         to name_hint.  Add location_t param.
4948         * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4949         Include "c-family/name-hint.h"
4950         (c_parser_declaration_or_fndef): Convert "hint" from
4951         const char * to name_hint.  Pass location to lookup_name_fuzzy.
4952         (c_parser_parameter_declaration): Likewise.
4954 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
4956         PR c/66618
4957         PR c/69960
4958         * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
4959         where needed.
4960         * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
4961         handle_omp_array_sections): Likewise.
4962         (digest_init): Don't call decl_constant_value_for_optimization.
4963         * c-tree.h (decl_constant_value_for_optimization): Removed.
4964         * c-fold.c (c_fold_array_ref): New function.
4965         (c_fully_fold_internal): Add LVAL argument, propagate it through
4966         recursive calls.  For VAR_P call decl_constant_value and
4967         unshare if not LVAL and either optimizing or IN_INIT.  Remove
4968         decl_constant_value_for_optimization calls.  If IN_INIT and not LVAL,
4969         fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4970         (c_fully_fold): Add LVAL argument, pass it through to
4971         c_fully_fold_internal.
4972         (decl_constant_value_for_optimization): Removed.
4974 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
4976         PR c/81156
4977         * c-parser.c (check_tgmath_function): New function.
4978         (enum tgmath_parm_kind): New enum.
4979         (c_parser_postfix_expression): Handle __builtin_tgmath.
4981 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
4983         * c-decl.c (implicit_decl_warning): Update for renaming of
4984         pedwarn_at_rich_loc and warning_at_rich_loc.
4985         (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4986         (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4987         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4988         (c_parser_struct_or_union_specifier): Likewise for renaming of
4989         pedwarn_at_rich_loc.
4990         (c_parser_parameter_declaration): Likewise for renaming of
4991         error_at_rich_loc.
4992         * c-typeck.c (build_component_ref): Likewise.
4993         (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4994         (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4995         (set_init_label): Likewise for renaming of error_at_rich_loc.
4997 2017-10-30  Richard Biener  <rguenther@suse.de>
4999         * gimple-parser.c (c_parser_gimple_statement): Parse conditional
5000         stmts.
5002 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
5004         * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
5005         fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
5007 2017-10-25  David Malcolm  <dmalcolm@redhat.com>
5009         PR c/7356
5010         * c-parser.c (c_parser_declaration_or_fndef): Detect missing
5011         semicolons.
5013 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
5015         PR libstdc++/81706
5016         * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
5017         newdecl to corresponding __builtin_ if any.
5019 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
5021         PR c++/82466
5022         * c-decl.c (diagnose_mismatched_decls): Use
5023         OPT_Wbuiltin_declaration_mismatch.
5025 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
5027         * c-parser.c (c_parser_require): Add "type_is_unique" param and
5028         use it to guard calls to maybe_suggest_missing_token_insertion.
5029         (c_parser_parms_list_declarator): Override default value of new
5030         "type_is_unique" param to c_parser_require.
5031         (c_parser_asm_statement): Likewise.
5032         * c-parser.h (c_parser_require): Add "type_is_unique" param,
5033         defaulting to true.
5035 2017-10-11  Nathan Sidwell  <nathan@acm.org>
5037         * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
5039 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
5041         * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
5042         operating on trees as wide_ints.
5043         * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
5044         (c_tree_equal): Likewise.
5046 2017-10-04  David Malcolm  <dmalcolm@redhat.com>
5048         * c-decl.c (push_parm_decl): Store c_parm's location into the
5049         PARAM_DECL.
5050         (build_c_parm): Add "loc" param and store it within the c_parm.
5051         * c-parser.c (struct c_parser): Add "last_token_location" field.
5052         (c_parser_consume_token): Store location of the token into the
5053         new field.
5054         (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
5055         when handling a FUNCTION_DECL, if it doesn't already have them.
5056         (c_parser_parameter_declaration): Generate a location for the
5057         parameter, and pass it to the call to build_c_parm.
5058         * c-tree.h (struct c_parm): Add field "loc".
5059         (build_c_parm): Add location_t param.
5060         * c-typeck.c (get_fndecl_argument_location): New function.
5061         (inform_for_arg): New function.
5062         (convert_for_assignment): Use inform_for_arg when dealing with
5063         ic_argpass.
5065 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
5067         * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
5068         width is non-NULL.
5069         (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
5070         don't SET_DECL_C_BIT_FIELD here.
5072         PR c/82340
5073         * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
5074         instead of trying to set just TREE_READONLY manually.
5076 2017-09-16  Tom de Vries  <tom@codesourcery.com>
5078         PR c/81875
5079         * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
5080         cond itself.
5082 2017-09-15  Joseph Myers  <joseph@codesourcery.com>
5084         PR c/82071
5085         * c-typeck.c (ep_convert_and_check): Just call convert_and_check
5086         for C11.
5087         (build_conditional_expr): For C11, generate result with excess
5088         precision when one argument is an integer and the other is of a
5089         type using excess precision.
5091 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5093         * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
5095 2017-09-13  Marek Polacek  <polacek@redhat.com>
5097         PR c/82167
5098         * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
5099         than expr.original_type.
5101 2017-09-12  Nathan Sidwell  <nathan@acm.org>
5103         * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5104         resort_sorted_fields): Moved from c-family/c-common.c.
5105         * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
5107 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
5109         PR c/82071
5110         * c-typeck.c (build_atomic_assign): Handle argument with excess
5111         precision.  Ensure any EXCESS_PRECISION_EXPR is present in
5112         argument passed to build_binary_op and convert_for_assignment but
5113         not for call to c_fully_fold.
5114         (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
5115         Ensure build_binary_op is called with argument with original
5116         semantic type.  Avoid calling c_fully_fold with an
5117         EXCESS_PRECISION_EXPR from build_binary_op.
5119 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
5121         PR c/81887
5122         * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
5124 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5125             Alan Hayward  <alan.hayward@arm.com>
5126             David Sherwood  <david.sherwood@arm.com>
5128         * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
5129         (c_common_type): Likewise.  Use as_a <scalar_mode> when setting
5130         m1 and m2 to the signed equivalent of a fixed-point
5131         SCALAR_TYPE_MODE.
5133 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
5135         * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
5136         than CAN_HAVE_LOCATION_P when determining whether to use the
5137         location_t value within "value".
5139 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
5141         * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
5142         rather than peeking the location of the first token.
5143         * c-tree.h (c_expr::get_location): New method.
5145 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
5147         * c-typeck.c (build_function_call_vec): Pass arg_loc to call
5148         to check_function_arguments.
5150 2017-08-18  Marek Polacek  <polacek@redhat.com>
5152         * c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
5153         commentary.
5155 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
5157         PR c/53037
5158         * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
5159         (check_bitfield_type_and_width): Don't allow bit-field with
5160         warn_if_not_aligned type.
5162 2017-08-14  Martin Sebor  <msebor@redhat.com>
5164         PR c/81117
5165         * c-objc-common.c (c_objc_common_init): Handle 'G'.
5167 2017-08-11  Marek Polacek  <polacek@redhat.com>
5169         PR c/81795
5170         * c-decl.c (pushtag): Only print inform if the warning was printed.
5171         (grokdeclarator): Likewise.
5173 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
5175         * c-parser.c (c_parser_error): Rename to...
5176         (c_parser_error_richloc): ...this, making static, and adding
5177         "richloc" parameter, passing it to the c_parse_error call,
5178         rather than calling c_parser_set_source_position_from_token.
5179         (c_parser_error): Reintroduce, reimplementing in terms of the
5180         above, converting return type from void to bool.
5181         (class token_pair): New class.
5182         (struct matching_paren_traits): New struct.
5183         (matching_parens): New typedef.
5184         (struct matching_brace_traits): New struct.
5185         (matching_braces): New typedef.
5186         (get_matching_symbol): New function.
5187         (c_parser_require): Add param MATCHING_LOCATION, using it to
5188         highlight matching "opening" tokens for missing "closing" tokens.
5189         (c_parser_skip_until_found): Likewise.
5190         (c_parser_static_assert_declaration_no_semi): Convert explicit
5191         parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
5192         class matching_parens, so that the pertinent open parenthesis is
5193         highlighted when there are problems locating the close
5194         parenthesis.
5195         (c_parser_struct_or_union_specifier): Likewise.
5196         (c_parser_typeof_specifier): Likewise.
5197         (c_parser_alignas_specifier): Likewise.
5198         (c_parser_simple_asm_expr): Likewise.
5199         (c_parser_braced_init): Likewise, for matching_braces.
5200         (c_parser_paren_condition): Likewise, for matching_parens.
5201         (c_parser_switch_statement): Likewise.
5202         (c_parser_for_statement): Likewise.
5203         (c_parser_asm_statement): Likewise.
5204         (c_parser_asm_operands): Likewise.
5205         (c_parser_cast_expression): Likewise.
5206         (c_parser_sizeof_expression): Likewise.
5207         (c_parser_alignof_expression): Likewise.
5208         (c_parser_generic_selection): Likewise.
5209         (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
5210         RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
5211         RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
5212         In case CPP_OPEN_PAREN, pass loc_open_paren to the
5213         c_parser_skip_until_found call.
5214         (c_parser_objc_class_definition): Use class matching_parens as
5215         above.
5216         (c_parser_objc_method_decl): Likewise.
5217         (c_parser_objc_try_catch_finally_statement): Likewise.
5218         (c_parser_objc_synchronized_statement): Likewise.
5219         (c_parser_objc_at_property_declaration): Likewise.
5220         (c_parser_oacc_wait_list): Likewise.
5221         (c_parser_omp_var_list_parens): Likewise.
5222         (c_parser_omp_clause_collapse): Likewise.
5223         (c_parser_omp_clause_default): Likewise.
5224         (c_parser_omp_clause_if): Likewise.
5225         (c_parser_omp_clause_num_threads): Likewise.
5226         (c_parser_omp_clause_num_tasks): Likewise.
5227         (c_parser_omp_clause_grainsize): Likewise.
5228         (c_parser_omp_clause_priority): Likewise.
5229         (c_parser_omp_clause_hint): Likewise.
5230         (c_parser_omp_clause_defaultmap): Likewise.
5231         (c_parser_oacc_single_int_clause): Likewise.
5232         (c_parser_omp_clause_ordered): Likewise.
5233         (c_parser_omp_clause_reduction): Likewise.
5234         (c_parser_omp_clause_schedule): Likewise.
5235         (c_parser_omp_clause_num_teams): Likewise.
5236         (c_parser_omp_clause_thread_limit): Likewise.
5237         (c_parser_omp_clause_aligned): Likewise.
5238         (c_parser_omp_clause_linear): Likewise.
5239         (c_parser_omp_clause_safelen): Likewise.
5240         (c_parser_omp_clause_simdlen): Likewise.
5241         (c_parser_omp_clause_depend): Likewise.
5242         (c_parser_omp_clause_map): Likewise.
5243         (c_parser_omp_clause_device): Likewise.
5244         (c_parser_omp_clause_dist_schedule): Likewise.
5245         (c_parser_omp_clause_proc_bind): Likewise.
5246         (c_parser_omp_clause_uniform): Likewise.
5247         (c_parser_omp_for_loop): Likewise.
5248         (c_parser_cilk_clause_vectorlength): Likewise.
5249         (c_parser_cilk_clause_linear): Likewise.
5250         (c_parser_transaction_expression): Likewise.
5251         * c-parser.h (c_parser_require): Add param matching_location with
5252         default UNKNOWN_LOCATION.
5253         (c_parser_error): Convert return type from void to bool.
5254         (c_parser_skip_until_found): Add param matching_location with
5255         default UNKNOWN_LOCATION.
5257 2017-08-09  Marek Polacek  <polacek@redhat.com>
5259         * c-decl.c (build_enumerator): Use true/false instead of 1/0.
5260         * c-tree.h (build_external_ref): Update declaration.
5261         * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
5262         (build_external_ref): Change the type of a parameter to bool.
5263         (parser_build_binary_op): Use true/false instead of 1/0.
5264         (pointer_diff): Likewise.
5265         (build_modify_expr): Likewise.
5266         (set_designator): Change the type of a parameter to bool.
5267         (set_init_index): Use true/false instead of 1/0.
5268         (set_init_label): Likewise.
5269         (output_init_element): Change the type of a parameter to bool.
5270         (output_pending_init_elements): Use true/false instead of 1/0.
5271         (process_init_element): Likewise.
5272         (build_binary_op): Change the type of a parameter to bool.
5274 2017-08-09  Marek Polacek  <polacek@redhat.com>
5276         PR c/81233
5277         * c-typeck.c (pedwarn_init): Make the function take a variable list.
5278         Call emit_diagnostic_valist instead of pedwarn.
5279         (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
5280         Print the relevant types in diagnostics.
5282 2017-08-09  Marek Polacek  <polacek@redhat.com>
5284         PR c/81417
5285         * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
5286         build_conditional_expr.
5287         * c-parser.c (c_parser_conditional_expression): Create locations for
5288         EXP1 and EXP2 from their source ranges.  Pass the locations down to
5289         build_conditional_expr.
5290         * c-tree.h (build_conditional_expr): Update declaration.
5291         * c-typeck.c (build_conditional_expr): Add location_t parameters.
5292         For -Wsign-compare, also print the types.
5294 2017-08-08  Martin Liska  <mliska@suse.cz>
5296         * c-convert.c: Include header files.
5297         * c-typeck.c: Likewise.
5299 2017-08-07  Martin Liska  <mliska@suse.cz>
5301         * c-parser.c (c_parser_attributes): Canonicalize name of an
5302         attribute.
5304 2017-08-02  Marek Polacek  <polacek@redhat.com>
5306         PR c/81289
5307         * c-parser.c (c_parser_unary_expression): Use set_error.
5309         PR c/81448
5310         PR c/81306
5311         * c-warn.c (warn_for_multistatement_macros): Prevent bogus
5312         warnings.  Avoid walking MACRO_MAP_LOCATIONS.
5314 2017-07-31  Jan Hubicka  <hubicka@ucw.cz>
5315             Martin Liska  <mliska@suse.cz>
5317         * c-typeck.c (c_finish_goto_label): Build gimple predict
5318         statement.
5320 2017-07-31  Martin Liska  <mliska@suse.cz>
5322         PR sanitize/81530
5323         * c-convert.c (convert): Guard condition with flag_sanitize_p
5324         also with current_function_decl non-null equality.
5325         * c-decl.c (grokdeclarator): Likewise.
5326         * c-typeck.c (build_binary_op): Likewise.
5328 2017-07-25  Marek Polacek  <polacek@redhat.com>
5330         * c-decl.c (grokfield): Remove local variable.
5332 2017-07-25  Marek Polacek  <polacek@redhat.com>
5334         PR c/81364
5335         * c-parser.c (c_parser_else_body): Don't warn about multistatement
5336         macro expansion if the body is in { }.
5337         (c_parser_while_statement): Likewise.
5338         (c_parser_for_statement): Likewise.
5340 2017-07-18  Nathan Sidwell  <nathan@acm.org>
5342         * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
5344 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
5346         * c-decl.c (implicitly_declare): When suggesting a missing
5347         #include, provide a fix-it hint.
5349 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
5351         * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
5352         and call that instead.
5353         * c-tree.h (selftest::run_c_tests): New decl.
5355 2017-06-26  Marek Polacek  <polacek@redhat.com>
5357         PR c/80116
5358         * c-parser.c (c_parser_if_body): Set the location of the
5359         body of the conditional after parsing all the labels.  Call
5360         warn_for_multistatement_macros.
5361         (c_parser_else_body): Likewise.
5362         (c_parser_switch_statement): Likewise.
5363         (c_parser_while_statement): Likewise.
5364         (c_parser_for_statement): Likewise.
5365         (c_parser_statement): Add a default argument.  Save the location
5366         after labels have been parsed.
5367         (c_parser_c99_block_statement): Likewise.
5369 2017-06-19  Richard Biener  <rguenther@suse.de>
5371         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5372         negated _Literals to parse _Literal (int) -1.
5374 2017-06-13  Martin Liska  <mliska@suse.cz>
5376         PR sanitize/78204
5377         * c-convert.c (convert): Use sanitize_flags_p.
5378         * c-decl.c (grokdeclarator): Likewise.
5379         * c-typeck.c (convert_for_assignment): Likewise.
5380         (c_finish_return): Likewise.
5381         (build_binary_op): Likewise.
5383 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
5385         PR c/81006
5386         * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
5387         to sizetype before size_binop.
5389 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
5391         * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
5392         of TDI_generic.
5394 2017-06-06  Marek Polacek  <polacek@redhat.com>
5396         PR c/79983
5397         * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
5398         ref.
5399         (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
5401 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5403         * c-parser.c (c_parser_binary_expression): Implement the
5404         -Wsizeof_pointer_div warning.
5405         (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
5406         from a parenthesized expression.
5407         (c_parser_expr_list): Use c_last_sizeof_loc.
5408         * c-tree.h (c_last_sizeof_loc): New external.
5409         * c-typeck.c (c_last_sizeof_loc): New variable.
5410         (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
5412 2017-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
5414         PR testsuite/80580
5415         * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
5417 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
5419         * c-objc-common.c (c_tree_printer): Gain bool and const char **
5420         parameters.
5422 2017-05-24  Martin Sebor  <msebor@redhat.com>
5424         PR c/80731
5425         * c-fold.c (c_fully_fold_internal): Adjust.
5426         * c-typeck.c (parser_build_unary_op): Adjust.
5428 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
5430         * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
5431         "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
5432         "VECTOR_LENGTH".
5434 2017-05-23  Marek Polacek  <polacek@redhat.com>
5436         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
5437         quotes.
5439 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
5441         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
5442         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
5443         it returned invariant.  Call tree_invariant_p unconditionally
5444         afterwards to decide whether to return expr or op0.
5446 2017-05-22  Nathan Sidwell  <nathan@acm.org>
5448         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
5450 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
5452         * c-parser.c (c_parser_omp_clause_default): Handle
5453         "OMP_CLAUSE_DEFAULT_PRESENT".
5455 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5457         * config-lang.in (gtfiles): Add c-family/c-format.c.
5459 2017-05-18  Nathan Sidwell  <nathan@acm.org>
5461         * c-decl.c (pushdecl_top_level): Delete unused function.
5463 2017-05-18  Marek Polacek  <polacek@redhat.com>
5465         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
5466         (check_earlier_gotos): Likewise.
5467         (define_label): Likewise.
5468         (pending_xref_error): Likewise.
5469         (smallest_type_quals_location): Likewise.
5470         (grokdeclarator): Likewise.
5471         (grokparms): Likewise.
5472         (identifier_global_value): Likewise.
5473         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
5474         (find_init_member): Likewise.
5476 2017-05-18  Marek Polacek  <polacek@redhat.com>
5478         * c-decl.c (start_decl): Use false/true instead of 0/1.
5479         (grokdeclarator): Likewise.
5480         (finish_struct): Likewise.
5481         (start_function): Change the return type to bool.  Use false/true
5482         instead of 0/1.
5483         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
5484         * c-tree.h (start_function): Update.
5485         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
5486         (set_designator): Change the return type to bool.  Use false/true
5487         instead of 0/1.
5489 2017-05-17  Marek Polacek  <polacek@redhat.com>
5491         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
5492         * c-typeck.c: Likewise.
5494 2017-05-17  Marek Polacek  <polacek@redhat.com>
5496         PR sanitizer/80659
5497         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
5498         DECL_IGNORED_P even for non-static compound literals.
5500 2017-05-17  Martin Liska  <mliska@suse.cz>
5502         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
5503         use it instead of int type.
5505 2017-05-17  Marek Polacek  <polacek@redhat.com>
5507         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
5508         call c_fully_fold.
5509         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
5510         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
5511         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
5512         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
5513         save_expr.
5514         (c_parser_conditional_expression): Likewise.
5515         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
5516         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
5517         (process_init_element): Likewise.
5518         (build_binary_op): Likewise.
5519         (handle_omp_array_sections_1): Likewise.
5521 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
5523         * c-parser.c (c_parser_omp_clause_num_gangs)
5524         (c_parser_omp_clause_num_workers)
5525         (c_parser_omp_clause_vector_length): Merge functions into...
5526         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
5527         all users.
5529 2017-05-11  Nathan Sidwell  <nathan@acm.org>
5531         * gimple-parser.c: Don't #include tree-dump.h.
5533 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
5535         PR testsuite/80580
5536         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
5538 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
5540         PR testsuite/80580
5541         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5542         incorrect __MEM syntax.
5544 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
5546         PR testsuite/80580
5547         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
5548         type of unary '*'.
5550 2017-05-09  Nathan Sidwell  <nathan@acm.org>
5552         * c-tree.h (pushdecl): Declare.
5554 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
5556         * c-decl.c (warn_defaults_to): Replace report_diagnostic
5557         with diagnostic_report_diagnostic.
5558         * c-errors.c (pedwarn_c99): Likewise.
5559         (pedwarn_c90): Likewise.
5561 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
5563         PR c++/80038
5564         * c-gimplify.c (c_gimplify_expr): Remove calls to
5565         cilk_gimplifY_call_params_in_spawned_fn.
5567 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
5569         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
5570         hint for removing extra semicolon.
5572 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
5574         PR c/80468
5575         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
5576         enabled, set specs->type to integer_type_node.
5578 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
5580         * c-array-notation.c: Fix typo in comment.
5582 2017-03-29  Marek Polacek  <polacek@redhat.com>
5584         PR c/79730
5585         * c-decl.c (finish_decl): Check VAR_P.
5587 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
5589         PR middle-end/80162
5590         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
5591         * c-typeck.c (c_mark_addressable): Likewise.  Look through
5592         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
5593         to ARRAY_TYPE.
5594         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
5596 2017-03-23  Marek Polacek  <polacek@redhat.com>
5598         * c-tree.h: Remove a C_RID_YYCODE reference.
5600 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
5602         PR c/80097
5603         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
5604         optional COMPOUND_EXPR with ubsan instrumentation.
5606 2017-03-17  Marek Polacek  <polacek@redhat.com>
5608         * c-parser.c: Add C11 references.
5610 2017-03-15  Marek Polacek  <polacek@redhat.com>
5612         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
5614 2017-03-11  Marek Polacek  <polacek@redhat.com>
5616         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
5618 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
5620         PR translation/79848
5621         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5622         "%qs".
5623         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
5625 2017-03-09  Marek Polacek  <polacek@redhat.com>
5627         PR sanitizer/79757
5628         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5629         parameter declarations with initializers.
5631 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
5633         PR c/79969
5634         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
5635         TYPE_STUB_DECL.
5637 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
5639         PR c/79834
5640         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
5641         for "may only be used in compound statements" diagnostics, change it
5642         such that the same translatable string is used for all pragmas.  For
5643         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
5644         diagnostics.
5645         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
5646         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
5647         "may only be used in compound statements" diagnostics, such that the
5648         same translatable string is used for all pragmas.
5650 2017-03-04  Marek Polacek  <polacek@redhat.com>
5652         PR c/79847
5653         * c-decl.c (implicit_decl_warning): Add missing space.
5655 2017-03-03  Marek Polacek  <polacek@redhat.com>
5657         PR c/79758
5658         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
5659         current_function_prototype_arg_types is error_mark_node.  Fix
5660         formatting.  Use TREE_VALUE instead of TREE_TYPE.
5662 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
5664         PR c/79837
5665         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
5666         %<min%> or %<max%> in the diagnostics, instead mention identifier.
5667         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
5668         diagnostics.
5670         PR c/79836
5671         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
5672         instead of %<_Generic>.
5673         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
5674         (c_parser_omp_target_exit_data): Use %<release%> instead of
5675         %<release>.
5677 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
5679         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
5680         instead of just cond ? "..." : "...".
5681         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
5682         for "enter"/"exit" keyword.
5683         (c_finish_oacc_routine): Don't use %s to supply portions of the
5684         message.
5686 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
5688         PR c++/79588
5689         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
5690         handle -Wrestrict here.
5691         * c-typeck.c (build_function_call_vec): Adjust
5692         check_function_arguments caller.
5694 2017-02-23  Richard Biener  <rguenther@suse.de>
5696         PR c/79684
5697         * gimple-parser.c (c_parser_gimple_statement): Use set_error
5698         to initialize c_exprs to return.
5699         (c_parser_gimple_binary_expression): Likewise.
5700         (c_parser_gimple_unary_expression): Likewise.
5701         (c_parser_gimple_postfix_expression): Likewise.
5703 2017-02-22  Marek Polacek  <polacek@redhat.com>
5705         PR c/79662
5706         * c-typeck.c (convert_arguments): Handle error_mark_node.
5708 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5710         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
5711         value of c_parser_parse_ssa_name against error_mark_node and emit
5712         error if ssa name is anonymous and written as default definition.
5714 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5716         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5717         FMA_EXPR.
5719 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
5721         PR c++/79512
5722         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5723         ignore #pragma omp target even when not followed by identifier.
5725 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5727         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5728         (c_parser_gimple_unary_expression): Likewise.
5730 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
5732         * c-parser.c (c_parser_oacc_declare): Add missing space in
5733         diagnostics.
5735 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5737         PR c/79478
5738         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5739         set_c_expr_source_range when parsing ssa-name.
5741 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
5742             Richard Biener  <rguenther@suse.de>
5744         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5745         building IL when arguments are error_mark_node.
5746         (c_parser_gimple_unary_expression): Likewise.
5747         (c_parser_gimple_if_stmt): Likewise.
5748         (c_parser_gimple_switch_stmt): Likewise.
5749         (c_parser_gimple_return_stmt): Likewise.
5750         (c_parser_parse_ssa_name): When name lookup fails do not build
5751         an SSA name.  Use undeclared rather than not declared in error
5752         reporting.
5754 2017-02-09  Marek Polacek  <polacek@redhat.com>
5756         PR c/79428
5757         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5758         instead of c_parser_skip_until_found.
5760 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
5762         PR c/79431
5763         * c-parser.c (c_parser_omp_declare_target): Don't invoke
5764         symtab_node::get on automatic variables.
5766 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
5767             Chung-Lin Tang  <cltang@codesourcery.com>
5769         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5770         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5771         semantic checking.
5772         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5774 2017-02-07  Richard Biener  <rguenther@suse.de>
5776         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5777         (c_parser_gimple_postfix_expression_after_primary):
5778         Do not use c_build_function_call_vec to avoid folding and promotion.
5779         Simplify.
5781 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
5783         PR lto/79061
5784         * c-decl.c (pop_scope): Pass main_input_filename to
5785         build_translation_unit_decl.
5787 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
5789         * c-parser.c: Include "read-rtl-function.h" and
5790         "run-rtl-passes.h".
5791         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5792         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
5793         production.  Update for renaming of field "gimple_pass" to
5794         "gimple_or_rtl_pass".  If __RTL was seen, call
5795         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
5796         to an auto_timevar, to cope with early exit.
5797         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5798         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5799         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5800         Handle RID_RTL.
5801         (c_parser_parse_rtl_body): New function.
5802         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5803         (struct c_declspecs): Rename field "gimple_pass" to
5804         "gimple_or_rtl_pass".  Add field "rtl_p".
5805         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5806         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5807         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5808         (c_parser_gimple_or_rtl_pass_list): ...this.
5810 2017-01-20  Marek Polacek  <polacek@redhat.com>
5812         PR c/64279
5813         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5815 2017-01-13  Richard Biener  <rguenther@suse.de>
5817         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5818         nops.
5820 2017-01-13  Richard Biener  <rguenther@suse.de>
5822         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5823         _Literal ( type-name ) number.
5825 2017-01-12  Richard Biener  <rguenther@suse.de>
5827         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5828         __MEM.
5830 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
5832         PR c++/72813
5833         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5834         PCH file.
5836 2017-01-11  Richard Biener  <rguenther@suse.de>
5838         PR bootstrap/79052
5839         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5840         returns on parse errors.
5842 2017-01-04  Marek Polacek  <polacek@redhat.com>
5844         PR c++/64767
5845         * c-parser.c (c_parser_postfix_expression): Mark zero character
5846         constants by setting original_type in c_expr.
5847         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5848         with a zero character constant.
5849         (char_type_p): New function.
5851 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
5853         * c-parser.c (c_parser_declaration_or_fndef): Create a
5854         rich_location at init_loc and parse it to start_init.
5855         (last_init_list_comma): New global.
5856         (c_parser_braced_init): Update last_init_list_comma when parsing
5857         commas.  Pass it to pop_init_level.  Pass location of closing
5858         brace to pop_init_level.
5859         (c_parser_postfix_expression_after_paren_type): Create a
5860         rich_location at type_loc and parse it to start_init.
5861         (c_parser_omp_declare_reduction): Likewise for loc.
5862         * c-tree.h (start_init): Add rich_location * param.
5863         (pop_init_level): Add location_t param.
5864         * c-typeck.c (struct initializer_stack): Add field
5865         "missing_brace_richloc".
5866         (start_init): Add richloc param, use it to initialize
5867         the stack node's missing_brace_richloc.
5868         (last_init_list_comma): New decl.
5869         (finish_implicit_inits): Pass last_init_list_comma to
5870         pop_init_level.
5871         (push_init_level): When finding missing open braces, add fix-it
5872         hints to the richloc.
5873         (pop_init_level): Add "insert_before" param and pass it
5874         when calling pop_init_level.  Add fixits about missing
5875         close braces to any richloc.  Use the richloc for the
5876         -Wmissing-braces warning.
5877         (set_designator): Pass last_init_list_comma to pop_init_level.
5878         (process_init_element): Likewise.
5880 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
5882         Update copyright years.
5884 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
5886         PR bootstrap/78817
5887         * c-typeck.c (build_function_call_vec): If check_function_arguments
5888         returns true, set TREE_NO_WARNING on CALL_EXPR.
5890         PR c/77767
5891         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5892         to *expr instead of overwriting it.
5894 2016-12-20  Richard Biener  <rguenther@suse.de>
5896         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5897         error recovery.
5898         (c_parser_gimple_statement): Only build assigns for non-error
5899         stmts.
5900         (c_parser_gimple_postfix_expression_after): Improve error recovery.
5902 2016-12-14  Martin Jambor  <mjambor@suse.cz>
5904         * c-parser.c: Include omp-general.h and omp-offload.h instead of
5905         omp-low.h.
5906         (c_finish_oacc_routine): Adjusted call to
5907         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5908         to use their new names.
5909         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5910         use its new name.
5911         (c_parser_oacc_update): Likewise.
5912         (c_parser_omp_simd): Likewise.
5913         (c_parser_omp_target_update): Likewise.
5914         * c-typeck.c: Include omp-general.h instead of omp-low.h.
5915         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5916         name.
5917         (c_finish_omp_cancellation_point): Likewise.
5918         * gimple-parser.c: Do not include omp-low.h
5920 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
5921             James Norris  <jnorris@codesourcery.com>
5923         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5924         EXIT_DATA,WAIT} are not used in compound statements.
5925         (c_parser_oacc_enter_exit_data): Update diagnostics.
5927 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5929         PR c++/71973
5930         * c-decl.c (diagnose_mismatched_decls): Use
5931         OPT_Wbuiltin_declaration_mismatch here too.
5933 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
5934             Alan Hayward  <alan.hayward@arm.com>
5935             David Sherwood  <david.sherwood@arm.com>
5937         * c-decl.c (merge_decls): Use SET_DECL_MODE.
5938         (make_label, finish_struct): Likewise.
5940 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
5941             Richard Biener  <rguenther@suse.de>
5943         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5944         * config-lang.in (gtfiles): Add c/c-parser.h.
5945         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
5946         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
5947         * c-parser.c (enum c_id_kind, struct c_token,
5948         c_parser_next_token_is, c_parser_next_token_is_not,
5949         c_parser_next_token_is_keyword,
5950         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
5951         Split out to ...
5952         * c-parser.h: ... new header.
5953         * c-parser.c: Include c-parser.h and gimple-parser.h.
5954         (c_parser_peek_token, c_parser_peek_2nd_token,
5955         c_token_starts_typename, c_parser_next_token_starts_declspecs,
5956         c_parser_next_tokens_start_declaration, c_parser_consume_token,
5957         c_parser_error, c_parser_require, c_parser_skip_until_found,
5958         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5959         c_parser_type_name): Export.
5960         (c_parser_tokens_buf): New function.
5961         (c_parser_error): Likewise.
5962         (c_parser_set_error): Likewise.
5963         (c_parser_declspecs): Handle RID_GIMPLE.
5964         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5965         via c_parser_parse_gimple_body.
5966         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5967         c_token_starts_typename, c_parser_next_token_starts_declspecs,
5968         c_parser_next_tokens_start_declaration, c_parser_consume_token,
5969         c_parser_error, c_parser_require, c_parser_skip_until_found,
5970         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5971         c_parser_type_name): Declare.
5972         (struct c_parser): Declare forward.
5973         (c_parser_tokens_buf): Declare.
5974         (c_parser_error): Likewise.
5975         (c_parser_set_error): Likewise.
5976         * gimple-parser.c: New file.
5977         * gimple-parser.h: Likewise.
5979 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5981         PR c/35503
5982         * c-parser.c (c_parser_postfix_expression_after_primary): Call
5983         warn_for_restrict.
5985 2016-09-11  Le-Chun Wu  <lcwu@google.com>
5986             Mark Wielaard  <mjw@redhat.com>
5988         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5989         to the given -Wshadow= variant.
5991 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5993         * c-typeck.c: Include memmodel.h.
5995 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
5997         PR target/77957
5998         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5999         instead of lhd_return_null_tree_v.
6001 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
6003         PR c++/69733
6004         * c-decl.c (smallest_type_quals_location): New static function.
6005         (grokdeclarator): Try to find the correct location for an ignored
6006         qualifier.
6008 2016-09-26  Marek Polacek  <polacek@redhat.com>
6010         PR c/7652
6011         * c-decl.c (pop_scope): Add gcc_fallthrough.
6013 2016-09-26  Marek Polacek  <polacek@redhat.com>
6015         PR c/7652
6016         * c-parser.c (struct c_token): Add flags field.
6017         (c_lex_one_token): Pass it to c_lex_with_flags.
6018         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
6019         into IFN_FALLTHROUGH.
6020         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
6021         attribute fallthrough after a case label or default label.
6022         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
6024 2016-09-24  Marek Polacek  <polacek@redhat.com>
6026         PR c/77490
6027         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
6028         have boolean value.  Warn about ++/-- on booleans.
6030 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
6032         * c-parser.c (incomplete_record_decls): Remove unnecessary
6033         = vNULL initialization of file scope vec.
6035 2016-09-16  Marek Polacek  <polacek@redhat.com>
6037         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
6039 2016-09-14  Marek Polacek  <polacek@redhat.com>
6041         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
6042         (fix_array_notation_expr): Likewise.
6043         * c-decl.c (finish_decl): Likewise.
6044         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6045         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
6046         (function_to_pointer_conversion): Use false instead of 0.
6047         (convert_lvalue_to_rvalue): Likewise.
6048         (parser_build_unary_op): Likewise.
6049         (build_atomic_assign): Likewise.
6050         (build_unary_op): Change nonconvert parameter type to bool, use
6051         true/false instead of 1/0.
6052         (build_binary_op): Use true instead of 1.
6054 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
6056         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
6057         of add_fixit_insert to add_fixit_insert_before.
6059 2016-09-13  Marek Polacek  <polacek@redhat.com>
6061         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
6062         it.
6064 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6066         PR c++/77496
6067         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
6068         COMPOUND_EXPR to warn_for_omitted_condop.
6070 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
6072         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
6073         c_get_substring_location for this new langhook.
6075 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
6077         PR c/65467
6078         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
6079         flag_openmp.
6080         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
6081         instead of mark_exp_read on low_bound/length expression.
6082         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
6083         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6084         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6085         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
6086         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
6087         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
6088         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
6089         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
6090         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
6091         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
6092         instead of mark_expr_read.
6093         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
6094         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
6095         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
6096         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
6097         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
6098         array section bases outside of depend clause, for depend clause
6099         use convert_lvalue_to_rvalue on the base.
6100         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
6101         linear, aligned, map, to and from clauses.
6102         (c_omp_clause_copy_ctor): New function.
6104 2016-09-01  Marek Polacek  <polacek@redhat.com>
6106         PR c/7652
6107         * c-typeck.c (composite_type): Add FALLTHRU comment.
6109 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
6111         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
6112         to the insertion fixits for "struct", "union", and "enum".
6114 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
6116         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
6117         rather than add_fixit_misspelled_id.
6118         (undeclared_variable): Likewise.
6119         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
6120         now-redundant "here" params from add_fixit_insert method calls.
6121         (c_parser_parameter_declaration): Likewise.
6122         * c-typeck.c (build_component_ref): Remove now-redundant range
6123         param from add_fixit_replace method calls.
6125 2016-08-25  Marek Polacek  <polacek@redhat.com>
6127         * c-typeck.c (parser_build_binary_op): Pass LHS to
6128         warn_logical_not_parentheses.
6130 2016-08-25  Marek Polacek  <polacek@redhat.com>
6132         PR c/77323
6133         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
6134         or _FloatN or _FloatNx is not supported.
6135         (finish_declspecs): Set type to integer_type_node when _FloatN or
6136         _FloatNx is not supported.
6138 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
6140         PR c/32187
6141         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
6142         (struct c_declspecs): Add field floatn_nx_idx.
6143         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
6144         and _FloatNx type specifiers.
6145         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
6146         (c_parser_declspecs, c_parser_attribute_any_word)
6147         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
6148         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
6149         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
6150         narrower than double.
6152 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
6153             Martin Liska  <mliska@suse.cz>
6155         PR c/67410
6156         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
6157         % to determine val element to change.  Assert that
6158         wchar_bytes * charwidth fits into val array.
6160 2016-08-12  Marek Polacek  <polacek@redhat.com>
6162         PR c/7652
6163         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
6164         (c_parser_postfix_expression): Likewise.
6165         * c-typeck.c (build_unary_op): Adjust fall through comment.
6166         (c_mark_addressable): Likewise.
6168 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
6170         PR c/72816
6171         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
6172         array member through typedef, for orig_qual_indirect == 0 clear
6173         orig_qual_type.
6175 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
6177         PR c/64955
6178         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
6179         this up to selftest::run_c_tests.
6180         (selftest::run_c_tests): New function.
6182 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
6184         * c-parser.c (struct oacc_routine_data): Add error_seen and
6185         fndecl_seen members.
6186         (c_finish_oacc_routine): Use these.
6187         (c_parser_declaration_or_fndef): Adjust.
6188         (c_parser_oacc_routine): Likewise.  Support more C language
6189         constructs, and improve diagnostics.  Move pragma context
6190         checking...
6191         (c_parser_pragma): ... here.
6193         * c-parser.c (struct oacc_routine_data): New.
6194         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
6195         Simplify code.
6196         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
6197         declare target" attribute.
6199 2016-08-01  Jan Beulich  <jbeulich@suse.com>
6201         * c-fold.c (c_fully_fold_internal): Also emit shift count
6202         warnings for vector types.
6203         * c-typeck.c (build_binary_op): Likewise.
6205 2016-07-29  Marek Polacek  <polacek@redhat.com>
6207         PR c/71742
6208         * c-decl.c (finish_struct): Rephrase an error message.
6210         PR c/71853
6211         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
6212         to error node for invalid code.
6214         PR c/71573
6215         * c-decl.c (implicitly_declare): Return decl early not only for
6216         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
6218 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
6220         PR c/71969
6221         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
6222         on GNU extern inline functions.
6224 2016-07-29  Marek Polacek  <polacek@redhat.com>
6226         PR c/71583
6227         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
6228         check expr.value.
6230 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
6232         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
6234 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
6236         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
6237         spellcheck-tree.h
6238         (best_macro_match): Likewise, converting from a typedef to a
6239         subclass.
6240         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
6241         (lookup_name_fuzzy): Update for change of best_macro_match to a
6242         subclass with a ctor that calls cpp_forall_identifiers.
6244 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
6246         * c-decl.c (implicit_decl_warning): Update for conversion of
6247         return type of lookup_name_fuzzy to const char *.
6248         (undeclared_variable): Likewise.
6249         (lookup_name_fuzzy): Convert return type from tree to
6250         const char *.
6251         * c-parser.c (c_parser_declaration_or_fndef): Update for
6252         conversion of return type of lookup_name_fuzzy to const char *.
6253         (c_parser_parameter_declaration): Likewise.
6255 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
6257         * c-parser.c (c_parser_oacc_declare): Don't scan for
6258         GOMP_MAP_POINTER.
6259         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
6260         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
6261         zero-length subarrays.
6263 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
6265         PR c/71858
6266         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
6267         instead of FUZZY_LOOKUP_NAME.
6268         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
6269         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
6271 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
6273         PR c/71858
6274         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
6276 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
6278         * c-parser.c (c_parser_generic_selection): Make type of variable
6279         auto_vec.
6280         (c_parser_omp_declare_simd): Likewise.
6282 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
6284         * c-decl.c (struct c_struct_parse_info): Change member types
6285         from vec to auto_vec.
6286         (start_struct): Adjust.
6287         (finish_struct): Likewise.
6289 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
6291         PR c/71719
6292         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
6294 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
6296         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
6297         Move pragma context checking into...
6298         (c_parser_omp_cancellation_point): ... here, and improve
6299         diagnostic messages.
6300         * c-typeck.c (c_finish_omp_cancel)
6301         (c_finish_omp_cancellation_point): Improve diagnostic messages.
6303 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
6305         PR c/71685
6306         * c-typeck.c (c_build_qualified_type): Don't clear
6307         C_TYPE_INCOMPLETE_VARS for the main variant.
6309 2016-06-28  Martin Sebor  <msebor@redhat.com>
6311         PR c/71552
6312         * c-typeck.c (output_init_element): Diagnose incompatible types
6313         before non-constant initializers.
6315 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
6317         * Make-lang.in: Don't cat ../stage_current if it does not exist.
6319 2016-06-23  Andi Kleen  <ak@linux.intel.com>
6321         * Make-lang.in: Add support for autofdo.
6323 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
6325         PR c/70339
6326         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
6327         (implicit_decl_warning): When issuing warnings for implicit
6328         declarations, attempt to provide a suggestion via
6329         lookup_name_fuzzy.
6330         (undeclared_variable): Likewise when issuing errors.
6331         (lookup_name_in_scope): Likewise.
6332         (struct edit_distance_traits<cpp_hashnode *>): New struct.
6333         (best_macro_match): New typedef.
6334         (find_closest_macro_cpp_cb): New function.
6335         (lookup_name_fuzzy): New function.
6336         * c-parser.c: Include gcc-rich-location.h.
6337         (c_token_starts_typename): Split out case CPP_KEYWORD into...
6338         (c_keyword_starts_typename): ...this new function.
6339         (c_parser_declaration_or_fndef): When issuing errors about
6340         missing "struct" etc, add a fixit.  For other kinds of errors,
6341         attempt to provide a suggestion via lookup_name_fuzzy.
6342         (c_parser_parms_declarator): When looking ahead to detect typos in
6343         type names, also reject CPP_KEYWORD.
6344         (c_parser_parameter_declaration): When issuing errors about
6345         unknown type names, attempt to provide a suggestion via
6346         lookup_name_fuzzy.
6347         * c-tree.h (c_keyword_starts_typename): New prototype.
6349 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
6351         PR c/71601
6352         * c-typeck.c (build_conditional_expr): Return error_mark_node if
6353         c_common_type returns error_mark_node.
6355 2016-06-19  Martin Sebor  <msebor@redhat.com>
6357         PR c/69507
6358         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
6359         __alignof__ (expression).
6361 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
6363         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
6365 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
6367         * c-typeck.c (build_component_ref): Simplify fixit code by
6368         using gcc_rich_location::add_fixit_misspelled_id.
6369         (set_init_label): Likewise.
6371 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
6373         * c-parser.c (c_parser_initelt): Provide location of name for new
6374         location_t param of set_init_label.
6375         * c-tree.h (set_init_label): Add location_t param.
6376         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
6377         param and use it when issuing error messages about unrecognized
6378         field names.  Attempt to provide a fixit hint if appropriate,
6379         otherwise update the error message to provide the type name.
6381 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
6383         PR c/71381
6384         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
6385         Loosen checking.
6387 2016-06-08  Martin Sebor  <msebor@redhat.com>
6388             Jakub Jelinek  <jakub@redhat.com>
6390         PR c++/70507
6391         PR c/68120
6392         * c-typeck.c (convert_arguments): Don't promote last argument
6393         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6395 2016-06-08  Marek Polacek  <polacek@redhat.com>
6397         PR c/71418
6398         * c-decl.c (grokdeclarator): Check TYPE_P.
6400         PR c/71426
6401         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
6402         code.
6404 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
6406         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
6407         and structure element reference, capture the location of the
6408         element name token and pass it to build_component_ref.
6409         (c_parser_postfix_expression_after_primary): Likewise for
6410         structure element dereference.
6411         (c_parser_omp_variable_list): Likewise for
6412         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
6413         * c-tree.h (build_component_ref): Add location_t param.
6414         * c-typeck.c (build_component_ref): Add location_t param
6415         COMPONENT_LOC.  Use it, if available, when issuing hints about
6416         mispelled member names to provide a fixit replacement hint.
6418 2016-06-06  Marek Polacek  <polacek@redhat.com>
6420         PR c/71362
6421         * c-parser.c (c_parser_direct_declarator): Set location.
6423 2016-06-06  Marek Polacek  <polacek@redhat.com>
6425         * c-typeck.c (comptypes_internal): Handle comparisons of
6426         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
6427         TYPE_REF_CAN_ALIAS_ALL.
6429 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
6431         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
6432         arguments as addressable when async clause exists.
6434 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
6436         PR c++/71349
6437         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
6438         when combined with target construct.
6440 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
6442         * c-parser.c (c_parser_omp_clause_schedule): Warn if
6443         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
6445 2016-05-25  Marek Polacek  <polacek@redhat.com>
6447         PR c/71265
6448         * c-decl.c (c_make_fname_decl): Don't check seen_error.
6450         PR c/71266
6451         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
6453 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
6455         * c-parser.c (c_parser_oacc_declare): Add support for
6456         GOMP_MAP_FIRSTPRIVATE_POINTER.
6457         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
6458         argument with enum c_omp_region_type ort.
6459         (handle_omp_array_sections): Likewise.  Update call to
6460         handle_omp_array_sections_1.
6461         (c_finish_omp_clauses): Add specific errors and warning messages for
6462         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
6463         call to handle_omp_array_sections.
6465 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
6467         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
6469 2016-05-24  Richard Biener  <rguenther@suse.de>
6471         PR middle-end/70434
6472         PR c/69504
6473         * c-typeck.c (build_array_ref): Do not complain about indexing
6474         non-lvalue vectors.  Adjust for function name change.
6476 2016-05-20  Martin Sebor  <msebor@redhat.com>
6478         PR c/71115
6479         * c-typeck.c (error_init): Use
6480         expansion_point_location_if_in_system_header.
6481         (warning_init): Same.
6483 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
6485         PR c/71171
6486         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
6487         in error-handling.
6488         (c_parser_postfix_expression): Likewise.
6489         * c-tree.h (c_expr::set_error): New method.
6490         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
6491         that result's range is initialized.
6493 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
6495         * c-typeck.c (parser_build_unary_op): Fix formatting.
6497 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
6499         * c-decl.c (grokdeclarator): Remove errmsg and use of
6500         targetm.invalid_return_type.
6501         (grokparms): Remove errmsg and use of
6502         targetm.invalid_parameter_type.
6504 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
6506         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
6507         function return type.
6509 2016-05-12  Marek Polacek  <polacek@redhat.com>
6511         PR c/70756
6512         * c-decl.c (build_compound_literal): Pass LOC down to
6513         c_incomplete_type_error.
6514         * c-tree.h (require_complete_type): Adjust declaration.
6515         (c_incomplete_type_error): Likewise.
6516         * c-typeck.c (require_complete_type): Add location parameter, pass it
6517         down to c_incomplete_type_error.
6518         (c_incomplete_type_error): Add location parameter, pass it down to
6519         error_at.
6520         (build_component_ref): Pass location down to c_incomplete_type_error.
6521         (default_conversion): Pass location down to require_complete_type.
6522         (build_array_ref): Likewise.
6523         (build_function_call_vec): Likewise.
6524         (convert_arguments): Likewise.
6525         (build_unary_op): Likewise.
6526         (build_c_cast): Likewise.
6527         (build_modify_expr): Likewise.
6528         (convert_for_assignment): Likewise.
6529         (c_finish_omp_clauses): Likewise.
6531 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
6533         PR c/43651
6534         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
6535         is enabled.
6536         * c-errors.c (pedwarn_c90): Return true if warned.
6537         * c-tree.h (pedwarn_c90): Change return type to bool.
6538         (enum c_declspec_word): Add new enumerator cdw_atomic.
6540 2016-05-11  Marek Polacek  <polacek@redhat.com>
6542         PR c++/71024
6543         * c-decl.c (diagnose_mismatched_decls): Factor out code to
6544         diagnose_mismatched_attributes and call it.
6546 2016-05-10  Marek Polacek  <polacek@redhat.com>
6548         PR c/70255
6549         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
6550         on a declaration following the definition.
6552 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
6554         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
6555         parse it through to c_parser_c99_block_statement.
6556         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
6557         caller.
6559 2016-05-04  Marek Polacek  <polacek@redhat.com>
6561         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
6562         OPT_Wdangling_else.
6564 2016-05-04  Marek Polacek  <polacek@redhat.com>
6566         PR c/48778
6567         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
6568         for macro expansions.
6570 2016-05-03  Marek Polacek  <polacek@redhat.com>
6572         PR c/70859
6573         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
6574         check_builtin_function_arguments.
6576 2016-05-03  Richard Biener  <rguenther@suse.de>
6578         * Make-lang.in (cc1-checksum.c): For stage-final re-use
6579         the checksum from the previous stage.
6581 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
6583         * c-parser.c (c_parser_oacc_all_clauses): Update call to
6584         c_finish_omp_clauses.
6585         (c_parser_omp_all_clauses): Likewise.
6586         (c_parser_oacc_cache): Likewise.
6587         (c_parser_oacc_loop): Likewise.
6588         (omp_split_clauses): Likewise.
6589         (c_parser_omp_declare_target): Likewise.
6590         (c_parser_cilk_all_clauses): Likewise.
6591         (c_parser_cilk_for): Likewise.
6592         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
6593         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
6595 2016-05-02  Marek Polacek  <polacek@redhat.com>
6597         PR c/70851
6598         * c-decl.c (grokdeclarator): Diagnose when array's size has an
6599         incomplete type.
6601 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
6603         PR middle-end/70626
6604         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
6605         OACC_LOOP_CLAUSE_MASK.
6606         (c_parser_oacc_kernels_parallel): Update call to
6607         c_oacc_split_loop_clauses.
6609 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
6611         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
6612         argument to build_modify_expr in two cases.
6614 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
6616         * c-parser.c (c_parser_postfix_expression_after_primary): Call
6617         warn_for_memset instead of warning directly here.
6619 2016-04-26  Marek Polacek  <polacek@redhat.com>
6621         PR c/67784
6622         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
6623         out of ...
6624         (c_parser_for_statement): ... here.
6625         (c_parser_if_statement): Use it.
6626         (c_parser_switch_statement): Use it.
6627         (c_parser_while_statement): Use it.
6629         PR c/70791
6630         * c-decl.c (pushdecl): Pass LOCUS down to warning.
6632 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
6634         PR c++/69363
6635         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
6636         instead of c_finish_cilk_clauses.
6637         * c-tree.h (c_finish_omp_clauses): Add new default argument.
6638         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
6639         floating-point variables in the linear clause for Cilk Plus.
6641 2016-04-18  Michael Matz  <matz@suse.de>
6643         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
6644         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
6646 2016-04-15  Marek Polacek  <polacek@redhat.com>
6648         PR c/70671
6649         * c-typeck.c (build_unary_op): Pass location down to error and
6650         warning call.
6652 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
6654         PR c/70436
6655         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
6656         where needed.
6657         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
6658         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
6659         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
6660         Adjust c_parser_pragma callers.
6661         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
6662         caller.
6663         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
6664         c_parser_statement.
6665         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
6666         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
6667         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
6668         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
6669         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
6670         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
6671         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
6672         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
6673         down where needed.
6674         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
6675         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
6676         calls.
6678 2016-04-13  Marek Polacek  <polacek@redhat.com>
6680         PR c/70436
6681         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
6682         adjust callers.
6683         (c_parser_statement): Likewise.
6684         (c_parser_c99_block_statement): Likewise.
6685         (c_parser_while_statement): Likewise.
6686         (c_parser_for_statement): Likewise.
6687         (c_parser_if_body): Don't set IF_P here.
6688         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
6689         about dangling else here.
6690         * c-tree.h (c_finish_if_stmt): Adjust declaration.
6691         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
6692         warn about dangling else here.
6694 2016-04-04  Marek Polacek  <polacek@redhat.com>
6696         PR c/70307
6697         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
6699 2016-03-31  Marek Polacek  <polacek@redhat.com>
6701         PR c/70297
6702         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
6704 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
6706         PR c/70281
6707         * c-parser.c (c_parser_postfix_expression): Set the source range
6708         for uses of "__builtin_types_compatible_p".
6710 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
6712         PR c/70280
6713         * c-typeck.c (composite_type): Don't count void_list_node
6714         into len, if the list is terminated by void_list_node, start
6715         with void_list_node instead of NULL for newargs.  Stop
6716         at void_list_node.
6718 2016-03-16  Marek Polacek  <polacek@redhat.com>
6720         PR c/70093
6721         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
6722         nested functions returning VM types.
6724 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
6726         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6727         when calling c_finish_omp_clauses.
6729 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
6731         PR c/69824
6732         * c-decl.c (get_parm_info): Don't queue implicit function declarations
6733         for later.
6735 2016-03-04  Marek Polacek  <polacek@redhat.com>
6737         PR c/69798
6738         * c-parser.c (c_parser_postfix_expression): Call
6739         c_parser_cast_expression rather than c_parser_postfix_expression.
6741 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
6743         PR c/69796
6744         PR c/69974
6745         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6746         of incomplete decls to error_mark_node.
6748 2016-02-24  Marek Polacek  <polacek@redhat.com>
6750         PR c/69819
6751         * c-decl.c (finish_decl): Don't update the copy of the type of a
6752         different decl type.
6754 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
6756         PR objc/69844
6757         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6758         in id_kind reclassification.
6760 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
6762         PR c/69835
6763         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6765 2016-02-16  James Norris  <jnorris@codesourcery.com>
6767         PR c/64748
6768         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6770 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
6772         * c-decl.c (build_null_declspecs): Zero the entire struct.
6774         PR c/69522
6775         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
6776         callers changed.  If nested_p is true, use it to call
6777         finish_implicit_inits.
6778         * c-tree.h (finish_implicit_inits): Declare.
6779         * c-typeck.c (finish_implicit_inits): New function.  Move code
6780         from ...
6781         (push_init_level): ... here.
6782         (set_designator, process_init_element): Call finish_implicit_inits.
6784 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
6786         PR c/69768
6787         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6788         arguments for -Waddress warning.
6790 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
6792         PR c/69669
6793         * c-decl.c (finish_enum): When honoring mode attribute,
6794         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6796 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
6798         PR debug/69518
6799         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6800         all type variants, not just TYPE_MAIN_VARIANT.
6802 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
6804         PR debug/66869
6805         * c-decl.c (c_write_global_declarations_1): Warn with
6806         warn_unused_function if static prototype without definition
6807         is not C_DECL_USED.
6809 2016-01-27  Marek Polacek  <polacek@redhat.com>
6811         PR c/68062
6812         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6813         to unsigned, if needed.  Add -Wsign-compare warning.
6815 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
6817         PR tree-optimization/69483
6818         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6820 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6822         PR c/24293
6823         * c-tree.h (incomplete_record_decls): Declare.
6824         * c-parser.c (incomplete_record_decls): Define.
6825         (c_parser_translation_unit): Iterate through incomplete_record_decls and
6826         report error if any decl has zero size.
6827         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6828         or enum type to incomplete_record_decls.
6830 2016-01-14  Tom de Vries  <tom@codesourcery.com>
6832         PR tree-optimization/68773
6833         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6834         set force_output.
6836 2016-01-14  Marek Polacek  <polacek@redhat.com>
6838         PR c/69262
6839         * c-decl.c (grokdeclarator): Provide more information for invalid
6840         array declarations.
6842 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
6844         * c-parser.c (c_parser_unary_expression): For dereferences, build
6845         a combined location before calling build_indirect_ref, so that
6846         error reports cover the full range, manually updating the c_expr
6847         src_range.
6849 2016-01-06  Marek Polacek  <polacek@redhat.com>
6851         PR sanitizer/69099
6852         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
6853         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
6854         NULL.
6856 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
6858         Update copyright years.
6860 2016-01-04  Marek Polacek  <polacek@redhat.com>
6862         PR c/68908
6863         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
6864         optimization to use __atomic_fetch_* built-in if possible.
6866 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
6868         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6869         into...
6870         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
6871         all users.
6873 2015-12-22  Marek Polacek  <polacek@redhat.com>
6875         PR c/69002
6876         * c-typeck.c (build_component_ref): Warn when acessing elements of
6877         atomic structures or unions.
6879 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
6881         * c-typeck.c: Include "gcc-rich-location.h".
6882         (build_binary_op): In the two places that call binary_op_error,
6883         create a gcc_rich_location and populate it with the location of
6884         the binary op and its two operands.
6886 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
6888         * c-parser.c (c_parser_statement_after_labels): When calling
6889         c_finish_return, Use the return expression's location if it has
6890         one, falling back to the location of the first token within it.
6891         * c-typeck.c (c_finish_return): When issuing warnings about
6892         the incorrect presence/absence of a return value, issue a note
6893         showing the declaration of the function.
6895 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
6897         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6898         to 4.
6899         (c_parser_peek_nth_token): New function.
6900         (c_parser_peek_conflict_marker): New function.
6901         (c_parser_error): Detect conflict markers and report them as such.
6903 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
6905         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6906         to preserve range information for the primary expression
6907         in the call to c_parser_postfix_expression_after_primary.
6909 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
6911         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6912         expression location, falling back on the first token location,
6913         rather than always using the latter.
6915 2015-12-16  Marek Polacek  <polacek@redhat.com>
6917         PR c/64637
6918         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6919         available.
6921 2015-12-15  Marek Polacek  <polacek@redhat.com>
6923         PR c/68907
6924         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6925         artificial decl.
6927 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
6929         * c-parser.c (c_parser_alignof_expression): Capture location of
6930         closing parenthesis (if any), or of end of unary expression, and
6931         use it to build a src_range for the expression.
6933 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
6935         PR c/68757
6936         * c-parser.c (c_parser_get_builtin_args): Add
6937         "out_close_paren_loc" param, and write back to it.
6938         (c_parser_postfix_expression): Capture the closing
6939         parenthesis location for RID_CHOOSE_EXPR,
6940         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
6941         RID_BUILTIN_SHUFFLE and use it to set the source range
6942         for such expressions; within RID_BUILTIN_COMPLEX set
6943         the underlying location.
6945 2015-12-07  Marek Polacek  <polacek@redhat.com>
6947         PR c/68668
6948         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
6949         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
6951 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
6953         * c-tree.h (c_build_va_arg): Adjust prototype.
6954         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
6955         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6956         parameter, adjust throughout and issue an error if EXPR is a component
6957         with reverse storage order.
6959 2015-12-02  Jason Merrill  <jason@redhat.com>
6961         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6962         (c_fully_fold_internal, decl_constant_value_for_optimization):
6963         Move from c-common.c.
6964         * c-tree.h: Declare decl_constant_value_for_optimization.
6965         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6967 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
6969         PR c/68162
6970         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6971         following link from declarator to next declarator.  Track original
6972         qualified type and pass it to c_build_qualified_type.
6973         * c-typeck.c (c_build_qualified_type): Add arguments
6974         orig_qual_type and orig_qual_indirect.
6976 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
6978         * c-parser.c (c_parser_omp_clause_name)
6979         (c_parser_oacc_all_clauses): Alphabetical sorting.
6981 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
6983         PR c/68533
6984         * c-decl.c (get_parm_info): Use b->locus instead of input_location
6985         for diagnostics.
6987 2015-12-01  Julian Brown  <julian@codesourcery.com>
6988             Cesar Philippidis  <cesar@codesourcery.com>
6989             James Norris  <James_Norris@mentor.com>
6991         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6992         (c_parser_oacc_clause_use_device): New function.
6993         (c_parser_oacc_all_clauses): Add use_device support.
6994         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6995         (c_parser_oacc_host_data): New function.
6996         (c_parser_omp_construct): Add host_data support.
6997         * c-tree.h (c_finish_oacc_host_data): Add prototype.
6998         * c-typeck.c (c_finish_oacc_host_data): New function.
6999         (c_finish_omp_clauses): Add use_device support.
7001 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
7003         PR c/67106
7004         * c-decl.c: Set TYPE_PACKED in variants.
7006 2015-11-27  Martin Liska  <mliska@suse.cz>
7008         PR c++/68312
7009         * c-array-notation.c (fix_builtin_array_notation_fn):
7010         Use release_vec_vec instead of vec::release.
7011         (build_array_notation_expr): Likewise.
7012         (fix_conditional_array_notations_1): Likewise.
7013         (fix_array_notation_expr): Likewise.
7014         (fix_array_notation_call_expr): Likewise.
7016 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
7018         PR c/63326
7019         * c-parser.c (c_parser_compound_statement_nostart): If
7020         last_label is true, use pragma_stmt instead of pragma_compound
7021         as second c_parser_pragma argument.
7022         (c_parser_omp_ordered, c_parser_omp_target_update,
7023         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
7024         false as second argument to c_parser_skip_to_pragma_eol after
7025         diagnosing standalone directives used in pragma_stmt context.
7027 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
7029         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
7030         with "if (ENABLE_OFFLOADING)".
7032 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
7034         PR objc/68438
7035         * c-parser.c (c_parser_postfix_expression): Set up source ranges
7036         for various Objective-C constructs: Class.name syntax,
7037         @selector(), @protocol(), @encode(), and [] message syntax.
7039 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
7041         PR 62314
7042         * c-typeck.c (should_suggest_deref_p): New function.
7043         (build_component_ref): Special-case POINTER_TYPE when
7044         generating a "not a structure of union"  error message, and
7045         suggest a "->" rather than a ".", providing a fix-it hint.
7047 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
7049         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
7050         candidate into a new function, find_closest_identifier.
7052 2015-11-19  Marek Polacek  <polacek@redhat.com>
7054         PR c/68412
7055         * c-typeck.c (parser_build_binary_op): Properly handle
7056         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
7058 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
7060         * c-parser.c (set_c_expr_source_range): Bulletproof both
7061         overloaded implementations against NULL expr->value.
7062         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
7063         values.
7064         (c_parser_unary_expression): Likewise when handling addresses of
7065         labels.
7066         (c_parser_postfix_expression): Likewise for statement expressions,
7067         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
7068         __builtin_va_arg, and for __builtin_offset_of.
7069         (c_parser_postfix_expression_after_paren_type): Initialize expr's
7070         src_range using the range of the braced initializer.
7071         (c_parser_transaction_expression): Set src_range for "ret" to a
7072         sane pair of values.
7074 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
7076         * c-parser.c (c_finish_omp_declare_simd): Look for
7077         "simd" attribute as well. Update error message.
7079 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
7081         * c-parser.c (c_parser_omp_declare_target): Adjust.
7083 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
7085         * c-typeck.c (c_finish_omp_clauses): Don't mark
7086         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
7088 2015-11-14  Marek Polacek  <polacek@redhat.com>
7090         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
7091         * c-typeck.c: Likewise.
7093 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
7095         * c-decl.c (warn_defaults_to): Pass line_table to
7096         rich_location ctor.
7097         * c-errors.c (pedwarn_c99): Likewise.
7098         (pedwarn_c90): Likewise.
7099         * c-parser.c (set_c_expr_source_range): New functions.
7100         (c_token::get_range): New method.
7101         (c_token::get_finish): New method.
7102         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
7103         based on the range from the start of the LHS to the end of the
7104         RHS.
7105         (c_parser_conditional_expression): Likewise, based on the range
7106         from the start of the cond.value to the end of exp2.value.
7107         (c_parser_binary_expression): Call set_c_expr_source_range on
7108         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
7109         (c_parser_cast_expression): Call set_c_expr_source_range on ret
7110         based on the cast_loc through to the end of the expr.
7111         (c_parser_unary_expression): Likewise, based on the
7112         op_loc through to the end of op.
7113         (c_parser_sizeof_expression) Likewise, based on the start of the
7114         sizeof token through to either the closing paren or the end of
7115         expr.
7116         (c_parser_postfix_expression): Likewise, using the token range,
7117         or from the open paren through to the close paren for
7118         parenthesized expressions.
7119         (c_parser_postfix_expression_after_primary): Likewise, for
7120         various kinds of expression.
7121         * c-tree.h (struct c_expr): Add field "src_range".
7122         (c_expr::get_start): New method.
7123         (c_expr::get_finish): New method.
7124         (set_c_expr_source_range): New decls.
7125         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
7126         on ret for prefix unary ops.
7127         (parser_build_binary_op): Likewise, running from the start of
7128         arg1.value through to the end of arg2.value.
7130 2015-11-13  Marek Polacek  <polacek@redhat.com>
7132         PR c/68320
7133         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
7135 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
7137         * c-typeck.c: Include spellcheck.h.
7138         (lookup_field_fuzzy_find_candidates): New function.
7139         (lookup_field_fuzzy): New function.
7140         (build_component_ref): If the field was not found, try using
7141         lookup_field_fuzzy and potentially offer a suggestion.
7143 2015-11-12  James Norris  <jnorris@codesourcery.com>
7144             Joseph Myers  <joseph@codesourcery.com>
7146         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
7147         (c_parser_omp_clause_name): Handle 'device_resident' clause.
7148         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7149         and PRAGMA_OMP_CLAUSE_LINK.
7150         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7151         and PRAGMA_OACC_CLAUSE_LINK.
7152         (OACC_DECLARE_CLAUSE_MASK): New definition.
7153         (c_parser_oacc_declare): New function.
7155 2015-11-12  Marek Polacek  <polacek@redhat.com>
7157         PR c/67784
7158         * c-parser.c (c_parser_for_statement): Reclassify the token in
7159         a correct scope.
7161 2015-11-11  Marek Polacek  <polacek@redhat.com>
7163         PR c/68107
7164         PR c++/68266
7165         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
7166         checking the size of an array.
7168 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
7170         * c-array-notation.c: Remove unused header files.
7171         * c-aux-info.c: Likewise.
7172         * c-convert.c: Likewise.
7173         * c-decl.c: Likewise.
7174         * c-errors.c: Likewise.
7175         * c-lang.c: Likewise.
7176         * c-objc-common.c: Likewise.
7177         * c-parser.c: Likewise.
7178         * c-typeck.c: Likewise.
7179         * gccspec.c: Likewise.
7181 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
7182             Cesar Philippidis  <cesar@codesourcery.com>
7183             James Norris  <jnorris@codesourcery.com>
7184             Julian Brown  <julian@codesourcery.com>
7185             Nathan Sidwell  <nathan@codesourcery.com>
7187         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
7188         routine arg.
7189         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
7190         (c_parser_pragma): Parse 'acc routine'.
7191         (OACC_ROUTINE_CLAUSE_MARK): Define.
7192         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
7194 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7196         PR debug/67192
7197         * c-typeck.c (c_finish_loop): For unconditional loops, set the
7198         location of the backward-goto to the start of the loop body.
7200 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7202         PR debug/67192
7203         * c-parser.c (c_parser_while_statement): Finish the loop before
7204         parsing ahead for misleading indentation.
7205         (c_parser_for_statement): Likewise.
7207 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
7209         * c-decl.c (finish_struct): If the structure has reverse storage
7210         order, rewrite the type of array fields with scalar component.  Call
7211         maybe_apply_pragma_scalar_storage_order on entry.
7212         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
7213         errors on bit-fields and reverse SSO here and not...
7214         (c_mark_addressable): ...here.
7215         (output_init_element): Adjust call to initializer_constant_valid_p.
7216         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
7218 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
7220         * c-decl.c (warn_defaults_to): Update for change in signature
7221         of diagnostic_set_info.
7222         * c-errors.c (pedwarn_c99): Likewise.
7223         (pedwarn_c90): Likewise.
7224         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
7225         for textinfo::set_location.
7227 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
7228             Thomas Schwinge  <thomas@codesourcery.com>
7229             James Norris  <jnorris@codesourcery.com>
7231         * c-parser.c (c_parser_omp_clause_name): Add support for
7232         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
7233         (c_parser_omp_clause_default): Add is_oacc argument. Handle
7234         default(none) in OpenACC.
7235         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
7236         arguments.
7237         (c_parser_oacc_clause_tile): New function.
7238         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
7239         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
7240         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
7241         TILE}.
7242         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
7243         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
7244         FIRSTPRIVATE}.
7245         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
7246         (c_parser_oacc_update): Update the error message for missing clauses.
7247         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
7248         and OMP_CLAUSE_INDEPENDENT.
7250 2015-11-05  Marek Polacek  <polacek@redhat.com>
7252         PR c/68090
7253         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
7254         deal with pre-evaluation on invalid types.
7256 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
7257             Ilya Verbin  <ilya.verbin@intel.com>
7259         * c-parser.c: Include context.h and gimple-expr.h.
7260         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
7261         monotonic together with nonmonotonic.
7262         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
7263         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
7264         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
7265         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
7266         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
7267         expressions on combined target teams before the target.
7268         (c_parser_omp_declare_target): If decl has "omp declare target" or
7269         "omp declare target link" attribute, and cgraph or varpool node already
7270         exists, then set corresponding flags.  Call c_finish_omp_clauses
7271         in the parenthesized extended-list syntax case.
7272         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
7273         declare target.
7274         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
7275         on OMP_CLAUSE_REDUCTION array sections.
7276         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
7277         into the constant offset, or for variable low-bound using
7278         POINTER_PLUS_EXPR.  For structure element based array sections use
7279         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
7280         (c_finish_omp_clauses): Drop generic_field_head, structure
7281         elements are now always mapped even as array section bases,
7282         diagnose same var in data sharing and mapping clauses.  Diagnose if
7283         linear step on declare simd is neither a constant nor a uniform
7284         parameter.  Look through POINTER_PLUS_EXPR for array section
7285         reductions.  Diagnose the same var or function appearing multiple
7286         times on the same directive.  Fix up wording for the to clause if t
7287         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
7288         modifier on kinds other than dynamic or guided or nonmonotonic
7289         modifier together with ordered clause.
7291 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
7292             Chung-Lin Tang  <cltang@codesourcery.com>
7294         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
7296 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
7298         * c-array-notation.c: Reorder #include's and remove duplicates.
7299         * c-aux-info.c: Likewise.
7300         * c-convert.c: Likewise.
7301         * c-decl.c: Likewise.
7302         * c-errors.c: Likewise.
7303         * c-lang.c: Likewise.
7304         * c-objc-common.c: Likewise.
7305         * c-parser.c: Likewise.
7306         * c-typeck.c: Likewise.
7308 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
7310         PR debug/66068
7311         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
7312         after calling build_qualified_type.
7314 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
7315             Thomas Schwinge  <thomas@codesourcery.com>
7316             James Norris  <jnorris@codesourcery.com>
7317             Joseph Myers  <joseph@codesourcery.com>
7318             Julian Brown  <julian@codesourcery.com>
7319             Bernd Schmidt  <bschmidt@redhat.com>
7321         * c-parser.c (c_parser_oacc_shape_clause): New.
7322         (c_parser_oacc_simple_clause): New.
7323         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
7324         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
7326 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
7327             James Norris  <jnorris@codesourcery.com>
7328             Cesar Philippidis  <cesar@codesourcery.com>
7330         PR c/64765
7331         PR c/64880
7332         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
7333         parameters, and handle these.  Adjust all users.
7334         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
7335         into...
7336         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
7337         all users.
7338         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
7339         declare functions.
7340         (c_finish_omp_construct): Declare function.
7341         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
7342         Merge functions into...
7343         (c_finish_omp_construct): ... this new function.
7345 2015-10-22  Richard Biener  <rguenther@suse.de>
7347         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
7348         before folding a MINUS_EXPR.
7350 2015-10-21  Marek Polacek  <polacek@redhat.com>
7352         PR c/68024
7353         * c-decl.c (start_function): Warn about vararg functions without
7354         a prototype.
7356 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
7358         * c-typeck.c (build_conditional_expr): Use boolean vector
7359         type for vector comparison.
7360         (build_vec_cmp): New.
7361         (build_binary_op): Use build_vec_cmp for comparison.
7363 2015-10-20  Marek Polacek  <polacek@redhat.com>
7365         * c-parser.c (is_cilkplus_vector_p): Don't define here.
7367 2015-10-20  Marek Polacek  <polacek@redhat.com>
7369         PR c/67964
7370         * c-parser.c (c_parser_attributes): Break out of the loop if the
7371         token after an attribute isn't a comma.
7373 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
7374             Aldy Hernandez  <aldyh@redhat.com>
7376         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
7377         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
7378         (c_parser_omp_variable_list): Handle structure elements for
7379         map, to and from clauses.  Handle array sections in reduction
7380         clause.  Formatting fixes.
7381         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
7382         if clause modifiers.
7383         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
7384         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
7385         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
7386         c_parser_omp_clause_is_device_ptr): New functions.
7387         (c_parser_omp_clause_ordered): Parse optional parameter.
7388         (c_parser_omp_clause_reduction): Handle array reductions.
7389         (c_parser_omp_clause_schedule): Parse optional simd modifier.
7390         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
7391         functions.
7392         (c_parser_omp_clause_linear): Parse linear clause modifiers.
7393         (c_parser_omp_clause_depend_sink): New function.
7394         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
7395         (c_parser_omp_clause_map): Parse release/delete map kinds and
7396         optional always modifier.
7397         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
7398         and c_finish_omp_clauses callers.
7399         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
7400         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
7401         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
7402         (OMP_CRITICAL_CLAUSE_MASK): Define.
7403         (c_parser_omp_critical): Parse critical clauses.
7404         (c_parser_omp_for_loop): Handle doacross loops, adjust
7405         c_finish_omp_for and c_finish_omp_clauses callers.
7406         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
7407         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
7408         (OMP_FOR_CLAUSE_MASK): Add linear clause.
7409         (c_parser_omp_for): Disallow ordered clause when combined with
7410         distribute.  Disallow linear clause when combined with distribute
7411         and not combined with simd.
7412         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
7413         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
7414         parse clauses and if depend clause is found, don't parse a body.
7415         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
7416         Allow target parallel without for after it.
7417         (OMP_TASK_CLAUSE_MASK): Add priority clause.
7418         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
7419         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
7420         invalid kinds.
7421         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
7422         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
7423         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
7424         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
7425         functions.
7426         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
7427         defaultmap and is_device_ptr clauses.
7428         (c_parser_omp_target): Parse target parallel and target simd.  Set
7429         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
7430         and target exit data.  Diagnose invalid map kinds.
7431         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
7432         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
7433         construct.
7434         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
7435         &omp_priv.
7436         (OMP_TASKLOOP_CLAUSE_MASK): Define.
7437         (c_parser_omp_taskloop): New function.
7438         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
7439         handle PRAGMA_OMP_TASKLOOP.
7440         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
7441         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
7442         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
7443         Add IS_OMP argument, handle structure element bases, diagnose
7444         bitfields, pass IS_OMP recursively, diagnose known zero length
7445         array sections in depend clauses, handle array sections in reduction
7446         clause, diagnose negative length even for pointers.
7447         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
7448         types, pass IS_OMP down to handle_omp_array_sections_1, handle
7449         array sections in reduction clause, set
7450         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
7451         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
7452         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
7453         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
7455 2015-10-06  Marek Polacek  <polacek@redhat.com>
7457         * c-parser.c (c_parser_statement_after_labels): Use
7458         protected_set_expr_location.
7459         (c_parser_omp_clause_num_gangs): Likewise.
7460         (c_parser_omp_clause_num_threads): Likewise.
7461         (c_parser_omp_clause_num_workers): Likewise.
7462         (c_parser_omp_clause_vector_length): Likewise.
7463         (c_parser_omp_clause_num_teams): Likewise.
7464         (c_parser_omp_clause_thread_limit): Likewise.
7465         * c-typeck.c (build_c_cast): Likewise.
7466         (c_cast_expr): Likewise.
7468 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
7470         * c-typeck.c (c_tree_equal): Use real_equal instead of
7471         REAL_VALUES_EQUAL.
7473 2015-10-04  Jason Merrill  <jason@redhat.com>
7475         * c-parser.c (c_lex_one_token): Handle @synchronized.
7476         * c-decl.c (match_builtin_function_types): A declaration of a built-in
7477         can change whether the function is transaction_safe.
7479 2015-10-02  Marek Polacek  <polacek@redhat.com>
7481         PR c/67730
7482         * c-typeck.c (convert_for_assignment): Use the expansion point
7483         location throughout.
7485 2015-10-02  Marek Polacek  <polacek@redhat.com>
7487         PR c/64249
7488         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
7489         and pass it down to c_parser_if_statement.
7490         (c_parser_else_body): Add CHAIN parameter and pass it down to
7491         c_parser_statement_after_labels.
7492         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
7493         duplicated if-else-if conditions.
7495 2015-10-01  Marek Polacek  <polacek@redhat.com>
7497         * c-typeck.c (convert_for_assignment): Improve commentary.
7499 2015-09-30  Marek Polacek  <polacek@redhat.com>
7501         PR c/67730
7502         * c-typeck.c (c_finish_return): Use the expansion point location for
7503         certain "return with value" warnings.
7505 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7507         * c-parser.c (pragma_lex): Add loc argument.
7509 2015-09-15  Marek Polacek  <polacek@redhat.com>
7511         PR c/67580
7512         * c-decl.c (tag_exists_p): New function.
7513         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
7514         struct/union/enum keywords are missing.
7515         * c-tree.h (tag_exists_p): Declare.
7517 2015-09-15  Marek Polacek  <polacek@redhat.com>
7519         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
7520         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
7521         Return NULL_TREE instead of 0.
7522         (lookup_name): Return NULL_TREE instead of 0.
7523         (lookup_name_in_scope): Likewise.
7524         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
7525         (parser_xref_tag): Use false instead of 0.
7526         (start_struct): Use true instead of 1.
7527         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
7529 2015-09-14  Marek Polacek  <polacek@redhat.com>
7531         * c-typeck.c (set_nonincremental_init_from_string): Use
7532         HOST_WIDE_INT_M1U when shifting a negative value.
7534 2015-09-09  Mark Wielaard  <mjw@redhat.com>
7536         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
7537         parm against NULL.
7539 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
7541         PR c/67502
7542         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
7543         into OMP_FOR_PRE_BODY rather than before the loop.
7545 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
7547         PR c/67501
7548         * c-parser.c (c_parser_oacc_all_clauses,
7549         c_parser_omp_all_clauses): Remove invalid clause from
7550         list of clauses even if parser->error is set.
7552         PR c/67500
7553         * c-parser.c (c_parser_omp_clause_aligned,
7554         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
7555         test for errors.
7556         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
7557         error_mark_node.
7559         PR c/67495
7560         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
7561         instead of c_parser_unary_expression.  If the result is !lvalue_p,
7562         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
7564 2015-09-04  Marek Polacek  <polacek@redhat.com>
7566         PR sanitizer/67279
7567         * c-typeck.c (build_binary_op): Don't instrument static initializers.
7569 2015-09-03  Martin Sebor  <msebor@redhat.com>
7571         PR c/66516
7572         * c-typeck.c (convert_arguments, parser_build_unary_op,
7573         build_conditional_expr, c_cast_expr, convert_for_assignment,
7574         build_binary_op, _objc_common_truthvalue_conversion): Call
7575         reject_gcc_builtin.
7576         (c_decl_implicit): Define.
7578 2015-09-02  Marek Polacek  <polacek@redhat.com>
7580         PR c/67432
7581         * c-parser.c (c_parser_enum_specifier): Give a better error for
7582         an empty enum.
7584 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
7586         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
7588 2015-08-12  Marek Polacek  <polacek@redhat.com>
7590         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
7591         LOC to it.
7593 2015-08-03  Marek Polacek  <polacek@redhat.com>
7595         PR c/67088
7596         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
7597         Use it.
7598         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
7600 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
7602         * c-parser.c (c_parser_if_body): Take token_indent_info
7603         argument. Call warn_for_misleading_indentation even when the
7604         body is a semicolon.  Extract token_indent_infos corresponding
7605         to the guard, body and next tokens.  Adjust call to
7606         warn_for_misleading_indentation accordingly.
7607         (c_parser_else_body): Likewise.
7608         (c_parser_if_statement): Likewise.
7609         (c_parser_while_statement): Likewise.
7610         (c_parser_for_statement): Likewise.
7612 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
7613             Manuel López-Ibáñez  <manu@gcc.gnu.org>
7615         * c-decl.c (get_parm_info): Remove static var. Update warning
7616         message.
7618 2015-07-27  Marek Polacek  <polacek@redhat.com>
7620         PR c++/66555
7621         PR c/54979
7622         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
7624 2015-07-20  Marek Polacek  <polacek@redhat.com>
7626         PR c++/55095
7627         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
7628         (build_binary_op): Warn about left shift overflows.
7630 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
7632         * c-array-notation.c: Adjust includes for flags.h changes.
7633         * c-objc-common.c: Likewise.
7635 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
7637         * c-array-notation.c: Adjust includes.
7638         * c-aux-info.c: Likewise.
7639         * c-convert.c: Likewise.
7640         * c-decl.c: Likewise.
7641         * c-errors.c: Likewise.
7642         * c-lang.c: Likewise.
7643         * c-objc-common.c: Likewise.
7644         * c-parser.c: Likewise.
7645         * c-typeck.c: Likewise.
7647 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7649         PR fortran/66605
7650         * c-decl.c (finish_function): Call do_warn_unused_parameter.
7652 2015-06-29  Marek Polacek  <polacek@redhat.com>
7654         PR c/66322
7655         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
7656         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
7657         about -Wswitch-bool here.
7658         (do_case): Update c_add_case_label call.
7659         (c_finish_case): Update c_do_switch_warnings call.
7661 2015-06-27  Marek Polacek  <polacek@redhat.com>
7663         * c-typeck.c: Use VECTOR_TYPE_P throughout.
7665 2015-06-26  Marek Polacek  <polacek@redhat.com>
7667         * c-array-notation.c (fix_builtin_array_notation_fn): Use
7668         INDIRECT_REF_P.
7669         * c-typeck.c (array_to_pointer_conversion): Likewise.
7670         (build_unary_op): Likewise.
7671         (c_finish_return): Likewise.
7673 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
7675         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
7676         * c-parser.c: Likewise.
7678 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
7680         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
7681         instead of pointer_hash.
7682         (detect_field_duplicates): Likewise.
7684 2015-06-25  Marek Polacek  <polacek@redhat.com>
7686         * c-array-notation.c: Use VAR_P throughout.
7687         * c-decl.c: Likewise.
7688         * c-objc-common.c: Likewise.
7689         * c-parser.c: Likewise.
7690         * c-typeck.c: Likewise.
7692 2015-06-25  Marek Polacek  <polacek@redhat.com>
7694         * c-decl.c: Use is_global_var throughout.
7695         * c-parser.c: Likewise.
7696         * c-typeck.c: Likewise.
7698 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
7700         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
7701         * c-aux-info.c: Likewise.
7702         * c-convert.c: Likewise.
7703         * c-decl.c: Likewise.
7704         * c-errors.c: Likewise.
7705         * c-lang.c: Likewise.
7706         * c-objc-common.c: Likewise.
7707         * c-parser.c: Likewise.
7708         * c-typeck.c: Likewise.
7710 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
7712         PR middle-end/66325
7713         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
7714         variants.
7716 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
7718         * c-decl.c (pop_scope): Register the main translation unit
7719         through the new debug hook.
7721 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
7723         * c-array-notation.c : Adjust include files.
7724         * c-aux-info.c : Likewise.
7725         * c-convert.c : Likewise.
7726         * c-decl.c : Likewise.
7727         * c-errors.c : Likewise.
7728         * c-lang.c : Likewise.
7729         * c-lang.h : Likewise.
7730         * c-objc-common.c : Likewise.
7731         * c-parser.c : Likewise.
7732         * c-typeck.c : Likewise.
7734 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
7736         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7737         immediately clobber it.
7738         (c_write_global_declarations_1): Remove call to
7739         check_global_declaration_1.
7740         (c_write_global_declarations_2): Remove.
7741         (c_write_final_cleanups): Rename from c_write_global_declarations.
7742         Remove call to finalize_compilation_unit.
7743         Remove calls to debugging hooks.
7744         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7745         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7746         * c-tree.h: Remove c_write_global_declarations.
7748 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
7750         * c-array-notation.c: Adjust includes for restructured coretypes.h.
7751         * c-aux-info.c: Likewise.
7752         * c-convert.c: Likewise.
7753         * c-decl.c: Likewise.
7754         * c-errors.c: Likewise.
7755         * c-lang.c: Likewise.
7756         * c-objc-common.c: Likewise.
7757         * c-parser.c: Likewise.
7758         * c-typeck.c: Likewise.
7760 2015-06-04  Marek Polacek  <polacek@redhat.com>
7762         PR c/66341
7763         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7764         it is a lvalue.
7766 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7768         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7769         Warn for empty struct.
7770         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7772 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
7774         * c-decl.c (start_function): Call plugin before parsing.
7775         (finish_function): Call plugin after parsing.
7777 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7779         PR c/49551
7780         * c-decl.c (merge_decls): Merge DECL_COMMON.
7782 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
7784         * Make-lang.in (check_gcc_pallelize): Define.
7786 2015-05-22  Marek Polacek  <polacek@redhat.com>
7788         PR c/47043
7789         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7790         attributes.
7792 2015-05-21  Marek Polacek  <polacek@redhat.com>
7794         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7795         DECL_BUILT_IN.
7797 2015-05-20  Marek Polacek  <polacek@redhat.com>
7799         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7800         * c-typeck.c: Likewise.
7802 2015-05-19  Marek Polacek  <polacek@redhat.com>
7804         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7806 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
7808         PR middle-end/66199
7809         * c-parser.c (c_parser_omp_for_loop): Don't add
7810         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7811         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7812         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7813         constructs.
7815 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
7817         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
7818         swaps.
7820 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7822         PR fortran/44054
7823         * c-objc-common.c (c_tree_printer): Replace locus pointer with
7824         accessor function.
7826 2015-05-14  Marek Polacek  <polacek@redhat.com>
7828         PR c/66066
7829         PR c/66127
7830         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7831         rather than with 0.
7833 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
7835         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7836         to add a call to warn_for_misleading_indentation.
7837         (c_parser_else_body): Likewise, adding param "else_loc".
7838         (c_parser_if_statement): Check for misleading indentation.
7839         (c_parser_while_statement): Likewise.
7840         (c_parser_for_statement): Likewise.
7842 2015-05-08  Marek Polacek  <polacek@redhat.com>
7844         PR c/64918
7845         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7846         (output_init_element): Likewise.
7848 2015-05-07  Marek Polacek  <polacek@redhat.com>
7850         PR c/65179
7851         * c-typeck.c (build_binary_op): Warn when left shifting a negative
7852         value.
7854 2015-04-30  Marek Polacek  <polacek@redhat.com>
7856         * c-typeck.c (set_init_label): Call error_at instead of error and
7857         pass LOC to it.
7859         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
7860         the type of a decl.
7862         * c-typeck.c (c_build_va_arg): Clarify the error message.
7864 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
7866         * c-parser.c (c_parser_oacc_enter_exit_data): Use
7867         OMP_STANDALONE_CLAUSES.
7869 2015-04-28  Marek Polacek  <polacek@redhat.com>
7871         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7873 2015-04-28  Marek Polacek  <polacek@redhat.com>
7875         PR c/65901
7876         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7878 2015-04-25  Marek Polacek  <polacek@redhat.com>
7880         PR c/52085
7881         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
7882         attribute.
7884 2015-04-23  Marek Polacek  <polacek@redhat.com>
7886         PR c/65345
7887         * c-decl.c (set_labels_context_r): New function.
7888         (store_parm_decls): Call it via walk_tree_without_duplicates.
7889         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7890         instead of create_tmp_var.  Build TARGET_EXPR instead of
7891         COMPOUND_EXPR.
7892         (build_atomic_assign): Use create_tmp_var_raw instead of
7893         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
7895 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
7897         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7898         (c_parser_omp_target_update): Add missed %> to error_at ().
7900 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
7902         PR target/55143
7903         * c-decl.c (c_default_pointer_mode): Remove definition.
7904         * c-tree.h (c_default_pointer_mode): Remove declaration.
7906 2015-03-27  Tobias Burnus  <burnus@net-b.de>
7908         PR c/65586
7909         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7910         error out.
7911         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7912         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7913         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7915 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
7917         * c-decl.c (c_decl_attributes): Also add "omp declare target"
7918         attribute for DECL_EXTERNAL VAR_DECLs.
7920 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
7922         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7923         argument.
7925 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
7927         PR c/65120
7928         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7929         before preparing arguments to warn_logical_not_parentheses.
7931 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
7933         PR c/65120
7934         * c-typeck.c (parser_build_binary_op): Don't warn for
7935         !!x == y or !b == y where b is _Bool.
7937 2015-03-09  Marek Polacek  <polacek@redhat.com>
7939         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
7940         * c-decl.c (grokdeclarator): Likewise.
7941         * c-typeck.c (build_binary_op): Likewise.
7943 2015-02-27  Marek Polacek  <polacek@redhat.com>
7945         PR c/65228
7946         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
7948 2015-02-14  Marek Polacek  <polacek@redhat.com>
7950         PR c/64768
7951         * c-decl.c (grokdeclarator): Set the range of a flexible array member
7952         declared through a typedef name.
7954 2015-02-13  Marek Polacek  <polacek@redhat.com>
7956         PR c/65050
7957         * c-decl.c (grokdeclarator): Print also the type when giving
7958         the error message about array's incomplete element type.
7960 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
7962         PR c/64824
7963         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7964         check in the POP macro.
7966 2015-02-09  Marek Polacek  <polacek@redhat.com>
7968         PR c/64856
7969         * c-typeck.c (process_init_element): Don't always wrap
7970         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7971         initializing a range of elements.
7973 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
7975         PR c/64824
7976         PR c/64868
7977         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7979 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
7981         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7982         processing enum declaration.
7984 2015-01-29  Marek Polacek  <polacek@redhat.com>
7986         PR c/64709
7987         * c-typeck.c (pop_init_level): If constructor_elements has
7988         exactly one element with integer_zerop value, set constructor_zeroinit
7989         to 1.  Remove braces around warning_init call.
7991 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
7993         PR c/64766
7994         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7995         of FUNCTION_DECLs with error_mark_node.
7997 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
7999         PR c/64778
8000         * c-typeck.c (convert_arguments): Return -1 if there are
8001         error_args, even if we've diagnosed too many arguments.
8003 2015-01-21  Richard Biener  <rguenther@suse.de>
8005         PR middle-end/64313
8006         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
8007         for builtins the user declared correctly.
8009 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
8010             Bernd Schmidt  <bernds@codesourcery.com>
8011             Cesar Philippidis  <cesar@codesourcery.com>
8012             James Norris  <jnorris@codesourcery.com>
8013             Jakub Jelinek  <jakub@redhat.com>
8014             Ilmir Usmanov  <i.usmanov@samsung.com>
8016         * c-parser.c: Include "gomp-constants.h".
8017         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
8018         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
8019         Use OMP_CLAUSE_SET_MAP_KIND.
8020         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
8021         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
8022         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
8023         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
8024         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
8025         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
8026         "copyout", "create", "delete", "deviceptr", "gang", "host",
8027         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
8028         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
8029         "present_or_create", "pcreate", "seq", "self", "vector",
8030         "vector_length", "wait", "worker".
8031         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
8032         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
8033         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
8034         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
8035         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
8036         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
8037         (c_parser_oacc_data_clause_deviceptr)
8038         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
8039         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
8040         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
8041         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
8042         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
8043         (c_parser_oacc_parallel, c_parser_oacc_update)
8044         (c_parser_oacc_wait): New functions.
8045         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
8046         (c_finish_oacc_data): New prototypes.
8047         * c-typeck.c: Include "gomp-constants.h".
8048         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
8049         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
8050         OMP_CLAUSE_SET_MAP_KIND.
8051         (c_finish_oacc_parallel, c_finish_oacc_kernels)
8052         (c_finish_oacc_data): New functions.
8053         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
8054         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
8055         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
8056         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
8057         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
8058         GOMP_MAP_FORCE_DEVICEPTR.
8060 2015-01-09  Michael Collison  <michael.collison@linaro.org>
8062         * c-array-notation.c: Include hash-set.h, machmode.h,
8063         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8064         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8065         * c-aux-info.c: Ditto.
8066         * c-convert.c: Ditto.
8067         * c-decl.c: Ditto.
8068         * c-errors.c: Ditto.
8069         * c-lang.c: Dittoxs.
8070         * c-objc-common.c: Ditto.
8071         * c-parser.c: Ditto.
8072         * c-typeck.c: Include hash-set.h, machmode.h,
8073         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8074         fold-const.h, wide-int.h, inchash.h, real.h and
8075         fixed-value.h due to flattening of tree.h.
8077 2015-01-07  Marek Polacek  <polacek@redhat.com>
8079         PR c/64417
8080         * c-typeck.c (process_init_element): Disallow initialization of
8081         a flexible array member with a string constant if the structure
8082         is in an array.
8084 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
8086         PR sanitizer/64344
8087         * c-typeck.c (convert_for_assignment, c_finish_return): For
8088         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
8089         types also set in_late_binary_op around convert call.
8090         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
8091         to integral type casts, if not in_late_binary_op, pass c_fully_fold
8092         result on expr as last argument to ubsan_instrument_float_cast,
8093         if in_late_binary_op, don't use c_save_expr but save_expr.
8095         Update copyright years.
8097 2015-01-05  Marek Polacek  <polacek@redhat.com>
8099         PR c/64423
8100         * c-typeck.c (build_array_ref): Pass loc down to
8101         warn_array_subscript_with_type_char.
8103 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
8105         * c-typeck.c: New behavious for pointers to arrays with qualifiers
8106         (common-pointer-type): For pointers to arrays take qualifiers from
8107         element type.
8108         (build_conditional_expr): Add warnings for lost qualifiers.
8109         (comp-target-types): Allow pointers to arrays with different qualifiers.
8110         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
8111         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8112         to PEDWARN_FOR_QUALIFIERS.
8114 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
8116         PR sanitizer/64289
8117         * c-convert.c: Include ubsan.h.
8118         (convert): For real -> integral casts and
8119         -fsanitize=float-cast-overflow don't call convert_to_integer, but
8120         instead instrument the float cast directly.
8122 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
8124         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
8125         c_finish_stmt_expr): Remove NULL last argument from
8126         create_tmp_var_raw and create_tmp_var calls.
8127         * c-array-notation.c (fix_builtin_array_notation_fn,
8128         build_array_notation_expr, fix_conditional_array_notations_1,
8129         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
8131 2014-11-28  Marek Polacek  <polacek@redhat.com>
8133         PR c/63862
8134         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
8135         convert the right operand to integer type.
8137 2014-11-25  Marek Polacek  <polacek@redhat.com>
8139         PR c/63877
8140         * c-decl.c (start_function): Disable -Wmissing-declarations warning
8141         for inline functions.
8143 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
8145         PR target/63764
8146         * c-typeck.c (build_array_ref): Adjust
8147         convert_vector_to_pointer_for_subscript caller.  If it returns true,
8148         call non_lvalue_loc on the result.
8150 2014-11-11  Richard Biener  <rguenther@suse.de>
8152         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
8153         to true.
8155 2014-11-10  Andi Kleen  <ak@linux.intel.com>
8157         PR c/60804
8158         * c-parser.c (c_parser_statement_after_labels): Call
8159         check_no_cilk.
8160         (c_parser_if_statement): Dito.
8161         (c_parser_switch_statement): Dito.
8162         (c_parser_while_statement): Dito.
8163         (c_parser_do_statement): Dito.
8164         (c_parser_for_statement): Dito.
8165         * c-typeck.c (c_finish_loop): Dito.
8167 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
8169         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
8170         OPT_Wshift_count_overflow in the warnings.
8172 2014-10-30  Marek Polacek  <polacek@redhat.com>
8174         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
8175         print the stripped version as well, if they're not the same.
8177 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
8179         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
8180         machine_mode.
8182 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
8184         * c-decl.c: Adjust include files.
8185         * c-parser.c: Ditto.
8187 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
8188             Tom Tromey  <tromey@redhat.com>
8190         * c-tree.h (enum c_oracle_request): New.
8191         (c_binding_oracle_function): New typedef.
8192         (c_binding_oracle, c_pushtag, c_bind): Declare.
8193         * c-decl.c (c_binding_oracle): New global.
8194         (I_SYMBOL_CHECKED): New macro.
8195         (i_symbol_binding): New function.
8196         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
8197         (I_TAG_CHECKED): New macro.
8198         (i_tag_binding): New function.
8199         (I_TAG_BINDING, I_TAG_DECL): Redefine.
8200         (I_LABEL_CHECKED): New macro.
8201         (i_label_binding): New function.
8202         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
8203         (c_print_identifier): Save and restore c_binding_oracle.
8204         (c_pushtag, c_bind): New functions.
8206 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
8208         * c-typeck.c: Adjust include files.
8210 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8212         PR c++/53061
8213         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
8214         initialization here...
8215         (c_initialize_diagnostics): ... but here. Set defaults after
8216         building pretty-printer.
8218 2014-10-23  Marek Polacek  <polacek@redhat.com>
8220         PR c/63626
8221         * c-decl.c (pop_scope): Don't print warning in external_scope.
8223 2014-10-19  Marek Polacek  <polacek@redhat.com>
8225         PR c/63567
8226         * c-typeck.c (output_init_element): Allow initializing objects with
8227         static storage duration with compound literals even in C99 and add
8228         pedwarn for it.
8230 2014-10-17  Marek Polacek  <polacek@redhat.com>
8232         PR c/63567
8233         * c-typeck.c (digest_init): Allow initializing objects with static
8234         storage duration with compound literals even in C99 and add pedwarn
8235         for it.
8237 2014-10-17  Marek Polacek  <polacek@redhat.com>
8239         PR c/63543
8240         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
8241         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
8242         error multiple times.  Print the type.
8244 2014-10-17  Marek Polacek  <polacek@redhat.com>
8246         PR c/63549
8247         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
8248         type.
8250 2014-10-17  Marek Polacek  <polacek@redhat.com>
8252         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
8253         (start_function): Use OPT_Wimplicit_int instead of 0.
8254         (store_parm_decls_oldstyle): Likewise.
8256 2014-10-17  Alan Modra  <amodra@gmail.com>
8258         PR middle-end/61848
8259         * c-decl.c (merge_decls): Don't merge section name or tls model
8260         to newdecl symtab node, instead merge to olddecl.  Override
8261         existing olddecl section name.  Set tls_model for all thread-local
8262         vars, not just OMP thread-private ones.  Remove incorrect comment.
8264 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
8266         * c-decl.c: Adjust include files.
8268 2014-10-14  DJ Delorie  <dj@redhat.com>
8270         * c-parser.c (c_parse_init): Add RID entries for each __intN.
8271         (c_token_starts_typename): Check all __intN, not just __int128.
8272         (c_token_starts_declspecs): Likewise.
8273         (c_parser_declspecs): Likewise.
8274         (c_parser_attribute_any_word): Likewise.
8275         (c_parser_objc_selector): Likewise.
8276         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
8277         (struct c_declspecs): Add int_n_idx field to record *which* __intN
8278         is specified.
8279         * c-decl.c (declspecs_add_type): Check for all __intN, not just
8280         __int128.
8281         (finish_declspecs): Likewise.
8283 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
8285         * c-parser.c (c_parser_all_labels): New function to replace
8286         the duplicate code.
8287         (c_parser_statement): Call the new function.
8289 2014-10-09  Marek Polacek  <polacek@redhat.com>
8291         PR c/63480
8292         * c-typeck.c (pop_init_level): Don't warn about initializing
8293         with { }.
8295 2014-10-07  Marek Polacek  <polacek@redhat.com>
8297         PR c/59717
8298         * c-decl.c (header_for_builtin_fn): New function.
8299         (implicitly_declare): Suggest which header to include.
8301 2014-10-07  Marek Polacek  <polacek@redhat.com>
8303         * c-convert.c (convert): Use error_operand_p.
8304         * c-typeck.c (require_complete_type): Likewise.
8305         (really_atomic_lvalue): Likewise.
8306         (digest_init): Likewise.
8307         (handle_omp_array_sections_1): Likewise.
8309 2014-10-03  Marek Polacek  <polacek@redhat.com>
8311         PR c/63453
8312         * c-decl.c (pop_scope): Don't warn about "inline function declared
8313         but never defined" for functions marked with gnu_inline attribute.
8315 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
8317         PR c++/63249
8318         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
8319         on low_bound and length.
8321 2014-09-24  Marek Polacek  <polacek@redhat.com>
8323         PR c/61405
8324         PR c/53874
8325         * c-parser.c: Don't define CPP_KEYWORD.
8326         (c_parser_switch_statement): Pass original type to c_finish_case.
8327         * c-tree.h (c_finish_case): Update declaration.
8328         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
8329         conditionally to c_do_switch_warnings.
8331 2014-09-03  Marek Polacek  <polacek@redhat.com>
8333         PR c/62024
8334         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
8335         conversions.
8337 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
8338             Balaji V. Iyer  <balaji.v.iyer@intel.com>
8339             Igor Zamyatin  <igor.zamyatin@intel.com>
8341         * c-parser.c (c_parser_cilk_for): New function.
8342         (c_parser_cilk_grainsize): Likewise.
8343         (c_get_temp_regvar): Likewise.
8344         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
8345         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
8346         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
8347         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
8348         case.
8350 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
8352         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
8353         with using HOST_WIDE_INT without truncation to 'int'
8355 2014-08-22  Marek Polacek  <polacek@redhat.com>
8357         PR c++/62199
8358         * c-typeck.c (parser_build_binary_op): Adjust call to
8359         warn_logical_not_parentheses.
8361 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
8363         PR other/62008
8364         * c-parser.c (c_parser_array_notation): Check for correct
8365         type of an array added.
8367 2014-08-19  Marek Polacek  <polacek@redhat.com>
8369         PR c++/62153
8370         * c-typeck.c (build_binary_op): If either operand of a comparison
8371         is a boolean expression, call maybe_warn_bool_compare.
8373 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
8375         PR c/45584
8376         * c-typeck.c (build_c_cast): Do a conversion even when the
8377         TYPE_MAIN_VARIANTs are the same.
8379 2014-08-19  Marek Polacek  <polacek@redhat.com>
8381         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
8382         pedwarn_c99 instead of pedwarn.
8383         (grokfield): Likewise.
8384         (warn_defaults_to): New function.
8385         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
8386         Unconditionally call pedwarn_c99 instead of pedwarn.
8387         (start_function): Call warn_defaults_to instead of pedwarn_c99.
8388         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
8389         check flag_isoc11 before.
8390         * c-errors.c (pedwarn_c99): Change the return type to bool.
8391         Handle -Wc99-c11-compat.
8392         * c-parser.c (disable_extension_diagnostics): Handle
8393         warn_c99_c11_compat.
8394         (restore_extension_diagnostics): Likewise.
8395         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
8396         instead of pedwarn, don't check flag_isoc11 before.
8397         (c_parser_declspecs): Likewise.
8398         (c_parser_alignas_specifier): Likewise.
8399         (c_parser_alignof_expression): Likewise.
8400         (c_parser_generic_selection): Likewise.
8401         * c-tree.h (pedwarn_c99): Update declaration.
8402         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
8403         of pedwarn_c99.
8405 2014-08-19  Marek Polacek  <polacek@redhat.com>
8407         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
8408         to pedwarn_c90.
8409         * c-errors.c: Include "opts.h".
8410         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
8411         * c-parser.c (disable_extension_diagnostics): Handle negative value
8412         of warn_c90_c99_compat, too.
8413         (restore_extension_diagnostics): Likewise.
8414         (c_parser_compound_statement_nostart): Pass
8415         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
8417 2014-08-12  Marek Polacek  <polacek@redhat.com>
8419         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
8420         Add pedwarn.
8421         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
8422         Likewise.
8423         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
8425 2014-08-10  Marek Polacek  <polacek@redhat.com>
8427         PR c/51849
8428         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
8429         Call pedwarn_c90 instead of pedwarn.
8430         (check_bitfield_type_and_width): Likewise.
8431         (declspecs_add_qual): Likewise.
8432         (declspecs_add_type): Likewise.
8433         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
8434         Adjust to only call pedwarn_c90.
8435         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
8436         pedwarn_c90 instead of pedwarn.
8437         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
8438         * c-parser.c (disable_extension_diagnostics): Handle
8439         warn_c90_c99_compat.
8440         (restore_extension_diagnostics): Likewise.
8441         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
8442         pedwarn_c90 instead of pedwarn.
8443         (c_parser_initelt): Likewise.
8444         (c_parser_postfix_expression): Likewise.
8445         (c_parser_postfix_expression_after_paren_type): Likewise.
8446         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
8447         * c-tree.h: Fix formatting.
8448         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
8449         pedwarn_c90 instead of pedwarn.
8451 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
8453         * c-typeck.c: Remove include of pointer-set.h.
8455 2014-08-07  Marek Polacek  <polacek@redhat.com>
8457         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
8459 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
8461         * c-typeck.c: Use hash_map instead of pointer_map.
8463 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
8465         * c-decl.c: Use hash_set instead of pointer_set.
8467 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
8469         PR middle-end/61455
8470         * c-array-notation.c (expand_array_notations): Handling
8471         of DECL_EXPR added.
8473 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
8475         PR c++/60517
8476         * c-typeck.c (c_finish_return): Return 0 instead of the address of
8477         a local variable.
8479 2014-07-30  Tom Tromey  <tromey@redhat.com>
8481         * c-typeck.c (struct constructor_stack) <designator_depth>: New
8482         field.
8483         (really_start_incremental_init, push_init_level): Initialize
8484         designator_depth.
8485         (pop_init_level): Set global designator_depth.
8486         (process_init_element): Check for designated_init attribute.
8488 2014-07-20  Marek Polacek  <polacek@redhat.com>
8490         PR c/61852
8491         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
8492         (implicitly_declare): Pass location to implicit_decl_warning.
8494 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
8496         PR middle-end/61294
8497         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
8498         If non-NULL, call c_parser_check_literal_zero.
8499         (c_parser_check_literal_zero): New function.
8500         (c_parser_postfix_expression_after_primary): Adjust
8501         c_parser_expr_list caller, handle -Wmemset-transposed-args.
8503 2014-07-06  Marek Polacek  <polacek@redhat.com>
8505         PR c/6940
8506         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
8507         * c-tree.h (C_ARRAY_PARAMETER): Define.
8508         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
8509         function parameter.
8511 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
8512             Chen Gang  <gang.chen.5i5j@gmail.com>
8514         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
8515         releasing symbol.
8517 2014-07-01  Marek Polacek  <polacek@redhat.com>
8519         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
8520         instead of 0 to WARN_FOR_ASSIGNMENT.
8522 2014-07-01  Marek Polacek  <polacek@redhat.com>
8524         PR c/58286
8525         * c-typeck.c (convert_for_assignment): Pass
8526         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
8528 2014-06-30  Marek Polacek  <polacek@redhat.com>
8530         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
8531         has no_sanitize_undefined attribute.
8533 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
8535         PR middle-end/57541
8536         * c-array-notation.c (fix_builtin_array_notation_fn):
8537         Check for 0 arguments in builtin call. Check that bultin argument is
8538         correct.
8539         * c-parser.c (c_parser_array_notation): Check for incorrect initial
8540         index.
8542 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8544         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
8545         qualifiers in __auto_type for atomic types.
8546         (c_parser_typeof_specifier): Discard all type qualifiers in
8547         __typeof__ for atomic types.
8549 2014-06-25  Marek Polacek  <polacek@redhat.com>
8551         PR c/61162
8552         * c-parser.c (c_parser_statement_after_labels): Pass the location of
8553         the return expression to c_finish_return.
8555 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
8557         * c-typeck.c (c_finish_omp_clauses): Make sure
8558         OMP_CLAUSE_LINEAR_STEP has correct type.
8560 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
8562         * c-decl.c: Adjust.
8564 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
8566         * c-parser.c (c_parser_omp_for_loop): For
8567         #pragma omp parallel for simd move lastprivate clause from parallel
8568         to for rather than simd.
8570 2014-06-23  Marek Polacek  <polacek@redhat.com>
8572         * c-typeck.c (parser_build_binary_op): Don't call
8573         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
8575 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
8577         * c-parser.c (c_parser_omp_threadprivate): Likewise.
8578         * c-decl.c (merge_decls): Likewise.
8580 2014-06-09  Marek Polacek  <polacek@redhat.com>
8582         PR c/36446
8583         * c-typeck.c (error_init): Call inform instead of error_at.
8584         (pedwarn_init): Call inform instead of pedwarn.
8585         (warning_init): Call inform instead of warning_at.
8587 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
8589         * c-decl.c (merge_decls): Use set_decl_section_name.
8590         (duplicate_decls): Remove node if it exists.
8592 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
8594         PR c/53119
8595         * c-typeck.c (push_init_level, process_init_element,
8596         pop_init_level): Correct check for zero initialization, move
8597         missing brace warning to respect zero initialization.
8599 2014-06-05  Marek Polacek  <polacek@redhat.com>
8601         PR c/56724
8602         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
8604 2014-06-05  Marek Polacek  <polacek@redhat.com>
8606         PR c/49706
8607         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
8608         on the left hand side operand of a comparison.
8610 2014-06-05  Marek Polacek  <polacek@redhat.com>
8612         PR c/48062
8613         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
8614         Print note only if the warning was printed.
8616 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
8618         PR c/58942
8619         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
8620         with a pointer.
8622 2014-06-03  Marek Polacek  <polacek@redhat.com>
8624         PR c/60439
8625         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
8626         c_start_case.
8627         * c-tree.h (c_start_case): Update.
8628         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
8629         switch condition has boolean value.
8631 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
8633         * c-decl.c: Include builtins.h.
8634         * c-parser.c: Likewise.
8636 2014-05-27  Marek Polacek  <polacek@redhat.com>
8638         PR c/56724
8639         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
8640         error and warning calls to error_at and warning_at.  Pass location of
8641         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
8642         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
8643         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
8645 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
8647         PR c/61191
8648         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
8649         function parameters.
8651 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
8653         * c-decl.c (merge_decls): Preserve symtab node pointers.
8654         (duplicate_decls): Free new decl.
8656 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
8658         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
8659         initialization.
8661         * c-parser.c (c_parser_omp_target): Return bool values.
8663 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
8665         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
8666         num_teams_loc variable to num_thread_limit_loc.
8668 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
8670         * c-array-notation.c (expand_array_notations): Use void_node
8671         instead of void_zero_node.
8673 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
8675         * c-decl.c (finish_struct): Adjust.
8676         (finish_enum): Likewise.
8677         (bind): Adjust.
8678         (record_inline_static): Likewise.
8679         (push_scope): Likewise.
8680         (make_label): Likewise.
8681         (lookup_label_for_goto): Likewise.
8682         (finish_struct): Likewise.
8683         (finish_enum): Likewise.
8684         (store_parm_decls): Likewise.
8685         (c_push_function_context): Likewise.
8686         * c-lang.h: Remove usage of variable_size gty attribute.
8687         * c-parser.c (c_parse_init): Adjust.
8688         (c_parse_file): Likewise.
8690 2014-05-13  Marek Polacek  <polacek@redhat.com>
8692         PR c/61162
8693         * c-typeck.c (convert_for_assignment): Pass location to
8694         WARN_FOR_ASSIGNMENT instead of input_location.
8696 2014-05-10  Marek Polacek  <polacek@redhat.com>
8698         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
8699         maybe_warn_string_init.
8700         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
8701         maybe_warn_string_init.
8702         * c-tree.h (maybe_warn_string_init): Update declaration.
8703         * c-typeck.c (maybe_warn_string_init): Add location parameter.
8704         Call pedwarn_init with loc instead of with input_location.
8705         (digest_init): Pass init_loc to maybe_warn_string_init.
8706         (pop_init_level): Call pedwarn_init with loc instead of with
8707         input_location.
8708         (set_init_index): Likewise.
8709         (process_init_element): Likewise.
8711 2014-05-09  Marek Polacek  <polacek@redhat.com>
8713         PR c/61096
8714         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
8715         (c_parser_initelt): Pass location to set_init_label.  Pass array index
8716         location to set_init_index.
8717         * c-tree.h (push_init_level): Update declaration.
8718         (pop_init_level): Likewise.
8719         (set_init_index): Likewise.
8720         (set_init_label): Likewise.
8721         * c-typeck.c (error_init): Add location parameter.  Call error_at
8722         instead of error.
8723         (digest_init): Pass init_loc to error_init.
8724         (really_start_incremental_init):
8725         (push_init_level): Add location parameter.  Pass loc to pop_init_level
8726         and error_init.
8727         (pop_init_level): Likewise.
8728         (set_designator): Add location parameter.  Pass loc to pop_init_level,
8729         push_init_level, and error_init.
8730         (set_init_index): Add location parameter.  Pass loc to error_init and
8731         set_designator.
8732         (set_init_label): Likewise.
8733         (output_init_element): Pass loc to error_init.
8734         (process_init_element): Pass loc to error_init, pop_init_level,
8735         pedwarn_init, and push_init_level.
8737 2014-05-09  Marek Polacek  <polacek@redhat.com>
8739         PR c/50459
8740         * c-parser.c (c_parser_attributes): Parse the arguments as an
8741         expression-list if the attribute takes identifier.
8743 2014-05-08  Marek Polacek  <polacek@redhat.com>
8745         PR c/61053
8746         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8747         TYPE_ALIGN_UNIT.
8749 2014-05-08  Marek Polacek  <polacek@redhat.com>
8751         PR c/61077
8752         * c-decl.c (start_function): Warn for _Atomic-qualified return type
8753         of main.
8755 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
8756             Mike Stump  <mikestump@comcast.net>
8757             Richard Sandiford  <rdsandiford@googlemail.com>
8759         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8760         (finish_enum): Use wide-int interfaces.
8761         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8762         * c-typeck.c (build_c_cast): Likewise.
8763         (set_nonincremental_init_from_string): Likewise.
8764         (c_tree_equal): Likewise.
8766 2014-05-02  Marek Polacek  <polacek@redhat.com>
8768         PR c/25801
8769         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
8770         Return size_one_node when the type is not complete.
8771         (pointer_diff): Remove comment.
8772         (build_unary_op): Improve error messages.
8774 2014-05-02  Marek Polacek  <polacek@redhat.com>
8776         * c-typeck.c (c_finish_return): Separate warning_at calls.
8778 2014-05-02  Marek Polacek  <polacek@redhat.com>
8780         * c-tree.h (error_init): Remove declaration.
8781         (pedwarn_init): Likewise.
8782         * c-typeck.c (error_init): Make static and move above.
8783         (pedwarn_init): Likewise.
8784         (warning_init): Move above.
8785         (maybe_warn_string_init): Likewise.
8787 2014-05-01  Jeff Law  <law@redhat.com>
8789         Revert:
8791         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
8792         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8793         avoid goto.
8795 2014-05-02  Marek Polacek  <polacek@redhat.com>
8797         PR c/60784
8798         * c-typeck.c (push_init_level): Set constructor_designated to
8799         p->designated for structures.
8801 2014-05-01  Marek Polacek  <polacek@redhat.com>
8803         PR c/60915
8804         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8805         function-definition has an attribute after the declarator.
8807 2014-05-01  Marek Polacek  <polacek@redhat.com>
8809         PR c/60257
8810         * c-typeck.c (warning_init): Add location_t parameter.  Call
8811         warning_at instead of warning.
8812         (push_init_level): Pass input_location to warning_init.
8813         (add_pending_init): Add location_t parameter.  Pass loc to
8814         warning_init.
8815         (set_nonincremental_init): Pass input_location to add_pending_init.
8816         (set_nonincremental_init_from_string): Likewise.
8817         (output_init_element): Pass loc to warning_init and to
8818         add_pending_init.
8820 2014-05-01  Marek Polacek  <polacek@redhat.com>
8822         PR c/43395
8823         * c-typeck.c (c_finish_return): Distinguish between label and variable
8824         when warning about returning local address.
8826 2014-05-01  Marek Polacek  <polacek@redhat.com>
8828         PR c/29467
8829         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8830         in C89 mode.
8832 2014-05-01  Marek Polacek  <polacek@redhat.com>
8834         PR c/43245
8835         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8836         instead of 0 to WARN_FOR_QUALIFIERS.
8838 2014-05-01  Marek Polacek  <polacek@redhat.com>
8840         PR c/56989
8841         * c-typeck.c (default_conversion): Use better location for
8842         error call.
8844 2014-04-30  Marek Polacek  <polacek@redhat.com>
8846         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8847         also when SANITIZE_FLOAT_DIVIDE is on.
8849 2014-04-30  Marek Polacek  <polacek@redhat.com>
8851         PR c/60139
8852         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8853         and pedwarn_init.  Use loc insted of input_location.
8855 2014-04-30  Marek Polacek  <polacek@redhat.com>
8857         PR c/60351
8858         * c-typeck.c (build_binary_op): Use location when warning about
8859         shift count.
8861 2014-04-25  Marek Polacek  <polacek@redhat.com>
8863         PR c/18079
8864         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8865         always_inline/noinline and hot/cold attributes.
8867 2014-04-25  Marek Polacek  <polacek@redhat.com>
8869         PR c/60114
8870         * c-parser.c (c_parser_initelt): Pass input_location to
8871         process_init_element.
8872         (c_parser_initval): Pass loc to process_init_element.
8873         * c-tree.h (process_init_element): Adjust declaration.
8874         * c-typeck.c (push_init_level): Pass input_location to
8875         process_init_element.
8876         (pop_init_level): Likewise.
8877         (set_designator): Likewise.
8878         (output_init_element): Add location_t parameter.  Pass loc to
8879         digest_init.
8880         (output_pending_init_elements): Pass input_location to
8881         output_init_element.
8882         (process_init_element): Add location_t parameter.  Pass loc to
8883         output_init_element.
8885 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
8887         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8888         atomic-clause, allow comma in between atomic-clause and
8889         seq_cst.
8891 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
8893         PR c/59073
8894         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8895         fails, don't set OM_PARALLEL_COMBINED and return NULL.
8897 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
8899         PR middle-end/60469
8900         * c-array-notation.c (fix_builtin_array_notation_fn): Use
8901         create_tmp_var instead build_decl for creating temps.
8902         (build_array_notation_expr): Likewise.
8903         (fix_conditional_array_notations_1): Likewise.
8904         (fix_array_notation_expr): Likewise.
8905         (fix_array_notation_call_expr): Likewise.
8907 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
8909         PR c++/60689
8910         * c-tree.h (c_build_function_call_vec): New prototype.
8911         * c-typeck.c (build_function_call_vec): Don't call
8912         resolve_overloaded_builtin here.
8913         (c_build_function_call_vec): New wrapper function around
8914         build_function_call_vec.  Call resolve_overloaded_builtin here.
8915         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8916         Call c_build_function_call_vec instead of build_function_call_vec.
8917         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8918         * c-decl.c (finish_decl): Likewise.
8920 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8922         PR c/55383
8923         * c-typeck.c: Use correct format string in cast-qual warning
8925 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
8927         * c-decl.c (c_decl_attributes): Use
8928         lang_hooks.types.omp_mappable_type.
8929         * c-typeck.c (c_finish_omp_clauses): Likewise.
8931 2014-03-06  Marek Polacek  <polacek@redhat.com>
8933         PR c/60197
8934         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
8935         of checking tree code.
8937 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
8939         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
8940         (c_parser_parameter_declaration): Likewise.
8942 2014-02-19  Marek Polacek  <polacek@redhat.com>
8944         PR c/60195
8945         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
8946         Call mark_exp_read on exp.value.
8947         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
8948         TREE_ADDRESSABLE on old instead of val.
8949         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
8951 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
8953         * c-parser.c (c_parser_get_builtin_args): Replace calls to
8954         C_EXPR_APPEND by vec_safe_push.
8955         * c-tree.h (C_EXPR_APPEND): Remove.
8957 2014-01-31  Marek Polacek  <polacek@redhat.com>
8959         PR c/59963
8960         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
8961         build_function_call_vec.
8962         (build_function_call): Likewise.
8963         (build_atomic_assign): Likewise.
8964         (build_function_call_vec): Add arg_loc parameter.  Use it.
8965         (convert_arguments): Likewise.
8966         (convert_for_assignment): Rename rhs_loc to expr_loc.
8967         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8968         (c_parser_objc_keywordexpr): Likewise.
8969         (c_parser_postfix_expression_after_primary): Call
8970         build_function_call_vec with expr_loc rather than op_loc.
8971         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
8972         build_function_call_vec.
8973         (c_parser_expr_list): Add locations parameter.  Fill it with locations
8974         of function arguments.
8975         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8977 2014-01-30  Marek Polacek  <polacek@redhat.com>
8979         PR c/59940
8980         * c-typeck.c (build_function_call_vec): Use loc parameter.
8981         (convert_arguments): Add location parameter.  Use it.
8982         (ep_convert_and_check): Likewise.
8983         (build_atomic_assign): Adjust convert_for_assignment call.
8984         (build_modify_expr): Likewise.
8985         (digest_init): Likewise.
8986         (c_finish_return): Likewise.
8987         (build_conditional_expr): Adjust ep_convert_and_check calls.
8988         (convert_for_assignment): Add rhs_loc parameter.  Use it.
8989         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8990         calls.
8992 2014-01-30  Richard Biener  <rguenther@suse.de>
8994         PR c/59905
8995         * c-typeck.c (build_function_call_vec): Do not replace calls
8996         to a function via an incompatible type with a runtime abort.
8998 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9000         * c-parser.c (c_parser_declaration_or_fndef): Replaced
9001         flag_enable_cilkplus with flag_cilkplus.
9002         (c_parser_direct_declarator_inner): Likewise.
9003         (c_parser_attribute_any_word): Likewise.
9004         (c_parser_attributes): Likewise.
9005         (c_parser_compound_statement): Likewise.
9006         (c_parser_statement_after_labels): Likewise.
9007         (c_parser_if_statement): Likewise.
9008         (c_parser_switch_statement): Likewise.
9009         (c_parser_do_statement): Likewise.
9010         (c_parser_for_statement): Likewise.
9011         (c_parser_unary_expression): Likewise.
9012         (c_parser_postfix_expression): Likewise.
9013         (c_parser_postfix_expression_after_primary): Likewise.
9014         (c_parser_postfix_expression_after_primary): Likewise.
9015         (c_parser_omp_clause_name): Likewise.
9016         (c_finish_omp_declare_simd): Likewise.
9017         (c_parser_cilk_verify_simd): Likewise.
9018         * c-typeck.c (build_array_ref): Likewise.
9019         (build_function_call_vec): Likewise.
9020         (convert_arguments): Likewise.
9021         (build_compound_expr): Likewise.
9022         (c_finish_return): Likewise.
9023         (c_finish_if_stmt): Likewise.
9024         (c_finish_loop): Likewise.
9025         (build_binary_op): Likewise.
9027 2014-01-23  Marek Polacek  <polacek@redhat.com>
9029         PR c/59846
9030         * c-typeck.c (parser_build_binary_op): Use location instead of
9031         input_location.
9032         (build_binary_op): Pass location to shorten_compare.
9034 2014-01-23  Marek Polacek  <polacek@redhat.com>
9036         PR c/58346
9037         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
9038         an empty aggregate.
9040 2014-01-23  Marek Polacek  <polacek@redhat.com>
9042         PR c/59871
9043         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
9044         of a comma expression.
9045         (emit_side_effect_warnings): Likewise.
9047 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9049         PR c/59825
9050         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
9051         function to use walk_tree and moved a lot of its functionality to
9052         expand_array_notations.
9053         (expand_array_notations): New function.
9055 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9057         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
9058         attribute an attribute without value.
9060 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
9062         PR middle-end/58809
9063         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
9064         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
9066 2014-01-22  Marek Polacek  <polacek@redhat.com>
9068         PR c/59891
9069         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
9070         of remove_c_maybe_const_expr on op1 and op2.
9072 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
9074         PR c/58943
9075         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
9076         effects, preevaluate rhs using SAVE_EXPR first.
9078 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9080         PR c++/59631
9081         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
9082         statements with if-elseif statements.
9084 2014-01-06  Marek Polacek  <polacek@redhat.com>
9086         PR c/57773
9087         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
9088         defined bit-field types only in ISO C.
9090 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
9092         Update copyright years
9094 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
9096         * c-array-notation.c: Use the standard form for the copyright notice.
9098 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9100         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
9101         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
9102         field in parser is not empty.  If not-empty, call the function
9103         c_parser_finish_omp_declare_simd.
9104         (c_parser_cilk_clause_vectorlength): Modified function to be shared
9105         between SIMD-enabled functions and #pragma simd.  Added new parameter.
9106         (c_parser_cilk_all_clauses): Modified the usage of the function
9107         c_parser_cilk_clause_vectorlength as mentioned above.
9108         (c_parser_cilk_simd_fn_vector_attrs): New function.
9109         (c_finish_cilk_simd_fn_tokens): Likewise.
9110         (is_cilkplus_vector_p): Likewise.
9111         (c_parser_omp_clause_name): Added checking for "vectorlength,"
9112         "nomask," and "mask" strings in clause name.
9113         (c_parser_omp_all_clauses): Added 3 new case statements:
9114         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
9115         PRAGMA_CILK_CLAUSE_NOMASK.
9116         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
9117         check for vector attribute and if so call the function
9118         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
9119         called the function c_finish_cilk_simd_fn_tokens.
9120         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
9121         parser field is non-empty.  If so, parse them as you would parse
9122         the omp declare simd pragma.
9123         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
9124         Added a check when step is a parameter and flag it as error.
9125         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
9126         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
9127         pragma_omp_clause.
9129 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
9131         * c-parser.c (c_parser_omp_parallel): Fix description.
9133 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9135         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
9136         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9137         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
9138         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
9140 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
9142         PR c/52023
9143         * c-parser.c (c_parser_alignas_specifier): Use
9144         c_sizeof_or_alignof_type instead of c_alignof.
9145         (c_parser_alignof_expression): Likewise, with min_alignof
9146         parameter depending on alignof spelling used.
9148 2013-12-04  Marek Polacek  <polacek@redhat.com>
9150         PR c/54113
9151         * c-decl.c (start_function): Don't warn for missing prototype for
9152         inline functions.
9154 2013-12-03  Marek Polacek  <polacek@redhat.com>
9156         PR c/59351
9157         * c-decl.c (build_compound_literal): Allow compound literals with
9158         empty initial value.
9160 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
9162         PR c/58235
9163         * c-typeck.c (build_modify_expr): Diagnose assignment to
9164         expression with array type.
9166 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
9168         PR c/42262
9169         * c-typeck.c (process_init_element): Do not treat a string as
9170         initializing a whole array when used with a designator for an
9171         individual element.
9173 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
9175         PR c/57574
9176         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
9177         an inline function following a static declaration.
9179 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
9181         PR c/59310
9182         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
9183         to p_name before calling c_parser_omp_teams instead of after.
9184         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
9185         argument.  Remove unused p_name variable.
9187 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
9188             Jakub Jelinek  <jakub@redhat.com>
9190         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
9191         external_scope is NULL.
9193 2013-11-27  Tom de Vries  <tom@codesourcery.com>
9194             Marc Glisse  <marc.glisse@inria.fr>
9196         PR c++/59032
9197         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
9199 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
9201         * c-typeck.c: Add required include files from gimple.h.
9203 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
9205         * c-decl.c (define_label, shadow_tag_warned)
9206         (check_bitfield_type_and_width, grokdeclarator, grokparms,
9207         store_parm_decls_newstyle, store_parm_decls_oldstyle)
9208         (declspecs_add_type): Remove use of in_system_header macro.
9209         * c-parser.c (c_parser_unary_expression): Likewise.
9210         * c-typeck.c (store_init_value, process_init_element)
9211         (c_start_case): Likewise.
9213         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
9214         macro.
9216         * c-parser.c (c_parser_set_source_position_from_token): Remove
9217         reference to in_system_header from comment.
9219 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9221         * c-decl.c (grokdeclarator): Update comment to refer to
9222         tree_to_[su]hwi rather than tree_low_cst.
9224 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9226         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
9227         tree_to_uhwi throughout.
9229 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9231         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
9232         throughout.
9234 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9236         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
9237         throughout.
9239 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
9241         * c-parser.c (c_parser_cilk_simd): New.
9242         (c_parser_cilk_verify_simd): New.
9243         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
9244         (c_parser_omp_for_loop): Add case for NE_EXPR.
9245         Set c_break_label for CILK_SIMD.
9246         (c_parser_cilk_clause_vectorlength): New.
9247         (c_parser_cilk_clause_linear): New.
9248         (c_parser_cilk_clause_name): New.
9249         (c_parser_cilk_all_clauses): New.
9250         * c-typeck.c (build_unary_op): Pass location argument to
9251         readonly_error.
9252         (build_modify_expr): Same.
9253         (build_asm_expr): Same.
9254         (c_finish_bc_stmt): Error on break/continue in loops.
9256 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
9258         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
9260 2013-11-14  Diego Novillo  <dnovillo@google.com>
9262         * c-decl.c: Include print-tree.h.
9263         Include stor-layout.h.
9264         Include varasm.h.
9265         Include attribs.h.
9266         Include stringpool.h.
9267         * c-lang.c: Include fold-const.h.
9268         * c-parser.c: Include stringpool.h.
9269         Include attribs.h.
9270         Include stor-layout.h.
9271         Include varasm.h.
9272         Include trans-mem.h.
9273         * c-typeck.c: Include stor-layout.h.
9274         Include trans-mem.h.
9275         Include varasm.h.
9276         Include stmt.h.
9278 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
9280         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
9281         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
9282         __auto_type.
9283         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
9284         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
9285         RID_AUTO_TYPE.
9286         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
9287         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
9288         (c_parser_declarator, c_parser_direct_declarator_inner)
9289         (c_parser_parameter_declaration, c_parser_type_name): All callers
9290         changed.
9291         (c_parser_declaration_or_fndef): Handle declarations with type
9292         determined from the initializer.
9294 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
9296         * c-typeck.c: Include gimplify.h.
9298 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
9300         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
9301         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
9302         comment.
9303         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
9304         or _Thread_local as appropriate in diagnostics.
9305         (build_null_declspecs): Initialize ret->thread_gnu_p.
9306         (declspecs_add_scspec): Handle either __thread or _Thread_local
9307         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
9308         pedantic.  Do not disallow _Thread_local extern and _Thread_local
9309         static.
9311 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
9312             Andrew MacLeod  <amacleod@redhat.com>
9314         * c-aux-info.c (gen_type): Handle atomic qualifier.
9315         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
9316         qualifiers when compating types.
9317         (shadow_tag_warned): Handle atomic_p in declspecs.
9318         (quals_from_declspecs): Likewise.
9319         (start_decl): Use c_type_promotes_to when promoting argument
9320         types.
9321         (grokdeclarator): Handle _Atomic.
9322         (get_parm_info): Diagnose any qualifier on "void" as only
9323         parameter.
9324         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
9325         comparing types.  Use c_type_promotes_to when promoting argument
9326         types.
9327         (finish_function): Use c_type_promotes_to when promoting argument
9328         types.
9329         (build_null_declspecs): Handle atomic_p in declspecs.
9330         (declspecs_add_qual): Handle RID_ATOMIC.
9331         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
9332         (c_token_starts_declspecs): Handle RID_ATOMIC.
9333         (c_parser_declspecs): Handle atomic type specifiers and
9334         qualifiers.
9335         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
9336         from types of expressions with atomic type.
9337         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
9338         (c_parser_attribute_any_word): Handle RID_ATOMIC.
9339         (c_parser_initializer, c_parser_initelt, c_parser_initval)
9340         (c_parser_statement_after_labels, c_parser_switch_statement)
9341         (c_parser_for_statement, c_parser_expr_no_commas)
9342         (c_parser_conditional_expression, c_parser_binary_expression)
9343         (c_parser_cast_expression, c_parser_unary_expression)
9344         (c_parser_postfix_expression)
9345         (c_parser_postfix_expression_after_primary, c_parser_expression):
9346         Use convert_lvalue_to_rvalue.
9347         (c_parser_expression_conv, c_parser_expr_list): Document
9348         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
9349         (c_parser_objc_synchronized_statement): Use
9350         convert_lvalue_to_rvalue.
9351         (c_parser_objc_selector): Handle RID_ATOMIC.
9352         (c_parser_objc_receiver, c_parser_array_notation): Use
9353         convert_lvalue_to_rvalue.
9354         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
9355         _Atomic (type-name).
9356         (struct c_declspecs): Add atomic_p field.
9357         (convert_lvalue_to_rvalue): Declare.
9358         * c-typeck.c (c_type_promotes_to): Promote atomic types to
9359         corresponding atomic types.
9360         (qualify_type): Don't add _Atomic qualifiers from second argument.
9361         (comp_target_types): Do not allow _Atomic mismatches.
9362         (type_lists_compatible_p): Do not remove atomic qualifiers when
9363         comparing types.
9364         (really_atomic_lvalue, convert_lvalue_to_rvalue)
9365         (build_atomic_assign): New functions.
9366         (build_unary_op): Use build_atomic_assign for atomic increment and
9367         decrement.
9368         (build_conditional_expr): Do not treat _Atomic void as a qualified
9369         version of void.
9370         (build_modify_expr): Use build_atomic_assign for atomic LHS.
9371         (find_anonymous_field_with_type, convert_to_anonymous_field)
9372         (convert_for_assignment): Do not remove atomic qualifiers when
9373         comparing types.
9374         (digest_init): Do not accept initialization of arrays of atomic
9375         elements by string constants.
9376         (build_asm_expr): Use convert_lvalue_to_rvalue.
9377         (build_binary_op): Do not treat _Atomic void as a qualified
9378         version of void.
9380 2013-11-06  DJ Delorie  <dj@redhat.com>
9382         * c-decl.c (locate_old_decl): If a previous conflicting decl is
9383         both explicit and builtin, print the location of the explicit one.
9385 2013-11-05  Tobias Burnus  <burnus@net-b.de>
9387         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
9388         c_parser_omp_distribute, c_parser_omp_teams,
9389         c_parser_omp_target, c_parser_omp_declare): Handle
9390         -fopenmp-simd.
9392 2013-11-03  Marek Polacek  <polacek@redhat.com>
9394         * c-decl.c (grokdeclarator): Add VLA instrumentation.
9396 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
9398         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
9399         check_dup_generic at the end, unless remove is true.
9400         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
9401         remove = true;.
9402         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
9404 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
9406         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
9407         with decl that is not pointer nor array.
9409 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9411         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
9412         a spawning function is found.
9413         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
9414         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
9415         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9416         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
9417         case.
9418         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
9419         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
9420         expr.
9421         (c_finish_return): Added a check to reject _Cilk_spawn in return
9422         expression.
9423         (build_cilk_spawn): New function.
9424         (build_cilk_sync): Likewise.
9425         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
9427 2013-10-27  Tobias Burnus  <burnus@net-b.de>
9429         PR other/33426
9430         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
9431         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
9432         (c_parser_statement_after_labels): Update calls.
9434 2013-10-24  Tobias Burnus  <burnus@net-b.de>
9436         PR other/33426
9437         * c-parser.c (c_parser_pragma, c_parser_for_statement):
9438         Handle PRAGMA_IVDEP.
9439         (c_parser_statement_after_labels): Update call.
9441 2013-10-24  Marek Polacek  <polacek@redhat.com>
9443         * c-parser.c (c_parser_struct_declaration): Add a comment.
9444         (c_parser_declarator): Don't allow _Alignas here.
9446 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
9448         * c-parser.c: Include omp-low.h.
9449         * c-typeck.c: Likewise.
9451 2013-10-17  Marek Polacek  <polacek@redhat.com>
9453         PR c/58267
9454         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
9455         Document syntax of the array-declarator.
9456         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
9457         are not permitted.
9458         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
9459         (c_parser_struct_declaration): Likewise.
9460         (c_parser_declarator): Likewise.
9461         (c_parser_direct_declarator_inner): Likewise.
9462         (c_parser_parameter_declaration): Likewise.
9463         (c_parser_type_name): Likewise.
9465 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
9467         * c-lang.h (current_omp_declare_target_attribute): New extern
9468         decl.
9469         * c-parser.c: Include c-lang.h.
9470         (struct c_parser): Change tokens to c_token *.
9471         Add tokens_buf field.  Change tokens_avail type to unsigned int.
9472         (c_parser_consume_token): If parser->tokens isn't
9473         &parser->tokens_buf[0], increment parser->tokens.
9474         (c_parser_consume_pragma): Likewise.
9475         (enum pragma_context): Add pragma_struct and pragma_param.
9476         (c_parser_external_declaration): Adjust
9477         c_parser_declaration_or_fndef caller.
9478         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
9479         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
9480         Adjust recursive call.
9481         (c_parser_struct_or_union_specifier): Use pragma_struct instead
9482         of pragma_external.
9483         (c_parser_parameter_declaration): Use pragma_param instead of
9484         pragma_external.
9485         (c_parser_compound_statement_nostart, c_parser_label,
9486         c_parser_for_statement): Adjust
9487         c_parser_declaration_or_fndef callers.
9488         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
9489         it through to c_parser_conditional_expression.
9490         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
9491         pass it through to c_parser_binary_expression.  Adjust recursive
9492         call.
9493         (c_parser_binary_expression): Remove prec argument, add
9494         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
9495         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
9496         binop matches it, use build2 instead of parser_build_binary_op.
9497         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
9498         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
9499         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
9500         Handle pragma_struct and pragma_param the same as pragma_external.
9501         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
9502         (c_parser_omp_variable_list): Parse array sections for
9503         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
9504         (c_parser_omp_clause_collapse): Fully fold collapse expression.
9505         (c_parser_omp_clause_reduction): Handle user defined reductions.
9506         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
9507         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
9508         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
9509         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
9510         c_parser_omp_clause_depend, c_parser_omp_clause_map,
9511         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
9512         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
9513         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
9514         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
9515         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
9516         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
9517         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
9518         (c_parser_omp_for_loop): Add CODE argument, pass it through
9519         to c_finish_omp_for.  Change last argument to cclauses,
9520         and adjust uses to grab parallel clauses from the array of all
9521         the split clauses.  Adjust c_parser_binary_expression,
9522         c_parser_declaration_or_fndef and c_finish_omp_for callers.
9523         (omp_split_clauses): New function.
9524         (c_parser_omp_simd): New function.
9525         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
9526         Allow the function to be called also when parsing combined constructs,
9527         and call c_parser_omp_simd when parsing for simd.
9528         (c_parser_omp_sections_scope): If section-sequence doesn't start with
9529         #pragma omp section, require exactly one structured-block instead of
9530         sequence of statements.
9531         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
9532         Allow the function to be called also when parsing combined constructs.
9533         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
9534         Allow the function to be called also when parsing combined
9535         constructs.
9536         (c_parser_omp_taskgroup, c_parser_omp_cancel,
9537         c_parser_omp_cancellation_point, c_parser_omp_distribute,
9538         c_parser_omp_teams, c_parser_omp_target_data,
9539         c_parser_omp_target_update, c_parser_omp_target,
9540         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
9541         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
9542         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
9543         (c_parser_omp_construct): Add p_name and mask vars.  Handle
9544         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
9545         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
9546         and c_parser_omp_sections callers.
9547         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
9548         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
9549         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
9550         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
9551         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
9552         OMP_CLAUSE_DEPEND.
9553         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
9554         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
9555         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
9556         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
9557         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
9558         * c-typeck.c: Include tree-inline.h.
9559         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
9560         handle_omp_array_sections_1, handle_omp_array_sections,
9561         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
9562         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
9563         user defined reductions.
9564         (c_tree_equal): New function.
9565         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
9566         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
9567         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
9568         c_check_omp_declare_reduction_r): New prototypes.
9569         * c-decl.c (current_omp_declare_target_attribute): New variable.
9570         (c_decl_attributes): New function.
9571         (start_decl, start_function): Use it instead of decl_attributes.
9572         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
9573         c_omp_reduction_decl, c_omp_reduction_lookup,
9574         c_check_omp_declare_reduction_r): New functions.
9576 2013-09-25  Tom Tromey  <tromey@redhat.com>
9578         * Make-lang.in (c/gccspec.o): Remove.
9579         (CFLAGS-c/gccspec.o): New variable.
9580         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
9581         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
9582         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
9584 2013-09-25  Tom Tromey  <tromey@redhat.com>
9586         * Make-lang.in (c/gccspec.o): Don't use subshell.
9588 2013-09-18  Marek Polacek  <polacek@redhat.com>
9590         PR sanitize/58443
9591         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
9592         Remove unnecessary check.
9594 2013-09-18  Marek Polacek  <polacek@redhat.com>
9596         PR sanitizer/58411
9597         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
9598         no_sanitize_undefined attribute.
9600 2013-09-13  Kai Tietz  <ktietz@redhat.com>
9602         PR target/57848
9603         * c-decl.c (c_builtin_function_ext_scope): Remove
9604         wrong assumption that it is never called on prexisting
9605         symbol.
9607 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
9609         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
9611 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9613         * c-objc-common.c (c_tree_printer): Tidy.
9615 2013-08-30  Marek Polacek  <polacek@redhat.com>
9617         * c-typeck.c (build_binary_op): Add division by zero and shift
9618         instrumentation.
9620 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
9621             Joseph Myers  <joseph@codesourcery.com>
9623         PR c/35649
9624         * c-typeck.c (c_common_type): Prefer double_type_node over
9625         other REAL_TYPE types with the same precision.
9626         (convert_arguments): Likewise.
9628 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9630         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
9631         (c_initialize_diagnostics): Call a destructor for the early printer.
9633 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9635         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
9636         printer initialization.
9638 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9640         PR c/57490
9641         * c-array-notation.c (fix_conditional_array_notations_1): Added a
9642         check for truth values.
9643         (expand_array_notation_exprs): Added truth values case.  Removed an
9644         unwanted else.  Added for-loop to walk through subtrees in default
9645         case.
9647 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9649         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
9651 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
9653         * c-parser.c (struct c_generic_association): Fix typo.
9655 2013-07-23  Tom Tromey  <tromey@redhat.com>
9656             Joseph Myers  <joseph@codesourcery.com>
9658         * c-parser.c (struct c_generic_association): New.
9659         (c_generic_association_d): New typedef.
9660         (c_parser_generic_selection): New function.
9661         (c_parser_postfix_expression): Handle RID_GENERIC.
9663 2013-07-13  Jason Merrill  <jason@redhat.com>
9665         PR c++/57793
9666         * c-decl.c (finish_struct): Check for too-large class.
9668 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
9670         PR c/57821
9671         * c-typeck.c (set_init_index): When folding, check for index overflow.
9673 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9675         * c-parser.c (c_parser_array_notation): Removed rejection of array
9676         notations in an array of function pointers.
9678 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9680         * c-array-notation.c (make_triplet_val_inv): New function.
9681         (create_cmp_incr): Likewise.
9682         (create_array_refs): Likewise.
9683         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
9684         Also modularized common parts between functions and called the function.
9685         (build_array_notation_expr): Likewise.
9686         (fix_conditional_array_notations_1): Likewise.
9687         (fix_array_notation_expr): Likewise.
9688         (fix_array_notation_call_expr): Likewise.
9690 2013-06-18  Marek Polacek  <polacek@redhat.com>
9692         PR c/57630
9693         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
9695 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9697         * c-array-notation.c (build_array_notation_expr): Reject array notation
9698         mismatch between LHS and RHS even inside a call_expr.  Also, removed
9699         a couple while statements that were dead code.
9701 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9703         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
9704         excessive precision expressions in function parameters.  Also removed
9705         couple unwanted while statements.
9707 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9709         * c-array-notation.c (expand_array_notation_exprs): Added
9710         ARRAY_NOTATION_REF case.
9712 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9714         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
9715         function to c-family/array-notation-common.c.
9716         (is_cilkplus_reduce_builtin): Likewise.
9717         (find_rank): Likewise.
9718         (extract_array_notation_exprs): Likewise.
9719         (replace_array_notations): Likewise.
9720         (find_inv_trees): Likewise.
9721         (replace_inv_trees): Likewise.
9722         (contains_array_notation_expr): Likewise.
9723         (find_correct_array_notation_type): Likewise.
9724         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9725         (struct inv_list): Moved this to c-family/array-notation-common.c.
9726         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
9728 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9730         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9731         reduction functions outside the for-loop.  Added a check if the fundecl
9732         is non-NULL.  Finally, removed an unwanted if-statement, and made the
9733         body unconditional.
9735 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9737         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9738         condition of the if-statement matches the rank of else-block and then-
9739         block when array notations are used.
9740         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9741         expression after the entire function body is parsed.
9742         (c_parser_expr_no_commas): Delayed creating array notation expressions
9743         to the end of function parsing.
9744         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9745         whole if-statement instead of just the condition.
9746         (expand_array_notation_exprs): Added MODIFY_EXPR case.
9748 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9750         PR c/57474
9751         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9752         array to NULL_TREE if they are unused.  Also added a check for the
9753         field to be NULL before its fields are used in future.
9755 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9757         PR bootstrap/57450
9758         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9759         (build_array_notation_expr): Likewise.
9761 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9763         * c-typeck.c (build_array_ref): Added a check to see if array's
9764         index is greater than one.  If true, then emit an error.
9765         (build_function_call_vec): Exclude error reporting and checking
9766         for builtin array-notation functions.
9767         (convert_arguments): Likewise.
9768         (c_finish_return): Added a check for array notations as a return
9769         expression.  If true, then emit an error.
9770         (c_finish_loop): Added a check for array notations in a loop
9771         condition.  If true then emit an error.
9772         (lvalue_p): Added a ARRAY_NOTATION_REF case.
9773         (build_binary_op): Added a check for array notation expr inside
9774         op1 and op0.  If present, we call another function to find correct
9775         type.
9776         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9777         * c-parser.c (c_parser_compound_statement): Check if array
9778         notation code is used in tree, if so, then transform them into
9779         appropriate C code.
9780         (c_parser_expr_no_commas): Check if array notation is used in LHS
9781         or RHS, if so, then build array notation expression instead of
9782         regular modify.
9783         (c_parser_postfix_expression_after_primary): Added a check for
9784         colon(s) after square braces, if so then handle it like an array
9785         notation.  Also, break up array notations in unary op if found.
9786         (c_parser_direct_declarator_inner): Added a check for array
9787         notation.
9788         (c_parser_compound_statement): Added a check for array notation in
9789         a stmt.  If one is present, then expand array notation expr.
9790         (c_parser_if_statement): Likewise.
9791         (c_parser_switch_statement): Added a check for array notations in
9792         a switch statement's condition.  If true, then output an error.
9793         (c_parser_while_statement): Similarly, but for a while.
9794         (c_parser_do_statement): Similarly, but for a do-while.
9795         (c_parser_for_statement): Similarly, but for a for-loop.
9796         (c_parser_unary_expression): Check if array notation is used in a
9797         pre-increment or pre-decrement expression.  If true, then expand
9798         them.
9799         (c_parser_array_notation): New function.
9800         * c-array-notation.c: New file.
9801         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
9803 2013-05-23  Mike Stump  <mikestump@comcast.net>
9805         * c-typeck.c (convert_for_assignment): Handle references to memory
9806         spaces better.
9808 2013-05-16  Jason Merrill  <jason@redhat.com>
9810         * Make-lang.in (cc1$(exeext)): Use link mutex.
9812 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
9814         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9815         to simply use OPT_Wpointer_arith.
9816         (build_unary_op): Likewise.
9818 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
9820         PR c/19449
9821         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9822         argument.  If set, or it temporarily for parsing of the first
9823         argument into force_folding_builtin_constant_p.
9824         (c_parser_postfix_expression): Adjust callers.
9826 2013-03-21  Richard Biener  <rguenther@suse.de>
9828         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9829         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
9831 2013-02-12  Marek Polacek  <polacek@redhat.com>
9833         PR c/44938
9834         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9835         origtypes to NULL.
9837 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
9839         PR c/56078
9840         * c-typeck.c (set_nonincremental_init_from_string): If
9841         constructor_max_index is NULL, treat it as if tree_int_cst_lt
9842         returned false.
9843         (process_init_element): Likewise.
9845 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
9847         PR c++/55619
9848         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9849         argument, don't call default_function_array_conversion
9850         nor c_fully_fold here.
9851         (c_parser_asm_statement): Adjust callers.
9852         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9853         and outputs here, and call default_function_array_conversion
9854         on inputs that don't need to be addressable.
9856 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
9858         PR c/39464
9859         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9860         warning require that both c_common_unsigned_type as well as
9861         c_common_signed_type is the same for both mvl and mvr types.
9863 2012-11-16  Diego Novillo  <dnovillo@google.com>
9865         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9867         * c-common.c: Use new vec API in vec.h.
9868         * c-common.h: Likewise.
9869         * c-gimplify.c: Likewise.
9870         * c-pragma.c: Likewise.
9871         * c-pretty-print.c: Likewise.
9872         * c-pretty-print.h: Likewise.
9873         * c-semantics.c: Likewise.
9874         * c-decl.c: Likewise.
9875         * c-parser.c: Likewise.
9876         * c-tree.h: Likewise.
9877         * c-typeck.c: Likewise.
9879 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
9881         PR c++/54930
9882         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9884 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
9886         PR c/53066
9887         * c-decl.c (warn_if_shadowing): Do not warn if a variable
9888         shadows a function, unless the variable is a function or a
9889         pointer-to-function.
9891 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
9893         PR c/54381
9894         * c-parser.c (struct c_tree_loc_pair): Removed.
9895         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9896         add location_t * and tree * arguments, fill in array of 3
9897         sizeof_arg trees and corresponding locs.
9898         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9899         c_parser_expr_list callers.
9900         (c_parser_postfix_expression_after_primary): Likewise.  Pass
9901         array of 3 sizeof_arg trees and locs (corresponding to first
9902         3 arguments) to sizeof_pointer_memaccess_warning.
9904 2012-10-09  Lawrence Crowl  <crowl@google.com>
9906         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9907         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9908         hash table.
9910 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
9912         PR c++/54194
9913         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9914         call.
9916 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
9918         PR c++/54427
9919         * c-typeck.c: Include c-common.h.
9920         (enum stv_conv): Moved to c-common.h.
9921         (scalar_to_vector): Moved to c-common.c.
9922         (build_binary_op): Adapt to scalar_to_vector's new prototype.
9923         * Make-lang.in: c-typeck.c depends on c-common.h.
9925 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
9927         * c-decl.c (c_write_global_declarations): Fix handling of
9928         -fdump-ada-spec*.
9930 2012-09-30  Sharad Singhai  <singhai@google.com>
9932         * c-decl.c (c_write_global_declarations): Use a different method
9933         to determine if the dump has ben initialized.
9935 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
9937         PR c/54552
9938         * c-typeck.c (c_cast_expr): When casting to a type requiring
9939         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
9940         c_fully_fold first.
9942 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
9944         PR c/54103
9945         * c-typeck.c (build_unary_op): Pass original argument of
9946         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
9947         any C_MAYBE_CONST_EXPR, if it has integer operands.
9948         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
9949         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
9950         to c_objc_common_truthvalue_conversion, then remove any
9951         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
9952         c_objc_common_truthvalue_conversion not
9953         c_common_truthvalue_conversion.
9954         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
9955         call note_integer_operands for arguments with integer operands
9956         that are not integer constants.
9958 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
9960         PR c/54559
9961         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
9962         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9964 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
9966         PR c/54428
9967         * c-convert.c (convert): Don't call fold_convert_loc if
9968         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9969         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
9970         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9972 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
9974         PR c/54355
9975         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9976         for nested and empty_ok arguments in the call to
9977         c_parser_declaration_or_fndef.
9979 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
9981         * c-tree.h (c_last_sizeof_arg): Declare.
9982         * c-parser.c (struct c_tree_loc_pair): New type.
9983         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
9984         non-NULL.
9985         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9986         (c_parser_postfix_expression_after_primary): Likewise.  Call
9987         sizeof_pointer_memaccess_warning if needed.
9988         (sizeof_ptr_memacc_comptypes): New function.
9989         * c-typeck.c (c_last_sizeof_arg): New global variable.
9990         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9992 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
9994         * c-lang.h (lang_decl): Add variable_size GTY option.
9996 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
9998         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9999         * Make-lang.in: Fix dependencies.
10001 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
10003         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
10004         and add language Makefile hooks.
10005         * config-lang.in: New file.
10006         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
10007         add the required "normal" config-lang.in rules.
10008         * c-lang.h: Moved from gcc/ to here.
10009         * c-tree.h: Likewise.
10010         * c-objc-common.c: Likewise.
10011         * c-objc-common.h: Likewise.
10012         * c-typeck.c: Likewise.
10013         * c-convert.c: Likewise.
10014         * c-lang.c: Likewise.
10015         * c-aux-info.c: Likewise.
10016         * c-errors.c: Likewise.
10017         * gccspec.c: Likewise.
10018         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
10019         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
10021 Copyright (C) 2012-2024 Free Software Foundation, Inc.
10023 Copying and distribution of this file, with or without modification,
10024 are permitted in any medium without royalty provided the copyright
10025 notice and this notice are preserved.