Daily bump.
[official-gcc.git] / gcc / c / ChangeLog
blob69495aff11e1d1e29cb1e353b724659d556bebde
1 2024-02-26  Jakub Jelinek  <jakub@redhat.com>
3         PR c/114042
4         * c-parser.cc (c_parser_postfix_expression): Diagnose
5         __builtin_stdc_bit_* argument with ENUMERAL_TYPE or BOOLEAN_TYPE
6         type or if signed here rather than on the replacement builtins
7         in check_builtin_function_arguments.
9 2024-02-22  Jakub Jelinek  <jakub@redhat.com>
11         PR c/114007
12         * c-parser.cc (c_parser_std_attribute): Remove loose_scope_p argument.
13         Instead of checking it, parse 2 CPP_COLONs with the first one with
14         COLON_SCOPE flag the same as CPP_SCOPE.
15         (c_parser_std_attribute_list): Remove loose_scope_p argument, don't
16         pass it to c_parser_std_attribute.
17         (c_parser_std_attribute_specifier): Adjust c_parser_std_attribute_list
18         caller.
20 2024-02-13  Tobias Burnus  <tburnus@baylibre.com>
22         PR middle-end/113904
23         * c-parser.cc (c_parser_omp_context_selector): Handle splitting of
24         OMP_TRAIT_PROPERTY_EXPR into OMP_TRAIT_PROPERTY_{DEV_NUM,BOOL}_EXPR.
26 2024-02-10  Jakub Jelinek  <jakub@redhat.com>
28         * c-decl.cc (get_parm_array_spec): Use HOST_WIDE_INT_PRINT_UNSIGNED
29         instead of "%lu" and casts to unsigned long or unsigned long long.
31 2024-02-08  Joseph Myers  <josmyers@redhat.com>
33         PR c/113776
34         * c-typeck.cc (c_objc_common_truthvalue_conversion): Return an
35         integer constant expression for boolean conversion of floating
36         constant.
38 2024-02-05  Jakub Jelinek  <jakub@redhat.com>
40         PR c/113740
41         * c-decl.cc (finish_struct): Only use build_bitint_type if
42         bit-field has width larger or equal to minimum _BitInt
43         precision.
45 2024-01-31  Joseph Myers  <josmyers@redhat.com>
47         PR c/112571
48         * c-decl.cc (start_enum): Clear ENUM_FIXED_UNDERLYING_TYPE_P when
49         defining without a fixed underlying type an enumeration previously
50         declared with a fixed underlying type.
52 2024-01-31  Martin Uecker  <uecker@tugraz.at>
54         PR c/113438
55         * c-typeck.cc (composite_type_internal): Set TYPE_STUB_DECL.
57 2024-01-31  Joseph Myers  <josmyers@redhat.com>
59         PR c/111059
60         PR c/111911
61         * c-tree.h (c_objc_common_truthvalue_conversion): Add third
62         argument.
63         * c-convert.cc (c_convert): For conversions to boolean, pass third
64         argument to c_objc_common_truthvalue_conversion rather than
65         converting here.
66         * c-typeck.cc (build_c_cast): Ensure arguments with integer
67         operands are marked as such for conversion to boolean.
68         (c_objc_common_truthvalue_conversion): Add third argument TYPE.
70 2024-01-21  Martin Uecker  <uecker@tugraz.at>
72         PR c/113492
73         * c-decl.cc (grokdeclarator): Use c_common_unsigned_type instead of
74         unsigned_type_for to create the unsigned type for bitfields declared
75         with int when using -funsigned-bitfields.
77 2024-01-12  Jakub Jelinek  <jakub@redhat.com>
79         PR c/113315
80         * c-typeck.cc (build_array_ref): If index has BITINT_TYPE type with
81         precision larger than sizetype precision, convert it to sizetype.
83 2024-01-11  Julian Brown  <julian@codesourcery.com>
85         * c-parser.cc (c_parser_braced_init, c_parser_conditional_expression):
86         Don't allow OpenMP array section.
87         (c_parser_postfix_expression): Don't allow array section in statement
88         expression.
89         (c_parser_postfix_expression_after_primary): Add support for OpenMP
90         array section parsing.
91         (c_parser_expr_list): Don't allow OpenMP array section here.
92         (c_parser_omp_variable_list): Change ALLOW_DEREF parameter to
93         MAP_LVALUE.  Support parsing of general lvalues in "map", "to" and
94         "from" clauses.
95         (c_parser_omp_var_list_parens): Change ALLOW_DEREF parameter to
96         MAP_LVALUE.  Update call to c_parser_omp_variable_list.
97         (c_parser_oacc_data_clause): Update calls to
98         c_parser_omp_var_list_parens.
99         (c_parser_omp_clause_reduction): Use OMP_ARRAY_SECTION tree node
100         instead of TREE_LIST for array sections.
101         (c_parser_omp_target): Allow GOMP_MAP_ATTACH.
102         * c-tree.h (c_omp_array_section_p): Add extern declaration.
103         (build_omp_array_section): Add prototype.
104         * c-typeck.cc (c_omp_array_section_p): Add flag.
105         (mark_exp_read): Support OMP_ARRAY_SECTION.
106         (build_omp_array_section): Add function.
107         (build_external_ref): Tweak error path for OpenMP array sections.
108         (handle_omp_array_sections_1): Use OMP_ARRAY_SECTION tree code instead
109         of TREE_LIST.  Handle more kinds of expressions.
110         (c_oacc_check_attachments): Use OMP_ARRAY_SECTION instead of TREE_LIST
111         for array sections.
112         (c_finish_omp_clauses): Use OMP_ARRAY_SECTION instead of TREE_LIST.
113         Check for supported expression types.
115 2024-01-09  Tamar Christina  <tamar.christina@arm.com>
117         PR c/113267
118         * c-parser.cc (c_parser_for_statement): Skip the pragma is no cond.
120 2024-01-03  Kwok Cheung Yeung  <kcy@codesourcery.com>
122         * c-parser.cc (c_parser_omp_clause_name): Move handling of indirect
123         clause to correspond to alphabetical order.
125 2023-12-30  Martin Uecker  <uecker@tugraz.at>
127         * c-typeck.cc (tagged_types_tu_compatible_p): Revise.
129 2023-12-22  Martin Uecker  <uecker@tugraz.at>
131         * c-typeck.cc (composite_type_internal): Adapted from
132         composite_type to support structs and unions.
133         (composite_type): New wrapper function.
134         (build_conditional_operator): Return composite type.
135         * c-decl.cc (finish_struct): Allow NULL for
136         enclosing_struct_parse_info.
138 2023-12-21  Martin Uecker  <uecker@tugraz.at>
140         * c-decl.cc (c_struct_hasher): Hash stable for struct
141         types.
142         (c_struct_hasher::hash, c_struct_hasher::equal): New
143         functions.
144         (finish_struct): Set TYPE_CANONICAL to first struct in
145         equivalence class.
146         * c-objc-common.cc (c_get_alias_set): Let structs or
147         unions with variable size alias anything.
148         * c-tree.h (comptypes_equiv): New prototype.
149         * c-typeck.cc (comptypes_equiv): New function.
150         (comptypes_internal): Implement equivalence mode.
151         (tagged_types_tu_compatible): Implement equivalence mode.
153 2023-12-21  Martin Uecker  <uecker@tugraz.at>
155         * c-tree.h (c_parser_enum_specifier): Add parameter.
156         * c-decl.cc (start_enum): Allow redefinition.
157         (finish_enum): Diagnose conflicts.
158         (build_enumerator): Set context.
159         (diagnose_mismatched_decls): Diagnose conflicting enumerators.
160         (push_decl): Preserve context for enumerators.
161         * c-typeck.cc (tagged_types_tu_compatible_p): Adapt.
162         * c-parser.cc (c_parser_enum_specifier): Remember when
163         seen is from an enum type which is not yet defined.
165 2023-12-21  Martin Uecker  <uecker@tugraz.at>
167         * c-decl.cc (previous_tag): New function.
168         (parser_xref_tag): Find earlier definition.
169         (get_parm_info): Turn off warning for C23.
170         (start_struct): Allow redefinitons.
171         (finish_struct): Diagnose conflicts.
172         * c-tree.h (comptypes_same_p): Add prototype.
173         * c-typeck.cc (comptypes_same_p): New function.
174         (comptypes_internal): Activate comparison of tagged types.
175         (convert_for_assignment): Ignore qualifiers.
176         (digest_init): Add error.
177         (initialized_elementwise_p): Allow compatible types.
179 2023-12-20  Jakub Jelinek  <jakub@redhat.com>
181         * c-parser.cc (c_parser_postfix_expression_after_primary): Grow
182         sizeof_arg and sizeof_arg_loc arrays to 6 elements.  Call
183         warn_for_calloc if warn_calloc_transposed_args for functions with
184         alloc_size type attribute with 2 arguments.
185         (c_parser_expr_list): Use 6 instead of 3.
186         * c-typeck.cc (build_c_cast): Call warn_for_alloc_size for casts
187         of calls to functions with alloc_size type attribute.
188         (convert_for_assignment): Likewise.
190 2023-12-19  Sandra Loosemore  <sandra@codesourcery.com>
192         * c-parser.cc (omp_construct_selectors): Delete.
193         (omp_device_selectors): Delete.
194         (omp_implementation_selectors): Delete.
195         (omp_user_selectors): Delete.
196         (c_parser_omp_context_selector): Adjust for new representations
197         and simplify dispatch logic.  Uniformly warn instead of sometimes
198         error when an unknown selector is found.  Adjust error messages
199         for extraneous/incorrect score.
200         (c_parser_omp_context_selector_specification): Likewise.
201         (c_finish_omp_declare_variant): Adjust for new representations.
203 2023-12-19  Sandra Loosemore  <sandra@codesourcery.com>
205         * c-parser.cc (c_parser_omp_context_selector): Adjust for new
206         namelist property representation.
208 2023-12-19  Sandra Loosemore  <sandra@codesourcery.com>
210         * c-parser.cc (c_parser_omp_context_selector): Use new constructors.
212 2023-12-18  Richard Biener  <rguenther@suse.de>
214         PR c/111975
215         * gimple-parser.cc (c_parser_gimple_postfix_expression):
216         Parse TARGET_MEM_REF extended operands for __MEM.
218 2023-12-13  Jason Merrill  <jason@redhat.com>
220         * c-typeck.cc (convert_for_assignment): Adjust call to
221         warn_for_address_of_packed_member.
223 2023-12-13  Julian Brown  <julian@codesourcery.com>
225         * c-parser.cc (c_parser_oacc_all_clauses): Add TARGET_P parameter. Use
226         to select region type for c_finish_omp_clauses call.
227         (c_parser_oacc_loop): Update calls to c_parser_oacc_all_clauses.
228         (c_parser_oacc_compute): Likewise.
229         (c_parser_omp_target_data, c_parser_omp_target_enter_data): Support
230         ATTACH kind.
231         (c_parser_omp_target_exit_data): Support DETACH kind.
232         (check_clauses): Handle GOMP_MAP_POINTER and GOMP_MAP_ATTACH here.
233         * c-typeck.cc (handle_omp_array_sections_1,
234         handle_omp_array_sections, c_finish_omp_clauses): Use
235         c_omp_address_inspector class and OMP address tokenizer to analyze and
236         expand map clause expressions.  Fix some diagnostics.  Fix "is OpenACC"
237         condition for C_ORT_ACC_TARGET addition.
239 2023-12-13  Julian Brown  <julian@codesourcery.com>
241         * c-typeck.cc (c_finish_omp_clauses): Add braces and reindent
242         OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza.
244 2023-12-11  Martin Uecker  <uecker@tugraz.at>
246         PR c/112488
247         * c-decl.cc (add_decl_expr): Revise.
248         (finish_struct): Create DECL_EXPR.
249         * c-parser.cc (c_parser_struct_or_union_specifier): Call
250         finish_struct with expression for VLA sizes.
251         * c-tree.h (finish_struct): Add argument.
253 2023-12-11  Tobias Burnus  <tobias@codesourcery.com>
255         * c-parser.cc (c_parser_omp_requires): Handle acquires/release
256         in atomic_default_mem_order clause.
257         (c_parser_omp_atomic): Update.
259 2023-12-05  Richard Sandiford  <richard.sandiford@arm.com>
261         * c-decl.cc (std_attribute_table): Add extra braces to work
262         around PR 16333 in older compilers.
264 2023-12-05  Richard Biener  <rguenther@suse.de>
266         PR c/86869
267         * c-typeck.cc (c_build_qualified_type): Preserve address-space
268         info for ARRAY_TYPE.
270 2023-12-02  Richard Sandiford  <richard.sandiford@arm.com>
272         * c-tree.h (std_attribute_table): Declare.
273         * c-decl.cc (std_attribute_table): Change type to
274         scoped_attribute_specs, using...
275         (std_attributes): ...this as the underlying array.
276         (c_init_decl_processing): Remove call to register_scoped_attributes.
277         * c-objc-common.h (c_objc_attribute_table): New global.
278         (LANG_HOOKS_ATTRIBUTE_TABLE): Use it.
279         (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
280         (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
282 2023-12-01  Florian Weimer  <fweimer@redhat.com>
284         PR other/44209
285         * c-decl.cc (grokparms): Issue permerror for
286         OPT_Wdeclaration_missing_parameter_type instead of a pedwarn.
288 2023-12-01  Florian Weimer  <fweimer@redhat.com>
290         PR c/96284
291         * c-typeck.cc (build_conditional_expr): Upgrade most pointer
292         type mismatches to a permerror.
293         (convert_for_assignment): Use permerror_opt and
294         permerror_init for OPT_Wincompatible_pointer_types warnings.
296 2023-12-01  Florian Weimer  <fweimer@redhat.com>
298         PR c/96284
299         * c-typeck.cc (c_finish_return): Use permerrors
300         for OPT_Wreturn_mismatch diagnostics.
302 2023-12-01  Florian Weimer  <fweimer@redhat.com>
304         * c-decl.cc (grokdeclarator): Do not skip -Wimplicit-int
305         warnings or errors in system headers.
307 2023-12-01  Florian Weimer  <fweimer@redhat.com>
309         * c-decl.cc (warn_defaults_to): Remove.
310         (grok_declarator, start_function): Call permerror_opt
311         instead of warn_defaults_to.
312         (store_parm_decls_oldstyle): Call permerror_opt for
313         OPT_Wimplicit_int.
315 2023-12-01  Florian Weimer  <fweimer@redhat.com>
317         PR c/91092
318         PR c/96284
319         * c-decl.cc (implicit_decl_permerror): Rename from
320         implicit_decl_warning.  Call permerror_opt instead of
321         pedwarn and warning_at.
322         (implicitly_declare): Adjust callers.
324 2023-12-01  Florian Weimer  <fweimer@redhat.com>
326         PR c/96284
327         PR c/106416
328         * c-typeck.cc (build_conditional_expr): Use permerror_opt for
329         pointer/integer type mismatches, based on -Wint-conversion.
330         (pedwarn_permerror_init, permerror_init): New function.
331         (pedwarn_init): Call pedwarn_permerror_init.
332         (convert_for_assignment): Use permerror_opt and
333         permerror_init for -Wint-conversion warnings.
335 2023-11-29  Alexandre Oliva  <oliva@adacore.com>
337         * c-typeck.cc (convert_lvalue_to_rvalue): Decay hardbools.
338         * c-convert.cc (convert): Convert to hardbool through
339         truthvalue.
340         * c-decl.cc (check_bitfield_type_and_width): Skip enumeral
341         truncation warnings for hardbool.
342         (finish_struct): Propagate hardbool attribute to bitfield
343         types.
344         (digest_init): Convert to hardbool.
346 2023-11-28  Jason Merrill  <jason@redhat.com>
348         PR c++/94264
349         PR c++/53220
350         * c-typeck.cc (array_to_pointer_conversion): Adjust -Wc++-compat
351         diagnostic.
353 2023-11-28  Richard Biener  <rguenther@suse.de>
355         PR middle-end/112741
356         * gimple-parser.cc (c_parser_parse_gimple_body): Also
357         set DECL_SEEN_IN_BIND_EXPR_Pfor locals.
359 2023-11-27  Alex Coplan  <alex.coplan@arm.com>
360             Iain Sandoe  <iain@sandoe.co.uk>
362         PR c++/60512
363         * c-lang.cc (c_family_register_lang_features): New.
364         * c-objc-common.cc (struct c_feature_info): New.
365         (c_register_features): New.
366         * c-objc-common.h (c_register_features): New.
368 2023-11-24  Tobias Burnus  <tobias@codesourcery.com>
370         * c-parser.cc (c_parser_omp_clause_num_threads,
371         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
372         c_parser_omp_clause_priority, c_parser_omp_clause_schedule,
373         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
374         c_parser_omp_clause_dist_schedule, c_parser_omp_depobj,
375         c_parser_omp_scan_loop_body, c_parser_omp_assumption_clauses):
376         Add OPT_Wopenmp to warning_at.
378 2023-11-24  Tobias Burnus  <tobias@codesourcery.com>
380         * c-parser.cc (c_parser_omp_depobj): Accept optionally an argument
381         to the destroy clause.
383 2023-11-23  Jakub Jelinek  <jakub@redhat.com>
385         * c-parser.cc (c_parser_postfix_expression): Handle RID_BUILTIN_STDC.
386         * c-decl.cc (names_builtin_p): Likewise.
388 2023-11-14  Jakub Jelinek  <jakub@redhat.com>
390         PR c/111309
391         * c-typeck.cc (convert_arguments): Don't promote first argument
392         of BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
394 2023-11-10  Martin Uecker  <uecker@tugraz.at>
396         * c-typeck.cc (struct comptypes_data): Add anon_field flag.
397         (comptypes, comptypes_check_unum_int,
398         comptypes_check_different_types): Remove old cache.
399         (tagged_tu_types_compatible_p): Rewrite.
401 2023-11-09  Florian Weimer  <fweimer@redhat.com>
403         * c-typeck.cc (c_finish_return): Use pedwarn with
404         OPT_Wreturn_mismatch for missing/extra return expressions.
406 2023-11-07  Kwok Cheung Yeung  <kcy@codesourcery.com>
408         * c-decl.cc (c_decl_attributes): Add attribute for indirect
409         functions.
410         * c-lang.h (c_omp_declare_target_attr): Add indirect field.
411         * c-parser.cc (c_parser_omp_clause_name): Handle indirect clause.
412         (c_parser_omp_clause_indirect): New.
413         (c_parser_omp_all_clauses): Handle indirect clause.
414         (OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
415         (c_parser_omp_declare_target): Handle indirect clause.  Emit error
416         message if device_type or indirect clauses used alone.  Emit error
417         if indirect clause used with device_type that is not 'any'.
418         (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
419         (c_parser_omp_begin): Handle indirect clause.
420         * c-typeck.cc (c_finish_omp_clauses): Handle indirect clause.
422 2023-11-07  Joseph Myers  <joseph@codesourcery.com>
424         * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p
425         instead of c2x_auto_p.  Refer to C23 instead of C2X in diagnostics
426         and comments.
427         * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and
428         warn_c11_c23_compat instead of warn_c11_c2x_compat.  Refer to C23
429         instead of C2X in comments.
430         * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x,
431         warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p
432         instead of c2x_auto_p and D_C23 instead of D_C2X.  Refer to C23
433         instead of C2X in diagnostics and comments.
434         * c-tree.h: Refer to C23 instead of C2X in comments.
435         (struct c_declspecs): Rename c2x_auto_p to c23_auto_p.
436         * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and
437         warn_c11_c23_compat instead of warn_c11_c2x_compat.  Refer to C23
438         instead of C2X in diagnostics and comments.
440 2023-11-06  Joseph Myers  <joseph@codesourcery.com>
442         PR c/107954
443         * c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
444         OPT_Wc11_c2x_compat.
445         * c-typeck.cc (build_conditional_expr, convert_for_assignment):
446         Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.
448 2023-11-04  Jakub Jelinek  <jakub@redhat.com>
450         * c-parser.h (c_maybe_parse_omp_decl): Declare.
451         * c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
452         (c_parser_std_attribute): Uncoment omp::decl handling.
453         (c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
454         don't expect any arguments, instead create clause or TREE_LIST for
455         that decl.
456         (c_maybe_parse_omp_decl): New function.
457         (c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
458         first token isn't name or comma invoke c_parser_omp_var_list_parens.
459         * c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
460         use *node rather than non-existing *decl.
462 2023-11-04  Jakub Jelinek  <jakub@redhat.com>
464         * c-tree.def: New file.
465         * c-tree.h (struct c_tree_token_vec): Forward declare.
466         (c_tree_size): Declare.
467         * c-lang.h (struct c_omp_declare_target_attr): Add attr_syntax member.
468         (struct c_omp_begin_assumes_data): New type.
469         (current_omp_begin_assumes): Change type from int to
470         vec<c_omp_begin_assumes_data, va_gc> *.
471         * c-lang.cc: Include c-family/c-pragma.h and c-parser.h.
472         * c-parser.h (struct c_tree_token_vec_struct): New type.
473         (C_TOKEN_VEC_TOKENS): New macro.
474         * c-parser.cc (struct c_parser): Add omp_attrs_forbidden_p and
475         in_omp_attribute_pragma members.
476         (c_parser_skip_until_found): Handle CPP_PRAGMA_EOL when
477         parser->in_omp_attribute_pragma.
478         (c_parser_skip_to_pragma_eol): Likewise.
479         (c_parser_translation_unit): Adjust for current_omp_begin_assumes
480         being a vector rather than counter.
481         (c_parser_declaration_or_fndef): Handle omp::directive and
482         omp::sequence attributes on attribute declaration and declare simd
483         or declare variant directives in those on function declarations.
484         (c_parser_check_balanced_raw_token_sequence): Forward declare.
485         (c_parser_omp_directive_args, c_parser_omp_sequence_args): New
486         functions.
487         (c_parser_std_attribute): Handle omp::directive and omp::sequence
488         attributes.
489         (struct c_omp_attribute_data): New type.
490         (c_parser_handle_statement_omp_attributes,
491         c_parser_handle_directive_omp_attributes): New functions.
492         (c_parser_compound_statement_nostart): Handle omp::directive and
493         omp::sequence attributes on statements.  Formatting fix.
494         (c_parser_all_labels): Handle omp::directive and omp::sequence
495         attributes on statements.
496         (c_parser_statement): Clear parser->omp_attrs_forbidden_p.
497         (c_parser_omp_variable_list): Handle parser->tokens
498         != &parser->tokens_buf[0] by saving/restoring it.
499         (c_parser_omp_structured_block): Set parser->omp_attrs_forbidden_p.
500         (c_parser_omp_section_scan): New function.
501         (c_parser_omp_structured_block_sequence, c_parser_omp_sections_scope):
502         Use it.
503         (c_parser_omp_parallel): Set parser->omp_attrs_forbidden_p.
504         (c_parser_omp_task): Likewise.
505         (c_parser_omp_declare_simd): Handle function declaration after
506         std attributes.
507         (c_finish_omp_declare_simd): Don't assert all kinds are the same.
508         (c_parser_omp_declare_target): Also push attr_syntax flag.
509         (c_parser_omp_begin): Likewise.  Adjust for current_omp_begin_assumes
510         type change.
511         (c_parser_omp_end): Adjust for current_omp_begin_assumes type
512         change.  Diagnose mixing of attribute vs. pragma syntax on end assumes
513         or end declare target.
514         (c_parser_omp_declare_reduction): Handle parser->tokens
515         != &parser->tokens_buf[0] by saving/restoring it.
516         * c-decl.cc: Include c-parser.h.
517         (current_omp_begin_assumes): Change type from int to
518         vec<c_omp_begin_assumes_data, va_gc> *.
519         (struct c_tree_token_vec): New type.  Add static assertions
520         for sizeof and offsetof.
521         (union lang_tree_node): Add c_token_vec member and adjust GTY
522         desc for it.
523         (c_tree_size): New function.
524         (c_decl_attributes): Diagnose invalid omp::directive attribute
525         uses.
526         * c-objc-common.h (LANG_HOOKS_TREE_SIZE): Redefine.
528 2023-11-02  Martin Uecker  <uecker@tugraz.at>
530         PR c/112347
531         * c-typeck.cc (convert_for_assignment): Add missing check.
533 2023-11-01  Martin Uecker  <uecker@tugraz.at>
535         PR c/71219
536         * c-typeck.cc (convert_for_assignment): Add warning.
538 2023-10-26  liuhongt  <hongtao.liu@intel.com>
540         * c-typeck.cc (build_vec_cmp): Pass type of arg0 to
541         truth_type_for.
543 2023-10-25  Thomas Schwinge  <thomas@codesourcery.com>
545         * c-parser.cc (c_parser_omp_clause_name): Return
546         'PRAGMA_OACC_CLAUSE_SELF' for "self".
547         (c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
548         (c_parser_oacc_all_clauses): Remove 'bool compute_p' formal
549         parameter, and instead locally determine whether we're called for
550         an OpenACC compute construct or OpenACC 'update' directive.
551         (c_parser_oacc_compute): Adjust.
553 2023-10-25  Chung-Lin Tang  <cltang@codesourcery.com>
555         * c-parser.cc (c_parser_oacc_compute_clause_self): New function.
556         (c_parser_oacc_all_clauses): Add new 'bool compute_p = false'
557         parameter, add parsing of self clause when compute_p is true.
558         (OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
559         (OACC_PARALLEL_CLAUSE_MASK): Likewise,
560         (OACC_SERIAL_CLAUSE_MASK): Likewise.
561         (c_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
562         set compute_p argument to true.
563         * c-typeck.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case.
565 2023-10-20  Florian Weimer  <fweimer@redhat.com>
567         PR c/109827
568         PR other/44209
569         * c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
570         for pointer/integer mismatch warnings.
572 2023-10-20  Florian Weimer  <fweimer@redhat.com>
574         PR c/109826
575         PR other/44209
576         * c-typeck.cc (build_conditional_expr): Use
577         OPT_Wincompatible_pointer_types for pointer mismatches.
578         Emit location information for the operand.
580 2023-10-19  Andrew Pinski  <pinskia@gmail.com>
582         PR c/100532
583         * c-typeck.cc (convert_argument): After erroring out
584         about an incomplete type return error_mark_node.
586 2023-10-19  Andrew Pinski  <pinskia@gmail.com>
588         PR c/104822
589         * c-typeck.cc (convert_for_assignment): Check for null pointer
590         before warning about an incompatible scalar storage order.
592 2023-10-18  Andrew Pinski  <pinskia@gmail.com>
594         PR c/101364
595         * c-decl.cc (diagnose_arglist_conflict): Test for
596         error mark before calling of c_type_promotes_to.
598 2023-10-18  Andrew Pinski  <pinskia@gmail.com>
600         PR c/101285
601         * c-typeck.cc (c_safe_arg_type_equiv_p): Return true for error
602         operands early.
604 2023-10-17  Martin Uecker  <uecker@tugraz.at>
606         PR c/111708
607         * c-decl.cc (grokdeclarator): Add error.
609 2023-10-03  David Malcolm  <dmalcolm@redhat.com>
611         * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
612         text_info fields.
614 2023-09-30  Eugene Rozenfeld  <erozen@microsoft.com>
616         * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
618 2023-09-20  Jakub Jelinek  <jakub@redhat.com>
620         * c-parser.cc (c_parser_postfix_expression_after_primary): Parse
621         __builtin_classify_type call with typename as argument.
623 2023-09-19  Richard Biener  <rguenther@suse.de>
625         PR c/111468
626         * gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
628 2023-09-19  Richard Biener  <rguenther@suse.de>
630         PR c/111468
631         * gimple-parser.cc (c_parser_gimple_binary_expression): Add
632         return type argument.
633         (c_parser_gimple_statement): Adjust.
634         (c_parser_gimple_paren_condition): Likewise.
635         (c_parser_gimple_binary_expression): Use passed in return type,
636         add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
637         __UNORDERED and __ORDERED.
639 2023-09-12  Tobias Burnus  <tobias@codesourcery.com>
641         * c-parser.cc (struct c_omp_loc_tree): New.
642         (c_check_omp_allocate_allocator_r): New; checking moved from ...
643         (c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
644         ICE with tree_to_shwi for invalid too-large value.
646 2023-09-12  Tobias Burnus  <tobias@codesourcery.com>
648         * c-parser.cc (c_parser_omp_construct): Move call to
649         c_parser_omp_allocate to ...
650         (c_parser_pragma): ... here.
651         (c_parser_omp_allocate): Avoid ICE is allocator could not be
652         parsed; set 'omp allocate' attribute for stack/automatic variables
653         and only reject static variables; add several additional
654         restriction checks.
655         * c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
656         * c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
657         (c_mark_decl_jump_unsafe_in_current_scope): New.
658         (warn_about_goto, c_check_switch_jump_warnings): Add error for
659         omp-allocated decls.
661 2023-09-12  Martin Uecker  <uecker@tugraz.at>
663         * c-typeck.cc (struct comptypes_data): Add structure.
664         (tagged_types_tu_compatible_p,
665         function_types_compatible_p, type_lists_compatible_p,
666         comptypes_internal): Add structure to interface, change
667         return type to bool, and adapt calls.
668         (comptarget_types): Change return type too bool.
669         (comptypes, comptypes_check_enum_int,
670         comptypes_check_different_types): Adapt calls.
672 2023-09-06  Jakub Jelinek  <jakub@redhat.com>
674         PR c/102989
675         * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
676         * c-typeck.cc (c_common_type): Emit sorry for common type between
677         _Complex integer and larger _BitInt and return the _Complex integer.
679 2023-09-06  Jakub Jelinek  <jakub@redhat.com>
681         PR c/102989
682         * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
683         * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
684         bit-fields.
685         (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
686         if possible.
687         (declspecs_add_type): Formatting fixes.  Handle cts_bitint.  Adjust
688         for added union in *specs.  Handle RID_BITINT.
689         (finish_declspecs): Handle cts_bitint.  Adjust for added union
690         in *specs.
691         * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
692         c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
693         RID_BITINT.
694         (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
695         * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
696         Add cts_bitint enumerator.
697         (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
698         and add bitint_prec there as well.
699         * c-typeck.cc (c_common_type, comptypes_internal):
700         Handle BITINT_TYPE.
701         (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
702         their declared type.
703         (build_array_ref, build_unary_op, build_conditional_expr,
704         build_c_cast, convert_for_assignment, digest_init, build_binary_op):
705         Handle BITINT_TYPE.
706         * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
707         INTEGER_TYPE.
708         * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
710 2023-09-06  Jakub Jelinek  <jakub@redhat.com>
712         * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
713         for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
714         text.
716 2023-09-05  Tobias Burnus  <tobias@codesourcery.com>
718         * c-parser.cc (c_parser_omp_clause_allocate): Handle
719         error_mark_node.
721 2023-08-25  Sandra Loosemore  <sandra@codesourcery.com>
723         * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
724         (struct omp_for_parse_data): New.
725         (check_omp_intervening_code): New.
726         (add_structured_block_stmt): New.
727         (c_parser_compound_statement_nostart): Recognize intervening code,
728         nested loops, and other things that need special handling in
729         OpenMP loop constructs.
730         (c_parser_while_statement): Error on loop in intervening code.
731         (c_parser_do_statement): Likewise.
732         (c_parser_for_statement): Likewise.
733         (c_parser_postfix_expression_after_primary): Error on calls to
734         the OpenMP runtime in intervening code.
735         (c_parser_pragma): Error on OpenMP pragmas in intervening code.
736         (c_parser_omp_loop_nest): New.
737         (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
738         c_parser_omp_loop_nest to do the heavy lifting.
740 2023-08-24  Richard Sandiford  <richard.sandiford@arm.com>
742         * c-parser.cc (c_parser_std_attribute): Conditionally allow
743         two colons to be used in place of ::.
744         (c_parser_std_attribute_list): New function, split out from...
745         (c_parser_std_attribute_specifier): ...here.  Allow the attribute-list
746         to start with __extension__.  When it does, also allow two colons
747         to be used in place of ::.
749 2023-08-22  Tobias Burnus  <tobias@codesourcery.com>
751         * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
752         'all' as category.
754 2023-08-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
756         PR c/106537
757         * c-typeck.cc (build_binary_op): Warning on comparing distinct
758         pointer types only when -Wcompare-distinct-pointer-types.
760 2023-08-15  Chung-Lin Tang  <cltang@codesourcery.com>
761             Thomas Schwinge  <thomas@codesourcery.com>
763         * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
765 2023-08-11  Jakub Jelinek  <jakub@redhat.com>
767         * c-parser.cc (c_parser_typeof_specifier): Handle
768         __typeof_unqual and __typeof_unqual__ as !is_std.
770 2023-08-11  Martin Uecker  <uecker@tugraz.at>
772         PR c/84510
773         * c-typeck.cc (build_c_cast): Add warning.
775 2023-08-05  Martin Uecker  <uecker@tugraz.at>
777         * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
778         warnings branches that are known not be taken during parsing.
780 2023-08-04  Tamar Christina  <tamar.christina@arm.com>
782         * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
783         c_parser_for_statement, c_parser_statement_after_labels,
784         c_parse_pragma_novector, c_parser_pragma): Wire through novector and
785         default to false.
787 2023-08-02  Eric Feng  <ef2648@columbia.edu>
789         PR analyzer/107646
790         * c-parser.cc: New functions on stashing values for the
791         analyzer.
793 2023-08-01  Lewis Hyatt  <lhyatt@gmail.com>
795         * c-parser.cc (pragma_lex_discard_to_eol): New function.
796         (c_init_preprocess): New function.
798 2023-07-31  Hamza Mahfooz  <someguy@effective-light.com>
800         PR c/65213
801         * c-decl.cc (start_decl): Handle
802         -Wmissing-variable-declarations.
804 2023-07-31  Chung-Lin Tang  <cltang@codesourcery.com>
806         * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
807         host_data construct to have an use_device clause.
809 2023-06-29  Qing Zhao  <qing.zhao@oracle.com>
811         PR c/77650
812         * c-decl.cc (finish_struct): Issue warnings for new option.
814 2023-06-29  Qing Zhao  <qing.zhao@oracle.com>
816         * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
817         struct/union type.
819 2023-06-29  Richard Biener  <rguenther@suse.de>
821         PR c/110454
822         * c-typeck.cc (convert_argument): Sink formal_prec compute
823         to where TYPE_PRECISION is valid to use.
825 2023-06-29  Eugene Rozenfeld  <erozen@microsoft.com>
827         * Make-lang.in: Pass correct stage cc1 when processing
828         profile data collected while building target libraries
830 2023-06-16  David Malcolm  <dmalcolm@redhat.com>
832         PR c/107583
833         * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
834         name" error.
836 2023-06-12  Tobias Burnus  <tobias@codesourcery.com>
838         * c-parser.cc (c_parser_omp_clause_map): Reword error message for
839         clearness especially with 'omp target (enter/exit) data.'
841 2023-06-06  Kwok Cheung Yeung  <kcy@codesourcery.com>
842             Tobias Burnus  <tobias@codesourcery.com>
844         * c-parser.cc (c_parser_omp_clause_defaultmap,
845         c_parser_omp_clause_map): Parse 'present'.
846         (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
847         (c_parser_omp_clause_from_to): New; parse to/from clauses with
848         optional present modifer.
849         (c_parser_omp_all_clauses): Update call.
850         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
851         c_parser_omp_target_exit_data): Handle new map enum values
852         for 'present' mapping.
854 2023-05-30  Tobias Burnus  <tobias@codesourcery.com>
856         PR c/109999
857         * c-parser.cc (c_parser_oacc_all_clauses,
858         c_parser_omp_all_clauses): Improve error wording.
860 2023-05-23  Martin Uecker  <uecker@tugraz.at>
862         PR c/109450
863         * c-decl.cc (add_decl_expr): New function.
864         (grokdeclarator): Add decl expr for size expression in
865         types pointed to by parameters declared as arrays.
867 2023-05-23  Martin Uecker  <uecker@tugraz.at>
869         PR c/70418
870         PR c/106465
871         PR c/107557
872         PR c/108423
873         * c-decl.cc (start_decl): Make sure size expression are
874         evaluated only in correct context.
875         (grokdeclarator): Size expression in fields may need a bind
876         expression, make sure DECL_EXPR is always created.
877         (grokfield, declspecs_add_type): Pass along size expressions.
878         (finish_struct): Remove unneeded DECL_EXPR.
879         (start_function): Evaluate size expressions for nested functions.
880         * c-parser.cc (c_parser_struct_declarations,
881         c_parser_struct_or_union_specifier): Pass along size expressions.
882         (c_parser_declaration_or_fndef): Evaluate size expression.
883         (c_parser_objc_at_property_declaration,
884         c_parser_objc_class_instance_variables): Adapt.
885         * c-tree.h (grokfield): Adapt declaration.
887 2023-05-19  Martin Uecker  <uecker@tugraz.at>
889         * c-decl.cc (set_type_context): Remove.
890         (pop_scope, diagnose_mismatched_decls, pushdecl):
891         Remove dead code.
892         * c-typeck.cc (comptypes_internal): Remove dead code.
893         (same_translation_unit_p): Remove.
894         (tagged_types_tu_compatible_p): Some fixes.
896 2023-05-19  Joseph Myers  <joseph@codesourcery.com>
898         * c-decl.cc (diagnose_mismatched_decls): Do not handle
899         thread-local declarations as tentative definitions for C2x.
900         (finish_decl): Do not allow thread-local definition with
901         incomplete type for C2x.
903 2023-05-18  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
905         * c-convert.cc (c_convert): Ditto.
906         * c-decl.cc (merge_decls): Ditto.
907         * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
908         (c_parser_omp_declare_reduction): Ditto.
909         * c-typeck.cc (build_component_ref): Ditto.
910         (convert_argument): Ditto.
911         (pointer_diff): Ditto.
912         (build_unary_op): Ditto.
913         (build_c_cast): Ditto.
914         (build_modify_expr): Ditto.
915         (store_init_value): Ditto.
916         (constexpr_init_fits_real_type): Ditto.
917         (check_constexpr_init): Ditto.
918         (c_finish_return): Ditto.
919         (handle_omp_array_sections_1): Ditto.
920         (c_finish_omp_clauses): Ditto.
921         * gimple-parser.cc (c_finish_gimple_return): Ditto.
923 2023-05-16  Joseph Myers  <joseph@codesourcery.com>
925         * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
926         diagnostics.
928 2023-05-15  Joseph Myers  <joseph@codesourcery.com>
930         * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
931         type for C2x.
933 2023-04-30  Andrew Pinski  <apinski@marvell.com>
935         * c-typeck.cc (process_init_element): Print out array type
936         for excessive elements.
938 2023-04-30  Andrew Pinski  <apinski@marvell.com>
940         PR c/107926
941         * c-typeck.cc (process_init_element): Move the check
942         for string cst until after the error message.
944 2023-04-28  Eugene Rozenfeld  <erozen@microsoft.com>
946         * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
948 2023-04-27  Jakub Jelinek  <jakub@redhat.com>
950         PR c/109409
951         * c-parser.cc (c_parser_initializer): Move diagnostics about
952         initialization of variable sized object with non-empty initializer
953         after c_parser_expr_no_commas call and ret.set_error (); after it.
955 2023-04-27  Jakub Jelinek  <jakub@redhat.com>
957         PR c/107682
958         PR c/109412
959         * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
960         reject empty initializer as invalid.
962 2023-04-26  Richard Biener  <rguenther@suse.de>
964         * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
965         last_stmt.
967 2023-04-25  Tobias Burnus  <tobias@codesourcery.com>
969         * c-parser.cc (c_parser_omp_scan_loop_body): Handle
970         zero exec statements before/after 'omp scan'.
972 2023-04-20  Jakub Jelinek  <jakub@redhat.com>
974         PR c/107041
975         * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
976         warning on acc_on_device declaration.
978 2023-03-28  David Malcolm  <dmalcolm@redhat.com>
980         PR c/107002
981         * c-typeck.cc (parser_build_binary_op): Update for new param of
982         check_for_xor_used_as_pow.
984 2023-03-10  Jakub Jelinek  <jakub@redhat.com>
986         PR c/108079
987         * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
988         after diagnosing it.
990 2023-02-28  Jakub Jelinek  <jakub@redhat.com>
992         PR sanitizer/108894
993         * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
994         and rename to c_strict_flex_array_level_of.
995         (is_flexible_array_member_p): Adjust caller.
997 2023-02-18  Martin Uecker  <uecker@tugraz.at>
999         PR c/108375
1000         * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
1001         (diagnose_mismatched_decl): Dito.
1002         (warn_about_goto): Dito:
1003         (c_check_switch_jump_warnings): Dito.
1004         (finish_decl): Dito.
1005         (finish_struct): Dito.
1006         (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
1007         (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
1008         * c-objc-common.cc (c_var_mod_p): New function.
1009         (c_var_unspec_p): Remove.
1010         * c-objc-common.h: Set lang hook.
1011         * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
1012         (c_parser_typeof_specifier): Dito.
1013         (c_parser_has_attribute_expression): Dito.
1014         (c_parser_generic_selection): Dito.
1015         * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
1016         * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
1018 2023-02-16  Patrick Palka  <ppalka@redhat.com>
1020         * c-parser.h: Mechanically drop static from static inline
1021         functions via s/^static inline/inline/g.
1023 2023-02-10  Joseph Myers  <joseph@codesourcery.com>
1025         * c-convert.cc (c_convert): Allow conversion of a null pointer
1026         constant to nullptr_t.
1027         * c-typeck.cc (null_pointer_constant_p): Remove static.
1028         (convert_for_assignment): Allow conversion of a null pointer
1029         constant to nullptr_t.
1030         (digest_init): Handle NULLPTR_TYPE among scalar conversions.
1031         * c-tree.h (null_pointer_constant_p): Declare.
1033 2023-02-09  Tobias Burnus  <tobias@codesourcery.com>
1035         * c-parser.cc (c_parser_omp_allocate): Parse align
1036         clause and check for restrictions.
1038 2023-02-08  Joseph Myers  <joseph@codesourcery.com>
1040         * c-typeck.cc (check_constexpr_init): Remove argument
1041         null_pointer_constant.  Only check pointer initializers for being
1042         null.
1043         (digest_init): Update calls to check_constexpr_init.
1045 2023-02-02  Joseph Myers  <joseph@codesourcery.com>
1047         * c-typeck.cc (build_binary_op): Allow comparisons between
1048         pointers and nullptr_t values that are not null pointer constants.
1050 2023-02-02  Joseph Myers  <joseph@codesourcery.com>
1052         * c-typeck.cc: Include "realmpfr.h".
1053         (constexpr_init_fits_real_type): Do not allow signaling NaN
1054         conversions to different types with the same mode.  Handle
1055         conversions from binary to decimal types.
1056         (check_constexpr_init): Do not disallow real initializers for
1057         complex types.  Do not disallow binary initializers for decimal
1058         floating types.
1060 2023-01-31  Marek Polacek  <polacek@redhat.com>
1062         PR c++/107593
1063         PR c++/108597
1064         * c-objc-common.cc (instantiation_dependent_expression_p): New.
1066 2023-01-27  Joseph Myers  <joseph@codesourcery.com>
1068         * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
1069         around auto initializer.
1071 2023-01-16  Jakub Jelinek  <jakub@redhat.com>
1073         PR c++/105593
1074         * c-parser.cc (c_parser_initializer): Check warning_enabled_at
1075         at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
1076         of warn_init_self.
1078 2023-01-14  Jakub Jelinek  <jakub@redhat.com>
1080         PR c++/108365
1081         * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
1082         division or modulo.
1084 2023-01-13  Qing Zhao  <qing.zhao@oracle.com>
1086         * c-decl.cc (strict_flex_array_level_of): ... here.
1088 2023-01-11  Jakub Jelinek  <jakub@redhat.com>
1090         PR c/105972
1091         * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
1092         markers for K&R function parameter declarations of nested functions.
1094 2023-01-09  Joseph Myers  <joseph@codesourcery.com>
1096         * c-decl.cc (build_compound_literal): Call record_inline_static.
1098 2023-01-06  Joseph Myers  <joseph@codesourcery.com>
1100         * c-parser.cc (c_parser_postfix_expression): Handle integer
1101         generic arguments to functions passed to __builtin_tgmath as
1102         _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
1103         Do not handle integer arguments to some narrowing functions as
1104         _Float64.
1106 2022-12-19  Jakub Jelinek  <jakub@redhat.com>
1108         PR c/108043
1109         * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
1110         compound literals with function type.
1112 2022-12-07  Joseph Myers  <joseph@codesourcery.com>
1114         * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
1115         auto, constexpr and a type used together.
1117 2022-12-06  Qing Zhao  <qing.zhao@oracle.com>
1119         * c-decl.cc (is_flexible_array_member_p): Call new function
1120         strict_flex_array_level_of.
1122 2022-11-24  Florian Weimer  <fweimer@redhat.com>
1124         PR c/107805
1125         * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
1126         from type to specs.
1128 2022-11-17  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
1130         * c-decl.cc (start_function): Set the result decl source
1131         location to the location of the typespec.
1133 2022-11-17  David Malcolm  <dmalcolm@redhat.com>
1135         PR analyzer/107711
1136         * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
1137         to cpp_create_reader, rather than ident_hash, so that the new
1138         reader gets its own hash table.
1140 2022-11-15  David Malcolm  <dmalcolm@redhat.com>
1142         PR analyzer/106302
1143         * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
1144         (class ana::c_translation_unit): New.
1145         (c_parser_translation_unit): Call ana::on_finish_translation_unit.
1147 2022-11-12  Joseph Myers  <joseph@codesourcery.com>
1149         * c-decl.cc (start_underspecified_init)
1150         (finish_underspecified_init): Handle name == NULL_TREE for
1151         compound literals.
1152         (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
1153         (shadow_tag_warned): Check for constexpr.
1154         (start_decl): Add parameter do_push.
1155         (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
1156         (grokdeclarator): Handle constexpr.
1157         (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
1158         (declspecs_add_scspec): Handle constexpr.
1159         * c-parser.cc (c_token_starts_compound_literal)
1160         (c_token_starts_declspecs, c_parser_declaration_or_fndef)
1161         (c_parser_declspecs, c_parser_gnu_attribute_any_word)
1162         (c_parser_compound_literal_scspecs)
1163         (c_parser_postfix_expression_after_paren_type): Handle constexpr.
1164         Update calls to start_init.
1165         (c_parser_declaration_or_fndef, c_parser_initializer)
1166         (c_parser_initval): Pass true for new argument of
1167         convert_lvalue_to_rvalue.  Call convert_lvalue_to_rvalue for
1168         constexpr compound literals.
1169         (c_parser_static_assert_declaration_no_semi)
1170         (c_parser_enum_specifier, c_parser_struct_declaration)
1171         (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
1172         Call convert_lvalue_to_rvalue on expressions required to be
1173         integer constant expressions.
1174         (c_parser_omp_declare_reduction): Update call to start_init.
1175         * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
1176         (C_DECL_DECLARED_CONSTEXPR): New macros.
1177         (struct c_declspecs): Add constexpr_p.
1178         (start_decl, convert_lvalue_to_rvalue, start_init): Update
1179         prototypes.
1180         * c-typeck.cc (require_constant_value, require_constant_elements):
1181         Change to bool.
1182         (require_constexpr_value, maybe_get_constexpr_init)
1183         (constexpr_init_fits_real_type, check_constexpr_init): New.
1184         (convert_lvalue_to_rvalue): Add new parameter for_init.  Call
1185         maybe_get_constexpr_init.
1186         (store_init_value): Update call to digest_init.
1187         (digest_init): Add parameters int_const_expr, arith_const_expr and
1188         require_constexpr.  Check constexpr initializers.
1189         (constructor_top_level): Remove.
1190         (struct initializer_stack): Remove top_level.  Add
1191         require_constexpr_value.
1192         (start_init): Remove parameter top_level.  Add parameters
1193         init_require_constant and init_require_constexpr.  Save
1194         require_constexpr_value on stack.
1195         (pop_init_level): Use a null pointer constant for zero initializer
1196         of pointer initialized with {}.
1197         (output_init_element): Update call to digest_init.  Avoid passing
1198         null pointer constants of pointer type through digest_init a
1199         second time when initializing a constexpr object.
1201 2022-11-03  Joseph Myers  <joseph@codesourcery.com>
1203         * c-decl.cc (in_underspecified_init, start_underspecified_init)
1204         (finish_underspecified_init): New.
1205         (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
1206         Give errors inside initializers of underspecified declarations.
1207         (grokdeclarator): Handle (erroneous) case of C2X auto on a
1208         parameter.
1209         (declspecs_add_type): Handle c2x_auto_p case.
1210         (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
1211         C2X mode.
1212         (finish_declspecs): Handle c2x_auto_p.
1213         * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
1214         * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
1215         (struct c_declspecs): Add c2x_auto_p.
1216         (start_underspecified_init, finish_underspecified_init): New
1217         prototypes.
1218         * c-typeck.cc (build_external_ref): Give error for underspecified
1219         declaration referenced in its initializer.
1221 2022-10-28  Joseph Myers  <joseph@codesourcery.com>
1223         * c-decl.cc (grokdeclarator): Pass
1224         arg_info->no_named_args_stdarg_p to build_function_type.
1225         (grokparms): Check arg_info->no_named_args_stdarg_p before
1226         converting () to (void).
1227         (build_arg_info): Initialize no_named_args_stdarg_p.
1228         (get_parm_info): Set no_named_args_stdarg_p.
1229         (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
1230         build_function_type.
1231         (store_parm_decls): Count (...) functions as prototyped.
1232         * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
1233         parenthesis to start parameter list.
1234         (c_parser_parms_list_declarator): Always allow '...' with no
1235         arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
1236         * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
1237         * c-typeck.cc (composite_type): Handle
1238         TYPE_NO_NAMED_ARGS_STDARG_P.
1239         (function_types_compatible_p): Compare
1240         TYPE_NO_NAMED_ARGS_STDARG_P.
1242 2022-10-28  Jakub Jelinek  <jakub@redhat.com>
1244         * c-parser.cc (c_parser_omp_all_clauses): Allow optional
1245         comma before the first clause.
1246         (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
1247         c_parser_omp_flush, c_parser_omp_scan_loop_body,
1248         c_parser_omp_ordered, c_finish_omp_declare_variant,
1249         c_parser_omp_declare_target, c_parser_omp_declare_reduction,
1250         c_parser_omp_requires, c_parser_omp_error,
1251         c_parser_omp_assumption_clauses): Likewise.
1253 2022-10-28  Joseph Myers  <joseph@codesourcery.com>
1255         PR c/61469
1256         * c-convert.cc (c_convert): Handle enums with underlying boolean
1257         type like bool.
1258         * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
1259         enums with enum type specifier, but give errors for storage class
1260         specifiers, qualifiers or alignment specifiers in non-definition
1261         declarations of such enums.
1262         (grokdeclarator): Give error for non-definition use of type
1263         specifier with an enum type specifier.
1264         (parser_xref_tag): Add argument has_enum_type_specifier.  Pass it
1265         to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
1266         (xref_tag): Update call to parser_xref_tag.
1267         (start_enum): Add argument fixed_underlying_type.  Complete enum
1268         type with a fixed underlying type given in the definition.  Give
1269         error for defining without a fixed underlying type in the
1270         definition if one was given in a prior declaration.  Do not mark
1271         enums with fixed underlying type as packed for -fshort-enums.
1272         Store the enum type in the_enum.
1273         (finish_enum): Do not adjust types of values or check their range
1274         for an enum with a fixed underlying type.  Set underlying type of
1275         enum and variants.
1276         (build_enumerator): Check enumeration constants for enum with
1277         fixed underlying type against that type and convert to that type.
1278         Increment in the underlying integer type, with handling for bool.
1279         (c_simulate_enum_decl): Update call to start_enum.
1280         (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
1281         * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
1282         rather than recomputing an underlying type based on size.
1283         * c-parser.cc (c_parser_declspecs)
1284         (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
1285         Set has_enum_type_specifier for type specifiers.
1286         (c_parser_enum_specifier): Handle enum type specifiers.
1287         (c_parser_struct_or_union_specifier): Update call to
1288         parser_xref_tag.
1289         (c_parser_omp_atomic): Check for boolean increment or decrement
1290         using C_BOOLEAN_TYPE_P.
1291         * c-tree.h (C_BOOLEAN_TYPE_P): New.
1292         (struct c_typespec): Add has_enum_type_specifier.
1293         (struct c_declspecs): Add enum_type_specifier_ref_p.
1294         (struct c_enum_contents): Add enum_type.
1295         (start_enum, parser_xref_tag): Update prototypes.
1296         * c-typeck.cc (composite_type): Allow for enumerated types
1297         compatible with bool.
1298         (common_type, comptypes_internal, perform_integral_promotions):
1299         Use ENUM_UNDERLYING_TYPE.
1300         (parser_build_binary_op, build_unary_op, convert_for_assignment)
1301         (c_finish_return, c_start_switch, build_binary_op): Check for
1302         boolean types using C_BOOLEAN_TYPE_P.
1304 2022-10-24  Jakub Jelinek  <jakub@redhat.com>
1306         PR c++/107358
1307         * c-typeck.cc (build_binary_op): Pass operands before excess precision
1308         promotions to scalar_to_vector call.
1310 2022-10-24  Arsen Arsenović  <arsen@aarsen.me>
1312         * c-decl.cc (finish_function): Ignore hosted when deciding
1313         whether to implicitly return zero, but check noreturn.
1314         * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
1315         requirements to just MAIN_NAME_P when hosted, or `int main'
1316         otherwise.
1318 2022-10-20  Richard Biener  <rguenther@suse.de>
1320         PR c/107305
1321         PR c/107306
1322         * gimple-parser.cc (c_parser_parse_gimple_body): Verify
1323         the parsed IL and zap the body on error.
1325 2022-10-18  Joseph Myers  <joseph@codesourcery.com>
1327         PR c/107164
1328         * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
1329         with previous declaration visible.
1331 2022-10-18  Joseph Myers  <joseph@codesourcery.com>
1333         PR c/36113
1334         * c-decl.cc (finish_enum): If any enumerators do not fit in int,
1335         convert all to the type of the enumeration.  pedwarn if no integer
1336         type fits all enumerators and default to
1337         widest_integer_literal_type_node in that case.  Otherwise pedwarn
1338         for type wider than intmax_t.
1339         (build_enumerator): pedwarn for enumerators outside the range of
1340         uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
1341         enumerators outside the range of int.  On overflow, attempt to
1342         find a wider type that can hold the value of the next enumerator.
1343         Do not convert value to type determined with
1344         c_common_type_for_size.
1346 2022-10-14  Jakub Jelinek  <jakub@redhat.com>
1348         * c-typeck.cc (convert_arguments): Don't promote __bf16 to
1349         double.
1351 2022-10-14  Joseph Myers  <joseph@codesourcery.com>
1353         * c-decl.cc (build_compound_literal): Add parameter scspecs.
1354         Handle storage class specifiers.
1355         * c-parser.cc (c_token_starts_compound_literal)
1356         (c_parser_compound_literal_scspecs): New.
1357         (c_parser_postfix_expression_after_paren_type): Add parameter
1358         scspecs.  Call pedwarn_c11 for use of storage class specifiers.
1359         Update call to build_compound_literal.
1360         (c_parser_cast_expression, c_parser_sizeof_expression)
1361         (c_parser_alignof_expression): Handle storage class specifiers for
1362         compound literals.  Update calls to
1363         c_parser_postfix_expression_after_paren_type.
1364         (c_parser_postfix_expression): Update syntax comment.
1365         * c-tree.h (build_compound_literal): Update prototype.
1366         * c-typeck.cc (c_mark_addressable): Diagnose taking address of
1367         register compound literal.
1369 2022-10-07  Qing Zhao  <qing.zhao@oracle.com>
1371         * c-decl.cc (flexible_array_member_type_p): New function.
1372         (one_element_array_type_p): Likewise.
1373         (zero_length_array_type_p): Likewise.
1374         (add_flexible_array_elts_to_size): Call new utility
1375         routine flexible_array_member_type_p.
1376         (is_flexible_array_member_p): New function.
1377         (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
1379 2022-10-06  Joseph Myers  <joseph@codesourcery.com>
1381         * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
1382         and not C2x.
1383         (c_keyword_starts_typename, c_token_starts_declspecs)
1384         (c_parser_declspecs, c_parser_objc_selector): Handle
1385         RID_TYPEOF_UNQUAL.
1386         (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
1387         Distinguish typeof for C2x from __typeof__ for all standard
1388         versions and typeof before C2x.
1389         * c-typeck.cc (build_function_call_vec): Use unqualified version
1390         of non-void return type.
1391         (build_unary_op): Use unqualified type for increment and
1392         decrement.
1394 2022-10-06  Jakub Jelinek  <jakub@redhat.com>
1396         * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
1397         call for holds clause on assume construct.
1399 2022-10-06  Jakub Jelinek  <jakub@redhat.com>
1401         PR c++/106654
1402         * c-parser.cc (handle_assume_attribute): New function.
1403         (c_parser_declaration_or_fndef): Handle assume attribute.
1404         (c_parser_attribute_arguments): Add assume_attr argument,
1405         if true, parse first argument as conditional expression.
1406         (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
1407         c_parser_attribute_arguments callers.
1408         (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
1409         assume attribute.
1411 2022-10-04  Jakub Jelinek  <jakub@redhat.com>
1413         * c-lang.h (struct c_omp_declare_target_attr): New type.
1414         (current_omp_declare_target_attribute): Change type from
1415         int to vec<c_omp_declare_target_attr, va_gc> *.
1416         * c-parser.cc (c_parser_translation_unit): Adjust for that change.
1417         If last pushed directive was begin declare target, use different
1418         wording and simplify format strings for easier translations.
1419         (c_parser_omp_clause_device_type): Uncomment
1420         check_no_duplicate_clause call.
1421         (c_parser_omp_declare_target): Adjust for the
1422         current_omp_declare_target_attribute type change, push { -1 }.
1423         Use error_at rather than warning_at for declare target with
1424         only device_type clauses.
1425         (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
1426         (c_parser_omp_begin): Add begin declare target support.
1427         (c_parser_omp_end): Adjust for the
1428         current_omp_declare_target_attribute type change, adjust
1429         diagnostics wording and simplify format strings for easier
1430         translations.
1431         * c-decl.cc (current_omp_declare_target_attribute): Change type from
1432         int to vec<c_omp_declare_target_attr, va_gc> *.
1433         (c_decl_attributes): Adjust for the
1434         current_omp_declare_target_attribute type change.  If device_type
1435         was present on begin declare target, add "omp declare target host"
1436         and/or "omp declare target nohost" attributes.
1438 2022-09-29  Joseph Myers  <joseph@codesourcery.com>
1440         * c-decl.cc (handle_std_noreturn_attribute): New function.
1441         (std_attribute_table): Add _Noreturn and noreturn.
1443 2022-09-27  Jakub Jelinek  <jakub@redhat.com>
1445         * c-lang.h (current_omp_begin_assumes): Declare.
1446         * c-parser.cc: Include bitmap.h.
1447         (c_parser_omp_end_declare_target): Rename to ...
1448         (c_parser_omp_end): ... this.  Handle also end assumes.
1449         (c_parser_omp_begin, c_parser_omp_assumption_clauses,
1450         c_parser_omp_assumes, c_parser_omp_assume): New functions.
1451         (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
1452         without corresponding #pragma omp end assumes.
1453         (c_parser_pragma): Use %s in may only be used at file scope
1454         diagnostics to decrease number of translatable messages.  Handle
1455         PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES.  Handle PRAGMA_OMP_END
1456         rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
1457         for it rather than c_parser_omp_end_declare_target.
1458         (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
1459         * c-decl.cc (current_omp_begin_assumes): Define.
1461 2022-09-24  Jakub Jelinek  <jakub@redhat.com>
1463         PR c/106981
1464         * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
1465         start.  For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
1466         t2 have different types.
1468 2022-09-22  David Malcolm  <dmalcolm@redhat.com>
1470         PR c/106830
1471         * c-parser.cc (c_parser_initelt): Initialize m_decimal.
1472         (c_parser_cast_expression): Likewise.
1473         (c_parser_alignof_expression): Likewise.
1474         (c_parser_postfix_expression_after_paren_type): Likewise.
1475         (c_parser_postfix_expression_after_primary): Likewise.
1476         (c_parser_expression): Likewise.
1477         (c_parser_omp_variable_list): Likewise.
1478         (c_parser_transaction_expression): Likewise.
1479         * c-tree.h (c_expr::set_error): Likewise.
1480         * c-typeck.cc (c_expr_sizeof_expr): Likewise.
1481         (parser_build_unary_op): Likewise.
1482         (parser_build_binary_op): Likewise.
1483         (digest_init): Likewise.
1484         (pop_init_level): Likewise.
1485         * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
1487 2022-09-19  Marek Polacek  <polacek@redhat.com>
1489         PR c/106947
1490         * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
1491         notes.
1493 2022-09-15  Richard Biener  <rguenther@suse.de>
1495         * c-decl.cc (build_void_list_node): Remove.
1497 2022-09-14  Julian Brown  <julian@codesourcery.com>
1499         * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
1500         on error.
1502 2022-09-07  Joseph Myers  <joseph@codesourcery.com>
1504         * c-parser.cc (c_parser_static_assert_declaration_no_semi)
1505         (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
1506         for C2x spellings of keywords.
1507         (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
1509 2022-09-06  Jakub Jelinek  <jakub@redhat.com>
1511         * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
1512         in omp_cur_iteration - 1 has integer_type_node type.
1514 2022-09-03  Jakub Jelinek  <jakub@redhat.com>
1516         * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
1517         (c_parser_omp_clause_depend_sink): Renamed to ...
1518         (c_parser_omp_clause_doacross_sink): ... this.  Add depend_p argument.
1519         Handle parsing of doacross(sink:omp_cur_iteration-1).  Use
1520         OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
1521         OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
1522         of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
1523         (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
1524         OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
1525         OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
1526         and set OMP_CLAUSE_DOACROSS_DEPEND on it.
1527         (c_parser_omp_clause_doacross): New function.
1528         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
1529         (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
1530         OMP_CLAUSE_DEPEND_SOURCE.
1531         (c_parser_omp_for_loop): Don't diagnose here linear clause together
1532         with ordered with argument.
1533         (c_parser_omp_simd): Don't diagnose ordered clause with argument on
1534         for simd.
1535         (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1536         (c_parser_omp_ordered): Handle also doacross and adjust for it
1537         diagnostic wording.
1538         * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
1539         Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
1541 2022-09-02  David Malcolm  <dmalcolm@redhat.com>
1543         PR c/90885
1544         * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
1545         (c_parser_expr_no_commas): Likewise.
1546         (c_parser_conditional_expression): Likewise.
1547         (c_parser_binary_expression): Clear m_decimal when popping the
1548         stack.
1549         (c_parser_unary_expression): Clear ret.m_decimal.
1550         (c_parser_has_attribute_expression): Likewise for result.
1551         (c_parser_predefined_identifier): Likewise for expr.
1552         (c_parser_postfix_expression): Likewise for expr.
1553         Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
1554         token.
1555         * c-tree.h (c_expr::m_decimal): New bitfield.
1556         * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
1557         (parser_build_binary_op): Call check_for_xor_used_as_pow.
1559 2022-09-01  Joseph Myers  <joseph@codesourcery.com>
1561         * c-decl.cc (grokparms): Handle () in a function declaration the
1562         same as (void) for C2X.
1564 2022-08-31  Joseph Myers  <joseph@codesourcery.com>
1566         * c-parser.cc (c_parser_label): Pass attributes to do_case.
1567         * c-typeck.cc (do_case): Add argument ATTRS.  Pass it to
1568         c_add_case_label.
1570 2022-08-26  Jakub Jelinek  <jakub@redhat.com>
1572         * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
1574 2022-08-25  Marek Polacek  <polacek@redhat.com>
1576         * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
1577         Give a better diagnostic when converting to nullptr_t.
1578         * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
1579         initialization.
1580         * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
1581         (c_parser_postfix_expression): Handle RID_NULLPTR.
1582         * c-typeck.cc (null_pointer_constant_p): Return true when expr is
1583         nullptr_node.
1584         (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
1585         (build_conditional_expr): Handle the case when the second/third operand
1586         is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
1587         (convert_for_assignment): Handle converting an expression of type
1588         nullptr_t to pointer/bool.
1589         (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
1590         <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
1592 2022-08-25  Joseph Myers  <joseph@codesourcery.com>
1594         * c-decl.cc (start_decl): Do not diagnose initialization of
1595         variable-sized objects here.
1596         * c-parser.cc (c_parser_braced_init): Add argument DECL.  All
1597         callers changed.
1598         (c_parser_initializer): Diagnose initialization of variable-sized
1599         objects other than with braced initializer.
1600         (c_parser_braced_init): Use pedwarn_c11 for empty initializer
1601         braces and update diagnostic text.  Diagnose initialization of
1602         variable-sized objects with nonempty braces.
1603         * c-typeck.cc (digest_init): Update diagnostic for initialization
1604         of variable-sized objects.
1605         (really_start_incremental_init, set_designator)
1606         (process_init_element): Update comments.
1607         (pop_init_level): Allow scalar empty initializers.
1609 2022-08-17  Tobias Burnus  <tobias@codesourcery.com>
1610             Chung-Lin Tang  <cltang@codesourcery.com>
1612         PR c++/104493
1613         * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
1614         instead of removed langhook.
1615         * c-typeck.cc (c_finish_omp_clauses): Likewise.
1617 2022-08-11  Marek Polacek  <polacek@redhat.com>
1619         PR middle-end/102633
1620         * c-parser.cc (c_parser_initializer): Add new tree parameter.  Use it.
1621         Call suppress_warning.
1622         (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
1623         (c_parser_omp_declare_reduction): Pass omp_priv down to
1624         c_parser_initializer.
1626 2022-08-08  Tom Honermann  <tom@honermann.net>
1628         * c-parser.cc (c_parser_string_literal): Use char8_t as the type
1629         of CPP_UTF8STRING when char8_t support is enabled.
1630         * c-typeck.cc (digest_init): Allow initialization of an array
1631         of character type by a string literal with type array of
1632         char8_t.
1634 2022-08-01  David Malcolm  <dmalcolm@redhat.com>
1636         * c-typeck.cc (build_c_cast): Quote names of address spaces in
1637         diagnostics.
1638         (convert_for_assignment): Add a note to address space mismatch
1639         diagnostics, specifying the expected and actual types.
1641 2022-07-10  Lewis Hyatt  <lhyatt@gmail.com>
1643         PR preprocessor/97498
1644         * c-parser.cc (c_parser_pragma): Set input_location to the
1645         location of the pragma, rather than the start of the line.
1647 2022-07-04  Tobias Burnus  <tobias@codesourcery.com>
1648             Chung-Lin Tang  <cltang@codesourcery.com>
1649             Thomas Schwinge  <thomas@codesourcery.com>
1651         * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
1652         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
1653         OMP_REQUIRES_TARGET_USED.
1654         (c_parser_omp_requires): Remove sorry.
1656 2022-07-01  Tobias Burnus  <tobias@codesourcery.com>
1658         * c-parser.cc (c_parser_omp_target_enter_data,
1659         c_parser_omp_target_exit_data): Accept tofrom
1660         map-type modifier but use 'to' / 'from' internally.
1662 2022-06-16  David Malcolm  <dmalcolm@redhat.com>
1664         * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
1665         group the warning with any note.
1666         (warn_about_goto): Likewise to group error or warning with note.
1667         Bail out if the warning wasn't emitted, to avoid emitting orphan
1668         notes.
1669         (lookup_label_for_goto): Add auto_diagnostic_group to
1670         group the error with the note.
1671         (check_earlier_gotos): Likewise.
1672         (c_check_switch_jump_warnings): Likewise for any error/warning.
1673         Conditionalize emission of the notes.
1674         (diagnose_uninitialized_cst_member): Likewise for warning,
1675         conditionalizing emission of the note.
1676         (grokdeclarator): Add auto_diagnostic_group to group the "array
1677         type has incomplete element type" error with any note.
1678         (parser_xref_tag): Add auto_diagnostic_group to group warnings
1679         with their notes.  Conditionalize emission of notes.
1680         (start_struct): Add auto_diagnostic_group to group the
1681         "redefinition of" errors with any note.
1682         (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
1683         (check_for_loop_decls): Likewise for pre-C99 error.
1685 2022-06-07  Jakub Jelinek  <jakub@redhat.com>
1687         * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
1688         style linear clause modifiers.  Set
1689         OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
1690         old style modifiers are used.
1691         * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
1692         with val modifier on simd or for if the old style modifiers are
1693         used.
1695 2022-06-02  David Malcolm  <dmalcolm@redhat.com>
1697         * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
1698         (c_get_sarif_source_language): New.
1699         * c-tree.h (c_get_sarif_source_language): New decl.
1701 2022-05-31  Jason Merrill  <jason@redhat.com>
1703         * Make-lang.in (c.tags): Look at *.cc.
1705 2022-05-31  Jakub Jelinek  <jakub@redhat.com>
1707         * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
1708         clauses.
1710 2022-05-28  Jakub Jelinek  <jakub@redhat.com>
1712         * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
1713         seen first, use "%<to%>" or "%<enter%>" depending on
1714         OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
1715         "%<to%> or %<enter%>" wording.
1717 2022-05-27  Jakub Jelinek  <jakub@redhat.com>
1719         * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
1720         (c_parser_omp_all_clauses): For to clause on declare target, use
1721         OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
1722         OMP_CLAUSE_TO_DECLARE clause.  Handle PRAGMA_OMP_CLAUSE_ENTER.
1723         (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
1724         (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
1725         OMP_CLAUSE_TO_DECLARE.
1726         * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
1727         of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
1728         name in diagnostics instead of
1729         omp_clause_code_name[OMP_CLAUSE_CODE (c)].
1731 2022-05-25  Jakub Jelinek  <jakub@redhat.com>
1733         PR c/91134
1734         * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
1735         * c-typeck.cc (build_component_ref): Likewise.  If DATUM is
1736         INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
1737         diagnostic and fixit hint if DATUM has pointer type.
1738         * c-parser.cc (c_parser_postfix_expression,
1739         c_parser_omp_variable_list): Adjust build_component_ref callers.
1740         * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
1741         Likewise.
1743 2022-05-24  Jakub Jelinek  <jakub@redhat.com>
1745         PR c/105378
1746         * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
1748 2022-05-18  Marek Polacek  <polacek@redhat.com>
1750         PR c/105131
1751         * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
1752         mismatches.
1753         * c-tree.h (comptypes_check_enum_int): Declare.
1754         * c-typeck.cc (comptypes): No longer static.
1756 2022-05-17  Marek Polacek  <polacek@redhat.com>
1758         * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
1759         its value.
1761 2022-05-17  Jakub Jelinek  <jakub@redhat.com>
1763         * c-parser.cc (c_parser_omp_clause_depend): Parse
1764         inoutset depend-kind.
1765         (c_parser_omp_depobj): Likewise.
1767 2022-05-16  Martin Liska  <mliska@suse.cz>
1769         * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
1771 2022-05-12  Jakub Jelinek  <jakub@redhat.com>
1773         * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
1774         if flag_openmp.
1775         (c_parser_postfix_expression): Diagnose uses of omp_all_memory
1776         in postfix expressions.
1777         (c_parser_omp_variable_list): Handle omp_all_memory in depend
1778         clause.
1779         * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
1780         keyword in depend clause as null_pointer_node, diagnose invalid
1781         uses.
1783 2022-05-09  Martin Liska  <mliska@suse.cz>
1785         * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
1786         macros.
1787         (c_parser_binary_expression): Likewise.
1789 2022-05-07  Marek Polacek  <polacek@redhat.com>
1791         PR c++/101833
1792         PR c++/47634
1793         * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1795 2022-04-08  Jakub Jelinek  <jakub@redhat.com>
1797         PR c/105149
1798         * c-typeck.cc (c_build_va_arg): Reject function types.
1800 2022-03-22  Marek Polacek  <polacek@redhat.com>
1802         PR c/82283
1803         PR c/84685
1804         * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1805         (start_init): Set it.
1806         (finish_init): Restore constructor_designated.
1807         (push_init_level): Set constructor_designated to the value of
1808         constructor_designated in the upper constructor_stack.
1810 2022-03-12  Thomas Schwinge  <thomas@codesourcery.com>
1812         PR other/65095
1813         * c-typeck.cc (handle_omp_array_sections_1)
1814         (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1815         instead of 'c_omp_map_clause_name'.
1817 2022-03-09  Joseph Myers  <joseph@codesourcery.com>
1819         * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1820         differently from earlier standards for unprototyped function type
1821         compatibility.
1823 2022-03-09  Jakub Jelinek  <jakub@redhat.com>
1825         PR c/104711
1826         * c-fold.cc (c_fully_fold_internal): Don't emit
1827         -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1828         * c-typeck.cc (build_binary_op): Likewise.
1830 2022-03-07  Jakub Jelinek  <jakub@redhat.com>
1832         * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1833         literal.
1835 2022-02-23  Richard Biener  <rguenther@suse.de>
1837         * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1838         SSA names without definition.
1839         (c_parser_gimple_declaration): Handle pointer typed SSA names.
1841 2022-02-17  Jakub Jelinek  <jakub@redhat.com>
1843         PR c/104532
1844         * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1845         convert_lvalue_to_rvalue and build_indirect_ref instead of
1846         build_simple_mem_ref.
1848 2022-02-11  Richard Biener  <rguenther@suse.de>
1850         * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1851         VEC_COND_EXPRs.
1853 2022-02-10  Marcel Vollweiler  <marcel@codesourcery.com>
1855         * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1856         clause.
1857         (c_parser_omp_variable_list): Handle array sections.
1858         (c_parser_omp_clause_has_device_addr): Added.
1859         (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1860         case.
1861         (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1862         OMP_CLAUSE_MASK.
1863         * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1864         (c_finish_omp_clauses): Handle array sections.
1866 2022-02-09  Jakub Jelinek  <jakub@redhat.com>
1868         PR c/104427
1869         * c-parser.cc (c_parser_postfix_expression)
1870         <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1871         instead of build1_loc to build PAREN_EXPR.
1872         * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1873         * c-fold.cc (c_fully_fold_internal): Likewise.
1875 2022-01-17  Martin Liska  <mliska@suse.cz>
1877         * Make-lang.in: Rename .c names to .cc.
1878         * c-convert.cc: Likewise.
1879         * c-decl.cc (struct lang_identifier): Likewise.
1880         (pop_scope): Likewise.
1881         (finish_decl): Likewise.
1882         * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1883         * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1884         * c-parser.h (GCC_C_PARSER_H): Likewise.
1885         * c-tree.h (c_keyword_starts_typename): Likewise.
1886         (finish_declspecs): Likewise.
1887         (c_get_alias_set): Likewise.
1888         (enum c_oracle_request): Likewise.
1889         (tag_exists_p): Likewise.
1890         (set_c_expr_source_range): Likewise.
1891         * c-typeck.cc (c_common_type): Likewise.
1892         (c_finish_omp_clauses): Likewise.
1893         * config-lang.in: Likewise.
1895 2022-01-17  Martin Liska  <mliska@suse.cz>
1897         * c-aux-info.c: Moved to...
1898         * c-aux-info.cc: ...here.
1899         * c-convert.c: Moved to...
1900         * c-convert.cc: ...here.
1901         * c-decl.c: Moved to...
1902         * c-decl.cc: ...here.
1903         * c-errors.c: Moved to...
1904         * c-errors.cc: ...here.
1905         * c-fold.c: Moved to...
1906         * c-fold.cc: ...here.
1907         * c-lang.c: Moved to...
1908         * c-lang.cc: ...here.
1909         * c-objc-common.c: Moved to...
1910         * c-objc-common.cc: ...here.
1911         * c-parser.c: Moved to...
1912         * c-parser.cc: ...here.
1913         * c-typeck.c: Moved to...
1914         * c-typeck.cc: ...here.
1915         * gccspec.c: Moved to...
1916         * gccspec.cc: ...here.
1917         * gimple-parser.c: Moved to...
1918         * gimple-parser.cc: ...here.
1920 2022-01-17  Andrew Stubbs  <ams@codesourcery.com>
1922         * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1924 2022-01-14  Chung-Lin Tang  <cltang@codesourcery.com>
1926         PR c++/103705
1927         * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1928         outer node for ARRAY_REFs.
1930 2022-01-01  Jakub Jelinek  <jakub@redhat.com>
1932         PR objc/103639
1933         * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1934         ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1936 2021-12-17  Marek Polacek  <polacek@redhat.com>
1938         PR c/103649
1939         * c-decl.c (c_warn_unused_attributes): Don't warn for
1940         attribute_ignored_p.
1941         * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1942         arguments when the attribute is ignored.
1944 2021-12-14  Jakub Jelinek  <jakub@redhat.com>
1946         PR c/103587
1947         * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1948         consume the pragma and silently skip to the pragma eol.
1950 2021-12-12  Jonathan Wakely  <jwakely@redhat.com>
1952         * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1953         * c-parser.c: Likewise.
1955 2021-12-09  Jakub Jelinek  <jakub@redhat.com>
1957         PR pch/71934
1958         * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1959         to resort_data.new_value.
1961 2021-12-08  Chung-Lin Tang  <cltang@codesourcery.com>
1963         * c-parser.c (struct omp_dim): New struct type for use inside
1964         c_parser_omp_variable_list.
1965         (c_parser_omp_variable_list): Allow multiple levels of array and
1966         component accesses in array section base-pointer expression.
1967         (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1968         c_parser_omp_var_list_parens.
1969         (c_parser_omp_clause_from): Likewise.
1970         * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1971         of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1972         POINTER_PLUS_EXPR.
1973         (c_finish_omp_clauses): Extend allowed ranged of expressions
1974         involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1976 2021-12-08  Chung-Lin Tang  <cltang@codesourcery.com>
1978         PR middle-end/92120
1979         * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1980         call to c_parser_omp_variable_list to 'true'.
1981         * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1982         array base handling.
1983         (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1985 2021-11-30  Thomas Schwinge  <thomas@codesourcery.com>
1987         * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1988         orphan loop" checking.
1990 2021-11-30  Cesar Philippidis  <cesar@codesourcery.com>
1991             Thomas Schwinge  <thomas@codesourcery.com>
1993         * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1994         OpenACC gang reductions.
1996 2021-11-30  Richard Biener  <rguenther@suse.de>
1998         * gimple-parser.c (c_parser_gimple_postfix_expression):
1999         avoid unreachable code after break.
2001 2021-11-29  Eric Gallager  <egallager@gcc.gnu.org>
2003         PR other/103021
2004         * Make-lang.in: Use ETAGS variable in TAGS target.
2006 2021-11-29  Richard Biener  <rguenther@suse.de>
2008         * c-typeck.c (c_tree_equal): Remove unreachable return.
2009         * c-parser.c (get_matching_symbol): Likewise.
2011 2021-11-23  Jakub Jelinek  <jakub@redhat.com>
2013         * c-typeck.c (c_clone_omp_udr): Don't initialize
2014         id.transform_lang_insert_block.
2016 2021-11-19  Martin Sebor  <msebor@redhat.com>
2018         PR c++/33925
2019         PR c/102867
2020         * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
2021         code resulting from macro expansion.
2023 2021-11-19  Martin Liska  <mliska@suse.cz>
2025         Revert:
2026         2021-11-19  Martin Liska  <mliska@suse.cz>
2028         * c-parser.c (add_debug_begin_stmt): Use option directly.
2030 2021-11-18  Matthias Kretz  <m.kretz@gsi.de>
2032         * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
2033         * c-parser.c (c_parser_postfix_expression): Likewise.
2035 2021-11-18  Martin Liska  <mliska@suse.cz>
2037         * c-parser.c (add_debug_begin_stmt): Use option directly.
2039 2021-11-17  Martin Sebor  <msebor@redhat.com>
2041         PR c/101702
2042         * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
2043         bounds before deciding if they're constant.
2045 2021-11-15  Jakub Jelinek  <jakub@redhat.com>
2047         * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
2048         PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
2050 2021-11-11  Jakub Jelinek  <jakub@redhat.com>
2052         * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
2053         lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
2054         Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
2055         OMP_CLAUSE_NUM_TEAMS_EXPR.
2056         (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
2057         combined target teams even lower-bound expression.
2059 2021-11-11  Richard Biener  <rguenther@suse.de>
2061         * gimple-parser.c: Shuffle bitmap.h include.
2063 2021-11-03  Joseph Myers  <joseph@codesourcery.com>
2065         PR c/103031
2066         * c-convert.c (c_convert): New function, based on convert.
2067         (convert): Make into wrapper of c_convert.
2068         (convert_init): New function.
2069         * c-typeck.c (enum impl_conv): Add ic_init_const.
2070         (convert_for_assignment): Handle ic_init_const like ic_init.  Add
2071         new argument to convert_and_check call.
2072         (digest_init): Pass ic_init_const to convert_for_assignment for
2073         initializers required to be constant.
2075 2021-11-02  Richard Sandiford  <richard.sandiford@arm.com>
2077         * c-tree.h (c_simulate_record_decl): Declare.
2078         * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
2079         * c-decl.c (c_simulate_record_decl): New function.
2081 2021-10-22  Eric Gallager  <egallager@gcc.gnu.org>
2083         PR other/102663
2084         * Make-lang.in: Add dummy c.install-dvi target.
2086 2021-10-15  Richard Biener  <rguenther@suse.de>
2088         PR c/102763
2089         * gimple-parser.c
2090         (c_parser_gimple_postfix_expression_after_primary): Check
2091         for a pointer do be dereferenced by ->.
2093 2021-10-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
2095         * c-parser.c (c_finish_omp_declare_variant): Change call from
2096         c_omp_check_context_selector to omp_check_context_selector. Change
2097         call from c_omp_mark_declare_variant to omp_mark_declare_variant.
2099 2021-10-09  Jakub Jelinek  <jakub@redhat.com>
2101         * c-parser.c (c_parser_omp_structured_block_sequence): New function.
2102         (c_parser_omp_scan_loop_body): Use it.
2103         (c_parser_omp_sections_scope): Likewise.
2105 2021-10-07  Richard Biener  <rguenther@suse.de>
2107         * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
2109 2021-10-05  Richard Biener  <rguenther@suse.de>
2111         PR c/102605
2112         * gimple-parser.c (c_parser_gimple_postfix_expression):
2113         Accept more address _Literals.
2115 2021-10-04  Marek Polacek  <polacek@redhat.com>
2117         PR c++/97573
2118         * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
2120 2021-10-01  Martin Sebor  <msebor@redhat.com>
2122         PR c/102103
2123         * c-typeck.c (maybe_warn_for_null_address): New function.
2124         (build_binary_op): Call it.
2126 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
2127             Richard Biener  <rguenther@suse.de>
2129         PR sanitizer/102515
2130         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2131         for division even for SANITIZE_SI_OVERFLOW.
2133 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
2135         * c-parser.c (c_parser_omp_clause_order): Set
2136         OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
2138 2021-09-28  Andrew Pinski  <apinski@marvell.com>
2140         PR c/32122
2141         * c-parser.c (c_parser_statement_after_labels): Pass
2142         the c_expr instead of the tree to c_finish_goto_ptr.
2143         * c-typeck.c (c_finish_goto_ptr): Change the second
2144         argument type to c_expr.
2145         * c-tree.h (c_finish_goto_ptr): Likewise.
2146         Error out if the expression was not of a pointer type.
2148 2021-09-22  Jakub Jelinek  <jakub@redhat.com>
2150         * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
2151         modifiers.
2153 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
2155         * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
2156         and reproducible modifiers.
2157         (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
2159 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
2161         * c-parser.c (c_parser_omp_clause_default): Handle private and
2162         firstprivate arguments, adjust diagnostics on unknown argument.
2164 2021-09-17  Jakub Jelinek  <jakub@redhat.com>
2166         * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
2167         is true.
2169 2021-09-10  Jakub Jelinek  <jakub@redhat.com>
2171         * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
2172         cond.value is >, < or == with omp_atomic_lhs as one of the operands,
2173         don't call build_conditional_expr, instead build a COND_EXPR directly.
2174         (c_parser_binary_expression): Avoid calling parser_build_binary_op
2175         if omp_atomic_lhs even in more cases for >, < or ==.
2176         (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
2177         parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
2178         acq_rel on atomic read/write and acq_rel/acquire clauses on update.
2179         * c-typeck.c (build_binary_op): For flag_openmp only handle
2180         MIN_EXPR/MAX_EXPR.
2182 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
2184         * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
2185         directive.
2187 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
2189         * c-decl.c (enum deprecated_states): Add unavailable state.
2190         (merge_decls): Copy unavailability.
2191         (quals_from_declspecs): Handle unavailable case.
2192         (start_decl): Amend the logic handling suppression of nested
2193         deprecation states to include unavailability.
2194         (smallest_type_quals_location): Amend comment.
2195         (grokdeclarator): Handle the unavailable deprecation state.
2196         (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
2197         * c-tree.h (struct c_declspecs): Add unavailable_p.
2198         * c-typeck.c (build_component_ref): Handle unavailability.
2199         (build_external_ref): Likewise.
2201 2021-09-01  Roger Sayle  <roger@nextmovesoftware.com>
2202             Joseph Myers  <joseph@codesourcery.com>
2204         PR c/79412
2205         * c-decl.c (duplicate_decls): On significant mismatches, mark the
2206         types of both (non-function) decls as error_mark_node, so that the
2207         middle-end can see the code is malformed.
2208         (free_attr_access_data): Don't process if the type has been set to
2209         error_mark_node.
2211 2021-08-31  Marcel Vollweiler  <marcel@codesourcery.com>
2213         * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
2214         and 'ancestor' in 'target device' clauses.
2216 2021-08-23  Jakub Jelinek  <jakub@redhat.com>
2218         * c-parser.c (c_parser_omp_clause_num_tasks,
2219         c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
2221 2021-08-22  Martin Uecker  <muecker@gwdg.de>
2223         PR c/98397
2224         * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
2225         for pointers to arrays with qualifiers.
2226         (build_conditional_expr): For C23 don't lose qualifiers for pointers
2227         to arrays when the other pointer is a void pointer. Update warnings.
2228         (convert_for_assignment): Update warnings for C2X when converting from
2229         void* with qualifiers to a pointer to array with the same qualifiers.
2231 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
2233         * c-parser.c (c_parser_omp_error): New function.
2234         (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
2236 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
2238         * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
2239         comma at the end of list.
2240         (c_parser_omp_requires): Likewise.
2242 2021-08-19  Jakub Jelinek  <jakub@redhat.com>
2244         * c-parser.c (c_parser_omp_requires): Don't call
2245         c_parser_peek_2nd_token and optionally consume token if current
2246         token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
2248 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
2250         * c-parser.c (c_parser_omp_nothing): New function.
2251         (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
2253 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
2255         * c-parser.c (c_parser_statement_after_labels): Add restart label
2256         near the start of the function.  If c_parser_pragma returns false,
2257         goto restart.
2258         (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
2259         c_parser_omp_cancellation_point returned.  For PRAGMA_OMP_DECLARE
2260         return what c_parser_omp_declare returned.  Return true instead of
2261         false after emitting errors that the directive is not allowed in
2262         pragma_stmt context.
2263         (c_parser_omp_ordered): Return true instead of
2264         false after emitting errors that the directive is not allowed in
2265         pragma_stmt context.
2266         (c_parser_omp_target_update): Likewise.
2267         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
2268         Change return type from tree to bool, return false if the
2269         directive should be ignored in pragma_stmt contexts.
2270         (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
2271         return their result directly.
2272         (c_parser_omp_cancellation_point): Change return type from void to
2273         bool, return false if the directive should be ignored in pragma_stmt
2274         contexts.
2275         (c_parser_omp_declare): Likewise.
2277 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
2279         * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
2280         (c_parser_omp_scope): New function.
2281         (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
2283 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
2285         * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
2286         (c_parser_omp_clause_filter): New function.
2287         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
2288         (OMP_MASKED_CLAUSE_MASK): Define.
2289         (c_parser_omp_masked): New function.
2290         (c_parser_omp_parallel): Handle parallel masked.
2291         (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
2292         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
2294 2021-08-12  Martin Uecker  <muecker@gwdg.de>
2296         PR c/101838
2297         PR c/29970
2298         * c-typeck.c (c_expr_sizeof_type): Evaluate
2299         size expressions for structs of variable size.
2301 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
2303         * c-parser.c (c_parser_omp_clause_proc_bind): Accept
2304         'primary' as alias for 'master'.
2306 2021-08-10  Martin Uecker  <muecker@gwdg.de>
2308         PR c/29970
2309         * c-typeck.c (c_expr_sizeof_expr): Evaluate
2310         size expressions for structs of variable size.
2312 2021-08-06  Tamar Christina  <tamar.christina@arm.com>
2314         * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
2315         * c-tree.h (c_simulate_enum_decl): Likewise.
2317 2021-08-06  Martin Sebor  <msebor@redhat.com>
2319         * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
2320         vec arguments to by-reference.
2321         (c_finish_omp_declare_simd): Same.
2322         (c_parser_compound_statement_nostart): Same.
2323         (c_parser_for_statement): Same.
2324         (c_parser_objc_methodprotolist): Same.
2325         (c_parser_oacc_routine): Same.
2326         (c_parser_omp_for_loop): Same.
2327         (c_parser_omp_declare_simd): Same.
2329 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
2330             Joseph Myers  <joseph@codesourcery.com>
2331             Cesar Philippidis  <cesar@codesourcery.com>
2333         * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
2334         (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
2335         (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
2336         * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
2338 2021-07-20  Martin Sebor  <msebor@redhat.com>
2340         * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
2341         by-const-reference.
2342         * c-typeck.c (c_build_function_call_vec): Same.
2344 2021-07-15  Martin Sebor  <msebor@redhat.com>
2346         PR c/101289
2347         PR c/97548
2348         * c-decl.c (get_parm_array_spec): Strip nops.
2350 2021-07-06  Martin Sebor  <msebor@redhat.com>
2352         * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
2354 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
2356         PR c/101297
2357         * c-parser.c (c_parser_omp_atomic): Consume comma only if it
2358         appears before a CPP_NAME.
2360 2021-06-25  Martin Sebor  <msebor@redhat.com>
2362         * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
2363         warning_suppressed_p, suppress_warning, and copy_no_warning.
2364         (diagnose_mismatched_decls): Same.
2365         (duplicate_decls): Same.
2366         (grokdeclarator): Same.
2367         (finish_function): Same.
2368         (c_write_global_declarations_1): Same.
2369         * c-fold.c (c_fully_fold_internal): Same.
2370         * c-parser.c (c_parser_expr_no_commas): Same.
2371         (c_parser_postfix_expression): Same.
2372         * c-typeck.c (array_to_pointer_conversion): Same.
2373         (function_to_pointer_conversion): Same.
2374         (default_function_array_conversion): Same.
2375         (convert_lvalue_to_rvalue): Same.
2376         (default_conversion): Same.
2377         (build_indirect_ref): Same.
2378         (build_function_call_vec): Same.
2379         (build_atomic_assign): Same.
2380         (build_unary_op): Same.
2381         (c_finish_return): Same.
2382         (emit_side_effect_warnings): Same.
2383         (c_finish_stmt_expr): Same.
2384         (c_omp_clause_copy_ctor): Same.
2386 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
2388         PR c/101176
2389         * c-parser.c (c_parser_has_attribute_expression): Set source range for
2390         the result.
2392 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
2394         PR c/101171
2395         * c-typeck.c (build_c_cast): Don't call note_integer_operands on
2396         error_mark_node.
2398 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
2400         * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
2401         C_ORT_OMP for clauses on target construct.
2402         (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
2403         (c_parser_omp_target): For non-combined target add
2404         map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION.  Pass
2405         C_ORT_OMP_TARGET to c_finish_omp_clauses.
2406         * c-typeck.c (handle_omp_array_sections): Adjust ort handling
2407         for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
2408         never present on C_ORT_*DECLARE_SIMD.
2409         (c_finish_omp_clauses): Likewise.  Handle OMP_CLAUSE_IN_REDUCTION
2410         on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
2411         corresponding map clauses.
2413 2021-06-21  Jakub Jelinek  <jakub@redhat.com>
2415         PR inline-asm/100785
2416         * c-typeck.c (c_mark_addressable): Diagnose trying to make
2417         bit-fields addressable.
2419 2021-06-15  Robin Dapp  <rdapp@linux.ibm.com>
2421         * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
2422         similar.
2424 2021-06-14  Tobias Burnus  <tobias@codesourcery.com>
2426         PR c/100913
2427         * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
2428         var in the error case.
2430 2021-06-07  Eric Botcazou  <ebotcazou@adacore.com>
2432         PR c/100920
2433         * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
2434         spot built-in functions.
2436 2021-06-06  Jakub Jelinek  <jakub@redhat.com>
2438         PR c/100902
2439         * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
2440         even when target is combined with other constructs.
2442 2021-06-06  Eric Botcazou  <ebotcazou@adacore.com>
2444         PR c/100920
2445         * c-decl.c (finish_struct): Fix thinko in previous change.
2446         * c-typeck.c (convert_for_assignment): Do not warn on pointer
2447         assignment and initialization for storage order purposes if the
2448         RHS is a call to a DECL_IS_MALLOC function.
2450 2021-06-04  Martin Sebor  <msebor@redhat.com>
2452         PR c/100783
2453         * c-objc-common.c (print_type): Handle erroneous types.
2455 2021-06-03  Jakub Jelinek  <jakub@redhat.com>
2457         PR c++/100859
2458         * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
2459         after depend only cases.
2461 2021-05-31  Richard Biener  <rguenther@suse.de>
2463         PR c++/88601
2464         * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
2465         * c-parser.c (c_parser_postfix_expression): Likewise.
2467 2021-05-28  Richard Biener   <rguenther@suse.de>
2469         PR c/100803
2470         * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
2471         invalid if conditions.
2473 2021-05-28  Jakub Jelinek  <jakub@redhat.com>
2475         PR middle-end/99928
2476         * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
2477         (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2478         marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT.  Add
2479         map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
2480         maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
2481         present too.  For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
2482         if present in map_head, map_field_head or map_firstprivate_head
2483         bitmaps.
2485 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
2487         * c-parser.c (c_parser_omp_clause_affinity): New.
2488         (c_parser_omp_clause_name, c_parser_omp_variable_list,
2489         c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
2490         * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
2491         c_finish_omp_clauses): Likewise.
2493 2021-05-26  Eric Botcazou  <ebotcazou@adacore.com>
2495         PR c/100653
2496         * c-decl.c (finish_struct): Warn for a union containing an aggregate
2497         field with a differing scalar storage order.
2499 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
2501         PR middle-end/99928
2502         * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
2503         OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain.  Don't error
2504         if a decl is mentioned both in map clause and in such firstprivate
2505         clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
2507 2021-05-19  Jakub Jelinek  <jakub@redhat.com>
2509         PR middle-end/99928
2510         * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
2511         master when combined with taskloop.
2512         (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
2513         parallel master when not combined with taskloop.
2515 2021-05-18  Richard Biener  <rguenther@suse.de>
2517         PR c/100522
2518         * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
2519         Diagnose calls to non-functions.
2520         (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
2522 2021-05-17  Richard Biener  <rguenther@suse.de>
2524         PR c/100625
2525         * gimple-parser.c (c_parser_gimple_label): Avoid building
2526         a GIMPLE label with NULL label decl.
2528 2021-05-13  Martin Sebor  <msebor@redhat.com>
2530         PR c/100550
2531         * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
2533 2021-05-12  Marcel Vollweiler  <marcel@codesourcery.com>
2535         * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
2536         'close'.
2538 2021-05-10  Martin Liska  <mliska@suse.cz>
2540         * c-aux-info.c (affix_data_type): Use startswith
2541         function instead of strncmp.
2542         * c-typeck.c (build_function_call_vec): Likewise.
2543         * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
2545 2021-05-07  Eric Botcazou  <ebotcazou@adacore.com>
2547         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
2548         on the address of a pointer field in a record with reverse SSO.
2550 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
2552         * c-typeck.c (c_finish_omp_clauses): Accept float + complex
2553         for || and && reductions.
2555 2021-04-29  Joseph Myers  <joseph@codesourcery.com>
2557         * c-typeck.c (function_types_compatible_p): For C2X, treat
2558         unprototyped function as compatible with non-variadic prototyped
2559         function even if some argument types are changed by the default
2560         argument promotions.
2562 2021-04-15  Martin Sebor  <msebor@redhat.com>
2564         PR c/99420
2565         PR c/99972
2566         * c-decl.c (pushdecl): Always propagate type attribute.
2568 2021-04-15  Richard Sandiford  <richard.sandiford@arm.com>
2570         PR c/98852
2571         * c-typeck.c (c_common_type): Do not drop attributes that
2572         affect type identity.
2574 2021-04-10  Jakub Jelinek  <jakub@redhat.com>
2576         PR c/99990
2577         * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
2578         error_mark_node.
2580 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
2582         PR c++/99565
2583         * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
2584         to operand_equal_p.
2586 2021-03-19  Jakub Jelinek  <jakub@redhat.com>
2588         PR c/99588
2589         * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
2590         with modifycode NOP_EXPR produces and mark the _Atomic var as read
2591         if found.
2592         (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
2593         rather than STATEMENT_LIST.  Otherwise call mark_exp_read on lhs.
2594         Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
2596 2021-03-15  Tobias Burnus  <tobias@codesourcery.com>
2598         PR c++/99509
2599         * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
2600         ensure that the varpool node is marked as offloadable.
2602 2021-03-05  Tobias Burnus  <tobias@codesourcery.com>
2604         PR c/99137
2605         * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
2607 2021-02-24  Martin Sebor  <msebor@redhat.com>
2609         PR middle-end/97172
2610         * c-decl.c (free_attr_access_data): Clear attribute arg spec.
2612 2021-02-18  Jakub Jelinek  <jakub@redhat.com>
2614         PR c/99136
2615         * c-typeck.c (c_finish_return): Don't wrap retval into
2616         EXCESS_PRECISION_EXPR in functions that return void.
2618 2021-02-11  Marek Polacek  <polacek@redhat.com>
2620         * c-parser.c (c_parser_if_statement): Use vec_free.
2622 2021-02-04  Martin Sebor  <msebor@redhat.com>
2624         PR c/97882
2625         * c-decl.c (locate_old_decl): Add type to diagnostic output.
2626         (diagnose_mismatched_decls): Same.
2627         (start_function): Introduce temporaries for better readability.
2628         * c-typeck.c (comptypes_internal): Only consider complete enum
2629         types in comparisons with integers.
2631 2021-02-01  Martin Sebor  <msebor@redhat.com>
2633         PR middle-end/97172
2634         * c-decl.c (free_attr_access_data): New function.
2635         (c_parse_final_cleanups): Call free_attr_access_data.
2637 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
2639         * c-parser.c (c_parser_omp_clause_detach): New.
2640         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
2641         (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2642         * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
2643         clause.  Prevent use of detach with mergeable and overriding the
2644         data sharing mode of the event handle.
2646 2021-01-15  Jakub Jelinek  <jakub@redhat.com>
2648         * c-typeck.c (c_finish_omp_clauses): For reduction build array with
2649         unqualified element type and then call c_build_qualified_type on the
2650         ARRAY_TYPE.
2652 2021-01-07  Richard Biener  <rguenther@suse.de>
2654         * gimple-parser.c (c_parser_gimple_compound_statement): Only
2655         reallocate loop array if it is too small.
2657 2020-12-16  Martin Uecker  <muecker@gwdg.de>
2659         PR c/98047
2660         * c-typeck.c (build_modify_expr): Drop qualifiers.
2662 2020-12-16  Martin Uecker  <muecker@gwdg.de>
2664         PR c/98260
2665         * c-parser.c (c_parser_expression): Look into
2666         nop expression when marking expressions as read.
2668 2020-12-14  Martin Liska  <mliska@suse.cz>
2670         PR sanitizer/98204
2671         * c-typeck.c (pointer_diff): Do not emit a top-level
2672         sanitization.
2673         (build_binary_op): Likewise.
2675 2020-12-09  Tobias Burnus  <tobias@codesourcery.com>
2677         * c-parser.c (c_parser_omp_allocate): New.
2678         (c_parser_omp_construct): Call it.
2680 2020-12-09  Richard Biener  <rguenther@suse.de>
2682         PR c/98200
2683         * gimple-parser.c (c_parser_gimple_postfix_expression): Return
2684         early on error.
2686 2020-12-07  Martin Uecker  <muecker@gwdg.de>
2688         PR c/97981
2689         * c-typeck.c (convert_lvalue_to_rvalue): Move the code
2690         that drops qualifiers to the end of the function.
2692 2020-11-26  Martin Uecker  <muecker@gwdg.de>
2694         PR c/65455
2695         PR c/92935
2696         * c-parser.c (c_parser_declaration_or_fndef): Remove
2697         redundant code to drop qualifiers of _Atomic types for __auto_type.
2698         (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
2699         types for __typeof__.
2701 2020-11-24  Jakub Jelinek  <jakub@redhat.com>
2703         PR c/97958
2704         * c-parser.c (c_parser_binary_expression): For omp atomic binary
2705         expressions, use make_node instead of build2 to avoid checking build2
2706         performs.
2708 2020-11-23  Joseph Myers  <joseph@codesourcery.com>
2710         PR c/95630
2711         * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
2712         for comparisons of complete and incomplete pointers.
2714 2020-11-21  Aaron Sawdey  <acsawdey@linux.ibm.com>
2716         * c-aux-info.c (gen_type): Support opaque types.
2718 2020-11-20  Martin Sebor  <msebor@redhat.com>
2720         PR middle-end/97879
2721         * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2723 2020-11-20  Jakub Jelinek  <jakub@redhat.com>
2725         PR other/97911
2726         * Make-lang.in (c.serial): Change from goal to a variable.
2727         (.PHONY): Drop c.serial.
2729 2020-11-20  Martin Uecker  <muecker@gwdg.de>
2731         * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2733 2020-11-19  Jakub Jelinek  <jakub@redhat.com>
2735         PR c/97860
2736         * c-decl.c (get_parm_array_spec): Bail out of nelts is
2737         error_operand_p.
2739 2020-11-18  Jakub Jelinek  <jakub@redhat.com>
2741         * Make-lang.in (c.serial): New goal.
2742         (.PHONY): Add c.serial c.prev.
2743         (cc1$(exeext)): Call LINK_PROGRESS.
2745 2020-11-13  Vladimir N. Makarov  <vmakarov@redhat.com>
2747         * c-parser.c (c_parser_asm_statement): Parse outputs for asm
2748         goto too.
2749         * c-typeck.c (build_asm_expr): Remove an assert checking output
2750         absence for asm goto.
2752 2020-11-13  Jakub Jelinek  <jakub@redhat.com>
2754         * c-typeck.c (c_finish_omp_clauses): Don't clear
2755         OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2757 2020-11-13  Iain Sandoe  <iain@sandoe.co.uk>
2759         PR objc/77404
2760         * c-parser.c (c_parser_objc_class_definition): Pass the
2761         location of the class name to the interface declaration.
2763 2020-11-10  Strager Neds  <strager.nds@gmail.com>
2765         * c-decl.c (merge_decls): Use new overload of
2766         set_decl_section_name.
2768 2020-11-10  Chung-Lin Tang  <cltang@codesourcery.com>
2770         * c-parser.c (c_parser_omp_target_data): Add use of
2771         new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
2772         handled map clause kind.
2773         (c_parser_omp_target_enter_data): Likewise.
2774         (c_parser_omp_target_exit_data): Likewise.
2775         (c_parser_omp_target): Likewise.
2776         * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
2777         use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
2778         (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
2779         same struct field access to co-exist on OpenMP construct.
2781 2020-11-07  Martin Uecker  <muecker@gwdg.de>
2783         * c-parser.c (c_parser_label): Implement mixing of labels and code.
2784         (c_parser_all_labels): Likewise.
2786 2020-11-06  Iain Sandoe  <iain@sandoe.co.uk>
2788         * c-parser.c (c_parser_objc_at_property_declaration):
2789         Improve parsing fidelity. Associate better location info
2790         with @property attributes.  Clean up the interface to
2791         objc_add_property_declaration ().
2793 2020-11-06  Nathan Sidwell  <nathan@acm.org>
2795         * c-decl.c (diagnose_mismatched_decls): Rename
2796         DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2797         (warn_if_shadowing, implicitly_declare, names_builtin_p)
2798         (collect_source_refs): Likewise.
2799         * c-typeck.c (inform_declaration, inform_for_arg)
2800         (convert_for_assignment): Likewise.
2802 2020-11-06  Tobias Burnus  <tobias@codesourcery.com>
2804         * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2805         OpenACC matching.
2806         (c_parser_omp_construct): Update call.
2808 2020-11-04  Jakub Jelinek  <jakub@redhat.com>
2810         PR c++/97670
2811         * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2812         find underlying decl to clear in the aligned_head bitmap.
2814 2020-11-04  Joseph Myers  <joseph@codesourcery.com>
2816         * c-decl.c (handle_nodiscard_attribute): New.
2817         (std_attribute_table): Add nodiscard.
2818         * c-parser.c (c_parser_std_attribute): Expect argument to
2819         nodiscard attribute to be a string.  Do not special-case ignoring
2820         nodiscard.
2821         * c-typeck.c (maybe_warn_nodiscard): New.
2822         (build_compound_expr, emit_side_effect_warnings): Call
2823         maybe_warn_nodiscard.
2824         (c_process_expr_stmt, c_finish_stmt_expr): Also call
2825         emit_side_effect_warnings if warn_unused_result.
2827 2020-10-29  Asher Gordon  <AsDaGo@posteo.net>
2829         * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2830         with XDELETE.
2831         (finish_init): Likewise.
2832         (pop_init_level): Likewise.
2834 2020-10-28  Joseph Myers  <joseph@codesourcery.com>
2836         * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2837         error_at for omitted parameter name.
2839 2020-10-28  Jakub Jelinek  <jakub@redhat.com>
2841         * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2842         (c_parser_omp_clause_allocate): New function.
2843         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2844         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2845         OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2846         OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2847         OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2848         OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2849         PRAGMA_OMP_CLAUSE_ALLOCATE.
2850         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2852 2020-10-27  Joseph Myers  <joseph@codesourcery.com>
2854         * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2855         standard attributes.
2857 2020-10-23  Marek Polacek  <polacek@redhat.com>
2859         PR c++/91741
2860         * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2861         (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2862         (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2863         * c-tree.h (char_type_p): Declare.
2864         * c-typeck.c (char_type_p): No longer static.
2866 2020-10-23  Martin Sebor  <msebor@redhat.com>
2868         PR middle-end/97552
2869         * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2871 2020-09-19  Martin Sebor  <msebor@redhat.com>
2873         PR c/50584
2874         * c-decl.c (lookup_last_decl): Define new function.
2875         (c_decl_attributes): Call it.
2876         (start_decl): Add argument and use it.
2877         (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2878         (get_parm_array_spec): Define new function.
2879         (push_parm_decl): Call get_parm_array_spec.
2880         (start_function): Call warn_parm_array_mismatch.  Build attribute
2881         access and add it to current function.
2882         * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2883         in forms of array parameters.
2884         * c-tree.h (start_decl): Add argument.
2886 2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
2888         * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2889         with...
2890         (in_statement): New.
2891         (start_function): Adjust for above change.
2892         (c_push_function_context, c_pop_function_context): Likewise.
2893         * c-lang.h (struct language_function): Likewise.
2894         * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2895         * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2896         New.
2897         (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2898         (c_parser_switch_statement): Adjust break/switch context handling
2899         and calls to renamed functions.
2900         (c_parser_while_statement): Adjust break/switch context handling and
2901         build a WHILE_STMT.
2902         (c_parser_do_statement): Ditto, with DO_STMT respectively.
2903         (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2904         (c_parser_omp_for_loop): Adjust break/switch context handling.
2905         * c-tree.h (c_break_label, c_cont_label): Delete.
2906         (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2907         (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2908         (in_statement, switch_statement_break_seen_p): Declare.
2909         (c_start_case, c_finish_case): Renamed to...
2910         (c_start_switch, c_finish_switch).
2911         (c_finish_bc_stmt): Adjust arguments.
2912         * c-typeck.c (build_function_call_vec): Don't try to print
2913         statements with %qE format.
2914         (struct c_switch):  Rename switch_expr field to switch_stmt.
2915         Add break_stmt_seen_p field.
2916         (c_start_case): Rename to c_start_switch.  Build a SWITCH_STMT
2917         instead of a SWITCH_EXPR.  Update for changes to struct c_switch.
2918         (do_case): Update for changes to struct c_switch.
2919         (c_finish_case): Rename to c_finish_switch.  Update for changes to
2920         struct c_switch and change of representation from SWITCH_EXPR to
2921         SWITCH_STMT.
2922         (c_finish_loop): Delete.
2923         (c_finish_bc_stmt): Update to reflect changes to break/continue
2924         state representation.  Build a BREAK_STMT or CONTINUE_STMT instead
2925         of a GOTO_EXPR except for objc foreach loops.
2927 2020-09-01  Jakub Jelinek  <jakub@redhat.com>
2929         PR c++/96867
2930         * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2931         only on PARM_DECLs.
2933 2020-08-28  Martin Sebor  <msebor@redhat.com>
2935         PR c/96596
2936         * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2937         argument type.
2939 2020-08-27  Martin Liska  <mliska@suse.cz>
2941         * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2942         growth function to true.
2944 2020-08-25  Tobias Burnus  <tobias@codesourcery.com>
2946         PR c/96678
2947         * c-typeck.c (handle_omp_array_sections_1): Talk about
2948         array function parameter in the error message.
2950 2020-08-18  Jakub Jelinek  <jakub@redhat.com>
2952         PR c/96571
2953         * c-parser.c (c_parser_generic_selection): Change match_found from bool
2954         to int, holding index of the match.  Call mark_exp_read on the selector
2955         expression and on expressions other than the selected one.
2957 2020-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2959         PR c/96377
2960         * c-typeck.c (process_init_element): Split test for whether to
2961         recurse into a record, union or array into...
2962         (initialize_elementwise_p): ...this new function.  Don't recurse
2963         into a vector type if the initialization value is also a vector.
2965 2020-07-31  Richard Biener  <rguenther@suse.de>
2967         PR debug/96383
2968         * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2969         Define to c_common_finalize_early_debug.
2971 2020-07-22  Tobias Burnus  <tobias@codesourcery.com>
2973         * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2974         (c_parser_omp_critical): Permit hint(0) clause without named critical.
2975         (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2977 2020-07-21  Sunil K Pandey  <skpgkp2@gmail.com>
2979         PR target/95237
2980         * c-decl.c (finish_decl): Call target hook
2981         lower_local_decl_alignment to lower local decl alignment.
2983 2020-07-09  Julian Brown  <julian@codesourcery.com>
2984             Thomas Schwinge  <thomas@codesourcery.com>
2986         PR middle-end/95270
2987         * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2988         for standalone attach/detach clauses.
2990 2020-07-08  Eric Botcazou  <ebotcazou@adacore.com>
2992         * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2993         set, warn for conversion between pointers that point to incompatible
2994         scalar storage orders.
2996 2020-07-07  Kaipeng Zhou  <zhoukaipeng3@huawei.com>
2998         * c-parser.c (c_parser_statement_after_labels): Pass correct
2999         parameters to c_parser_do_statement.
3001 2020-06-16  Jakub Jelinek  <jakub@redhat.com>
3003         * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
3004         c_in_omp_for.
3005         (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
3006         premature c_fully_fold.  Defer explicit c_fully_fold calls to after
3007         c_finish_omp_for.
3008         * c-tree.h (c_in_omp_for): Declare.
3009         * c-typeck.c (c_in_omp_for): Define.
3010         (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
3011         (digest_init): Likewise.
3012         (build_binary_op): Likewise.
3014 2020-06-16  Jakub Jelinek  <jakub@redhat.com>
3016         * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
3017         from kind by comma rather than colon.
3019 2020-06-05  Mark Wielaard  <mark@klomp.org>
3021         * c-decl.c (implicit_decl_warning): When warned and olddecl is
3022         an undeclared builtin, then add a fixit header hint, if found.
3023         (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
3024         warning_at about implicit builtin declaration type mismatch.
3026 2020-06-03  Mark Wielaard  <mark@klomp.org>
3028         * c-parser.c (struct c_parser): Add seen_string_literal
3029         bitfield.
3030         (c_parser_consume_token): Reset seen_string_literal.
3031         (c_parser_error_richloc): Add name_hint if seen_string_literal
3032         and next token is a CPP_NAME and we have a missing header
3033         suggestion for the name.
3034         (c_parser_string_literal): Set seen_string_literal.
3036 2020-06-03  Mark Wielaard  <mark@klomp.org>
3038         * c-parser.c (c_parser_postfix_expression_after_primary): Add
3039         scope with matching_parens after CPP_OPEN_PAREN.
3041 2020-06-03  Tobias Burnus  <tobias@codesourcery.com>
3043         * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
3045 2020-05-28  Nicolas Bértolo  <nicolasbertolo@gmail.com>
3047         * Make-lang.in: Remove extra slash.
3049 2020-05-19  Martin Liska  <mliska@suse.cz>
3051         * c-parser.c: Fix typo.
3053 2020-05-14  Jakub Jelinek  <jakub@redhat.com>
3055         * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
3057 2020-05-07  Richard Biener  <rguenther@suse.de>
3059         PR middle-end/94703
3060         * gimple-parser.c (c_parser_parse_ssa_name): Do not set
3061         DECL_GIMPLE_REG_P.
3063 2020-04-30  Jakub Jelinek  <jakub@redhat.com>
3065         PR c/94842
3066         * c-decl.c (set_labels_context_r): In addition to context-less
3067         LABEL_DECLs adjust also LABEL_DECLs with context equal to
3068         parent function if any.
3069         (store_parm_decls): Adjust comment.
3071 2020-04-19  Jakub Jelinek  <jakub@redhat.com>
3073         PR objc/94637
3074         * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
3075         two CPP_COLON tokens.
3077 2020-04-17  Jakub Jelinek  <jakub@redhat.com>
3079         PR other/94629
3080         * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
3081         to data.clauses.
3083 2020-04-15  Jakub Jelinek  <jakub@redhat.com>
3085         PR c/94593
3086         * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
3087         requires directive when not at file scope.
3089 2020-04-08  Tobias Burnus  <tobias@codesourcery.com>
3091         PR middle-end/94120
3092         * c-decl.c (c_check_in_current_scope): New function.
3093         * c-tree.h (c_check_in_current_scope): Declare it.
3094         * c-parser.c (c_parser_oacc_declare): Add check that variables
3095         are declared in the same scope as the directive. Fix handling
3096         of namespace vars.
3098 2020-04-07  Jakub Jelinek  <jakub@redhat.com>
3100         PR c++/94512
3101         * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
3102         if c_parser_omp_master succeeded.
3104 2020-03-23  Jakub Jelinek  <jakub@redhat.com>
3106         PR gcov-profile/94029
3107         PR c/94239
3108         * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
3109         the function_start_locus location.  Don't do that afterwards for the
3110         __GIMPLE body parsing.
3112 2020-03-19  Jakub Jelinek  <jakub@redhat.com>
3114         PR gcov-profile/94029
3115         * c-tree.h (finish_function): Add location_t argument defaulted to
3116         input_location.
3117         * c-parser.c (c_parser_compound_statement): Add endlocp argument and
3118         set it to the locus of closing } if non-NULL.
3119         (c_parser_compound_statement_nostart): Return locus of closing }.
3120         (c_parser_parse_rtl_body): Likewise.
3121         (c_parser_declaration_or_fndef): Propagate locus of closing } to
3122         finish_function.
3123         * c-decl.c (finish_function): Add end_loc argument, use it instead of
3124         input_location to set function_end_locus.
3126 2020-03-17  Jakub Jelinek  <jakub@redhat.com>
3128         PR c/94172
3129         * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
3130         instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
3131         (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
3132         * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
3133         ENUMERAL_TYPEs.
3134         (finish_incomplete_vars): New function, moved from finish_struct.  Use
3135         relayout_decl instead of layout_decl.
3136         (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
3137         being TYPE_VFIELD.  Use finish_incomplete_vars.
3138         (finish_enum): Clear C_TYPE_INCOMPLETE_VARS.  Call
3139         finish_incomplete_vars.
3140         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3141         also on ENUMERAL_TYPEs.
3143 2020-03-16  Jakub Jelinek  <jakub@redhat.com>
3145         PR c/94179
3146         * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
3148 2020-03-13  Martin Sebor  <msebor@redhat.com>
3150         PR c/94040
3151         * c-decl.c (builtin_structptr_type_count): New constant.
3152         (match_builtin_function_types): Reject decls that are incompatible
3153         in types pointed to by pointers.
3154         (diagnose_mismatched_decls): Adjust comments.
3156 2020-03-05  Joseph Myers  <joseph@codesourcery.com>
3158         PR c/93577
3159         * c-typeck.c (pop_init_level): Do not diagnose initializers as
3160         empty when initialized type is error_mark_node.
3161         (set_designator, process_init_element): Ignore initializers for
3162         elements of a variable-size type or of error_mark_node.
3164 2020-03-01  Martin Sebor  <msebor@redhat.com>
3166         PR middle-end/93926
3167         * c-decl.c (types_close_enough_to_match): New function.
3168         (match_builtin_function_types):
3169         (diagnose_mismatched_decls): Add missing inform call to a warning.
3171 2020-03-01  Martin Sebor  <msebor@redhat.com>
3173         PR c/93812
3174         * c-typeck.c (build_functype_attribute_variant): New function.
3175         (composite_type): Call it.
3177 2020-02-25  Jakub Jelinek  <jakub@redhat.com>
3179         PR other/93912
3180         * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
3181         Rename last argument from probablity to probability.
3183 2020-02-13  Jakub Jelinek  <jakub@redhat.com>
3185         PR c/93576
3186         * c-decl.c (grokdeclarator): If this_size_varies, only push size into
3187         *expr if it has side effects.
3189 2020-01-30  Jeff Law  <law@redhat.com>
3191         PR c/88660
3192         * c-parser.c (c_parser_switch_statement): Make sure to request
3193         marking the switch expr as used.
3195 2020-01-22  Joseph Myers  <joseph@codesourcery.com>
3197         PR c/93348
3198         * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
3199         argument with integer operands.
3201 2020-01-16  Kerem Kat  <keremkat@gmail.com>
3203         PR c/92833
3204         * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
3205         to support 4 available tokens.
3207 2020-01-15  Joseph Myers  <joseph@codesourcery.com>
3209         PR c/93072
3210         * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
3211         determine whether to set DECL_CONTEXT.
3213 2020-01-13  Joseph Myers  <joseph@codesourcery.com>
3215         PR c/93241
3216         * c-typeck.c (build_c_cast): Check for expressions with integer
3217         operands that can occur in an unevaluated part of an integer
3218         constant expression and call note_integer_operands as needed.
3220 2019-01-08  Richard Biener  <rguenther@suse.de>
3222         PR middle-end/93199
3223         * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
3224         permanently.
3226 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
3228         Update copyright years.
3230 2019-12-20  Eric Botcazou  <ebotcazou@adacore.com>
3232         * c-decl.c (collect_source_ref_cb): Delete.
3233         (for_each_global_decl): Rename into...
3234         (collect_source_refs): ...this.  Call collect_source_ref directly.
3235         (c_parse_final_cleanups): Always call collect_source_ref on the main
3236         input filename.
3238 2019-12-19  Julian Brown  <julian@codesourcery.com>
3239             Cesar Philippidis  <cesar@codesourcery.com>
3241         * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
3242         detach clauses.
3243         (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
3244         Allow deref (->) in variable lists if true.
3245         (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
3246         Pass to c_parser_omp_variable_list.
3247         (c_parser_oacc_data_clause): Support attach and detach clauses.  Update
3248         call to c_parser_omp_variable_list.
3249         (c_parser_oacc_all_clauses): Support attach and detach clauses.
3250         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
3251         OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
3252         OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
3253         (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
3254         * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
3255         and detach.  Support deref.
3256         (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
3257         GOMP_MAP_ALWAYS_POINTER for OpenACC.
3258         (c_oacc_check_attachments): New function.
3259         (c_finish_omp_clauses): Check attach/detach arguments for being
3260         pointers using above.  Support deref.
3262 2019-12-19  Julian Brown  <julian@codesourcery.com>
3263             Maciej W. Rozycki  <macro@codesourcery.com>
3264             Tobias Burnus  <tobias@codesourcery.com>
3265             Thomas Schwinge  <thomas@codesourcery.com>
3267         * c-parser.c (c_parser_omp_clause_name): Support no_create.
3268         (c_parser_oacc_data_clause): Likewise.
3269         (c_parser_oacc_all_clauses): Likewise.
3270         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3271         (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
3272         PRAGMA_OACC_CLAUSE_NO_CREATE.
3273         * c-typeck.c (handle_omp_array_sections): Support
3274         GOMP_MAP_NO_ALLOC.
3276 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
3278         * c-objc-common.c (range_label_for_type_mismatch::get_text):
3279         Replace label_text ctor calls.
3281 2019-12-04  Joseph Myers  <joseph@codesourcery.com>
3283         PR c/36941
3284         PR c/88827
3285         * c-typeck.c (convert_lvalue_to_rvalue): Call
3286         require_complete_type for arguments not of void types.
3287         (build_indirect_ref): Do not diagnose dereferencing pointers to
3288         incomplete types.
3289         * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
3291 2019-12-03  Joseph Myers  <joseph@codesourcery.com>
3293         PR c/88704
3294         * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
3295         old-style parameter definitions.
3297 2019-12-01  Sandra Loosemore  <sandra@codesourcery.com>
3299         PR target/92499
3301         * c-decl.c (flexible_array_type_p): Move to common code.
3303 2019-11-30  Richard Sandiford  <richard.sandiford@arm.com>
3305         * c-decl.c (start_decl): Allow initialization of variables whose
3306         size is a POLY_INT_CST.
3307         (finish_decl): Use verify_type_context to check whether the target
3308         allows variables with a particular type to have static or thread-local
3309         storage duration.  Don't raise a second error if such variables do
3310         not have a constant size.
3311         (grokdeclarator): Use verify_type_context to check whether the
3312         target allows fields or array elements to have a particular type.
3313         * c-typeck.c (pointer_diff): Use verify_type_context to test whether
3314         the target allows pointer difference for the types involved.
3315         (build_unary_op): Likewise for pointer increment and decrement.
3317 2019-11-29  Joseph Myers  <joseph@codesourcery.com>
3319         * c-parser.c (struct c_parser): Add members raw_tokens and
3320         raw_tokens_used.
3321         (c_lex_one_token): Add argument raw.  Handle lexing raw tokens and
3322         using previously-lexed raw tokens.
3323         (c_parser_peek_nth_token_raw)
3324         (c_parser_check_balanced_raw_token_sequence): New functions.
3325         (c_parser_nth_token_starts_std_attributes): Use
3326         c_parser_check_balanced_raw_token_sequence for Objective-C.
3328 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
3330         PR c/91985
3331         * c-decl.c (finish_declspecs): Use int instead of decimal
3332         floating-point types if decimal floating-point not supported.
3334 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
3336         * c-tree.h (struct c_declarator): Use a structure for id member.
3337         * c-decl.c (grokdeclarator): Extract attributes from cdk_id
3338         declarators at the start, not when handling individual declarators
3339         later.  Use u.id.id instead of u.id.
3340         (grokfield): Use u.id.id instead of u.id.
3341         (build_id_declarator): Set u.id.id and u.id.attrs.
3342         (finish_declspecs): Handle postfix attributes in case of typedef
3343         name or typeof used.
3344         * c-parser.c (c_parser_direct_declarator)
3345         (c_parser_direct_declarator_inner): Place declarator for
3346         attributes inside that for function or array, not outside.  Set
3347         u.id.attrs for identifiers.
3348         (c_parser_parameter_declaration): Use u.id.id instead of u.id.
3349         * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
3350         instead of u.id.
3352 2019-11-22  Jakub Jelinek  <jakub@redhat.com>
3354         PR c/90677
3355         * c-decl.c (identifier_global_tag): Define.
3357 2019-11-20  Richard Biener  <rguenther@suse.de>
3359         PR c/92088
3360         * c-decl.c (grokdeclarator): Prevent inlining of nested
3361         function with VLA arguments.
3363 2019-11-20  Joseph Myers  <joseph@codesourcery.com>
3365         * c-decl.c (c_warn_type_attributes): New function.
3366         (groktypename, grokdeclarator, finish_declspecs): Call
3367         c_warn_type_attributes before applying attributes to types.
3368         * c-tree.h (c_warn_type_attributes): Declare.
3370 2019-11-19  Joseph Myers  <joseph@codesourcery.com>
3372         * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
3373         standard attributes.
3374         * c-parser.c (c_parser_std_attribute): Take argument for_tm.  Use
3375         pedwarn for unknown standard attributes and return error_mark_node
3376         for them.
3378 2019-11-18  Matthew Malcomson  <matthew.malcomson@arm.com>
3380         * c-parser.c (c_parser_parse_rtl_body): Always call
3381         run_rtl_passes, even if startwith pass is not provided.
3383 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
3385         * c-parser.c (c_parser_std_attribute_specifier): Diagnose
3386         duplicate standard attributes.
3388 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
3390         * c-decl.c (std_attribute_table): Add maybe_unused.
3392 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
3394         * c-decl.c (std_attribute_table): Add fallthrough.
3395         * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
3396         attribute at top level.
3398 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
3400         * c-decl.c (std_attribute_table): New.
3401         (c_init_decl_processing): Register attributes from
3402         std_attribute_table.
3403         * c-parser.c (c_parser_attribute_arguments): Add arguments
3404         require_string and allow_empty_args.  All callers changed.
3405         (c_parser_std_attribute): Set require_string argument for
3406         "deprecated" attribute.
3408 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
3410         * c-parser.c (c_parser_postfix_expression)
3411         (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
3412         * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
3414 2019-11-14  Richard Sandiford  <richard.sandiford@arm.com>
3416         * c-typeck.c (build_conditional_expr): Use truth_type_for instead
3417         of build_same_sized_truth_vector_type.
3418         (build_vec_cmp): Likewise.
3420 2019-11-14  Jakub Jelinek  <jakub@redhat.com>
3422         * c-parser.c (c_parser_omp_context_selector): Don't require score
3423         argument to fit into shwi, just to be INTEGER_CST.  Diagnose
3424         negative score.
3426         * c-parser.c (c_parser_omp_context_selector): Rename
3427         CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
3428         Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
3429         identifier in that.  For CTX_PROPERTY_NAME_LIST, allow identifiers
3430         and string literals.
3432 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
3434         * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
3435         ctsk_tagfirstref_attrs.
3436         (struct c_declspecs): Update description of attrs.  Add
3437         postfix_attrs and non_std_attrs_seen_p.  Increase size of
3438         typespec_kind bit-field.
3439         (c_warn_unused_attributes): New declaration.
3440         (parser_xref_tag): Update prototype.
3441         * c-decl.c (c_warn_unused_attributes): New function.
3442         (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
3443         ctsk_tagref_attrs.  Handle attribute declarations.
3444         (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
3445         (grokdeclarator): Handle standard attributes.
3446         (parser_xref_tag): Add arguments have_std_attrs and attrs.  Apply
3447         attributes to incomplete type reference.
3448         (xref_tag): Update call to parser_xref_tag.
3449         (declspecs_add_addrspace, declspecs_add_type)
3450         (declspecs_add_scspec, declspecs_add_attrs): Set
3451         non_std_attrs_seen_p.
3452         (finish_declspecs): Apply postfix standard attributes to type.
3453         * c-parser.c (c_token_starts_declspecs)
3454         (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
3455         (c_parser_next_tokens_start_declaration): Update comments.
3456         (c_parser_consume_token, c_parser_consume_pragma): Handle moving
3457         parser->tokens[2] to parser->tokens[1].
3458         (c_parser_nth_token_starts_std_attributes)
3459         (c_parser_std_attribute_specifier_sequence): New functions.
3460         (c_parser_declaration_or_fndef): Add arguments have_attrs and
3461         attrs.  All callers changed.  Handle standard attributes.
3462         (c_parser_parms_declarator, c_parser_parms_list_declarator)
3463         (c_parser_parameter_declaration): Add argument have_gnu_attrs.
3464         All callers changed.
3465         (c_parser_declspecs): Add arguments start_std_attr_ok and
3466         end_std_attr_ok.  All callers changed.  Handle standard
3467         attributes.
3468         (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3469         (c_parser_direct_declarator, c_parser_direct_declarator_inner)
3470         (c_parser_compound_statement_nostart, c_parser_all_labels)
3471         (c_parser_label, c_parser_statement, c_parser_for_statement):
3472         Handle standard attributes.
3473         * c-parser.h (c_parser_declspecs): Update prototype.
3474         * gimple-parser.c (c_parser_gimple_declaration): Update call to
3475         c_parser_declspecs.
3477 2019-11-12  Martin Liska  <mliska@suse.cz>
3479         * gimple-parser.c: Do not include params.h.
3481 2019-11-12  Martin Liska  <mliska@suse.cz>
3483         * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
3484         with the new one, include opts.h if needed.  Use SET_OPTION_IF_UNSET
3485         macro.
3487 2019-11-12  Maciej W. Rozycki  <macro@codesourcery.com>
3488             Frederik Harwath  <frederik@codesourcery.com>
3490         gcc/c/
3491         * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
3492         (c_parser_oacc_kernels_parallel): Rename function to...
3493         (c_parser_oacc_compute): ... this.  Handle PRAGMA_OACC_SERIAL.
3494         (c_parser_omp_construct): Update accordingly.
3497 2019-11-11  Jakub Jelinek  <jakub@redhat.com>
3499         * c-parser.c (c_parser_translation_unit): Diagnose declare target
3500         without corresponding end declare target.
3502 2019-11-08  Richard Sandiford  <richard.sandiford@arm.com>
3504         * c-convert.c (convert): Only handle vector conversions if one of
3505         the types satisfies gnu_vector_type_p or if -flax-vector-conversions
3506         allows it.
3507         * c-typeck.c (build_array_ref): Only allow vector indexing if the
3508         vectors satisfy gnu_vector_type_p.
3509         (build_unary_op): Only allow unary operators to be applied to
3510         vectors if they satisfy gnu_vector_type_p.
3511         (digest_init): Only allow by-element initialization of vectors
3512         if they satisfy gnu_vector_type_p.
3513         (really_start_incremental_init): Likewise.
3514         (push_init_level): Likewise.
3515         (pop_init_level): Likewise.
3516         (process_init_element): Likewise.
3517         (build_binary_op): Only allow binary operators to be applied to
3518         vectors if they satisfy gnu_vector_type_p.
3520 2019-11-08  Joseph Myers  <joseph@codesourcery.com>
3522         * c-decl.c (grokparms): Convert () in a function definition to
3523         (void) for C2x.
3524         (store_parm_decls_oldstyle): Pedwarn for C2x.
3525         (store_parm_decls): Update comment about () not generating a
3526         prototype.
3528 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
3530         * c-parser.c (c_parser_attribute_arguments): New function.
3531         Factored out of c_parser_gnu_attribute.
3532         (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
3533         (c_parser_balanced_token_sequence, c_parser_std_attribute)
3534         (c_parser_std_attribute_specifier): New functions.
3535         (c_parser_transaction_attributes): Use
3536         c_parser_std_attribute_specifier.
3538 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
3540         * c-parser.c (c_parser): Remove lex_untranslated_string.  Add
3541         lex_joined_string and translate_strings_p.
3542         (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
3543         c_lex_with_flags.
3544         (c_parser_string_literal): New function.
3545         (c_parser_static_assert_declaration_no_semi): Use
3546         c_parser_string_literal.  Do not set lex_untranslated_string.
3547         (c_parser_asm_string_literal): Use c_parser_string_literal.
3548         (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
3549         (c_parser_gnu_attributes): Set and restore translate_strings_p
3550         instead of lex_untranslated_string.
3551         (c_parser_asm_statement): Do not set lex_untranslated_string.
3552         (c_parser_asm_operands): Likewise.
3553         (c_parser_has_attribute_expression): Set and restore
3554         translate_strings_p instead of lex_untranslated_string.
3555         (c_parser_postfix_expression): Use c_parser_string_literal.
3556         (pragma_lex): Likewise.
3557         (c_parser_pragma_pch_preprocess): Set lex_joined_string.
3558         (c_parse_file): Set translate_strings_p.
3559         * gimple-parser.c (c_parser_gimple_postfix_expression)
3560         (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
3561         * c-parser.c (c_parser_string_literal): Declare function.
3563 2019-11-02  Jakub Jelinek  <jakub@redhat.com>
3565         * c-parser.c (c_finish_omp_declare_variant): Use
3566         omp_get_context_selector instead of c_omp_get_context_selector.
3568 2019-10-29  Richard Sandiford  <richard.sandiford@arm.com>
3570         * c-tree.h (c_simulate_enum_decl): Declare.
3571         * c-decl.c (c_simulate_enum_decl): New function.
3572         * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
3574 2019-10-29  Richard Sandiford  <richard.sandiford@arm.com>
3576         * c-tree.h (c_simulate_builtin_function_decl): Declare.
3577         * c-decl.c (c_simulate_builtin_function_decl): New function.
3578         * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
3579         to the above.
3581 2019-10-28  Martin Sebor  <msebor@redhat.com>
3583         PR c/66970
3584         * c-decl.c (names_builtin_p): Define a new function.
3586 2019-10-28  Richard Biener  <rguenther@suse.de>
3588         PR c/92249
3589         * gimple-parser.c (c_parser_parse_gimple_body): Make
3590         current_bb the entry block initially to easier recover
3591         from errors.
3592         (c_parser_gimple_compound_statement): Adjust.
3594 2019-10-24  Jakub Jelinek  <jakub@redhat.com>
3596         * c-parser.c (c_finish_omp_declare_variant): Use
3597         omp_context_selector_matches instead of
3598         c_omp_context_selector_matches.
3599         * c-decl.c (c_decl_attributes): Add "omp declare target block"
3600         attribute in between declare target and end declare target
3601         pragmas.
3603 2019-10-15  Joseph Myers  <joseph@codesourcery.com>
3605         * c-parser.c (c_parser_attribute_any_word): Rename to
3606         c_parser_gnu_attribute_any_word.  All callers changed.
3607         (c_parser_attribute): Rename to c_parser_gnu_attribute.  All
3608         callers changed.
3609         (c_parser_attributes): Rename to c_parser_gnu_attributes.  All
3610         callers changed.
3611         (c_parser_declaration_or_fndef, c_parser_declspecs)
3612         (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3613         (c_parser_struct_declaration, c_parser_declarator)
3614         (c_parser_gnu_attribute, c_parser_compound_statement)
3615         (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
3616         (c_parser_transaction_attributes): Add "gnu-" prefix to names of
3617         attribute-related syntax productions.
3619 2019-10-14  Richard Sandiford  <richard.sandiford@arm.com>
3621         * c-objc-common.c (useful_aka_type_p): Replace with...
3622         (get_aka_type): ...this new function.  Given the original type,
3623         decide which aka type to print (if any).  Only look through typedefs
3624         if user_facing_original_type_p.
3625         (print_type): Update accordingly.
3627 2019-10-14  Jakub Jelinek  <jakub@redhat.com>
3629         * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
3630         into int NESTED, if it is 2, diagnose missing commas in between
3631         clauses.
3632         (c_parser_omp_context_selector): Pass 2 as last argument to
3633         c_parser_omp_all_clauses.
3635 2019-10-12  Jakub Jelinek  <jakub@redhat.com>
3637         * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
3638         For simd properties, put them directly into TREE_VALUE.
3639         (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
3640         If c_omp_context_selector_matches is 0, don't add attribute, otherwise
3641         add "omp declare variant base" attribute rather than
3642         "omp declare variant".
3644 2019-10-11  Joseph Myers  <joseph@codesourcery.com>
3646         * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
3648 2019-10-10  Jakub Jelinek  <jakub@redhat.com>
3650         * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
3651         true, terminate processing on closing paren and don't skip to end of
3652         pragma line.
3653         (c_parser_omp_declare_simd): Handle also declare variant.
3654         (omp_construct_selectors, omp_device_selectors,
3655         omp_implementation_selectors, omp_user_selectors): New variables.
3656         (c_parser_omp_context_selector,
3657         c_parser_omp_context_selector_specification,
3658         c_finish_omp_declare_variant): New functions.
3659         (c_finish_omp_declare_simd): Handle both declare simd and
3660         declare variant.
3661         (c_parser_omp_declare): Handle declare variant.
3663 2019-10-02  Joseph Myers  <joseph@codesourcery.com>
3665         * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
3666         CPP_COLON tokens.
3668 2019-10-01  Richard Sandiford  <richard.sandiford@arm.com>
3670         * c-objc-common.c (useful_aka_type_p): New function.
3671         (print_type): Use it to decide whether an aka type is worth printing.
3673 2019-09-27  Jakub Jelinek  <jakub@redhat.com>
3675         PR c++/88203
3676         * c-parser.c (c_parser_predefined_identifier): New function.
3677         (c_parser_postfix_expression): Use it.
3678         (c_parser_omp_variable_list): Parse predefined identifiers.
3679         * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
3680         in shared and firstprivate clauses, even when they are predetermined
3681         shared.
3683 2019-09-27  Richard Sandiford  <richard.sandiford@arm.com>
3685         * c-typeck.c (build_function_call_vec): Take the original function
3686         decl as an optional final parameter.  Pass all built-in calls to
3687         check_builtin_function_arguments.
3689 2019-09-20  Eric Botcazou  <ebotcazou@adacore.com>
3691         PR c/91815
3692         * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
3693         of identifiers in the external scope only for variables and functions.
3695 2019-09-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3697         PR c/78736
3698         * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
3700 2019-08-23  Iain Sandoe  <iain@sandoe.co.uk>
3702         PR pch/61250
3703         * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
3704         after determining that the first token is not
3705         PRAGMA_GCC_PCH_PREPROCESS.
3707 2019-08-22  Eric Botcazou  <ebotcazou@adacore.com>
3709         * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
3710         FUNCTION_DECL to the right value in the presence of nested declarators.
3712 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
3714         PR middle-end/91421
3715         * c-decl.c (merge_decls): Use copy_decl_built_in_function.
3717 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
3719         PR middle-end/91421
3720         * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
3721         of a built_in_function.
3722         (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
3724 2019-08-10  Jakub Jelinek  <jakub@redhat.com>
3726         * c-parser.c (c_parser_omp_clause_name): Parse device_type.
3727         (c_parser_omp_clause_device_type): New function.
3728         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3729         (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3730         (c_parser_omp_declare_target): Handle device_type clauses.  Remove
3731         diagnostics for declare target with clauses nested in clause-less
3732         declare target declaration-definition-seq.
3733         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
3735 2019-08-09  Jakub Jelinek  <jakub@redhat.com>
3737         * c-parser.c (check_no_duplicate_clause): Simplify using
3738         omp_find_clause.
3739         (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
3740         directive name modifiers.
3741         (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
3743         PR c/91401
3744         * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
3745         check_no_duplicate_clause call.  Comment it out, instead emit a
3746         warning for duplicate dist_schedule clauses.
3748 2019-08-08  Richard Sandiford  <richard.sandiford@arm.com>
3750         * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
3752 2019-08-08  Jakub Jelinek  <jakub@redhat.com>
3754         * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
3755         OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
3756         instead of generic_head to track duplicates.
3758 2019-08-07  Jakub Jelinek  <jakub@redhat.com>
3760         * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
3761         (c_parser_omp_clause_use_device_addr): New function.
3762         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3763         (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3764         (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
3765         like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
3766         map or use_device_* clauses.
3767         * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
3768         in OpenMP, require pointer type rather than pointer or array type.
3769         Handle OMP_CLAUSE_USE_DEVICE_ADDR.
3771 2019-07-31  Jakub Jelinek  <jakub@redhat.com>
3773         PR c/91192
3774         * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
3775         even if finish is UNKNOWN_LOCATION, just use start as finish in that
3776         case.
3778 2019-07-25  Martin Liska  <mliska@suse.cz>
3779             Dominik Infuhr  <dominik.infuehr@theobroma-systems.com>
3781         PR c++/23383
3782         * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
3784 2019-07-25  Martin Liska  <mliska@suse.cz>
3786         * c-decl.c (merge_decls): Use new macros
3787         (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
3789 2019-07-23  Richard Biener  <rguenther@suse.de>
3791         PR tree-optimization/83518
3792         * gimple-parser.c (c_parser_parse_gimple_body): When we have
3793         a CFG also rebuild cgraph edges.
3795 2019-07-20  Jakub Jelinek  <jakub@redhat.com>
3797         * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3798         (c_parser_omp_clause_bind): New function.
3799         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3800         (OMP_LOOP_CLAUSE_MASK): Define.
3801         (c_parser_omp_loop): New function.
3802         (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3803         loop combined with parallel or teams.
3804         (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3805         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3807 2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>
3809         PR c/53633
3810         * c-decl.c (finish_function): Check targetm.warn_func_return
3811         before issuing a -Wreturn-type warning.
3813 2019-07-12  Alexandre Oliva  <oliva@adacore.com>
3815         * gimple-parser.c (c_parser_gimple_try_stmt): New.
3816         (c_parser_compound_statement): Call it.
3818 2019-07-12  Jakub Jelinek  <jakub@redhat.com>
3820         * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3821         (c_parser_omp_clause_order): New function.
3822         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3823         (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3824         PRAGMA_OMP_CLAUSE_ORDER.
3825         * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3827 2019-07-10  Richard Biener  <rguenther@suse.de>
3829         * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3830         _Literal (int *) &x for address literals.
3832 2019-07-09  Martin Sebor  <msebor@redhat.com>
3834         PR c++/61339
3835         * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3836         to class.
3837         (field_decl_cmp): Same.
3838         * c-parser.c (c_parser_struct_or_union_specifier): Same.
3839         * c-tree.h: Same.
3840         * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3842 2019-07-09  Martin Sebor  <msebor@redhat.com>
3844         PR c++/61339
3845         * c-decl.c: Change class-key from class to struct and vice versa
3846         to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3847         * gimple-parser.c: Same.
3849 2019-07-01  Richard Biener  <rguenther@suse.de>
3851         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3852         _Literal (char *) &"foo" for address literals pointing to
3853         STRING_CSTs.
3855 2019-06-25  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3857         * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3858         * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3859         C incompatibility if alternate "__intN__" form is used.
3861 2019-06-24  Martin Sebor  <msebor@redhat.com>
3863         * c-typeck.c (build_binary_op): Hyphenate floating-point.
3865 2019-06-10  Jakub Jelinek  <jakub@redhat.com>
3867         * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3868         (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3869         (c_parser_omp_scan_loop_body): New function.
3870         (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3871         inscan reduction clauses.
3872         * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3873         non-inscan reductions on the same construct, or inscan reductions with
3874         ordered or schedule clauses, or inscan array reductions.
3876 2019-06-05  Martin Sebor  <msebor@redhat.com>
3878         PR c/90737
3879         * c-typeck.c (c_finish_return): Only consider functions returning
3880         pointers as candidates for -Wreturn-local-addr.
3882 2019-06-05  Martin Sebor  <msebor@redhat.com>
3884         * c-decl.c (start_decl): Adjust quoting and hyphenation
3885         in diagnostics.
3886         (finish_decl): Same.
3887         (finish_enum): Same.
3888         (start_function): Same.
3889         (declspecs_add_type): Same.
3890         * c-parser.c (warn_for_abs): Same.
3891         * c-typeck.c (build_binary_op): Same.
3893 2019-05-17  Thomas Schwinge  <thomas@codesourcery.com>
3895         PR c/89433
3896         * c-parser.c (c_finish_oacc_routine): Rework checking if already
3897         marked with an OpenACC 'routine' directive.
3899         PR c/89433
3900         * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3901         (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3903         PR c/89433
3904         * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3905         clauses from "omp declare target" attribute.
3907 2019-05-16  Martin Sebor  <msebor@redhat.com>
3909         * c-decl.c (start_decl): Quote keywords, operators, and
3910         types in diagnostics.
3911         (finish_decl): Same.
3912         * c-parser.c (c_parser_asm_statement): Same.
3913         (c_parser_conditional_expression): Same.
3914         (c_parser_transaction_cancel): Same.
3915         * c-typeck.c (c_common_type): Same.
3916         (build_conditional_expr): Same.
3917         (digest_init): Same.
3918         (process_init_element): Same.
3919         (build_binary_op): Same.
3921 2019-05-17  Richard Biener  <rguenther@suse.de>
3923         * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3924         (c_parser_gimple_unary_expression): Likewise.
3925         (c_parser_gimple_parentized_ternary_expression): New function.
3927 2019-05-16  Richard Biener  <rguenther@suse.de>
3929         * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3930         (c_parser_gimple_unary_expression): Likewise.
3932 2019-05-15  Richard Biener  <rguenther@suse.de>
3934         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3935         __BIT_FIELD_REF.
3937 2019-05-14  Richard Biener  <rguenther@suse.de>
3939         * gimple-parser.c (c_parser_gimple_statement): Remove
3940         questionable auto-promotion to VIEW_CONVERT_EXPR.
3941         (c_parser_gimple_typespec): Split out from __MEM parsing.
3942         (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3943         * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3944         as __VIEW_CONVERT with -gimple.
3946 2019-05-09  Martin Liska  <mliska@suse.cz>
3948         * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3949         __MAX.
3950         (c_parser_gimple_unary_expression): Parse also binary expression
3951         __MIN and __MAX.
3952         (c_parser_gimple_parentized_binary_expression): New function.
3954 2019-05-09  Martin Liska  <mliska@suse.cz>
3956         * gimple-parser.c (struct gimple_parser): Add probability.
3957         for gimple_parser_edge.
3958         (gimple_parser::push_edge): Add new argument probability.
3959         (c_parser_gimple_parse_bb_spec): Parse also probability
3960         if present.
3961         (c_parser_parse_gimple_body): Set edge probability.
3962         (c_parser_gimple_compound_statement): Consume token
3963         before calling c_parser_gimple_goto_stmt.
3964         Parse BB counts.
3965         (c_parser_gimple_statement): Pass new argument.
3966         (c_parser_gimple_goto_stmt): Likewise.
3967         (c_parser_gimple_if_stmt): Likewise.
3968         (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3969         * c-parser.c (c_parser_declaration_or_fndef): Pass
3970         hot_bb_threshold argument.
3971         * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3972         field.
3973         (c_parser_gimple_parse_bb_spec_edge_probability): New.
3975 2019-04-26  Jakub Jelinek  <jakub@redhat.com>
3977         PR debug/90197
3978         * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3979         * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3980         (c_parser_do_statement): Likewise.
3981         (c_parser_for_statement): Likewise.  Formatting fixes.
3982         * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3983         emit DEBUG_BEGIN_STMTs if needed.
3985 2019-04-19  Jakub Jelinek  <jakub@redhat.com>
3987         PR c/89888
3988         * c-typeck.c (struct c_switch): Remove outside_range_p member.
3989         (c_start_case): Don't clear it.
3990         (do_case): Adjust c_add_case_label caller.
3991         (c_finish_case): Adjust c_do_switch_warnings caller.
3993         PR c++/90108
3994         * c-decl.c (merge_decls): If remove is main variant and
3995         DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3996         variant that has newdecl as TYPE_NAME if any.
3998 2019-04-12  Jakub Jelinek  <jakub@redhat.com>
4000         PR c/89933
4001         * c-decl.c (merge_decls): When newdecl's type is its main variant,
4002         don't try to remove it from the variant list, but instead assert
4003         it has no variants.
4005 2019-04-01  Richard Biener  <rguenther@suse.de>
4007         PR c/71598
4008         * c-tree.h (c_get_alias_set): Declare.
4009         * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
4010         * c-objc-common.c (c_get_alias_set): Treat enumeral types
4011         as the underlying integer type.
4013 2019-03-19  Martin Sebor  <msebor@redhat.com>
4015         PR tree-optimization/89688
4016         * c-decl.c (finish_decl): Call braced_lists_to_string for more
4017         kinds of initializers.
4019 2019-03-19  Jakub Jelinek  <jakub@redhat.com>
4021         PR c/89734
4022         * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
4023         return type even if quals_used is 0.  Formatting fixes.
4025 2019-03-14  Richard Biener  <rguenther@suse.de>
4027         * c-tree.h (enum c_declspec_il): New.
4028         (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
4029         enum bitfield.
4030         * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
4031         Pass start pass and declspec_il to c_parser_parse_gimple_body.
4032         (c_parser_declspecs): Adjust.
4033         * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
4034         gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
4035         and bitmap.h.
4036         (struct gimple_parser): New.
4037         (gimple_parser::push_edge): New method.
4038         (c_parser_gimple_parse_bb_spec): New helper.
4039         (c_parser_parse_gimple_body): Get start pass and IL specification.
4040         Initialize SSA and CFG.
4041         (c_parser_gimple_compound_statement): Handle CFG and SSA build.
4042         Build a gimple_parser parsing state and pass it along.
4043         (c_parser_gimple_statement): Change intermittend __PHI internal
4044         function argument for the edge.
4045         (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
4046         (c_parser_gimple_goto_stmt): Record edges to build.
4047         (c_parser_gimple_if_stmt): Likewise.
4048         * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
4049         (c_parser_gimple_or_rtl_pass_list): Likewise.
4051 2019-03-11  Martin Liska  <mliska@suse.cz>
4053         * c-decl.c (check_for_loop_decls): Wrap an option name
4054         in a string format message and fix GNU coding style.
4055         * c-parser.c (c_parser_declspecs): Likewise.
4057 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
4059         PR tree-optimization/89550
4060         * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
4061         returned true.
4062         (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
4063         or warning returned true.
4065 2019-02-28  Jakub Jelinek  <jakub@redhat.com>
4067         PR c/89525
4068         * c-typeck.c (convert_arguments): Call inform_declaration only if
4069         the previous warning_at call returned true.
4071 2019-02-22  Thomas Schwinge  <thomas@codesourcery.com>
4073         * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
4074         parameter.  Adjust all users.
4075         (c_parser_oacc_simple_clause): Replace parser with loc formal
4076         parameter.  Adjust all users.
4078 2019-02-19  Chung-Lin Tang  <cltang@codesourcery.com>
4080         PR c/87924
4081         * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
4082         clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
4084 2019-02-15  Jakub Jelinek  <jakub@redhat.com>
4086         PR c/89340
4087         * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
4088         before c_decl_attributes rather than after it.
4090 2019-02-06  Jakub Jelinek  <jakub@redhat.com>
4092         PR c/89211
4093         * c-parser.c (c_parser_declaration_or_fndef): Don't update
4094         DECL_ARGUMENTS of d if it has been defined already.  Use a single if
4095         instead of 3 nested ifs.
4097 2019-02-06  Joseph Myers  <joseph@codesourcery.com>
4099         PR c/88584
4100         * c-decl.c (finish_decl): Do not complete array types for arrays
4101         with external linkage not at file scope.
4103 2019-02-05  Richard Biener  <rguenther@suse.de>
4105         PR c/88606
4106         * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
4107         all type variants when not supported.
4109 2019-01-30  Jakub Jelinek  <jakub@redhat.com>
4111         PR c/89061
4112         * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
4113         * c-decl.c (decl_jump_unsafe): Return false for
4114         C_DECL_COMPOUND_LITERAL_P decls.
4115         (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
4117 2019-01-29  Jakub Jelinek  <jakub@redhat.com>
4119         PR c/89045
4120         * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
4121         scope.
4123         PR c/86125
4124         * c-decl.c (last_fileptr_type): Remove.
4125         (last_structptr_types): New variable.
4126         (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
4127         {old,new}rettype instead of the types themselves.  Assert
4128         last_structptr_types array has the same number of elements
4129         as builtin_structptr_types array.  Use TYPE_MAIN_VARIANT for
4130         argument oldtype and newtype.  Instead of handling
4131         just fileptr_type_node specially, handle all builtin_structptr_types
4132         pointer nodes.  Formatting fix.
4134 2019-01-24  Martin Sebor  <msebor@redhat.com>
4136         PR c/86125
4137         PR c/88886
4138         PR middle-end/86308
4139         * c-decl.c (match_builtin_function_types): Add arguments.
4140         (diagnose_mismatched_decls): Diagnose mismatched declarations
4141         of built-ins more strictly.
4143 2019-01-24  Jakub Jelinek  <jakub@redhat.com>
4145         PR c++/88976
4146         * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
4147         on #pragma omp cancel with different modifiers.
4149 2019-01-18  H.J. Lu  <hongjiu.lu@intel.com>
4151         PR c/51628
4152         PR c/88664
4153         * c-typeck.c (convert_for_assignment): Upate the
4154         warn_for_address_or_pointer_of_packed_member call.
4156 2019-01-16  Tom Honermann  <tom@honermann.net>
4157             Jason Merrill  <jason@redhat.com>
4159         * c-typeck.c (digest_init): Revised the error message produced for
4160         ill-formed cases of array initialization with a string literal.
4161         (error_init): Make variadic.
4163 2019-01-12  Jakub Jelinek  <jakub@redhat.com>
4165         * c-typeck.c (convert_for_assignment): Fix a comment typo.
4167 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
4169         PR c/88701
4170         * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
4171         if current_function_decl is non-NULL.
4173 2019-01-07  Joseph Myers  <joseph@codesourcery.com>
4175         PR c/88720
4176         PR c/88726
4177         * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
4178         whether a function is nested, not DECL_EXTERNAL.  Diagnose inline
4179         functions declared but never defined only for external scope, not
4180         for other scopes.
4182 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
4184         PR c++/85052
4185         * c-parser.c (c_parser_postfix_expression): Parse
4186         __builtin_convertvector.
4188 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
4190         Update copyright years.
4192 2018-12-20  H.J. Lu  <hongjiu.lu@intel.com>
4194         PR c/51628
4195         * c-typeck.c (convert_for_assignment): Call
4196         warn_for_address_or_pointer_of_packed_member.
4198 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
4200         * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
4201         a more specific error message (instead of just falling through).
4203 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
4205         * c-parser.c (c_parser_asm_statement): Keep track of the location each
4206         asm qualifier is first seen; use that to give nicer "duplicate asm
4207         qualifier" messages.  Delete 'quals" variable, instead pass the
4208         "is_volatile_ flag to build_asm_stmt directly.
4209         * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
4210         * c-typeck.c (build_asm_stmt): Ditto; adjust.
4212 2018-12-19  Segher Boessenkool  <segher@kernel.crashing.org>
4214         * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
4215         "done" boolean variable.
4217 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
4219         PR c++/87504
4220         * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
4221         Move from here to gcc-rich-location.h and gcc-rich-location.c.
4222         (build_binary_op): Use struct op_location_t and
4223         class binary_op_rich_location.
4225 2018-12-11  Jakub Jelinek  <jakub@redhat.com>
4227         PR sanitizer/88426
4228         * c-convert.c (convert): Call c_fully_fold before calling
4229         ubsan_instrument_float_cast.
4231 2018-12-08  Segher Boessenkool  <segher@kernel.crashing.org>
4233         * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
4234         setting "quals".
4236 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
4238         * c-parser.c (c_parser_asm_statement): Detect the inline keyword
4239         after asm.  Pass a flag for it to build_asm_expr.
4240         * c-tree.h (build_asm_expr): Update declaration.
4241         * c-typeck.c (build_asm_stmt): Add is_inline parameter.  Use it to
4242         set ASM_INLINE_P.
4244 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
4246         PR inline-asm/55681
4247         * c-parser.c (c_parser_asm_statement): Update grammar.  Allow any
4248         combination of volatile and goto, in any order, without repetitions.
4250 2018-12-04  James Norris  <jnorris@codesourcery.com>
4251             Cesar Philippidis  <cesar@codesourcery.com>
4252             Julian Brown  <julian@codesourcery.com>
4254         * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
4255         code.
4257 2018-11-30  Richard Biener  <rguenther@suse.de>
4259         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4260         _Literal (type) { ... } as empty aggregate or vector constructor.
4262 2018-11-29  Martin Sebor  <msebor@redhat.com>
4264         PR c/88091
4265         * c-typeck.c (convert_argument): Add a parameter.  Adjust indentation.
4266         (convert_arguments): Add comments.  Pass additional argument to
4267         the function above.
4269 2018-11-29  Martin Sebor  <msebor@redhat.com>
4271         PR c/88172
4272         PR testsuite/88208
4273         * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
4275 2018-11-23  Martin Sebor  <msebor@redhat.com>
4277         PR testsuite/88098
4278         * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
4279         (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
4281 2018-11-20  Martin Sebor  <msebor@redhat.com>
4283         * c-parser.c (c_parser_has_attribute_expression): New function.
4284         (c_parser_attribute): New function.
4285         (c_parser_attributes): Move code into c_parser_attribute.
4286         (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
4288 2018-11-15  Martin Sebor  <msebor@redhat.com>
4290         PR c/83656
4291         * c-decl.c (header_for_builtin_fn): Declare.
4292         (diagnose_mismatched_decls): Diagnose declarations of built-in
4293         functions without a prototype.
4294         * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
4295         (convert_argument): Same.
4296         (convert_arguments): Factor code out into convert_argument.
4297         Detect mismatches between built-in formal arguments in calls
4298         to built-in without prototype.
4299         (build_conditional_expr): Same.
4300         (type_or_builtin_type): New function.
4301         (convert_for_assignment): Add argument.  Conditionally issue
4302         warnings instead of errors for mismatches.
4304 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
4306         * c-decl.c: Replace "source_location" with "location_t".
4307         * c-tree.h: Likewise.
4308         * c-typeck.c: Likewise.
4309         * gimple-parser.c: Likewise.
4311 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
4313         * c-parser.c (c_parser_omp_clause_final): Use
4314         c_parser_expr_no_commas, convert_lvalue_to_rvalue,
4315         c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
4316         parsing instead of c_parser_paren_condition.
4317         (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
4318         convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
4319         c_fully_fold instead of c_parser_condition.
4320         (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
4321         c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
4322         c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
4323         c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
4324         c_parser_expr_no_commas instead of c_parser_expression.
4326         * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
4327         reduction clause with inscan modifier.
4329         * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
4330         clauses other than atomic_default_mem_order.
4332 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
4334         * c-parser.c: Include memmode.h.
4335         (c_parser_omp_depobj, c_parser_omp_requires): New functions.
4336         (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
4337         (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
4338         task_reduction clauses.
4339         (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
4340         For OMP_CLAUSE_DEPEND, parse clause operands as either an array
4341         section, or lvalue assignment expression.
4342         (c_parser_omp_clause_if): Handle cancel and simd modifiers.
4343         (c_parser_omp_clause_lastprivate): Parse optional
4344         conditional: modifier.
4345         (c_parser_omp_clause_hint): Require constant integer expression rather
4346         than just integer expression.
4347         (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
4348         clause.
4349         (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
4350         Parse reduction modifiers.  Pass KIND to c_parser_omp_variable_list.
4351         (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
4352         functions.
4353         (c_parser_omp_clause_depend): Parse iterator modifier and handle
4354         iterators.  Parse mutexinoutset and depobj kinds.
4355         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
4356         callers.
4357         (c_parser_omp_all_clauses): Likewise.  Handle
4358         PRAGMA_OMP_CLAUSE_NONTEMPORAL and
4359         PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4360         (c_parser_omp_atomic): Parse hint and memory order clauses.  Handle
4361         default memory order from requires directive if any.  Adjust
4362         c_finish_omp_atomic caller.
4363         (c_parser_omp_critical): Allow comma in between (name) and hint clause.
4364         (c_parser_omp_flush): Parse flush with memory-order-clause.
4365         (c_parser_omp_for_loop): Allow NE_EXPR even in
4366         OpenMP loops, adjust c_finish_omp_for caller.
4367         (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
4368         (c_parser_omp_master): Add p_name, mask and cclauses arguments.
4369         Allow to be called while parsing combined parallel master.
4370         Parse combined master taskloop{, simd}.
4371         (c_parser_omp_parallel): Parse combined
4372         parallel master{, taskloop{, simd}} constructs.
4373         (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
4374         (OMP_TASKGROUP_CLAUSE_MASK): Define.
4375         (c_parser_omp_taskgroup): Add LOC argument.  Parse taskgroup clauses.
4376         (OMP_TASKWAIT_CLAUSE_MASK): Define.
4377         (c_parser_omp_taskwait): Handle taskwait with depend clauses.
4378         (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
4379         around teams body.  Use SET_EXPR_LOCATION.
4380         (c_parser_omp_target_data): Allow target data
4381         with only use_device_ptr clauses.
4382         (c_parser_omp_target): Use SET_EXPR_LOCATION.  Set
4383         OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
4384         (c_parser_omp_requires): New function.
4385         (c_finish_taskloop_clauses): New function.
4386         (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
4387         (c_parser_omp_taskloop): Use c_finish_taskloop_clauses.  Add forward
4388         declaration.  Disallow in_reduction clause when combined with parallel
4389         master.
4390         (c_parser_omp_construct): Adjust c_parser_omp_master and
4391         c_parser_omp_taskgroup callers.
4392         * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
4393         other than cancel.
4394         (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
4395         like OMP_CLAUSE_REDUCTION.
4396         (handle_omp_array_sections): Likewise.  Call save_expr on array
4397         reductions before calling build_index_type.  Handle depend clauses
4398         with iterators.
4399         (struct c_find_omp_var_s): New type.
4400         (c_find_omp_var_r, c_omp_finish_iterators): New functions.
4401         (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
4402         with static, runtime or auto schedule kinds.  Call save_expr for whole
4403         array reduction sizes.  Diagnose reductions with zero sized elements
4404         or variable length structures.  Diagnose nogroup clause used with
4405         reduction clause(s).  Handle depend clause with
4406         OMP_CLAUSE_DEPEND_DEPOBJ.  Diagnose bit-fields.  Require
4407         omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
4408         some different type for other kinds.  Use build_unary_op with
4409         ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
4410         Handle depend clauses with iterators.  Remove no longer needed special
4411         case that predetermined const qualified vars may be specified in
4412         firstprivate clause.  Complain if const qualified vars are mentioned
4413         in data-sharing clauses other than firstprivate or shared.  Use
4414         error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
4415         error.  Formatting fix.  Handle OMP_CLAUSE_NONTEMPORAL and
4416         OMP_CLAUSE_{IN,TASK}_REDUCTION.  Allow any lvalue as
4417         OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
4419 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
4421         * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
4422         logic for change to name_hint::operator bool.
4423         (undeclared_variable): Likewise.
4424         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4425         (c_parser_parameter_declaration): Likewise.
4427 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
4429         * c-errors.c (pedwarn_c11): New function.
4430         * c-parser.c (disable_extension_diagnostics): Save
4431         warn_c11_c2x_compat and set it to 0.
4432         (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
4433         (c_parser_static_assert_declaration_no_semi): Handle
4434         _Static_assert without string constant.
4435         * c-tree.h (pedwarn_c11): New prototype.
4437 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
4439         * Make-lang.in (selftest-c): New.
4440         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4441         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
4442         from gcc/Makefile.in.
4444 2018-10-02  Richard Biener  <rguenther@suse.de>
4446         * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
4448 2018-09-26  Joseph Myers  <joseph@codesourcery.com>
4450         PR c/87390
4451         * c-typeck.c (build_binary_op): Use excess precision for
4452         comparisons of integers and floating-point for C11 and later.
4454 2018-09-26  Martin Jambor  <mjambor@suse.cz>
4456         PR c/87347
4457         * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL.  Fix
4458         comment.
4460 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
4462         * c-objc-common.c (range_label_for_type_mismatch::get_text):
4463         Update for new param.
4464         * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
4465         Likewise.
4467 2018-09-17  Martin Jambor  <mjambor@suse.cz>
4469         PR c/63886
4470         * c-parser.c: (warn_for_abs): New function.
4471         (c_parser_postfix_expression_after_primary): Call it.
4473 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4475         * c-typeck.c (digest_init): Shorten overlength strings.
4477 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4479         * c-decl.c (finish_decl): Call complete_flexible_array_elts.
4481 2018-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4483         * c-decl.c (finish_decl): Call braced_list_to_string here ...
4484         * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
4486 2018-08-30  Alexander Monakov  <amonakov@ispras.ru>
4488         * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
4489         "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
4491 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
4493         PR 87091
4494         * c-decl.c (implicitly_declare): Update call to
4495         maybe_add_include_fixit to suggest overriding the location, as it
4496         is for a note.
4497         * c-objc-common.c (c_tree_printer): Update for conversion of
4498         show_caret_p to a tri-state.
4500 2018-08-27  Martin Liska  <mliska@suse.cz>
4502         * c-decl.c (locate_old_decl): Use new function
4503         fndecl_built_in_p and remove check for FUNCTION_DECL if
4504         possible.
4505         (diagnose_mismatched_decls): Likewise.
4506         (merge_decls): Likewise.
4507         (warn_if_shadowing): Likewise.
4508         (pushdecl): Likewise.
4509         (implicitly_declare): Likewise.
4510         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4511         * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
4512         * c-typeck.c (build_function_call_vec): Likewise.
4513         (convert_arguments): Likewise.
4515 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
4517         PR other/84889
4518         * c-decl.c (pushtag): Add auto_diagnostic_group instance.
4519         (diagnose_mismatched_decls): Likewise, in various places.
4520         (warn_if_shadowing): Likewise.
4521         (implicit_decl_warning): Likewise.
4522         (implicitly_declare): Likewise.
4523         (undeclared_variable): Likewise.
4524         (declare_label): Likewise.
4525         (grokdeclarator): Likewise.
4526         (start_function): Likewise.
4527         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4528         (c_parser_parameter_declaration): Likewise.
4529         (c_parser_binary_expression): Likewise.
4530         * c-typeck.c (c_expr_sizeof_expr): Likewise.
4531         (parser_build_binary_op): Likewise.
4532         (build_unary_op): Likewise.
4533         (error_init): Likewise.
4534         (pedwarn_init): Likewise.
4535         (warning_init): Likewise.
4536         (convert_for_assignment): Likewise.
4538 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
4540         * c-objc-common.c: Include "gcc-rich-location.h".
4541         (c_tree_printer): Move implemenation of '%T' to...
4542         (print_type): ...this new function.
4543         (range_label_for_type_mismatch::get_text): New function.
4544         * c-typeck.c (convert_for_assignment): Add type labels to the rhs
4545         range for the various ic_argpass cases.
4546         (class maybe_range_label_for_tree_type_mismatch): New class.
4547         (build_binary_op): Use it when calling binary_op_error.
4549 2018-08-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4551         * c-decl.c (start_decl): Do not warn if variables is named as main
4552         and is a local variable.
4554 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4556         PR c/19315
4557         * c-decl.c (finish_decl): Don't add the 'extern' storage class to
4558         objects of unknown size.
4560 2018-08-13  Martin Sebor  <msebor@redhat.com>
4562         PR tree-optimization/71625
4563         * c-parser.c (c_parser_declaration_or_fndef): Call
4564         braced_list_to_string.
4566 2018-08-03  Bogdan Harjoc  <harjoc@gmail.com>
4568         PR c/86690
4569         * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
4570         errors.
4572 2018-08-01  Martin Sebor  <msebor@redhat.com>
4574         PR tree-optimization/86650
4575         * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
4576         and TREE_BLOCK (t) from within percent_K_format to this callsite.
4578 2018-08-01  Jakub Jelinek  <jakub@redhat.com>
4580         PR c/85704
4581         * c-typeck.c (init_field_decl_cmp): New function.
4582         (output_pending_init_elements): Use it for field comparisons
4583         instead of pure bit_position comparisons.
4585 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
4587         * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
4588         type here, instead add "omp declare target implicit" attribute.
4589         (finish_decl): Diagnose vars without mappable type here.
4591 2018-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
4592             Thomas Schwinge  <thomas@codesourcery.com>
4593             Cesar Philippidis  <cesar@codesourcery.com>
4595         * c-parser.c (c_parser_omp_clause_name): Add support for finalize
4596         and if_present. Make present_or_{copy,copyin,copyout,create} aliases
4597         to their non-present_or_* counterparts. Make 'self' an alias to
4598         PRAGMA_OACC_CLAUSE_HOST.
4599         (c_parser_oacc_data_clause): Update GOMP mappings for
4600         PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
4601         PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
4602         (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
4603         Remove support for present_or_* clauses.
4604         (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4605         (OACC_PARALLEL_CLAUSE_MASK): Likewise.
4606         (OACC_DECLARE_CLAUSE_MASK): Likewise.
4607         (OACC_DATA_CLAUSE_MASK): Likewise.
4608         (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4609         (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
4610         (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
4611         (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
4612         * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
4614 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
4616         * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
4617         * gimple-parser.c (c_parser_gimple_statement): Likewise.
4618         (c_parser_gimple_unary_expression): Likewise.
4620 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
4622         PR c/86093
4623         * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
4624         before doing POINTER_DIFF_EXPR.
4626 2018-06-07  Marek Polacek  <polacek@redhat.com>
4628         PR c/85318
4629         * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
4630         for loop initial declarations.
4632 2018-05-30  David Pagan  <dave.pagan@oracle.com>
4634         PR c/55976
4635         * c-decl.c (grokdeclarator): Update check for return type warnings.
4636         (start_function): Likewise.
4637         (finish_function): Likewise.
4638         * c-typeck.c (c_finish_return): Update check for return type warnings.
4639         Pass OPT_Wreturn_type to pedwarn when appropriate.
4641 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
4643         * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
4644         __FMA_EXPR handlng.
4646 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
4648         * gimple-parser.c: Include internal-fn.h.
4649         (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
4650         (c_parser_gimple_call_internal): New function.
4651         (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
4652         Fix typos in comment.
4654 2018-05-10  Jakub Jelinek  <jakub@redhat.com>
4656         PR c++/85662
4657         * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
4658         fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
4659         fold_convert_loc.
4660         * c-typeck.c (build_unary_op): Use fold_offsetof rather than
4661         fold_offsetof_1, pass argtype as TYPE to it and drop the
4662         fold_convert_loc.
4664 2018-05-02  David Pagan  <dave.pagan@oracle.com>
4666         PR c/30552
4667         * c-decl.c (old_style_parameter_scope): New function.
4668         * c-parser.c (c_parser_postfix_expression): Check for statement
4669         expressions in old-style function parameter list declarations.
4670         * c-parser.h (old_style_parameter_scope): New extern declaration.
4672 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
4674         PR sanitizer/84307
4675         * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
4676         it is not TREE_STATIC.
4677         * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
4678         not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
4679         its COMPOUND_LITERAL_EXPR_DECL.
4681 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
4683         * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4684         where all functions return the same _FloatN or _FloatNx type,
4685         treat integer types as _Float64 instead of double.
4687 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
4689         PR c/84999
4690         * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
4691         building vector comparison, diagnose it and return error_mark_node.
4693 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
4695         PR c/84853
4696         * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
4697         If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
4698         INTEGER_TYPE element type.
4700 2018-03-13  David Pagan  <dave.pagan@oracle.com>
4702         PR c/46921
4703         * c-typeck.c (output_init_element): Ensure field initializer
4704         expression is always evaluated if there are side effects.
4706 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
4708         PR c/84721
4709         * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
4710         !building_stmt_list_p ().
4712 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
4714         PR c/84305
4715         * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
4716         in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
4717         and include the BIND_EXPR in the list of things that need to be
4718         pre-evaluated.
4720 2018-02-09  Nathan Sidwell  <nathan@acm.org>
4722         PR c/84293
4723         * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
4724         to strict_aliasing_warning.
4726 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
4728         * c-typeck.c (really_start_incremental_init, push_init_level,
4729         set_nonincremental_init, output_init_element, process_init_element):
4730         Use DECL_UNNAMED_BIT_FIELD.
4732 2018-01-31  Marek Polacek  <polacek@redhat.com>
4734         PR c/81779
4735         * c-parser.c (c_parser_compound_statement_nostart): Call
4736         expansion_point_location_if_in_system_header.
4738 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
4740         PR c++/83814
4741         * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
4742         the C part.
4744 2018-01-13  Jakub Jelinek  <jakub@redhat.com>
4746         PR c/83801
4747         * c-tree.h (decl_constant_value_1): Add a bool argument.
4748         * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
4749         returning a CONSTRUCTOR if it is true.  Use error_operand_p.
4750         (decl_constant_value): Adjust caller.
4751         * c-fold.c (c_fully_fold_internal): If in_init, pass true to
4752         decl_constant_value_1 as IN_INIT.  Otherwise, punt if
4753         decl_constant_value returns initializer that has BLKmode or
4754         array type.
4755         (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
4757 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
4758             Alan Hayward  <alan.hayward@arm.com>
4759             David Sherwood  <david.sherwood@arm.com>
4761         * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
4762         TYPE_VECTOR_SUBPARTS.
4764 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
4766         Update copyright years.
4768 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
4770         PR c/83595
4771         * c-parser.c (c_parser_braced_init, c_parser_initelt,
4772         c_parser_conditional_expression, c_parser_cast_expression,
4773         c_parser_sizeof_expression, c_parser_alignof_expression,
4774         c_parser_postfix_expression, c_parser_omp_declare_reduction,
4775         c_parser_transaction_expression): Use set_error () method instead
4776         of setting value member to error_mark_node.
4778 2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
4780         * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4781         and _Float<N>X built-in functions.
4783 2017-12-22  Jakub Jelinek  <jakub@redhat.com>
4785         PR debug/83550
4786         * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
4787         TYPE_STUB_DECL and call rest_of_type_compilation before processing
4788         incomplete vars rather than after it.
4790         PR debug/83547
4791         * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4792         indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4793         and consider empty ones if there are no other stmts.  For
4794         -Wunused-value walk all statements before the one only followed by
4795         DEBUG_BEGIN_STMTs.
4797 2017-12-22  Mike Stump  <mikestump@comcast.net>
4798             Eric Botcazou  <ebotcazou@adacore.com>
4800         * c-parser.c (c_parser_while_statement): Add unroll parameter and
4801         build ANNOTATE_EXPR if present.  Add 3rd operand to ANNOTATE_EXPR.
4802         (c_parser_do_statement): Likewise.
4803         (c_parser_for_statement): Likewise.
4804         (c_parser_statement_after_labels): Adjust calls to above.
4805         (c_parse_pragma_ivdep): New static function.
4806         (c_parser_pragma_unroll): Likewise.
4807         (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4808         <PRAGMA_UNROLL>: New case.
4810 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
4812         * c-typeck.c (comptypes_internal, function_types_compatible_p,
4813         perform_integral_promotions, digest_init): Replace Yoda conditions
4814         with typical order conditions.
4815         * c-decl.c (check_bitfield_type_and_width): Likewise.
4817 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4819         * c-typeck.c (c_safe_arg_type_equiv_p,
4820         c_safe_function_type_cast_p): New function.
4821         (build_c_cast): Implement -Wcast-function-type.
4823 2017-12-14  Richard Biener  <rguenther@suse.de>
4825         PR c/83415
4826         * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4827         like REALPART_EXPR for the behavior of whether its operand
4828         is an lvalue.
4830 2017-12-12  Marek Polacek  <polacek@redhat.com>
4832         PR c/82679
4833         * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4835 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
4837         * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4838         * c-parser.c (add_debug_begin_stmt): New.
4839         (c_parser_declaration_or_fndef): Call it.
4840         (c_parser_compound_statement_nostart): Likewise.
4841         (c_parser_statement_after_labels): Likewise.
4842         * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4844 2017-12-07  Joseph Myers  <joseph@codesourcery.com>
4846         * c-decl.c (build_compound_literal): Add parameter alignas_align
4847         and set alignment of decl if nonzero.
4848         * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4849         (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4850         qualifier.
4851         (c_parser_struct_declaration): Update syntax comment.
4852         (c_parser_type_name): Add alignas_ok argument and pass it to
4853         c_parser_declspecs.
4854         (c_parser_cast_expression): Pass true to c_parser_type_name and
4855         give error if a cast used an _Alignas specifier.
4856         (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4857         give error if sizeof (type-name) used an _Alignas specifier.
4858         (c_parser_alignof_expression): Pass true to c_parser_type_name and
4859         give error if _Alignof (type-name) used an _Alignas specifier.
4860         (c_parser_postfix_expression_after_paren_type): Check specified
4861         alignment for a compound literal and pass it to
4862         build_compound_literal.
4863         * c-parser.h (c_parser_type_name): Update prototype.
4864         * c-tree.h (build_compound_literal): Update prototype.
4866 2017-12-07  Martin Sebor  <msebor@redhat.com>
4868         PR c/81544
4869         * c-decl.c (c_decl_attributes): Look up existing declaration and
4870         pass it to decl_attributes.
4872 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
4874         PR c/83236
4875         * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4876         reserved for use by the implementation.
4878 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
4880         * c-decl.c: Include "c-family/c-spellcheck.h".
4882 2017-12-05  Martin Liska  <mliska@suse.cz>
4883             Jakub Jelinek  <jakub@redhat.com>
4885         * c-typeck.c (pointer_diff): Add new argument and instrument
4886         pointer subtraction.
4887         (build_binary_op): Similar for pointer comparison.
4889 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
4891         PR c/79153
4892         * c-parser.c: Include tree-iterator.h.
4893         (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4894         into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4895         on it.
4897         PR c/83222
4898         * c-tree.h (decl_constant_value_1): Declare.
4899         * c-typeck.c (decl_constant_value_1): New function.
4900         (decl_constant_value): Use it.
4901         * c-fold.c (c_fully_fold_internal): If in_init, use
4902         decl_constant_value_1 instead of decl_constant_value.
4904 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
4906         * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4908 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4910         PR sanitizer/81275
4911         * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4912         c_switch_covers_all_cases_p returns true.
4914 2017-11-28  Julia Koval  <julia.koval@intel.com>
4915             Sebastian Peryt  <sebastian.peryt@intel.com>
4917         * Make-lang.in (c/c-array-notation.o): Remove.
4918         * c-array-notation.c: Delete.
4919         * c-decl.c: Remove cilkplus condition.
4920         * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4921         c_parser_cilk_verify_simd, c_parser_array_notation,
4922         c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4923         c_parser_cilk_simd_fn_vector_attrs,
4924         c_finish_cilk_simd_fn_tokens): Delete.
4925         (c_parser_declaration_or_fndef): Remove cilkplus condition.
4926         (c_parser_direct_declarator_inner): Ditto.
4927         (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4928         (c_parser_attributes, c_parser_compound_statement,
4929         c_parser_statement_after_labels, c_parser_if_statement,
4930         c_parser_switch_statement, c_parser_while_statement,
4931         c_parser_do_statement, c_parser_for_statement,
4932         c_parser_unary_expression, c_parser_postfix_expression,
4933         c_parser_postfix_expression_after_primary,
4934         c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4935         c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4936         support.
4937         * c-typeck.c (build_array_ref, build_function_call_vec,
4938         convert_arguments,
4939         lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4940         c_finish_loop, build_binary_op): Remove cilkplus support.
4942 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4944         * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4945         of build3.
4947 2017-11-14  Boris Kolpackov  <boris@codesynthesis.com>
4949         * Make-lang.in (c.install-plugin): Install backend import library.
4951 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
4953         * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4954         pragma_stmt context.
4956 2017-11-23  Mike Stump  <mikestump@comcast.net>
4957             Eric Botcazou  <ebotcazou@adacore.com>
4959         * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4960         ANNOTATE_EXPR.
4961         (c_parser_do_statement): Likewise.
4962         (c_parser_for_statement): Likewise.
4964 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
4966         PR c++/62170
4967         * c-objc-common.c (c_tree_printer): Convert penultimate param from
4968         bool to bool *.  Within '%T' handling, if showing an "aka", use
4969         "quoted" param to add appropriate quoting.
4971 2017-11-22  Marek Polacek  <polacek@redhat.com>
4973         PR c++/60336
4974         PR middle-end/67239
4975         PR target/68355
4976         * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4978 2017-11-21  David Malcolm  <dmalcolm@redhat.com>
4980         PR c/83056
4981         * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4982         earlier failed lookups.
4984 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
4986         * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4987         * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4989 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
4991         PR c/81404
4992         * c-decl.c: Include "c-family/known-headers.h".
4993         (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4994         to known-headers.cc.
4995         (class suggest_missing_header): Move to known-header.h.
4996         (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4997         than get_c_name_hint.
4999 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
5001         * c-decl.c (get_c_name_hint): New function.
5002         (class suggest_missing_header): New class.
5003         (lookup_name_fuzzy): Call get_c_name_hint and use it to
5004         suggest missing headers to the user.
5006 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
5008         * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
5009         Include "c-family/name-hint.h"
5010         (implicit_decl_warning): Convert "hint" from
5011         const char * to name_hint.  Pass location to
5012         lookup_name_fuzzy.  Suppress any deferred diagnostic if the
5013         warning was not printed.
5014         (undeclared_variable): Likewise for "guessed_id".
5015         (lookup_name_fuzzy): Convert return type from const char *
5016         to name_hint.  Add location_t param.
5017         * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
5018         Include "c-family/name-hint.h"
5019         (c_parser_declaration_or_fndef): Convert "hint" from
5020         const char * to name_hint.  Pass location to lookup_name_fuzzy.
5021         (c_parser_parameter_declaration): Likewise.
5023 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
5025         PR c/66618
5026         PR c/69960
5027         * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
5028         where needed.
5029         * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
5030         handle_omp_array_sections): Likewise.
5031         (digest_init): Don't call decl_constant_value_for_optimization.
5032         * c-tree.h (decl_constant_value_for_optimization): Removed.
5033         * c-fold.c (c_fold_array_ref): New function.
5034         (c_fully_fold_internal): Add LVAL argument, propagate it through
5035         recursive calls.  For VAR_P call decl_constant_value and
5036         unshare if not LVAL and either optimizing or IN_INIT.  Remove
5037         decl_constant_value_for_optimization calls.  If IN_INIT and not LVAL,
5038         fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
5039         (c_fully_fold): Add LVAL argument, pass it through to
5040         c_fully_fold_internal.
5041         (decl_constant_value_for_optimization): Removed.
5043 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
5045         PR c/81156
5046         * c-parser.c (check_tgmath_function): New function.
5047         (enum tgmath_parm_kind): New enum.
5048         (c_parser_postfix_expression): Handle __builtin_tgmath.
5050 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
5052         * c-decl.c (implicit_decl_warning): Update for renaming of
5053         pedwarn_at_rich_loc and warning_at_rich_loc.
5054         (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
5055         (undeclared_variable): Likewise for renaming of error_at_rich_loc.
5056         * c-parser.c (c_parser_declaration_or_fndef): Likewise.
5057         (c_parser_struct_or_union_specifier): Likewise for renaming of
5058         pedwarn_at_rich_loc.
5059         (c_parser_parameter_declaration): Likewise for renaming of
5060         error_at_rich_loc.
5061         * c-typeck.c (build_component_ref): Likewise.
5062         (build_unary_op): Likewise for renaming of inform_at_rich_loc.
5063         (pop_init_level): Likewise for renaming of warning_at_rich_loc.
5064         (set_init_label): Likewise for renaming of error_at_rich_loc.
5066 2017-10-30  Richard Biener  <rguenther@suse.de>
5068         * gimple-parser.c (c_parser_gimple_statement): Parse conditional
5069         stmts.
5071 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
5073         * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
5074         fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
5076 2017-10-25  David Malcolm  <dmalcolm@redhat.com>
5078         PR c/7356
5079         * c-parser.c (c_parser_declaration_or_fndef): Detect missing
5080         semicolons.
5082 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
5084         PR libstdc++/81706
5085         * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
5086         newdecl to corresponding __builtin_ if any.
5088 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
5090         PR c++/82466
5091         * c-decl.c (diagnose_mismatched_decls): Use
5092         OPT_Wbuiltin_declaration_mismatch.
5094 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
5096         * c-parser.c (c_parser_require): Add "type_is_unique" param and
5097         use it to guard calls to maybe_suggest_missing_token_insertion.
5098         (c_parser_parms_list_declarator): Override default value of new
5099         "type_is_unique" param to c_parser_require.
5100         (c_parser_asm_statement): Likewise.
5101         * c-parser.h (c_parser_require): Add "type_is_unique" param,
5102         defaulting to true.
5104 2017-10-11  Nathan Sidwell  <nathan@acm.org>
5106         * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
5108 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
5110         * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
5111         operating on trees as wide_ints.
5112         * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
5113         (c_tree_equal): Likewise.
5115 2017-10-04  David Malcolm  <dmalcolm@redhat.com>
5117         * c-decl.c (push_parm_decl): Store c_parm's location into the
5118         PARAM_DECL.
5119         (build_c_parm): Add "loc" param and store it within the c_parm.
5120         * c-parser.c (struct c_parser): Add "last_token_location" field.
5121         (c_parser_consume_token): Store location of the token into the
5122         new field.
5123         (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
5124         when handling a FUNCTION_DECL, if it doesn't already have them.
5125         (c_parser_parameter_declaration): Generate a location for the
5126         parameter, and pass it to the call to build_c_parm.
5127         * c-tree.h (struct c_parm): Add field "loc".
5128         (build_c_parm): Add location_t param.
5129         * c-typeck.c (get_fndecl_argument_location): New function.
5130         (inform_for_arg): New function.
5131         (convert_for_assignment): Use inform_for_arg when dealing with
5132         ic_argpass.
5134 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
5136         * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
5137         width is non-NULL.
5138         (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
5139         don't SET_DECL_C_BIT_FIELD here.
5141         PR c/82340
5142         * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
5143         instead of trying to set just TREE_READONLY manually.
5145 2017-09-16  Tom de Vries  <tom@codesourcery.com>
5147         PR c/81875
5148         * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
5149         cond itself.
5151 2017-09-15  Joseph Myers  <joseph@codesourcery.com>
5153         PR c/82071
5154         * c-typeck.c (ep_convert_and_check): Just call convert_and_check
5155         for C11.
5156         (build_conditional_expr): For C11, generate result with excess
5157         precision when one argument is an integer and the other is of a
5158         type using excess precision.
5160 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5162         * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
5164 2017-09-13  Marek Polacek  <polacek@redhat.com>
5166         PR c/82167
5167         * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
5168         than expr.original_type.
5170 2017-09-12  Nathan Sidwell  <nathan@acm.org>
5172         * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5173         resort_sorted_fields): Moved from c-family/c-common.c.
5174         * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
5176 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
5178         PR c/82071
5179         * c-typeck.c (build_atomic_assign): Handle argument with excess
5180         precision.  Ensure any EXCESS_PRECISION_EXPR is present in
5181         argument passed to build_binary_op and convert_for_assignment but
5182         not for call to c_fully_fold.
5183         (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
5184         Ensure build_binary_op is called with argument with original
5185         semantic type.  Avoid calling c_fully_fold with an
5186         EXCESS_PRECISION_EXPR from build_binary_op.
5188 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
5190         PR c/81887
5191         * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
5193 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5194             Alan Hayward  <alan.hayward@arm.com>
5195             David Sherwood  <david.sherwood@arm.com>
5197         * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
5198         (c_common_type): Likewise.  Use as_a <scalar_mode> when setting
5199         m1 and m2 to the signed equivalent of a fixed-point
5200         SCALAR_TYPE_MODE.
5202 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
5204         * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
5205         than CAN_HAVE_LOCATION_P when determining whether to use the
5206         location_t value within "value".
5208 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
5210         * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
5211         rather than peeking the location of the first token.
5212         * c-tree.h (c_expr::get_location): New method.
5214 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
5216         * c-typeck.c (build_function_call_vec): Pass arg_loc to call
5217         to check_function_arguments.
5219 2017-08-18  Marek Polacek  <polacek@redhat.com>
5221         * c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
5222         commentary.
5224 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
5226         PR c/53037
5227         * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
5228         (check_bitfield_type_and_width): Don't allow bit-field with
5229         warn_if_not_aligned type.
5231 2017-08-14  Martin Sebor  <msebor@redhat.com>
5233         PR c/81117
5234         * c-objc-common.c (c_objc_common_init): Handle 'G'.
5236 2017-08-11  Marek Polacek  <polacek@redhat.com>
5238         PR c/81795
5239         * c-decl.c (pushtag): Only print inform if the warning was printed.
5240         (grokdeclarator): Likewise.
5242 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
5244         * c-parser.c (c_parser_error): Rename to...
5245         (c_parser_error_richloc): ...this, making static, and adding
5246         "richloc" parameter, passing it to the c_parse_error call,
5247         rather than calling c_parser_set_source_position_from_token.
5248         (c_parser_error): Reintroduce, reimplementing in terms of the
5249         above, converting return type from void to bool.
5250         (class token_pair): New class.
5251         (struct matching_paren_traits): New struct.
5252         (matching_parens): New typedef.
5253         (struct matching_brace_traits): New struct.
5254         (matching_braces): New typedef.
5255         (get_matching_symbol): New function.
5256         (c_parser_require): Add param MATCHING_LOCATION, using it to
5257         highlight matching "opening" tokens for missing "closing" tokens.
5258         (c_parser_skip_until_found): Likewise.
5259         (c_parser_static_assert_declaration_no_semi): Convert explicit
5260         parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
5261         class matching_parens, so that the pertinent open parenthesis is
5262         highlighted when there are problems locating the close
5263         parenthesis.
5264         (c_parser_struct_or_union_specifier): Likewise.
5265         (c_parser_typeof_specifier): Likewise.
5266         (c_parser_alignas_specifier): Likewise.
5267         (c_parser_simple_asm_expr): Likewise.
5268         (c_parser_braced_init): Likewise, for matching_braces.
5269         (c_parser_paren_condition): Likewise, for matching_parens.
5270         (c_parser_switch_statement): Likewise.
5271         (c_parser_for_statement): Likewise.
5272         (c_parser_asm_statement): Likewise.
5273         (c_parser_asm_operands): Likewise.
5274         (c_parser_cast_expression): Likewise.
5275         (c_parser_sizeof_expression): Likewise.
5276         (c_parser_alignof_expression): Likewise.
5277         (c_parser_generic_selection): Likewise.
5278         (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
5279         RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
5280         RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
5281         In case CPP_OPEN_PAREN, pass loc_open_paren to the
5282         c_parser_skip_until_found call.
5283         (c_parser_objc_class_definition): Use class matching_parens as
5284         above.
5285         (c_parser_objc_method_decl): Likewise.
5286         (c_parser_objc_try_catch_finally_statement): Likewise.
5287         (c_parser_objc_synchronized_statement): Likewise.
5288         (c_parser_objc_at_property_declaration): Likewise.
5289         (c_parser_oacc_wait_list): Likewise.
5290         (c_parser_omp_var_list_parens): Likewise.
5291         (c_parser_omp_clause_collapse): Likewise.
5292         (c_parser_omp_clause_default): Likewise.
5293         (c_parser_omp_clause_if): Likewise.
5294         (c_parser_omp_clause_num_threads): Likewise.
5295         (c_parser_omp_clause_num_tasks): Likewise.
5296         (c_parser_omp_clause_grainsize): Likewise.
5297         (c_parser_omp_clause_priority): Likewise.
5298         (c_parser_omp_clause_hint): Likewise.
5299         (c_parser_omp_clause_defaultmap): Likewise.
5300         (c_parser_oacc_single_int_clause): Likewise.
5301         (c_parser_omp_clause_ordered): Likewise.
5302         (c_parser_omp_clause_reduction): Likewise.
5303         (c_parser_omp_clause_schedule): Likewise.
5304         (c_parser_omp_clause_num_teams): Likewise.
5305         (c_parser_omp_clause_thread_limit): Likewise.
5306         (c_parser_omp_clause_aligned): Likewise.
5307         (c_parser_omp_clause_linear): Likewise.
5308         (c_parser_omp_clause_safelen): Likewise.
5309         (c_parser_omp_clause_simdlen): Likewise.
5310         (c_parser_omp_clause_depend): Likewise.
5311         (c_parser_omp_clause_map): Likewise.
5312         (c_parser_omp_clause_device): Likewise.
5313         (c_parser_omp_clause_dist_schedule): Likewise.
5314         (c_parser_omp_clause_proc_bind): Likewise.
5315         (c_parser_omp_clause_uniform): Likewise.
5316         (c_parser_omp_for_loop): Likewise.
5317         (c_parser_cilk_clause_vectorlength): Likewise.
5318         (c_parser_cilk_clause_linear): Likewise.
5319         (c_parser_transaction_expression): Likewise.
5320         * c-parser.h (c_parser_require): Add param matching_location with
5321         default UNKNOWN_LOCATION.
5322         (c_parser_error): Convert return type from void to bool.
5323         (c_parser_skip_until_found): Add param matching_location with
5324         default UNKNOWN_LOCATION.
5326 2017-08-09  Marek Polacek  <polacek@redhat.com>
5328         * c-decl.c (build_enumerator): Use true/false instead of 1/0.
5329         * c-tree.h (build_external_ref): Update declaration.
5330         * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
5331         (build_external_ref): Change the type of a parameter to bool.
5332         (parser_build_binary_op): Use true/false instead of 1/0.
5333         (pointer_diff): Likewise.
5334         (build_modify_expr): Likewise.
5335         (set_designator): Change the type of a parameter to bool.
5336         (set_init_index): Use true/false instead of 1/0.
5337         (set_init_label): Likewise.
5338         (output_init_element): Change the type of a parameter to bool.
5339         (output_pending_init_elements): Use true/false instead of 1/0.
5340         (process_init_element): Likewise.
5341         (build_binary_op): Change the type of a parameter to bool.
5343 2017-08-09  Marek Polacek  <polacek@redhat.com>
5345         PR c/81233
5346         * c-typeck.c (pedwarn_init): Make the function take a variable list.
5347         Call emit_diagnostic_valist instead of pedwarn.
5348         (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
5349         Print the relevant types in diagnostics.
5351 2017-08-09  Marek Polacek  <polacek@redhat.com>
5353         PR c/81417
5354         * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
5355         build_conditional_expr.
5356         * c-parser.c (c_parser_conditional_expression): Create locations for
5357         EXP1 and EXP2 from their source ranges.  Pass the locations down to
5358         build_conditional_expr.
5359         * c-tree.h (build_conditional_expr): Update declaration.
5360         * c-typeck.c (build_conditional_expr): Add location_t parameters.
5361         For -Wsign-compare, also print the types.
5363 2017-08-08  Martin Liska  <mliska@suse.cz>
5365         * c-convert.c: Include header files.
5366         * c-typeck.c: Likewise.
5368 2017-08-07  Martin Liska  <mliska@suse.cz>
5370         * c-parser.c (c_parser_attributes): Canonicalize name of an
5371         attribute.
5373 2017-08-02  Marek Polacek  <polacek@redhat.com>
5375         PR c/81289
5376         * c-parser.c (c_parser_unary_expression): Use set_error.
5378         PR c/81448
5379         PR c/81306
5380         * c-warn.c (warn_for_multistatement_macros): Prevent bogus
5381         warnings.  Avoid walking MACRO_MAP_LOCATIONS.
5383 2017-07-31  Jan Hubicka  <hubicka@ucw.cz>
5384             Martin Liska  <mliska@suse.cz>
5386         * c-typeck.c (c_finish_goto_label): Build gimple predict
5387         statement.
5389 2017-07-31  Martin Liska  <mliska@suse.cz>
5391         PR sanitize/81530
5392         * c-convert.c (convert): Guard condition with flag_sanitize_p
5393         also with current_function_decl non-null equality.
5394         * c-decl.c (grokdeclarator): Likewise.
5395         * c-typeck.c (build_binary_op): Likewise.
5397 2017-07-25  Marek Polacek  <polacek@redhat.com>
5399         * c-decl.c (grokfield): Remove local variable.
5401 2017-07-25  Marek Polacek  <polacek@redhat.com>
5403         PR c/81364
5404         * c-parser.c (c_parser_else_body): Don't warn about multistatement
5405         macro expansion if the body is in { }.
5406         (c_parser_while_statement): Likewise.
5407         (c_parser_for_statement): Likewise.
5409 2017-07-18  Nathan Sidwell  <nathan@acm.org>
5411         * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
5413 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
5415         * c-decl.c (implicitly_declare): When suggesting a missing
5416         #include, provide a fix-it hint.
5418 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
5420         * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
5421         and call that instead.
5422         * c-tree.h (selftest::run_c_tests): New decl.
5424 2017-06-26  Marek Polacek  <polacek@redhat.com>
5426         PR c/80116
5427         * c-parser.c (c_parser_if_body): Set the location of the
5428         body of the conditional after parsing all the labels.  Call
5429         warn_for_multistatement_macros.
5430         (c_parser_else_body): Likewise.
5431         (c_parser_switch_statement): Likewise.
5432         (c_parser_while_statement): Likewise.
5433         (c_parser_for_statement): Likewise.
5434         (c_parser_statement): Add a default argument.  Save the location
5435         after labels have been parsed.
5436         (c_parser_c99_block_statement): Likewise.
5438 2017-06-19  Richard Biener  <rguenther@suse.de>
5440         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5441         negated _Literals to parse _Literal (int) -1.
5443 2017-06-13  Martin Liska  <mliska@suse.cz>
5445         PR sanitize/78204
5446         * c-convert.c (convert): Use sanitize_flags_p.
5447         * c-decl.c (grokdeclarator): Likewise.
5448         * c-typeck.c (convert_for_assignment): Likewise.
5449         (c_finish_return): Likewise.
5450         (build_binary_op): Likewise.
5452 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
5454         PR c/81006
5455         * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
5456         to sizetype before size_binop.
5458 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
5460         * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
5461         of TDI_generic.
5463 2017-06-06  Marek Polacek  <polacek@redhat.com>
5465         PR c/79983
5466         * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
5467         ref.
5468         (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
5470 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5472         * c-parser.c (c_parser_binary_expression): Implement the
5473         -Wsizeof_pointer_div warning.
5474         (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
5475         from a parenthesized expression.
5476         (c_parser_expr_list): Use c_last_sizeof_loc.
5477         * c-tree.h (c_last_sizeof_loc): New external.
5478         * c-typeck.c (c_last_sizeof_loc): New variable.
5479         (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
5481 2017-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
5483         PR testsuite/80580
5484         * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
5486 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
5488         * c-objc-common.c (c_tree_printer): Gain bool and const char **
5489         parameters.
5491 2017-05-24  Martin Sebor  <msebor@redhat.com>
5493         PR c/80731
5494         * c-fold.c (c_fully_fold_internal): Adjust.
5495         * c-typeck.c (parser_build_unary_op): Adjust.
5497 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
5499         * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
5500         "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
5501         "VECTOR_LENGTH".
5503 2017-05-23  Marek Polacek  <polacek@redhat.com>
5505         * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
5506         quotes.
5508 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
5510         * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
5511         result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
5512         it returned invariant.  Call tree_invariant_p unconditionally
5513         afterwards to decide whether to return expr or op0.
5515 2017-05-22  Nathan Sidwell  <nathan@acm.org>
5517         * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
5519 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
5521         * c-parser.c (c_parser_omp_clause_default): Handle
5522         "OMP_CLAUSE_DEFAULT_PRESENT".
5524 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5526         * config-lang.in (gtfiles): Add c-family/c-format.c.
5528 2017-05-18  Nathan Sidwell  <nathan@acm.org>
5530         * c-decl.c (pushdecl_top_level): Delete unused function.
5532 2017-05-18  Marek Polacek  <polacek@redhat.com>
5534         * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
5535         (check_earlier_gotos): Likewise.
5536         (define_label): Likewise.
5537         (pending_xref_error): Likewise.
5538         (smallest_type_quals_location): Likewise.
5539         (grokdeclarator): Likewise.
5540         (grokparms): Likewise.
5541         (identifier_global_value): Likewise.
5542         * c-typeck.c (set_nonincremental_init_from_string): Likewise.
5543         (find_init_member): Likewise.
5545 2017-05-18  Marek Polacek  <polacek@redhat.com>
5547         * c-decl.c (start_decl): Use false/true instead of 0/1.
5548         (grokdeclarator): Likewise.
5549         (finish_struct): Likewise.
5550         (start_function): Change the return type to bool.  Use false/true
5551         instead of 0/1.
5552         (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
5553         * c-tree.h (start_function): Update.
5554         * c-typeck.c (same_translation_unit_p): Change the return type to bool.
5555         (set_designator): Change the return type to bool.  Use false/true
5556         instead of 0/1.
5558 2017-05-17  Marek Polacek  <polacek@redhat.com>
5560         * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
5561         * c-typeck.c: Likewise.
5563 2017-05-17  Marek Polacek  <polacek@redhat.com>
5565         PR sanitizer/80659
5566         * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
5567         DECL_IGNORED_P even for non-static compound literals.
5569 2017-05-17  Martin Liska  <mliska@suse.cz>
5571         * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
5572         use it instead of int type.
5574 2017-05-17  Marek Polacek  <polacek@redhat.com>
5576         * c-convert.c (convert): Replace c_save_expr with save_expr.  Don't
5577         call c_fully_fold.
5578         (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
5579         * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
5580         * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
5581         * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
5582         save_expr.
5583         (c_parser_conditional_expression): Likewise.
5584         * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
5585         * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
5586         (process_init_element): Likewise.
5587         (build_binary_op): Likewise.
5588         (handle_omp_array_sections_1): Likewise.
5590 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
5592         * c-parser.c (c_parser_omp_clause_num_gangs)
5593         (c_parser_omp_clause_num_workers)
5594         (c_parser_omp_clause_vector_length): Merge functions into...
5595         (c_parser_oacc_single_int_clause): ... this new function.  Adjust
5596         all users.
5598 2017-05-11  Nathan Sidwell  <nathan@acm.org>
5600         * gimple-parser.c: Don't #include tree-dump.h.
5602 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
5604         PR testsuite/80580
5605         * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
5607 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
5609         PR testsuite/80580
5610         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5611         incorrect __MEM syntax.
5613 2017-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
5615         PR testsuite/80580
5616         * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
5617         type of unary '*'.
5619 2017-05-09  Nathan Sidwell  <nathan@acm.org>
5621         * c-tree.h (pushdecl): Declare.
5623 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
5625         * c-decl.c (warn_defaults_to): Replace report_diagnostic
5626         with diagnostic_report_diagnostic.
5627         * c-errors.c (pedwarn_c99): Likewise.
5628         (pedwarn_c90): Likewise.
5630 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
5632         PR c++/80038
5633         * c-gimplify.c (c_gimplify_expr): Remove calls to
5634         cilk_gimplifY_call_params_in_spawned_fn.
5636 2017-04-25  David Malcolm  <dmalcolm@redhat.com>
5638         * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
5639         hint for removing extra semicolon.
5641 2017-04-21  Jakub Jelinek  <jakub@redhat.com>
5643         PR c/80468
5644         * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
5645         enabled, set specs->type to integer_type_node.
5647 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
5649         * c-array-notation.c: Fix typo in comment.
5651 2017-03-29  Marek Polacek  <polacek@redhat.com>
5653         PR c/79730
5654         * c-decl.c (finish_decl): Check VAR_P.
5656 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
5658         PR middle-end/80162
5659         * c-tree.h (c_mark_addressable): Add array_ref_p argument.
5660         * c-typeck.c (c_mark_addressable): Likewise.  Look through
5661         VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
5662         to ARRAY_TYPE.
5663         (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
5665 2017-03-23  Marek Polacek  <polacek@redhat.com>
5667         * c-tree.h: Remove a C_RID_YYCODE reference.
5669 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
5671         PR c/80097
5672         * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
5673         optional COMPOUND_EXPR with ubsan instrumentation.
5675 2017-03-17  Marek Polacek  <polacek@redhat.com>
5677         * c-parser.c: Add C11 references.
5679 2017-03-15  Marek Polacek  <polacek@redhat.com>
5681         * c-parser.c (c_parser_enum_specifier): Remove redundant line.
5683 2017-03-11  Marek Polacek  <polacek@redhat.com>
5685         * c-decl.c (implicit_decl_warning): Add a comment.  Fix formatting.
5687 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
5689         PR translation/79848
5690         * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5691         "%qs".
5692         * c-parser.c (c_parser_oacc_shape_clause): Likewise.
5694 2017-03-09  Marek Polacek  <polacek@redhat.com>
5696         PR sanitizer/79757
5697         * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5698         parameter declarations with initializers.
5700 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
5702         PR c/79969
5703         * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
5704         TYPE_STUB_DECL.
5706 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
5708         PR c/79834
5709         * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
5710         for "may only be used in compound statements" diagnostics, change it
5711         such that the same translatable string is used for all pragmas.  For
5712         PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
5713         diagnostics.
5714         (c_parser_omp_cancellation_point, c_parser_omp_target_update,
5715         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
5716         "may only be used in compound statements" diagnostics, such that the
5717         same translatable string is used for all pragmas.
5719 2017-03-04  Marek Polacek  <polacek@redhat.com>
5721         PR c/79847
5722         * c-decl.c (implicit_decl_warning): Add missing space.
5724 2017-03-03  Marek Polacek  <polacek@redhat.com>
5726         PR c/79758
5727         * c-decl.c (store_parm_decls_oldstyle): Check if the element of
5728         current_function_prototype_arg_types is error_mark_node.  Fix
5729         formatting.  Use TREE_VALUE instead of TREE_TYPE.
5731 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
5733         PR c/79837
5734         * c-parser.c (c_parser_omp_clause_reduction): Don't mention
5735         %<min%> or %<max%> in the diagnostics, instead mention identifier.
5736         (c_parser_omp_declare_reduction): Don't mention %<min%> in the
5737         diagnostics.
5739         PR c/79836
5740         * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
5741         instead of %<_Generic>.
5742         (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
5743         (c_parser_omp_target_exit_data): Use %<release%> instead of
5744         %<release>.
5746 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
5748         * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
5749         instead of just cond ? "..." : "...".
5750         (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
5751         for "enter"/"exit" keyword.
5752         (c_finish_oacc_routine): Don't use %s to supply portions of the
5753         message.
5755 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
5757         PR c++/79588
5758         * c-parser.c (c_parser_postfix_expression_after_primary): Don't
5759         handle -Wrestrict here.
5760         * c-typeck.c (build_function_call_vec): Adjust
5761         check_function_arguments caller.
5763 2017-02-23  Richard Biener  <rguenther@suse.de>
5765         PR c/79684
5766         * gimple-parser.c (c_parser_gimple_statement): Use set_error
5767         to initialize c_exprs to return.
5768         (c_parser_gimple_binary_expression): Likewise.
5769         (c_parser_gimple_unary_expression): Likewise.
5770         (c_parser_gimple_postfix_expression): Likewise.
5772 2017-02-22  Marek Polacek  <polacek@redhat.com>
5774         PR c/79662
5775         * c-typeck.c (convert_arguments): Handle error_mark_node.
5777 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5779         * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
5780         value of c_parser_parse_ssa_name against error_mark_node and emit
5781         error if ssa name is anonymous and written as default definition.
5783 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5785         * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5786         FMA_EXPR.
5788 2017-02-16  Jakub Jelinek  <jakub@redhat.com>
5790         PR c++/79512
5791         * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5792         ignore #pragma omp target even when not followed by identifier.
5794 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5796         * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5797         (c_parser_gimple_unary_expression): Likewise.
5799 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
5801         * c-parser.c (c_parser_oacc_declare): Add missing space in
5802         diagnostics.
5804 2017-02-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5806         PR c/79478
5807         * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5808         set_c_expr_source_range when parsing ssa-name.
5810 2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
5811             Richard Biener  <rguenther@suse.de>
5813         * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5814         building IL when arguments are error_mark_node.
5815         (c_parser_gimple_unary_expression): Likewise.
5816         (c_parser_gimple_if_stmt): Likewise.
5817         (c_parser_gimple_switch_stmt): Likewise.
5818         (c_parser_gimple_return_stmt): Likewise.
5819         (c_parser_parse_ssa_name): When name lookup fails do not build
5820         an SSA name.  Use undeclared rather than not declared in error
5821         reporting.
5823 2017-02-09  Marek Polacek  <polacek@redhat.com>
5825         PR c/79428
5826         * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5827         instead of c_parser_skip_until_found.
5829 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
5831         PR c/79431
5832         * c-parser.c (c_parser_omp_declare_target): Don't invoke
5833         symtab_node::get on automatic variables.
5835 2016-02-09  Nathan Sidwell  <nathan@codesourcery.com>
5836             Chung-Lin Tang  <cltang@codesourcery.com>
5838         * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5839         (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5840         semantic checking.
5841         * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5843 2017-02-07  Richard Biener  <rguenther@suse.de>
5845         * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5846         (c_parser_gimple_postfix_expression_after_primary):
5847         Do not use c_build_function_call_vec to avoid folding and promotion.
5848         Simplify.
5850 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
5852         PR lto/79061
5853         * c-decl.c (pop_scope): Pass main_input_filename to
5854         build_translation_unit_decl.
5856 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
5858         * c-parser.c: Include "read-rtl-function.h" and
5859         "run-rtl-passes.h".
5860         (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5861         grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
5862         production.  Update for renaming of field "gimple_pass" to
5863         "gimple_or_rtl_pass".  If __RTL was seen, call
5864         c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
5865         to an auto_timevar, to cope with early exit.
5866         (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5867         field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5868         c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5869         Handle RID_RTL.
5870         (c_parser_parse_rtl_body): New function.
5871         * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5872         (struct c_declspecs): Rename field "gimple_pass" to
5873         "gimple_or_rtl_pass".  Add field "rtl_p".
5874         * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5875         (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5876         * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5877         (c_parser_gimple_or_rtl_pass_list): ...this.
5879 2017-01-20  Marek Polacek  <polacek@redhat.com>
5881         PR c/64279
5882         * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5884 2017-01-13  Richard Biener  <rguenther@suse.de>
5886         * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5887         nops.
5889 2017-01-13  Richard Biener  <rguenther@suse.de>
5891         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5892         _Literal ( type-name ) number.
5894 2017-01-12  Richard Biener  <rguenther@suse.de>
5896         * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5897         __MEM.
5899 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
5901         PR c++/72813
5902         * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5903         PCH file.
5905 2017-01-11  Richard Biener  <rguenther@suse.de>
5907         PR bootstrap/79052
5908         * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5909         returns on parse errors.
5911 2017-01-04  Marek Polacek  <polacek@redhat.com>
5913         PR c++/64767
5914         * c-parser.c (c_parser_postfix_expression): Mark zero character
5915         constants by setting original_type in c_expr.
5916         * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5917         with a zero character constant.
5918         (char_type_p): New function.
5920 2017-01-04  David Malcolm  <dmalcolm@redhat.com>
5922         * c-parser.c (c_parser_declaration_or_fndef): Create a
5923         rich_location at init_loc and parse it to start_init.
5924         (last_init_list_comma): New global.
5925         (c_parser_braced_init): Update last_init_list_comma when parsing
5926         commas.  Pass it to pop_init_level.  Pass location of closing
5927         brace to pop_init_level.
5928         (c_parser_postfix_expression_after_paren_type): Create a
5929         rich_location at type_loc and parse it to start_init.
5930         (c_parser_omp_declare_reduction): Likewise for loc.
5931         * c-tree.h (start_init): Add rich_location * param.
5932         (pop_init_level): Add location_t param.
5933         * c-typeck.c (struct initializer_stack): Add field
5934         "missing_brace_richloc".
5935         (start_init): Add richloc param, use it to initialize
5936         the stack node's missing_brace_richloc.
5937         (last_init_list_comma): New decl.
5938         (finish_implicit_inits): Pass last_init_list_comma to
5939         pop_init_level.
5940         (push_init_level): When finding missing open braces, add fix-it
5941         hints to the richloc.
5942         (pop_init_level): Add "insert_before" param and pass it
5943         when calling pop_init_level.  Add fixits about missing
5944         close braces to any richloc.  Use the richloc for the
5945         -Wmissing-braces warning.
5946         (set_designator): Pass last_init_list_comma to pop_init_level.
5947         (process_init_element): Likewise.
5949 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
5951         Update copyright years.
5953 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
5955         PR bootstrap/78817
5956         * c-typeck.c (build_function_call_vec): If check_function_arguments
5957         returns true, set TREE_NO_WARNING on CALL_EXPR.
5959         PR c/77767
5960         * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5961         to *expr instead of overwriting it.
5963 2016-12-20  Richard Biener  <rguenther@suse.de>
5965         * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5966         error recovery.
5967         (c_parser_gimple_statement): Only build assigns for non-error
5968         stmts.
5969         (c_parser_gimple_postfix_expression_after): Improve error recovery.
5971 2016-12-14  Martin Jambor  <mjambor@suse.cz>
5973         * c-parser.c: Include omp-general.h and omp-offload.h instead of
5974         omp-low.h.
5975         (c_finish_oacc_routine): Adjusted call to
5976         get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5977         to use their new names.
5978         (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5979         use its new name.
5980         (c_parser_oacc_update): Likewise.
5981         (c_parser_omp_simd): Likewise.
5982         (c_parser_omp_target_update): Likewise.
5983         * c-typeck.c: Include omp-general.h instead of omp-low.h.
5984         (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5985         name.
5986         (c_finish_omp_cancellation_point): Likewise.
5987         * gimple-parser.c: Do not include omp-low.h
5989 2016-12-02  Cesar Philippidis  <cesar@codesourcery.com>
5990             James Norris  <jnorris@codesourcery.com>
5992         * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5993         EXIT_DATA,WAIT} are not used in compound statements.
5994         (c_parser_oacc_enter_exit_data): Update diagnostics.
5996 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5998         PR c++/71973
5999         * c-decl.c (diagnose_mismatched_decls): Use
6000         OPT_Wbuiltin_declaration_mismatch here too.
6002 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
6003             Alan Hayward  <alan.hayward@arm.com>
6004             David Sherwood  <david.sherwood@arm.com>
6006         * c-decl.c (merge_decls): Use SET_DECL_MODE.
6007         (make_label, finish_struct): Likewise.
6009 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
6010             Richard Biener  <rguenther@suse.de>
6012         * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
6013         * config-lang.in (gtfiles): Add c/c-parser.h.
6014         * c-tree.h (enum c_declspec_word): Add cdw_gimple.
6015         (struct c_declspecs): Add gimple_pass member and gimple_p flag.
6016         * c-parser.c (enum c_id_kind, struct c_token,
6017         c_parser_next_token_is, c_parser_next_token_is_not,
6018         c_parser_next_token_is_keyword,
6019         enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
6020         Split out to ...
6021         * c-parser.h: ... new header.
6022         * c-parser.c: Include c-parser.h and gimple-parser.h.
6023         (c_parser_peek_token, c_parser_peek_2nd_token,
6024         c_token_starts_typename, c_parser_next_token_starts_declspecs,
6025         c_parser_next_tokens_start_declaration, c_parser_consume_token,
6026         c_parser_error, c_parser_require, c_parser_skip_until_found,
6027         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
6028         c_parser_type_name): Export.
6029         (c_parser_tokens_buf): New function.
6030         (c_parser_error): Likewise.
6031         (c_parser_set_error): Likewise.
6032         (c_parser_declspecs): Handle RID_GIMPLE.
6033         (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
6034         via c_parser_parse_gimple_body.
6035         * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
6036         c_token_starts_typename, c_parser_next_token_starts_declspecs,
6037         c_parser_next_tokens_start_declaration, c_parser_consume_token,
6038         c_parser_error, c_parser_require, c_parser_skip_until_found,
6039         c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
6040         c_parser_type_name): Declare.
6041         (struct c_parser): Declare forward.
6042         (c_parser_tokens_buf): Declare.
6043         (c_parser_error): Likewise.
6044         (c_parser_set_error): Likewise.
6045         * gimple-parser.c: New file.
6046         * gimple-parser.h: Likewise.
6048 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6050         PR c/35503
6051         * c-parser.c (c_parser_postfix_expression_after_primary): Call
6052         warn_for_restrict.
6054 2016-09-11  Le-Chun Wu  <lcwu@google.com>
6055             Mark Wielaard  <mjw@redhat.com>
6057         * c-decl.c (warn_if_shadowing): Use the warning code corresponding
6058         to the given -Wshadow= variant.
6060 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6062         * c-typeck.c: Include memmodel.h.
6064 2016-10-13  Jakub Jelinek  <jakub@redhat.com>
6066         PR target/77957
6067         * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
6068         instead of lhd_return_null_tree_v.
6070 2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
6072         PR c++/69733
6073         * c-decl.c (smallest_type_quals_location): New static function.
6074         (grokdeclarator): Try to find the correct location for an ignored
6075         qualifier.
6077 2016-09-26  Marek Polacek  <polacek@redhat.com>
6079         PR c/7652
6080         * c-decl.c (pop_scope): Add gcc_fallthrough.
6082 2016-09-26  Marek Polacek  <polacek@redhat.com>
6084         PR c/7652
6085         * c-parser.c (struct c_token): Add flags field.
6086         (c_lex_one_token): Pass it to c_lex_with_flags.
6087         (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
6088         into IFN_FALLTHROUGH.
6089         (c_parser_label): Set FALLTHROUGH_LABEL_P on labels.  Handle
6090         attribute fallthrough after a case label or default label.
6091         (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
6093 2016-09-24  Marek Polacek  <polacek@redhat.com>
6095         PR c/77490
6096         * c-typeck.c (build_unary_op): Warn about bit not on expressions that
6097         have boolean value.  Warn about ++/-- on booleans.
6099 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
6101         * c-parser.c (incomplete_record_decls): Remove unnecessary
6102         = vNULL initialization of file scope vec.
6104 2016-09-16  Marek Polacek  <polacek@redhat.com>
6106         * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
6108 2016-09-14  Marek Polacek  <polacek@redhat.com>
6110         * c-array-notation.c (create_cmp_incr): Use false instead of 0.
6111         (fix_array_notation_expr): Likewise.
6112         * c-decl.c (finish_decl): Likewise.
6113         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6114         * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
6115         (function_to_pointer_conversion): Use false instead of 0.
6116         (convert_lvalue_to_rvalue): Likewise.
6117         (parser_build_unary_op): Likewise.
6118         (build_atomic_assign): Likewise.
6119         (build_unary_op): Change nonconvert parameter type to bool, use
6120         true/false instead of 1/0.
6121         (build_binary_op): Use true instead of 1.
6123 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
6125         * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
6126         of add_fixit_insert to add_fixit_insert_before.
6128 2016-09-13  Marek Polacek  <polacek@redhat.com>
6130         * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT.  Use
6131         it.
6133 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6135         PR c++/77496
6136         * c-parser.c (c_parser_conditional_expression): Pass the rightmost
6137         COMPOUND_EXPR to warn_for_omitted_condop.
6139 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
6141         * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
6142         c_get_substring_location for this new langhook.
6144 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
6146         PR c/65467
6147         * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
6148         flag_openmp.
6149         (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
6150         instead of mark_exp_read on low_bound/length expression.
6151         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
6152         c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6153         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6154         c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
6155         c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
6156         c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
6157         c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
6158         c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
6159         c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
6160         c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
6161         instead of mark_expr_read.
6162         (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
6163         * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
6164         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
6165         * c-tree.h (c_omp_clause_copy_ctor): New prototype.
6166         * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
6167         array section bases outside of depend clause, for depend clause
6168         use convert_lvalue_to_rvalue on the base.
6169         (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
6170         linear, aligned, map, to and from clauses.
6171         (c_omp_clause_copy_ctor): New function.
6173 2016-09-01  Marek Polacek  <polacek@redhat.com>
6175         PR c/7652
6176         * c-typeck.c (composite_type): Add FALLTHRU comment.
6178 2016-08-31  David Malcolm  <dmalcolm@redhat.com>
6180         * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
6181         to the insertion fixits for "struct", "union", and "enum".
6183 2016-08-30  David Malcolm  <dmalcolm@redhat.com>
6185         * c-decl.c (implicit_decl_warning): Use add_fixit_replace
6186         rather than add_fixit_misspelled_id.
6187         (undeclared_variable): Likewise.
6188         * c-parser.c (c_parser_declaration_or_fndef): Likewise.  Remove
6189         now-redundant "here" params from add_fixit_insert method calls.
6190         (c_parser_parameter_declaration): Likewise.
6191         * c-typeck.c (build_component_ref): Remove now-redundant range
6192         param from add_fixit_replace method calls.
6194 2016-08-25  Marek Polacek  <polacek@redhat.com>
6196         * c-typeck.c (parser_build_binary_op): Pass LHS to
6197         warn_logical_not_parentheses.
6199 2016-08-25  Marek Polacek  <polacek@redhat.com>
6201         PR c/77323
6202         * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
6203         or _FloatN or _FloatNx is not supported.
6204         (finish_declspecs): Set type to integer_type_node when _FloatN or
6205         _FloatNx is not supported.
6207 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
6209         PR c/32187
6210         * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
6211         (struct c_declspecs): Add field floatn_nx_idx.
6212         * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
6213         and _FloatNx type specifiers.
6214         * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
6215         (c_parser_declspecs, c_parser_attribute_any_word)
6216         (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
6217         * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
6218         (convert_arguments): Avoid promoting _FloatN and _FloatNx types
6219         narrower than double.
6221 2016-08-12  Jakub Jelinek  <jakub@redhat.com>
6222             Martin Liska  <mliska@suse.cz>
6224         PR c/67410
6225         * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
6226         % to determine val element to change.  Assert that
6227         wchar_bytes * charwidth fits into val array.
6229 2016-08-12  Marek Polacek  <polacek@redhat.com>
6231         PR c/7652
6232         * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
6233         (c_parser_postfix_expression): Likewise.
6234         * c-typeck.c (build_unary_op): Adjust fall through comment.
6235         (c_mark_addressable): Likewise.
6237 2016-08-11  Jakub Jelinek  <jakub@redhat.com>
6239         PR c/72816
6240         * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
6241         array member through typedef, for orig_qual_indirect == 0 clear
6242         orig_qual_type.
6244 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
6246         PR c/64955
6247         * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
6248         this up to selftest::run_c_tests.
6249         (selftest::run_c_tests): New function.
6251 2016-08-04  Thomas Schwinge  <thomas@codesourcery.com>
6253         * c-parser.c (struct oacc_routine_data): Add error_seen and
6254         fndecl_seen members.
6255         (c_finish_oacc_routine): Use these.
6256         (c_parser_declaration_or_fndef): Adjust.
6257         (c_parser_oacc_routine): Likewise.  Support more C language
6258         constructs, and improve diagnostics.  Move pragma context
6259         checking...
6260         (c_parser_pragma): ... here.
6262         * c-parser.c (struct oacc_routine_data): New.
6263         (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
6264         Simplify code.
6265         (c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
6266         declare target" attribute.
6268 2016-08-01  Jan Beulich  <jbeulich@suse.com>
6270         * c-fold.c (c_fully_fold_internal): Also emit shift count
6271         warnings for vector types.
6272         * c-typeck.c (build_binary_op): Likewise.
6274 2016-07-29  Marek Polacek  <polacek@redhat.com>
6276         PR c/71742
6277         * c-decl.c (finish_struct): Rephrase an error message.
6279         PR c/71853
6280         * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
6281         to error node for invalid code.
6283         PR c/71573
6284         * c-decl.c (implicitly_declare): Return decl early not only for
6285         error_mark_nodes, but for anything that is not a FUNCTION_DECL.
6287 2016-07-29  Jakub Jelinek  <jakub@redhat.com>
6289         PR c/71969
6290         * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
6291         on GNU extern inline functions.
6293 2016-07-29  Marek Polacek  <polacek@redhat.com>
6295         PR c/71583
6296         * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
6297         check expr.value.
6299 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
6301         * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
6303 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
6305         * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
6306         spellcheck-tree.h
6307         (best_macro_match): Likewise, converting from a typedef to a
6308         subclass.
6309         (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
6310         (lookup_name_fuzzy): Update for change of best_macro_match to a
6311         subclass with a ctor that calls cpp_forall_identifiers.
6313 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
6315         * c-decl.c (implicit_decl_warning): Update for conversion of
6316         return type of lookup_name_fuzzy to const char *.
6317         (undeclared_variable): Likewise.
6318         (lookup_name_fuzzy): Convert return type from tree to
6319         const char *.
6320         * c-parser.c (c_parser_declaration_or_fndef): Update for
6321         conversion of return type of lookup_name_fuzzy to const char *.
6322         (c_parser_parameter_declaration): Likewise.
6324 2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
6326         * c-parser.c (c_parser_oacc_declare): Don't scan for
6327         GOMP_MAP_POINTER.
6328         * c-typeck.c (handle_omp_array_sections): Mark data clauses with
6329         GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
6330         zero-length subarrays.
6332 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
6334         PR c/71858
6335         * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
6336         instead of FUZZY_LOOKUP_NAME.
6337         (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
6338         FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
6340 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
6342         PR c/71858
6343         * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
6345 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
6347         * c-parser.c (c_parser_generic_selection): Make type of variable
6348         auto_vec.
6349         (c_parser_omp_declare_simd): Likewise.
6351 2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
6353         * c-decl.c (struct c_struct_parse_info): Change member types
6354         from vec to auto_vec.
6355         (start_struct): Adjust.
6356         (finish_struct): Likewise.
6358 2016-07-02  Jakub Jelinek  <jakub@redhat.com>
6360         PR c/71719
6361         * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
6363 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
6365         * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
6366         Move pragma context checking into...
6367         (c_parser_omp_cancellation_point): ... here, and improve
6368         diagnostic messages.
6369         * c-typeck.c (c_finish_omp_cancel)
6370         (c_finish_omp_cancellation_point): Improve diagnostic messages.
6372 2016-06-29  Jakub Jelinek  <jakub@redhat.com>
6374         PR c/71685
6375         * c-typeck.c (c_build_qualified_type): Don't clear
6376         C_TYPE_INCOMPLETE_VARS for the main variant.
6378 2016-06-28  Martin Sebor  <msebor@redhat.com>
6380         PR c/71552
6381         * c-typeck.c (output_init_element): Diagnose incompatible types
6382         before non-constant initializers.
6384 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
6386         * Make-lang.in: Don't cat ../stage_current if it does not exist.
6388 2016-06-23  Andi Kleen  <ak@linux.intel.com>
6390         * Make-lang.in: Add support for autofdo.
6392 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
6394         PR c/70339
6395         * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
6396         (implicit_decl_warning): When issuing warnings for implicit
6397         declarations, attempt to provide a suggestion via
6398         lookup_name_fuzzy.
6399         (undeclared_variable): Likewise when issuing errors.
6400         (lookup_name_in_scope): Likewise.
6401         (struct edit_distance_traits<cpp_hashnode *>): New struct.
6402         (best_macro_match): New typedef.
6403         (find_closest_macro_cpp_cb): New function.
6404         (lookup_name_fuzzy): New function.
6405         * c-parser.c: Include gcc-rich-location.h.
6406         (c_token_starts_typename): Split out case CPP_KEYWORD into...
6407         (c_keyword_starts_typename): ...this new function.
6408         (c_parser_declaration_or_fndef): When issuing errors about
6409         missing "struct" etc, add a fixit.  For other kinds of errors,
6410         attempt to provide a suggestion via lookup_name_fuzzy.
6411         (c_parser_parms_declarator): When looking ahead to detect typos in
6412         type names, also reject CPP_KEYWORD.
6413         (c_parser_parameter_declaration): When issuing errors about
6414         unknown type names, attempt to provide a suggestion via
6415         lookup_name_fuzzy.
6416         * c-tree.h (c_keyword_starts_typename): New prototype.
6418 2016-06-20  Joseph Myers  <joseph@codesourcery.com>
6420         PR c/71601
6421         * c-typeck.c (build_conditional_expr): Return error_mark_node if
6422         c_common_type returns error_mark_node.
6424 2016-06-19  Martin Sebor  <msebor@redhat.com>
6426         PR c/69507
6427         * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
6428         __alignof__ (expression).
6430 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
6432         * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
6434 2016-06-14  David Malcolm  <dmalcolm@redhat.com>
6436         * c-typeck.c (build_component_ref): Simplify fixit code by
6437         using gcc_rich_location::add_fixit_misspelled_id.
6438         (set_init_label): Likewise.
6440 2016-06-13  David Malcolm  <dmalcolm@redhat.com>
6442         * c-parser.c (c_parser_initelt): Provide location of name for new
6443         location_t param of set_init_label.
6444         * c-tree.h (set_init_label): Add location_t param.
6445         * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
6446         param and use it when issuing error messages about unrecognized
6447         field names.  Attempt to provide a fixit hint if appropriate,
6448         otherwise update the error message to provide the type name.
6450 2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
6452         PR c/71381
6453         * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
6454         Loosen checking.
6456 2016-06-08  Martin Sebor  <msebor@redhat.com>
6457             Jakub Jelinek  <jakub@redhat.com>
6459         PR c++/70507
6460         PR c/68120
6461         * c-typeck.c (convert_arguments): Don't promote last argument
6462         of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6464 2016-06-08  Marek Polacek  <polacek@redhat.com>
6466         PR c/71418
6467         * c-decl.c (grokdeclarator): Check TYPE_P.
6469         PR c/71426
6470         * c-decl.c (get_parm_info): Don't crash on an assert on invalid
6471         code.
6473 2016-06-07  David Malcolm  <dmalcolm@redhat.com>
6475         * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
6476         and structure element reference, capture the location of the
6477         element name token and pass it to build_component_ref.
6478         (c_parser_postfix_expression_after_primary): Likewise for
6479         structure element dereference.
6480         (c_parser_omp_variable_list): Likewise for
6481         OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
6482         * c-tree.h (build_component_ref): Add location_t param.
6483         * c-typeck.c (build_component_ref): Add location_t param
6484         COMPONENT_LOC.  Use it, if available, when issuing hints about
6485         mispelled member names to provide a fixit replacement hint.
6487 2016-06-06  Marek Polacek  <polacek@redhat.com>
6489         PR c/71362
6490         * c-parser.c (c_parser_direct_declarator): Set location.
6492 2016-06-06  Marek Polacek  <polacek@redhat.com>
6494         * c-typeck.c (comptypes_internal): Handle comparisons of
6495         INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
6496         TYPE_REF_CAN_ALIAS_ALL.
6498 2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
6500         * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
6501         arguments as addressable when async clause exists.
6503 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
6505         PR c++/71349
6506         * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
6507         when combined with target construct.
6509 2016-05-26  Jakub Jelinek  <jakub@redhat.com>
6511         * c-parser.c (c_parser_omp_clause_schedule): Warn if
6512         OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
6514 2016-05-25  Marek Polacek  <polacek@redhat.com>
6516         PR c/71265
6517         * c-decl.c (c_make_fname_decl): Don't check seen_error.
6519         PR c/71266
6520         * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
6522 2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>
6524         * c-parser.c (c_parser_oacc_declare): Add support for
6525         GOMP_MAP_FIRSTPRIVATE_POINTER.
6526         * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
6527         argument with enum c_omp_region_type ort.
6528         (handle_omp_array_sections): Likewise.  Update call to
6529         handle_omp_array_sections_1.
6530         (c_finish_omp_clauses): Add specific errors and warning messages for
6531         OpenACC.  Use firsrtprivate pointers for OpenACC subarrays.  Update
6532         call to handle_omp_array_sections.
6534 2016-05-24  Thomas Schwinge  <thomas@codesourcery.com>
6536         * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
6538 2016-05-24  Richard Biener  <rguenther@suse.de>
6540         PR middle-end/70434
6541         PR c/69504
6542         * c-typeck.c (build_array_ref): Do not complain about indexing
6543         non-lvalue vectors.  Adjust for function name change.
6545 2016-05-20  Martin Sebor  <msebor@redhat.com>
6547         PR c/71115
6548         * c-typeck.c (error_init): Use
6549         expansion_point_location_if_in_system_header.
6550         (warning_init): Same.
6552 2016-05-19  David Malcolm  <dmalcolm@redhat.com>
6554         PR c/71171
6555         * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
6556         in error-handling.
6557         (c_parser_postfix_expression): Likewise.
6558         * c-tree.h (c_expr::set_error): New method.
6559         * c-typeck.c (parser_build_binary_op): In error-handling, ensure
6560         that result's range is initialized.
6562 2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
6564         * c-typeck.c (parser_build_unary_op): Fix formatting.
6566 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
6568         * c-decl.c (grokdeclarator): Remove errmsg and use of
6569         targetm.invalid_return_type.
6570         (grokparms): Remove errmsg and use of
6571         targetm.invalid_parameter_type.
6573 2016-05-13  Joseph Myers  <joseph@codesourcery.com>
6575         * c-decl.c (grokdeclarator): For C11, discard qualifiers on
6576         function return type.
6578 2016-05-12  Marek Polacek  <polacek@redhat.com>
6580         PR c/70756
6581         * c-decl.c (build_compound_literal): Pass LOC down to
6582         c_incomplete_type_error.
6583         * c-tree.h (require_complete_type): Adjust declaration.
6584         (c_incomplete_type_error): Likewise.
6585         * c-typeck.c (require_complete_type): Add location parameter, pass it
6586         down to c_incomplete_type_error.
6587         (c_incomplete_type_error): Add location parameter, pass it down to
6588         error_at.
6589         (build_component_ref): Pass location down to c_incomplete_type_error.
6590         (default_conversion): Pass location down to require_complete_type.
6591         (build_array_ref): Likewise.
6592         (build_function_call_vec): Likewise.
6593         (convert_arguments): Likewise.
6594         (build_unary_op): Likewise.
6595         (build_c_cast): Likewise.
6596         (build_modify_expr): Likewise.
6597         (convert_for_assignment): Likewise.
6598         (c_finish_omp_clauses): Likewise.
6600 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
6602         PR c/43651
6603         * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
6604         is enabled.
6605         * c-errors.c (pedwarn_c90): Return true if warned.
6606         * c-tree.h (pedwarn_c90): Change return type to bool.
6607         (enum c_declspec_word): Add new enumerator cdw_atomic.
6609 2016-05-11  Marek Polacek  <polacek@redhat.com>
6611         PR c++/71024
6612         * c-decl.c (diagnose_mismatched_decls): Factor out code to
6613         diagnose_mismatched_attributes and call it.
6615 2016-05-10  Marek Polacek  <polacek@redhat.com>
6617         PR c/70255
6618         * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
6619         on a declaration following the definition.
6621 2016-05-05  Jakub Jelinek  <jakub@redhat.com>
6623         * c-parser.c (c_parser_switch_statement): Add IF_P argument,
6624         parse it through to c_parser_c99_block_statement.
6625         (c_parser_statement_after_labels): Adjust c_parser_switch_statement
6626         caller.
6628 2016-05-04  Marek Polacek  <polacek@redhat.com>
6630         * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
6631         OPT_Wdangling_else.
6633 2016-05-04  Marek Polacek  <polacek@redhat.com>
6635         PR c/48778
6636         * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
6637         for macro expansions.
6639 2016-05-03  Marek Polacek  <polacek@redhat.com>
6641         PR c/70859
6642         * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
6643         check_builtin_function_arguments.
6645 2016-05-03  Richard Biener  <rguenther@suse.de>
6647         * Make-lang.in (cc1-checksum.c): For stage-final re-use
6648         the checksum from the previous stage.
6650 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
6652         * c-parser.c (c_parser_oacc_all_clauses): Update call to
6653         c_finish_omp_clauses.
6654         (c_parser_omp_all_clauses): Likewise.
6655         (c_parser_oacc_cache): Likewise.
6656         (c_parser_oacc_loop): Likewise.
6657         (omp_split_clauses): Likewise.
6658         (c_parser_omp_declare_target): Likewise.
6659         (c_parser_cilk_all_clauses): Likewise.
6660         (c_parser_cilk_for): Likewise.
6661         * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
6662         is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
6664 2016-05-02  Marek Polacek  <polacek@redhat.com>
6666         PR c/70851
6667         * c-decl.c (grokdeclarator): Diagnose when array's size has an
6668         incomplete type.
6670 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
6672         PR middle-end/70626
6673         * c-parser.c (c_parser_oacc_loop): Don't augment mask with
6674         OACC_LOOP_CLAUSE_MASK.
6675         (c_parser_oacc_kernels_parallel): Update call to
6676         c_oacc_split_loop_clauses.
6678 2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
6680         * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
6681         argument to build_modify_expr in two cases.
6683 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
6685         * c-parser.c (c_parser_postfix_expression_after_primary): Call
6686         warn_for_memset instead of warning directly here.
6688 2016-04-26  Marek Polacek  <polacek@redhat.com>
6690         PR c/67784
6691         * c-parser.c (c_parser_maybe_reclassify_token): New function factored
6692         out of ...
6693         (c_parser_for_statement): ... here.
6694         (c_parser_if_statement): Use it.
6695         (c_parser_switch_statement): Use it.
6696         (c_parser_while_statement): Use it.
6698         PR c/70791
6699         * c-decl.c (pushdecl): Pass LOCUS down to warning.
6701 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
6703         PR c++/69363
6704         * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
6705         instead of c_finish_cilk_clauses.
6706         * c-tree.h (c_finish_omp_clauses): Add new default argument.
6707         * c-typeck.c (c_finish_omp_clauses): Add new argument.  Allow
6708         floating-point variables in the linear clause for Cilk Plus.
6710 2016-04-18  Michael Matz  <matz@suse.de>
6712         * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
6713         (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
6715 2016-04-15  Marek Polacek  <polacek@redhat.com>
6717         PR c/70671
6718         * c-typeck.c (build_unary_op): Pass location down to error and
6719         warning call.
6721 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
6723         PR c/70436
6724         * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
6725         where needed.
6726         (c_parser_external_declaration, c_parser_struct_or_union_specifier,
6727         c_parser_parameter_declaration, c_parser_compound_statement_nostart,
6728         c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
6729         Adjust c_parser_pragma callers.
6730         (c_parser_statement_after_labels): Likewise.  Adjust c_parser_cilk_for
6731         caller.
6732         (c_parser_omp_structured_block): Add IF_P argument, pass it down to
6733         c_parser_statement.
6734         (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
6735         c_parser_oacc_kernels_parallel, c_parser_omp_critical,
6736         c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
6737         c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
6738         c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
6739         c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
6740         c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
6741         c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
6742         down where needed.
6743         (c_parser_omp_for_loop): Likewise.  Clear IF_P if nbraces.
6744         (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
6745         calls.
6747 2016-04-13  Marek Polacek  <polacek@redhat.com>
6749         PR c/70436
6750         * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
6751         adjust callers.
6752         (c_parser_statement): Likewise.
6753         (c_parser_c99_block_statement): Likewise.
6754         (c_parser_while_statement): Likewise.
6755         (c_parser_for_statement): Likewise.
6756         (c_parser_if_body): Don't set IF_P here.
6757         (c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
6758         about dangling else here.
6759         * c-tree.h (c_finish_if_stmt): Adjust declaration.
6760         * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
6761         warn about dangling else here.
6763 2016-04-04  Marek Polacek  <polacek@redhat.com>
6765         PR c/70307
6766         * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
6768 2016-03-31  Marek Polacek  <polacek@redhat.com>
6770         PR c/70297
6771         * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
6773 2016-03-18  David Malcolm  <dmalcolm@redhat.com>
6775         PR c/70281
6776         * c-parser.c (c_parser_postfix_expression): Set the source range
6777         for uses of "__builtin_types_compatible_p".
6779 2016-03-17  Jakub Jelinek  <jakub@redhat.com>
6781         PR c/70280
6782         * c-typeck.c (composite_type): Don't count void_list_node
6783         into len, if the list is terminated by void_list_node, start
6784         with void_list_node instead of NULL for newargs.  Stop
6785         at void_list_node.
6787 2016-03-16  Marek Polacek  <polacek@redhat.com>
6789         PR c/70093
6790         * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
6791         nested functions returning VM types.
6793 2016-03-09  Cesar Philippidis  <cesar@codesourcery.com>
6795         * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6796         when calling c_finish_omp_clauses.
6798 2016-03-04  Bernd Schmidt  <bschmidt@redhat.com>
6800         PR c/69824
6801         * c-decl.c (get_parm_info): Don't queue implicit function declarations
6802         for later.
6804 2016-03-04  Marek Polacek  <polacek@redhat.com>
6806         PR c/69798
6807         * c-parser.c (c_parser_postfix_expression): Call
6808         c_parser_cast_expression rather than c_parser_postfix_expression.
6810 2016-03-01  Jakub Jelinek  <jakub@redhat.com>
6812         PR c/69796
6813         PR c/69974
6814         * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6815         of incomplete decls to error_mark_node.
6817 2016-02-24  Marek Polacek  <polacek@redhat.com>
6819         PR c/69819
6820         * c-decl.c (finish_decl): Don't update the copy of the type of a
6821         different decl type.
6823 2016-02-23  Jakub Jelinek  <jakub@redhat.com>
6825         PR objc/69844
6826         * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6827         in id_kind reclassification.
6829 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
6831         PR c/69835
6832         * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6834 2016-02-16  James Norris  <jnorris@codesourcery.com>
6836         PR c/64748
6837         * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6839 2016-02-12  Bernd Schmidt  <bschmidt@redhat.com>
6841         * c-decl.c (build_null_declspecs): Zero the entire struct.
6843         PR c/69522
6844         * c-parser.c (c_parser_braced_init): New arg outer_obstack.  All
6845         callers changed.  If nested_p is true, use it to call
6846         finish_implicit_inits.
6847         * c-tree.h (finish_implicit_inits): Declare.
6848         * c-typeck.c (finish_implicit_inits): New function.  Move code
6849         from ...
6850         (push_init_level): ... here.
6851         (set_designator, process_init_element): Call finish_implicit_inits.
6853 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
6855         PR c/69768
6856         * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6857         arguments for -Waddress warning.
6859 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
6861         PR c/69669
6862         * c-decl.c (finish_enum): When honoring mode attribute,
6863         make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6865 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
6867         PR debug/69518
6868         * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6869         all type variants, not just TYPE_MAIN_VARIANT.
6871 2016-01-27  Jakub Jelinek  <jakub@redhat.com>
6873         PR debug/66869
6874         * c-decl.c (c_write_global_declarations_1): Warn with
6875         warn_unused_function if static prototype without definition
6876         is not C_DECL_USED.
6878 2016-01-27  Marek Polacek  <polacek@redhat.com>
6880         PR c/68062
6881         * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6882         to unsigned, if needed.  Add -Wsign-compare warning.
6884 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
6886         PR tree-optimization/69483
6887         * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6889 2016-01-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6891         PR c/24293
6892         * c-tree.h (incomplete_record_decls): Declare.
6893         * c-parser.c (incomplete_record_decls): Define.
6894         (c_parser_translation_unit): Iterate through incomplete_record_decls and
6895         report error if any decl has zero size.
6896         * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6897         or enum type to incomplete_record_decls.
6899 2016-01-14  Tom de Vries  <tom@codesourcery.com>
6901         PR tree-optimization/68773
6902         * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6903         set force_output.
6905 2016-01-14  Marek Polacek  <polacek@redhat.com>
6907         PR c/69262
6908         * c-decl.c (grokdeclarator): Provide more information for invalid
6909         array declarations.
6911 2016-01-06  David Malcolm  <dmalcolm@redhat.com>
6913         * c-parser.c (c_parser_unary_expression): For dereferences, build
6914         a combined location before calling build_indirect_ref, so that
6915         error reports cover the full range, manually updating the c_expr
6916         src_range.
6918 2016-01-06  Marek Polacek  <polacek@redhat.com>
6920         PR sanitizer/69099
6921         * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
6922         ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
6923         NULL.
6925 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
6927         Update copyright years.
6929 2016-01-04  Marek Polacek  <polacek@redhat.com>
6931         PR c/68908
6932         * c-typeck.c (build_atomic_assign): Improve commentary.  Add
6933         optimization to use __atomic_fetch_* built-in if possible.
6935 2015-12-23  Thomas Schwinge  <thomas@codesourcery.com>
6937         * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6938         into...
6939         (c_parser_omp_clause_use_device_ptr): ... this function.  Adjust
6940         all users.
6942 2015-12-22  Marek Polacek  <polacek@redhat.com>
6944         PR c/69002
6945         * c-typeck.c (build_component_ref): Warn when acessing elements of
6946         atomic structures or unions.
6948 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
6950         * c-typeck.c: Include "gcc-rich-location.h".
6951         (build_binary_op): In the two places that call binary_op_error,
6952         create a gcc_rich_location and populate it with the location of
6953         the binary op and its two operands.
6955 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
6957         * c-parser.c (c_parser_statement_after_labels): When calling
6958         c_finish_return, Use the return expression's location if it has
6959         one, falling back to the location of the first token within it.
6960         * c-typeck.c (c_finish_return): When issuing warnings about
6961         the incorrect presence/absence of a return value, issue a note
6962         showing the declaration of the function.
6964 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
6966         * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6967         to 4.
6968         (c_parser_peek_nth_token): New function.
6969         (c_parser_peek_conflict_marker): New function.
6970         (c_parser_error): Detect conflict markers and report them as such.
6972 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
6974         * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6975         to preserve range information for the primary expression
6976         in the call to c_parser_postfix_expression_after_primary.
6978 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
6980         * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6981         expression location, falling back on the first token location,
6982         rather than always using the latter.
6984 2015-12-16  Marek Polacek  <polacek@redhat.com>
6986         PR c/64637
6987         * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6988         available.
6990 2015-12-15  Marek Polacek  <polacek@redhat.com>
6992         PR c/68907
6993         * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6994         artificial decl.
6996 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
6998         * c-parser.c (c_parser_alignof_expression): Capture location of
6999         closing parenthesis (if any), or of end of unary expression, and
7000         use it to build a src_range for the expression.
7002 2015-12-08  David Malcolm  <dmalcolm@redhat.com>
7004         PR c/68757
7005         * c-parser.c (c_parser_get_builtin_args): Add
7006         "out_close_paren_loc" param, and write back to it.
7007         (c_parser_postfix_expression): Capture the closing
7008         parenthesis location for RID_CHOOSE_EXPR,
7009         RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
7010         RID_BUILTIN_SHUFFLE and use it to set the source range
7011         for such expressions; within RID_BUILTIN_COMPLEX set
7012         the underlying location.
7014 2015-12-07  Marek Polacek  <polacek@redhat.com>
7016         PR c/68668
7017         * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
7018         TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
7020 2015-12-04  Eric Botcazou  <ebotcazou@adacore.com>
7022         * c-tree.h (c_build_va_arg): Adjust prototype.
7023         * c-parser.c (c_parser_postfix_expression): Adjust call to above.
7024         * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
7025         parameter, adjust throughout and issue an error if EXPR is a component
7026         with reverse storage order.
7028 2015-12-02  Jason Merrill  <jason@redhat.com>
7030         * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7031         (c_fully_fold_internal, decl_constant_value_for_optimization):
7032         Move from c-common.c.
7033         * c-tree.h: Declare decl_constant_value_for_optimization.
7034         * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
7036 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
7038         PR c/68162
7039         * c-decl.c (grokdeclarator): Set first_non_attr_kind before
7040         following link from declarator to next declarator.  Track original
7041         qualified type and pass it to c_build_qualified_type.
7042         * c-typeck.c (c_build_qualified_type): Add arguments
7043         orig_qual_type and orig_qual_indirect.
7045 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
7047         * c-parser.c (c_parser_omp_clause_name)
7048         (c_parser_oacc_all_clauses): Alphabetical sorting.
7050 2015-12-02  Jakub Jelinek  <jakub@redhat.com>
7052         PR c/68533
7053         * c-decl.c (get_parm_info): Use b->locus instead of input_location
7054         for diagnostics.
7056 2015-12-01  Julian Brown  <julian@codesourcery.com>
7057             Cesar Philippidis  <cesar@codesourcery.com>
7058             James Norris  <James_Norris@mentor.com>
7060         * c-parser.c (c_parser_omp_clause_name): Add use_device support.
7061         (c_parser_oacc_clause_use_device): New function.
7062         (c_parser_oacc_all_clauses): Add use_device support.
7063         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
7064         (c_parser_oacc_host_data): New function.
7065         (c_parser_omp_construct): Add host_data support.
7066         * c-tree.h (c_finish_oacc_host_data): Add prototype.
7067         * c-typeck.c (c_finish_oacc_host_data): New function.
7068         (c_finish_omp_clauses): Add use_device support.
7070 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
7072         PR c/67106
7073         * c-decl.c: Set TYPE_PACKED in variants.
7075 2015-11-27  Martin Liska  <mliska@suse.cz>
7077         PR c++/68312
7078         * c-array-notation.c (fix_builtin_array_notation_fn):
7079         Use release_vec_vec instead of vec::release.
7080         (build_array_notation_expr): Likewise.
7081         (fix_conditional_array_notations_1): Likewise.
7082         (fix_array_notation_expr): Likewise.
7083         (fix_array_notation_call_expr): Likewise.
7085 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
7087         PR c/63326
7088         * c-parser.c (c_parser_compound_statement_nostart): If
7089         last_label is true, use pragma_stmt instead of pragma_compound
7090         as second c_parser_pragma argument.
7091         (c_parser_omp_ordered, c_parser_omp_target_update,
7092         c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
7093         false as second argument to c_parser_skip_to_pragma_eol after
7094         diagnosing standalone directives used in pragma_stmt context.
7096 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
7098         * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
7099         with "if (ENABLE_OFFLOADING)".
7101 2015-11-23  David Malcolm  <dmalcolm@redhat.com>
7103         PR objc/68438
7104         * c-parser.c (c_parser_postfix_expression): Set up source ranges
7105         for various Objective-C constructs: Class.name syntax,
7106         @selector(), @protocol(), @encode(), and [] message syntax.
7108 2015-11-20  David Malcolm  <dmalcolm@redhat.com>
7110         PR 62314
7111         * c-typeck.c (should_suggest_deref_p): New function.
7112         (build_component_ref): Special-case POINTER_TYPE when
7113         generating a "not a structure of union"  error message, and
7114         suggest a "->" rather than a ".", providing a fix-it hint.
7116 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
7118         * c-typeck.c (lookup_field_fuzzy): Move determination of closest
7119         candidate into a new function, find_closest_identifier.
7121 2015-11-19  Marek Polacek  <polacek@redhat.com>
7123         PR c/68412
7124         * c-typeck.c (parser_build_binary_op): Properly handle
7125         C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
7127 2015-11-17  David Malcolm  <dmalcolm@redhat.com>
7129         * c-parser.c (set_c_expr_source_range): Bulletproof both
7130         overloaded implementations against NULL expr->value.
7131         (c_parser_braced_init): Set src_range for "ret" to a sane pair of
7132         values.
7133         (c_parser_unary_expression): Likewise when handling addresses of
7134         labels.
7135         (c_parser_postfix_expression): Likewise for statement expressions,
7136         for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
7137         __builtin_va_arg, and for __builtin_offset_of.
7138         (c_parser_postfix_expression_after_paren_type): Initialize expr's
7139         src_range using the range of the braced initializer.
7140         (c_parser_transaction_expression): Set src_range for "ret" to a
7141         sane pair of values.
7143 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
7145         * c-parser.c (c_finish_omp_declare_simd): Look for
7146         "simd" attribute as well. Update error message.
7148 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
7150         * c-parser.c (c_parser_omp_declare_target): Adjust.
7152 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
7154         * c-typeck.c (c_finish_omp_clauses): Don't mark
7155         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
7157 2015-11-14  Marek Polacek  <polacek@redhat.com>
7159         * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
7160         * c-typeck.c: Likewise.
7162 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
7164         * c-decl.c (warn_defaults_to): Pass line_table to
7165         rich_location ctor.
7166         * c-errors.c (pedwarn_c99): Likewise.
7167         (pedwarn_c90): Likewise.
7168         * c-parser.c (set_c_expr_source_range): New functions.
7169         (c_token::get_range): New method.
7170         (c_token::get_finish): New method.
7171         (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
7172         based on the range from the start of the LHS to the end of the
7173         RHS.
7174         (c_parser_conditional_expression): Likewise, based on the range
7175         from the start of the cond.value to the end of exp2.value.
7176         (c_parser_binary_expression): Call set_c_expr_source_range on
7177         the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
7178         (c_parser_cast_expression): Call set_c_expr_source_range on ret
7179         based on the cast_loc through to the end of the expr.
7180         (c_parser_unary_expression): Likewise, based on the
7181         op_loc through to the end of op.
7182         (c_parser_sizeof_expression) Likewise, based on the start of the
7183         sizeof token through to either the closing paren or the end of
7184         expr.
7185         (c_parser_postfix_expression): Likewise, using the token range,
7186         or from the open paren through to the close paren for
7187         parenthesized expressions.
7188         (c_parser_postfix_expression_after_primary): Likewise, for
7189         various kinds of expression.
7190         * c-tree.h (struct c_expr): Add field "src_range".
7191         (c_expr::get_start): New method.
7192         (c_expr::get_finish): New method.
7193         (set_c_expr_source_range): New decls.
7194         * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
7195         on ret for prefix unary ops.
7196         (parser_build_binary_op): Likewise, running from the start of
7197         arg1.value through to the end of arg2.value.
7199 2015-11-13  Marek Polacek  <polacek@redhat.com>
7201         PR c/68320
7202         * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
7204 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
7206         * c-typeck.c: Include spellcheck.h.
7207         (lookup_field_fuzzy_find_candidates): New function.
7208         (lookup_field_fuzzy): New function.
7209         (build_component_ref): If the field was not found, try using
7210         lookup_field_fuzzy and potentially offer a suggestion.
7212 2015-11-12  James Norris  <jnorris@codesourcery.com>
7213             Joseph Myers  <joseph@codesourcery.com>
7215         * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
7216         (c_parser_omp_clause_name): Handle 'device_resident' clause.
7217         (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7218         and PRAGMA_OMP_CLAUSE_LINK.
7219         (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7220         and PRAGMA_OACC_CLAUSE_LINK.
7221         (OACC_DECLARE_CLAUSE_MASK): New definition.
7222         (c_parser_oacc_declare): New function.
7224 2015-11-12  Marek Polacek  <polacek@redhat.com>
7226         PR c/67784
7227         * c-parser.c (c_parser_for_statement): Reclassify the token in
7228         a correct scope.
7230 2015-11-11  Marek Polacek  <polacek@redhat.com>
7232         PR c/68107
7233         PR c++/68266
7234         * c-decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
7235         checking the size of an array.
7237 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
7239         * c-array-notation.c: Remove unused header files.
7240         * c-aux-info.c: Likewise.
7241         * c-convert.c: Likewise.
7242         * c-decl.c: Likewise.
7243         * c-errors.c: Likewise.
7244         * c-lang.c: Likewise.
7245         * c-objc-common.c: Likewise.
7246         * c-parser.c: Likewise.
7247         * c-typeck.c: Likewise.
7248         * gccspec.c: Likewise.
7250 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
7251             Cesar Philippidis  <cesar@codesourcery.com>
7252             James Norris  <jnorris@codesourcery.com>
7253             Julian Brown  <julian@codesourcery.com>
7254             Nathan Sidwell  <nathan@codesourcery.com>
7256         * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
7257         routine arg.
7258         (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
7259         (c_parser_pragma): Parse 'acc routine'.
7260         (OACC_ROUTINE_CLAUSE_MARK): Define.
7261         (c_parser_oacc_routine, (c_finish_oacc_routine): New.
7263 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7265         PR debug/67192
7266         * c-typeck.c (c_finish_loop): For unconditional loops, set the
7267         location of the backward-goto to the start of the loop body.
7269 2015-11-09  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7271         PR debug/67192
7272         * c-parser.c (c_parser_while_statement): Finish the loop before
7273         parsing ahead for misleading indentation.
7274         (c_parser_for_statement): Likewise.
7276 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
7278         * c-decl.c (finish_struct): If the structure has reverse storage
7279         order, rewrite the type of array fields with scalar component.  Call
7280         maybe_apply_pragma_scalar_storage_order on entry.
7281         * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs.  Issue
7282         errors on bit-fields and reverse SSO here and not...
7283         (c_mark_addressable): ...here.
7284         (output_init_element): Adjust call to initializer_constant_valid_p.
7285         (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
7287 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
7289         * c-decl.c (warn_defaults_to): Update for change in signature
7290         of diagnostic_set_info.
7291         * c-errors.c (pedwarn_c99): Likewise.
7292         (pedwarn_c90): Likewise.
7293         * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
7294         for textinfo::set_location.
7296 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
7297             Thomas Schwinge  <thomas@codesourcery.com>
7298             James Norris  <jnorris@codesourcery.com>
7300         * c-parser.c (c_parser_omp_clause_name): Add support for
7301         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
7302         (c_parser_omp_clause_default): Add is_oacc argument. Handle
7303         default(none) in OpenACC.
7304         (c_parser_oacc_shape_clause): Allow pointer variables as gang static
7305         arguments.
7306         (c_parser_oacc_clause_tile): New function.
7307         (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
7308         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
7309         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
7310         TILE}.
7311         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
7312         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
7313         FIRSTPRIVATE}.
7314         (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
7315         (c_parser_oacc_update): Update the error message for missing clauses.
7316         * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
7317         and OMP_CLAUSE_INDEPENDENT.
7319 2015-11-05  Marek Polacek  <polacek@redhat.com>
7321         PR c/68090
7322         * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
7323         deal with pre-evaluation on invalid types.
7325 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
7326             Ilya Verbin  <ilya.verbin@intel.com>
7328         * c-parser.c: Include context.h and gimple-expr.h.
7329         (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
7330         monotonic together with nonmonotonic.
7331         (c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
7332         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
7333         (c_parser_omp_target_data, c_parser_omp_target_enter_data,
7334         c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
7335         (c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
7336         expressions on combined target teams before the target.
7337         (c_parser_omp_declare_target): If decl has "omp declare target" or
7338         "omp declare target link" attribute, and cgraph or varpool node already
7339         exists, then set corresponding flags.  Call c_finish_omp_clauses
7340         in the parenthesized extended-list syntax case.
7341         * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
7342         declare target.
7343         * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
7344         on OMP_CLAUSE_REDUCTION array sections.
7345         (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
7346         into the constant offset, or for variable low-bound using
7347         POINTER_PLUS_EXPR.  For structure element based array sections use
7348         GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
7349         (c_finish_omp_clauses): Drop generic_field_head, structure
7350         elements are now always mapped even as array section bases,
7351         diagnose same var in data sharing and mapping clauses.  Diagnose if
7352         linear step on declare simd is neither a constant nor a uniform
7353         parameter.  Look through POINTER_PLUS_EXPR for array section
7354         reductions.  Diagnose the same var or function appearing multiple
7355         times on the same directive.  Fix up wording for the to clause if t
7356         is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
7357         modifier on kinds other than dynamic or guided or nonmonotonic
7358         modifier together with ordered clause.
7360 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
7361             Chung-Lin Tang  <cltang@codesourcery.com>
7363         * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
7365 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
7367         * c-array-notation.c: Reorder #include's and remove duplicates.
7368         * c-aux-info.c: Likewise.
7369         * c-convert.c: Likewise.
7370         * c-decl.c: Likewise.
7371         * c-errors.c: Likewise.
7372         * c-lang.c: Likewise.
7373         * c-objc-common.c: Likewise.
7374         * c-parser.c: Likewise.
7375         * c-typeck.c: Likewise.
7377 2015-10-26  Jim Wilson  <jim.wilson@linaro.org>
7379         PR debug/66068
7380         * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
7381         after calling build_qualified_type.
7383 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
7384             Thomas Schwinge  <thomas@codesourcery.com>
7385             James Norris  <jnorris@codesourcery.com>
7386             Joseph Myers  <joseph@codesourcery.com>
7387             Julian Brown  <julian@codesourcery.com>
7388             Bernd Schmidt  <bschmidt@redhat.com>
7390         * c-parser.c (c_parser_oacc_shape_clause): New.
7391         (c_parser_oacc_simple_clause): New.
7392         (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
7393         (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
7395 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
7396             James Norris  <jnorris@codesourcery.com>
7397             Cesar Philippidis  <cesar@codesourcery.com>
7399         PR c/64765
7400         PR c/64880
7401         * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
7402         parameters, and handle these.  Adjust all users.
7403         (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
7404         into...
7405         (c_parser_oacc_kernels_parallel): ... this new function.  Adjust
7406         all users.
7407         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
7408         declare functions.
7409         (c_finish_omp_construct): Declare function.
7410         * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
7411         Merge functions into...
7412         (c_finish_omp_construct): ... this new function.
7414 2015-10-22  Richard Biener  <rguenther@suse.de>
7416         * c-typeck.c (c_finish_omp_clauses): Properly convert operands
7417         before folding a MINUS_EXPR.
7419 2015-10-21  Marek Polacek  <polacek@redhat.com>
7421         PR c/68024
7422         * c-decl.c (start_function): Warn about vararg functions without
7423         a prototype.
7425 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
7427         * c-typeck.c (build_conditional_expr): Use boolean vector
7428         type for vector comparison.
7429         (build_vec_cmp): New.
7430         (build_binary_op): Use build_vec_cmp for comparison.
7432 2015-10-20  Marek Polacek  <polacek@redhat.com>
7434         * c-parser.c (is_cilkplus_vector_p): Don't define here.
7436 2015-10-20  Marek Polacek  <polacek@redhat.com>
7438         PR c/67964
7439         * c-parser.c (c_parser_attributes): Break out of the loop if the
7440         token after an attribute isn't a comma.
7442 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
7443             Aldy Hernandez  <aldyh@redhat.com>
7445         * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
7446         (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
7447         (c_parser_omp_variable_list): Handle structure elements for
7448         map, to and from clauses.  Handle array sections in reduction
7449         clause.  Formatting fixes.
7450         (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
7451         if clause modifiers.
7452         (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
7453         c_parser_omp_clause_priority, c_parser_omp_clause_hint,
7454         c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
7455         c_parser_omp_clause_is_device_ptr): New functions.
7456         (c_parser_omp_clause_ordered): Parse optional parameter.
7457         (c_parser_omp_clause_reduction): Handle array reductions.
7458         (c_parser_omp_clause_schedule): Parse optional simd modifier.
7459         (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
7460         functions.
7461         (c_parser_omp_clause_linear): Parse linear clause modifiers.
7462         (c_parser_omp_clause_depend_sink): New function.
7463         (c_parser_omp_clause_depend): Parse source/sink depend kinds.
7464         (c_parser_omp_clause_map): Parse release/delete map kinds and
7465         optional always modifier.
7466         (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
7467         and c_finish_omp_clauses callers.
7468         (c_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
7469         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
7470         (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
7471         (OMP_CRITICAL_CLAUSE_MASK): Define.
7472         (c_parser_omp_critical): Parse critical clauses.
7473         (c_parser_omp_for_loop): Handle doacross loops, adjust
7474         c_finish_omp_for and c_finish_omp_clauses callers.
7475         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
7476         (c_parser_omp_simd): Allow ordered clause if it has no parameter.
7477         (OMP_FOR_CLAUSE_MASK): Add linear clause.
7478         (c_parser_omp_for): Disallow ordered clause when combined with
7479         distribute.  Disallow linear clause when combined with distribute
7480         and not combined with simd.
7481         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
7482         (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
7483         parse clauses and if depend clause is found, don't parse a body.
7484         (c_parser_omp_parallel): Disallow copyin clause on target parallel.
7485         Allow target parallel without for after it.
7486         (OMP_TASK_CLAUSE_MASK): Add priority clause.
7487         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
7488         (c_parser_omp_target_data): Diagnose no map clauses or clauses with
7489         invalid kinds.
7490         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
7491         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
7492         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
7493         (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
7494         functions.
7495         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
7496         defaultmap and is_device_ptr clauses.
7497         (c_parser_omp_target): Parse target parallel and target simd.  Set
7498         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
7499         and target exit data.  Diagnose invalid map kinds.
7500         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
7501         (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
7502         construct.
7503         (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
7504         &omp_priv.
7505         (OMP_TASKLOOP_CLAUSE_MASK): Define.
7506         (c_parser_omp_taskloop): New function.
7507         (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
7508         handle PRAGMA_OMP_TASKLOOP.
7509         (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
7510         * c-tree.h (c_finish_omp_clauses): Add two new arguments.
7511         * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
7512         Add IS_OMP argument, handle structure element bases, diagnose
7513         bitfields, pass IS_OMP recursively, diagnose known zero length
7514         array sections in depend clauses, handle array sections in reduction
7515         clause, diagnose negative length even for pointers.
7516         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
7517         types, pass IS_OMP down to handle_omp_array_sections_1, handle
7518         array sections in reduction clause, set
7519         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
7520         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
7521         (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
7522         Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
7524 2015-10-06  Marek Polacek  <polacek@redhat.com>
7526         * c-parser.c (c_parser_statement_after_labels): Use
7527         protected_set_expr_location.
7528         (c_parser_omp_clause_num_gangs): Likewise.
7529         (c_parser_omp_clause_num_threads): Likewise.
7530         (c_parser_omp_clause_num_workers): Likewise.
7531         (c_parser_omp_clause_vector_length): Likewise.
7532         (c_parser_omp_clause_num_teams): Likewise.
7533         (c_parser_omp_clause_thread_limit): Likewise.
7534         * c-typeck.c (build_c_cast): Likewise.
7535         (c_cast_expr): Likewise.
7537 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
7539         * c-typeck.c (c_tree_equal): Use real_equal instead of
7540         REAL_VALUES_EQUAL.
7542 2015-10-04  Jason Merrill  <jason@redhat.com>
7544         * c-parser.c (c_lex_one_token): Handle @synchronized.
7545         * c-decl.c (match_builtin_function_types): A declaration of a built-in
7546         can change whether the function is transaction_safe.
7548 2015-10-02  Marek Polacek  <polacek@redhat.com>
7550         PR c/67730
7551         * c-typeck.c (convert_for_assignment): Use the expansion point
7552         location throughout.
7554 2015-10-02  Marek Polacek  <polacek@redhat.com>
7556         PR c/64249
7557         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
7558         and pass it down to c_parser_if_statement.
7559         (c_parser_else_body): Add CHAIN parameter and pass it down to
7560         c_parser_statement_after_labels.
7561         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
7562         duplicated if-else-if conditions.
7564 2015-10-01  Marek Polacek  <polacek@redhat.com>
7566         * c-typeck.c (convert_for_assignment): Improve commentary.
7568 2015-09-30  Marek Polacek  <polacek@redhat.com>
7570         PR c/67730
7571         * c-typeck.c (c_finish_return): Use the expansion point location for
7572         certain "return with value" warnings.
7574 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7576         * c-parser.c (pragma_lex): Add loc argument.
7578 2015-09-15  Marek Polacek  <polacek@redhat.com>
7580         PR c/67580
7581         * c-decl.c (tag_exists_p): New function.
7582         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
7583         struct/union/enum keywords are missing.
7584         * c-tree.h (tag_exists_p): Declare.
7586 2015-09-15  Marek Polacek  <polacek@redhat.com>
7588         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
7589         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
7590         Return NULL_TREE instead of 0.
7591         (lookup_name): Return NULL_TREE instead of 0.
7592         (lookup_name_in_scope): Likewise.
7593         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
7594         (parser_xref_tag): Use false instead of 0.
7595         (start_struct): Use true instead of 1.
7596         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
7598 2015-09-14  Marek Polacek  <polacek@redhat.com>
7600         * c-typeck.c (set_nonincremental_init_from_string): Use
7601         HOST_WIDE_INT_M1U when shifting a negative value.
7603 2015-09-09  Mark Wielaard  <mjw@redhat.com>
7605         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
7606         parm against NULL.
7608 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
7610         PR c/67502
7611         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
7612         into OMP_FOR_PRE_BODY rather than before the loop.
7614 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
7616         PR c/67501
7617         * c-parser.c (c_parser_oacc_all_clauses,
7618         c_parser_omp_all_clauses): Remove invalid clause from
7619         list of clauses even if parser->error is set.
7621         PR c/67500
7622         * c-parser.c (c_parser_omp_clause_aligned,
7623         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
7624         test for errors.
7625         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
7626         error_mark_node.
7628         PR c/67495
7629         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
7630         instead of c_parser_unary_expression.  If the result is !lvalue_p,
7631         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
7633 2015-09-04  Marek Polacek  <polacek@redhat.com>
7635         PR sanitizer/67279
7636         * c-typeck.c (build_binary_op): Don't instrument static initializers.
7638 2015-09-03  Martin Sebor  <msebor@redhat.com>
7640         PR c/66516
7641         * c-typeck.c (convert_arguments, parser_build_unary_op,
7642         build_conditional_expr, c_cast_expr, convert_for_assignment,
7643         build_binary_op, _objc_common_truthvalue_conversion): Call
7644         reject_gcc_builtin.
7645         (c_decl_implicit): Define.
7647 2015-09-02  Marek Polacek  <polacek@redhat.com>
7649         PR c/67432
7650         * c-parser.c (c_parser_enum_specifier): Give a better error for
7651         an empty enum.
7653 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
7655         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
7657 2015-08-12  Marek Polacek  <polacek@redhat.com>
7659         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
7660         LOC to it.
7662 2015-08-03  Marek Polacek  <polacek@redhat.com>
7664         PR c/67088
7665         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
7666         Use it.
7667         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
7669 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
7671         * c-parser.c (c_parser_if_body): Take token_indent_info
7672         argument. Call warn_for_misleading_indentation even when the
7673         body is a semicolon.  Extract token_indent_infos corresponding
7674         to the guard, body and next tokens.  Adjust call to
7675         warn_for_misleading_indentation accordingly.
7676         (c_parser_else_body): Likewise.
7677         (c_parser_if_statement): Likewise.
7678         (c_parser_while_statement): Likewise.
7679         (c_parser_for_statement): Likewise.
7681 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
7682             Manuel López-Ibáñez  <manu@gcc.gnu.org>
7684         * c-decl.c (get_parm_info): Remove static var. Update warning
7685         message.
7687 2015-07-27  Marek Polacek  <polacek@redhat.com>
7689         PR c++/66555
7690         PR c/54979
7691         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
7693 2015-07-20  Marek Polacek  <polacek@redhat.com>
7695         PR c++/55095
7696         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
7697         (build_binary_op): Warn about left shift overflows.
7699 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
7701         * c-array-notation.c: Adjust includes for flags.h changes.
7702         * c-objc-common.c: Likewise.
7704 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
7706         * c-array-notation.c: Adjust includes.
7707         * c-aux-info.c: Likewise.
7708         * c-convert.c: Likewise.
7709         * c-decl.c: Likewise.
7710         * c-errors.c: Likewise.
7711         * c-lang.c: Likewise.
7712         * c-objc-common.c: Likewise.
7713         * c-parser.c: Likewise.
7714         * c-typeck.c: Likewise.
7716 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7718         PR fortran/66605
7719         * c-decl.c (finish_function): Call do_warn_unused_parameter.
7721 2015-06-29  Marek Polacek  <polacek@redhat.com>
7723         PR c/66322
7724         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
7725         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
7726         about -Wswitch-bool here.
7727         (do_case): Update c_add_case_label call.
7728         (c_finish_case): Update c_do_switch_warnings call.
7730 2015-06-27  Marek Polacek  <polacek@redhat.com>
7732         * c-typeck.c: Use VECTOR_TYPE_P throughout.
7734 2015-06-26  Marek Polacek  <polacek@redhat.com>
7736         * c-array-notation.c (fix_builtin_array_notation_fn): Use
7737         INDIRECT_REF_P.
7738         * c-typeck.c (array_to_pointer_conversion): Likewise.
7739         (build_unary_op): Likewise.
7740         (c_finish_return): Likewise.
7742 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
7744         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
7745         * c-parser.c: Likewise.
7747 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
7749         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
7750         instead of pointer_hash.
7751         (detect_field_duplicates): Likewise.
7753 2015-06-25  Marek Polacek  <polacek@redhat.com>
7755         * c-array-notation.c: Use VAR_P throughout.
7756         * c-decl.c: Likewise.
7757         * c-objc-common.c: Likewise.
7758         * c-parser.c: Likewise.
7759         * c-typeck.c: Likewise.
7761 2015-06-25  Marek Polacek  <polacek@redhat.com>
7763         * c-decl.c: Use is_global_var throughout.
7764         * c-parser.c: Likewise.
7765         * c-typeck.c: Likewise.
7767 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
7769         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
7770         * c-aux-info.c: Likewise.
7771         * c-convert.c: Likewise.
7772         * c-decl.c: Likewise.
7773         * c-errors.c: Likewise.
7774         * c-lang.c: Likewise.
7775         * c-objc-common.c: Likewise.
7776         * c-parser.c: Likewise.
7777         * c-typeck.c: Likewise.
7779 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
7781         PR middle-end/66325
7782         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
7783         variants.
7785 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
7787         * c-decl.c (pop_scope): Register the main translation unit
7788         through the new debug hook.
7790 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
7792         * c-array-notation.c : Adjust include files.
7793         * c-aux-info.c : Likewise.
7794         * c-convert.c : Likewise.
7795         * c-decl.c : Likewise.
7796         * c-errors.c : Likewise.
7797         * c-lang.c : Likewise.
7798         * c-lang.h : Likewise.
7799         * c-objc-common.c : Likewise.
7800         * c-parser.c : Likewise.
7801         * c-typeck.c : Likewise.
7803 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
7805         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7806         immediately clobber it.
7807         (c_write_global_declarations_1): Remove call to
7808         check_global_declaration_1.
7809         (c_write_global_declarations_2): Remove.
7810         (c_write_final_cleanups): Rename from c_write_global_declarations.
7811         Remove call to finalize_compilation_unit.
7812         Remove calls to debugging hooks.
7813         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7814         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7815         * c-tree.h: Remove c_write_global_declarations.
7817 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
7819         * c-array-notation.c: Adjust includes for restructured coretypes.h.
7820         * c-aux-info.c: Likewise.
7821         * c-convert.c: Likewise.
7822         * c-decl.c: Likewise.
7823         * c-errors.c: Likewise.
7824         * c-lang.c: Likewise.
7825         * c-objc-common.c: Likewise.
7826         * c-parser.c: Likewise.
7827         * c-typeck.c: Likewise.
7829 2015-06-04  Marek Polacek  <polacek@redhat.com>
7831         PR c/66341
7832         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7833         it is a lvalue.
7835 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7837         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7838         Warn for empty struct.
7839         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7841 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
7843         * c-decl.c (start_function): Call plugin before parsing.
7844         (finish_function): Call plugin after parsing.
7846 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7848         PR c/49551
7849         * c-decl.c (merge_decls): Merge DECL_COMMON.
7851 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
7853         * Make-lang.in (check_gcc_pallelize): Define.
7855 2015-05-22  Marek Polacek  <polacek@redhat.com>
7857         PR c/47043
7858         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7859         attributes.
7861 2015-05-21  Marek Polacek  <polacek@redhat.com>
7863         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7864         DECL_BUILT_IN.
7866 2015-05-20  Marek Polacek  <polacek@redhat.com>
7868         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7869         * c-typeck.c: Likewise.
7871 2015-05-19  Marek Polacek  <polacek@redhat.com>
7873         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7875 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
7877         PR middle-end/66199
7878         * c-parser.c (c_parser_omp_for_loop): Don't add
7879         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7880         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7881         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7882         constructs.
7884 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
7886         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
7887         swaps.
7889 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7891         PR fortran/44054
7892         * c-objc-common.c (c_tree_printer): Replace locus pointer with
7893         accessor function.
7895 2015-05-14  Marek Polacek  <polacek@redhat.com>
7897         PR c/66066
7898         PR c/66127
7899         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7900         rather than with 0.
7902 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
7904         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7905         to add a call to warn_for_misleading_indentation.
7906         (c_parser_else_body): Likewise, adding param "else_loc".
7907         (c_parser_if_statement): Check for misleading indentation.
7908         (c_parser_while_statement): Likewise.
7909         (c_parser_for_statement): Likewise.
7911 2015-05-08  Marek Polacek  <polacek@redhat.com>
7913         PR c/64918
7914         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7915         (output_init_element): Likewise.
7917 2015-05-07  Marek Polacek  <polacek@redhat.com>
7919         PR c/65179
7920         * c-typeck.c (build_binary_op): Warn when left shifting a negative
7921         value.
7923 2015-04-30  Marek Polacek  <polacek@redhat.com>
7925         * c-typeck.c (set_init_label): Call error_at instead of error and
7926         pass LOC to it.
7928         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
7929         the type of a decl.
7931         * c-typeck.c (c_build_va_arg): Clarify the error message.
7933 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
7935         * c-parser.c (c_parser_oacc_enter_exit_data): Use
7936         OMP_STANDALONE_CLAUSES.
7938 2015-04-28  Marek Polacek  <polacek@redhat.com>
7940         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7942 2015-04-28  Marek Polacek  <polacek@redhat.com>
7944         PR c/65901
7945         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7947 2015-04-25  Marek Polacek  <polacek@redhat.com>
7949         PR c/52085
7950         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
7951         attribute.
7953 2015-04-23  Marek Polacek  <polacek@redhat.com>
7955         PR c/65345
7956         * c-decl.c (set_labels_context_r): New function.
7957         (store_parm_decls): Call it via walk_tree_without_duplicates.
7958         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7959         instead of create_tmp_var.  Build TARGET_EXPR instead of
7960         COMPOUND_EXPR.
7961         (build_atomic_assign): Use create_tmp_var_raw instead of
7962         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
7964 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
7966         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7967         (c_parser_omp_target_update): Add missed %> to error_at ().
7969 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
7971         PR target/55143
7972         * c-decl.c (c_default_pointer_mode): Remove definition.
7973         * c-tree.h (c_default_pointer_mode): Remove declaration.
7975 2015-03-27  Tobias Burnus  <burnus@net-b.de>
7977         PR c/65586
7978         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7979         error out.
7980         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7981         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7982         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7984 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
7986         * c-decl.c (c_decl_attributes): Also add "omp declare target"
7987         attribute for DECL_EXTERNAL VAR_DECLs.
7989 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
7991         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7992         argument.
7994 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
7996         PR c/65120
7997         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7998         before preparing arguments to warn_logical_not_parentheses.
8000 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
8002         PR c/65120
8003         * c-typeck.c (parser_build_binary_op): Don't warn for
8004         !!x == y or !b == y where b is _Bool.
8006 2015-03-09  Marek Polacek  <polacek@redhat.com>
8008         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
8009         * c-decl.c (grokdeclarator): Likewise.
8010         * c-typeck.c (build_binary_op): Likewise.
8012 2015-02-27  Marek Polacek  <polacek@redhat.com>
8014         PR c/65228
8015         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
8017 2015-02-14  Marek Polacek  <polacek@redhat.com>
8019         PR c/64768
8020         * c-decl.c (grokdeclarator): Set the range of a flexible array member
8021         declared through a typedef name.
8023 2015-02-13  Marek Polacek  <polacek@redhat.com>
8025         PR c/65050
8026         * c-decl.c (grokdeclarator): Print also the type when giving
8027         the error message about array's incomplete element type.
8029 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
8031         PR c/64824
8032         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
8033         check in the POP macro.
8035 2015-02-09  Marek Polacek  <polacek@redhat.com>
8037         PR c/64856
8038         * c-typeck.c (process_init_element): Don't always wrap
8039         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
8040         initializing a range of elements.
8042 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
8044         PR c/64824
8045         PR c/64868
8046         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
8048 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
8050         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
8051         processing enum declaration.
8053 2015-01-29  Marek Polacek  <polacek@redhat.com>
8055         PR c/64709
8056         * c-typeck.c (pop_init_level): If constructor_elements has
8057         exactly one element with integer_zerop value, set constructor_zeroinit
8058         to 1.  Remove braces around warning_init call.
8060 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
8062         PR c/64766
8063         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
8064         of FUNCTION_DECLs with error_mark_node.
8066 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
8068         PR c/64778
8069         * c-typeck.c (convert_arguments): Return -1 if there are
8070         error_args, even if we've diagnosed too many arguments.
8072 2015-01-21  Richard Biener  <rguenther@suse.de>
8074         PR middle-end/64313
8075         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
8076         for builtins the user declared correctly.
8078 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
8079             Bernd Schmidt  <bernds@codesourcery.com>
8080             Cesar Philippidis  <cesar@codesourcery.com>
8081             James Norris  <jnorris@codesourcery.com>
8082             Jakub Jelinek  <jakub@redhat.com>
8083             Ilmir Usmanov  <i.usmanov@samsung.com>
8085         * c-parser.c: Include "gomp-constants.h".
8086         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
8087         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
8088         Use OMP_CLAUSE_SET_MAP_KIND.
8089         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
8090         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
8091         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
8092         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
8093         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
8094         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
8095         "copyout", "create", "delete", "deviceptr", "gang", "host",
8096         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
8097         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
8098         "present_or_create", "pcreate", "seq", "self", "vector",
8099         "vector_length", "wait", "worker".
8100         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
8101         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
8102         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
8103         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
8104         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
8105         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
8106         (c_parser_oacc_data_clause_deviceptr)
8107         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
8108         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
8109         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
8110         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
8111         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
8112         (c_parser_oacc_parallel, c_parser_oacc_update)
8113         (c_parser_oacc_wait): New functions.
8114         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
8115         (c_finish_oacc_data): New prototypes.
8116         * c-typeck.c: Include "gomp-constants.h".
8117         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
8118         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
8119         OMP_CLAUSE_SET_MAP_KIND.
8120         (c_finish_oacc_parallel, c_finish_oacc_kernels)
8121         (c_finish_oacc_data): New functions.
8122         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
8123         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
8124         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
8125         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
8126         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
8127         GOMP_MAP_FORCE_DEVICEPTR.
8129 2015-01-09  Michael Collison  <michael.collison@linaro.org>
8131         * c-array-notation.c: Include hash-set.h, machmode.h,
8132         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8133         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8134         * c-aux-info.c: Ditto.
8135         * c-convert.c: Ditto.
8136         * c-decl.c: Ditto.
8137         * c-errors.c: Ditto.
8138         * c-lang.c: Dittoxs.
8139         * c-objc-common.c: Ditto.
8140         * c-parser.c: Ditto.
8141         * c-typeck.c: Include hash-set.h, machmode.h,
8142         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8143         fold-const.h, wide-int.h, inchash.h, real.h and
8144         fixed-value.h due to flattening of tree.h.
8146 2015-01-07  Marek Polacek  <polacek@redhat.com>
8148         PR c/64417
8149         * c-typeck.c (process_init_element): Disallow initialization of
8150         a flexible array member with a string constant if the structure
8151         is in an array.
8153 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
8155         PR sanitizer/64344
8156         * c-typeck.c (convert_for_assignment, c_finish_return): For
8157         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
8158         types also set in_late_binary_op around convert call.
8159         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
8160         to integral type casts, if not in_late_binary_op, pass c_fully_fold
8161         result on expr as last argument to ubsan_instrument_float_cast,
8162         if in_late_binary_op, don't use c_save_expr but save_expr.
8164         Update copyright years.
8166 2015-01-05  Marek Polacek  <polacek@redhat.com>
8168         PR c/64423
8169         * c-typeck.c (build_array_ref): Pass loc down to
8170         warn_array_subscript_with_type_char.
8172 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
8174         * c-typeck.c: New behavious for pointers to arrays with qualifiers
8175         (common-pointer-type): For pointers to arrays take qualifiers from
8176         element type.
8177         (build_conditional_expr): Add warnings for lost qualifiers.
8178         (comp-target-types): Allow pointers to arrays with different qualifiers.
8179         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
8180         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8181         to PEDWARN_FOR_QUALIFIERS.
8183 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
8185         PR sanitizer/64289
8186         * c-convert.c: Include ubsan.h.
8187         (convert): For real -> integral casts and
8188         -fsanitize=float-cast-overflow don't call convert_to_integer, but
8189         instead instrument the float cast directly.
8191 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
8193         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
8194         c_finish_stmt_expr): Remove NULL last argument from
8195         create_tmp_var_raw and create_tmp_var calls.
8196         * c-array-notation.c (fix_builtin_array_notation_fn,
8197         build_array_notation_expr, fix_conditional_array_notations_1,
8198         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
8200 2014-11-28  Marek Polacek  <polacek@redhat.com>
8202         PR c/63862
8203         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
8204         convert the right operand to integer type.
8206 2014-11-25  Marek Polacek  <polacek@redhat.com>
8208         PR c/63877
8209         * c-decl.c (start_function): Disable -Wmissing-declarations warning
8210         for inline functions.
8212 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
8214         PR target/63764
8215         * c-typeck.c (build_array_ref): Adjust
8216         convert_vector_to_pointer_for_subscript caller.  If it returns true,
8217         call non_lvalue_loc on the result.
8219 2014-11-11  Richard Biener  <rguenther@suse.de>
8221         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
8222         to true.
8224 2014-11-10  Andi Kleen  <ak@linux.intel.com>
8226         PR c/60804
8227         * c-parser.c (c_parser_statement_after_labels): Call
8228         check_no_cilk.
8229         (c_parser_if_statement): Dito.
8230         (c_parser_switch_statement): Dito.
8231         (c_parser_while_statement): Dito.
8232         (c_parser_do_statement): Dito.
8233         (c_parser_for_statement): Dito.
8234         * c-typeck.c (c_finish_loop): Dito.
8236 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
8238         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
8239         OPT_Wshift_count_overflow in the warnings.
8241 2014-10-30  Marek Polacek  <polacek@redhat.com>
8243         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
8244         print the stripped version as well, if they're not the same.
8246 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
8248         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
8249         machine_mode.
8251 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
8253         * c-decl.c: Adjust include files.
8254         * c-parser.c: Ditto.
8256 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
8257             Tom Tromey  <tromey@redhat.com>
8259         * c-tree.h (enum c_oracle_request): New.
8260         (c_binding_oracle_function): New typedef.
8261         (c_binding_oracle, c_pushtag, c_bind): Declare.
8262         * c-decl.c (c_binding_oracle): New global.
8263         (I_SYMBOL_CHECKED): New macro.
8264         (i_symbol_binding): New function.
8265         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
8266         (I_TAG_CHECKED): New macro.
8267         (i_tag_binding): New function.
8268         (I_TAG_BINDING, I_TAG_DECL): Redefine.
8269         (I_LABEL_CHECKED): New macro.
8270         (i_label_binding): New function.
8271         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
8272         (c_print_identifier): Save and restore c_binding_oracle.
8273         (c_pushtag, c_bind): New functions.
8275 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
8277         * c-typeck.c: Adjust include files.
8279 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8281         PR c++/53061
8282         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
8283         initialization here...
8284         (c_initialize_diagnostics): ... but here. Set defaults after
8285         building pretty-printer.
8287 2014-10-23  Marek Polacek  <polacek@redhat.com>
8289         PR c/63626
8290         * c-decl.c (pop_scope): Don't print warning in external_scope.
8292 2014-10-19  Marek Polacek  <polacek@redhat.com>
8294         PR c/63567
8295         * c-typeck.c (output_init_element): Allow initializing objects with
8296         static storage duration with compound literals even in C99 and add
8297         pedwarn for it.
8299 2014-10-17  Marek Polacek  <polacek@redhat.com>
8301         PR c/63567
8302         * c-typeck.c (digest_init): Allow initializing objects with static
8303         storage duration with compound literals even in C99 and add pedwarn
8304         for it.
8306 2014-10-17  Marek Polacek  <polacek@redhat.com>
8308         PR c/63543
8309         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
8310         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
8311         error multiple times.  Print the type.
8313 2014-10-17  Marek Polacek  <polacek@redhat.com>
8315         PR c/63549
8316         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
8317         type.
8319 2014-10-17  Marek Polacek  <polacek@redhat.com>
8321         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
8322         (start_function): Use OPT_Wimplicit_int instead of 0.
8323         (store_parm_decls_oldstyle): Likewise.
8325 2014-10-17  Alan Modra  <amodra@gmail.com>
8327         PR middle-end/61848
8328         * c-decl.c (merge_decls): Don't merge section name or tls model
8329         to newdecl symtab node, instead merge to olddecl.  Override
8330         existing olddecl section name.  Set tls_model for all thread-local
8331         vars, not just OMP thread-private ones.  Remove incorrect comment.
8333 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
8335         * c-decl.c: Adjust include files.
8337 2014-10-14  DJ Delorie  <dj@redhat.com>
8339         * c-parser.c (c_parse_init): Add RID entries for each __intN.
8340         (c_token_starts_typename): Check all __intN, not just __int128.
8341         (c_token_starts_declspecs): Likewise.
8342         (c_parser_declspecs): Likewise.
8343         (c_parser_attribute_any_word): Likewise.
8344         (c_parser_objc_selector): Likewise.
8345         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
8346         (struct c_declspecs): Add int_n_idx field to record *which* __intN
8347         is specified.
8348         * c-decl.c (declspecs_add_type): Check for all __intN, not just
8349         __int128.
8350         (finish_declspecs): Likewise.
8352 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
8354         * c-parser.c (c_parser_all_labels): New function to replace
8355         the duplicate code.
8356         (c_parser_statement): Call the new function.
8358 2014-10-09  Marek Polacek  <polacek@redhat.com>
8360         PR c/63480
8361         * c-typeck.c (pop_init_level): Don't warn about initializing
8362         with { }.
8364 2014-10-07  Marek Polacek  <polacek@redhat.com>
8366         PR c/59717
8367         * c-decl.c (header_for_builtin_fn): New function.
8368         (implicitly_declare): Suggest which header to include.
8370 2014-10-07  Marek Polacek  <polacek@redhat.com>
8372         * c-convert.c (convert): Use error_operand_p.
8373         * c-typeck.c (require_complete_type): Likewise.
8374         (really_atomic_lvalue): Likewise.
8375         (digest_init): Likewise.
8376         (handle_omp_array_sections_1): Likewise.
8378 2014-10-03  Marek Polacek  <polacek@redhat.com>
8380         PR c/63453
8381         * c-decl.c (pop_scope): Don't warn about "inline function declared
8382         but never defined" for functions marked with gnu_inline attribute.
8384 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
8386         PR c++/63249
8387         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
8388         on low_bound and length.
8390 2014-09-24  Marek Polacek  <polacek@redhat.com>
8392         PR c/61405
8393         PR c/53874
8394         * c-parser.c: Don't define CPP_KEYWORD.
8395         (c_parser_switch_statement): Pass original type to c_finish_case.
8396         * c-tree.h (c_finish_case): Update declaration.
8397         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
8398         conditionally to c_do_switch_warnings.
8400 2014-09-03  Marek Polacek  <polacek@redhat.com>
8402         PR c/62024
8403         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
8404         conversions.
8406 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
8407             Balaji V. Iyer  <balaji.v.iyer@intel.com>
8408             Igor Zamyatin  <igor.zamyatin@intel.com>
8410         * c-parser.c (c_parser_cilk_for): New function.
8411         (c_parser_cilk_grainsize): Likewise.
8412         (c_get_temp_regvar): Likewise.
8413         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
8414         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
8415         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
8416         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
8417         case.
8419 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
8421         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
8422         with using HOST_WIDE_INT without truncation to 'int'
8424 2014-08-22  Marek Polacek  <polacek@redhat.com>
8426         PR c++/62199
8427         * c-typeck.c (parser_build_binary_op): Adjust call to
8428         warn_logical_not_parentheses.
8430 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
8432         PR other/62008
8433         * c-parser.c (c_parser_array_notation): Check for correct
8434         type of an array added.
8436 2014-08-19  Marek Polacek  <polacek@redhat.com>
8438         PR c++/62153
8439         * c-typeck.c (build_binary_op): If either operand of a comparison
8440         is a boolean expression, call maybe_warn_bool_compare.
8442 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
8444         PR c/45584
8445         * c-typeck.c (build_c_cast): Do a conversion even when the
8446         TYPE_MAIN_VARIANTs are the same.
8448 2014-08-19  Marek Polacek  <polacek@redhat.com>
8450         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
8451         pedwarn_c99 instead of pedwarn.
8452         (grokfield): Likewise.
8453         (warn_defaults_to): New function.
8454         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
8455         Unconditionally call pedwarn_c99 instead of pedwarn.
8456         (start_function): Call warn_defaults_to instead of pedwarn_c99.
8457         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
8458         check flag_isoc11 before.
8459         * c-errors.c (pedwarn_c99): Change the return type to bool.
8460         Handle -Wc99-c11-compat.
8461         * c-parser.c (disable_extension_diagnostics): Handle
8462         warn_c99_c11_compat.
8463         (restore_extension_diagnostics): Likewise.
8464         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
8465         instead of pedwarn, don't check flag_isoc11 before.
8466         (c_parser_declspecs): Likewise.
8467         (c_parser_alignas_specifier): Likewise.
8468         (c_parser_alignof_expression): Likewise.
8469         (c_parser_generic_selection): Likewise.
8470         * c-tree.h (pedwarn_c99): Update declaration.
8471         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
8472         of pedwarn_c99.
8474 2014-08-19  Marek Polacek  <polacek@redhat.com>
8476         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
8477         to pedwarn_c90.
8478         * c-errors.c: Include "opts.h".
8479         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
8480         * c-parser.c (disable_extension_diagnostics): Handle negative value
8481         of warn_c90_c99_compat, too.
8482         (restore_extension_diagnostics): Likewise.
8483         (c_parser_compound_statement_nostart): Pass
8484         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
8486 2014-08-12  Marek Polacek  <polacek@redhat.com>
8488         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
8489         Add pedwarn.
8490         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
8491         Likewise.
8492         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
8494 2014-08-10  Marek Polacek  <polacek@redhat.com>
8496         PR c/51849
8497         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
8498         Call pedwarn_c90 instead of pedwarn.
8499         (check_bitfield_type_and_width): Likewise.
8500         (declspecs_add_qual): Likewise.
8501         (declspecs_add_type): Likewise.
8502         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
8503         Adjust to only call pedwarn_c90.
8504         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
8505         pedwarn_c90 instead of pedwarn.
8506         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
8507         * c-parser.c (disable_extension_diagnostics): Handle
8508         warn_c90_c99_compat.
8509         (restore_extension_diagnostics): Likewise.
8510         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
8511         pedwarn_c90 instead of pedwarn.
8512         (c_parser_initelt): Likewise.
8513         (c_parser_postfix_expression): Likewise.
8514         (c_parser_postfix_expression_after_paren_type): Likewise.
8515         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
8516         * c-tree.h: Fix formatting.
8517         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
8518         pedwarn_c90 instead of pedwarn.
8520 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
8522         * c-typeck.c: Remove include of pointer-set.h.
8524 2014-08-07  Marek Polacek  <polacek@redhat.com>
8526         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
8528 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
8530         * c-typeck.c: Use hash_map instead of pointer_map.
8532 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
8534         * c-decl.c: Use hash_set instead of pointer_set.
8536 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
8538         PR middle-end/61455
8539         * c-array-notation.c (expand_array_notations): Handling
8540         of DECL_EXPR added.
8542 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
8544         PR c++/60517
8545         * c-typeck.c (c_finish_return): Return 0 instead of the address of
8546         a local variable.
8548 2014-07-30  Tom Tromey  <tromey@redhat.com>
8550         * c-typeck.c (struct constructor_stack) <designator_depth>: New
8551         field.
8552         (really_start_incremental_init, push_init_level): Initialize
8553         designator_depth.
8554         (pop_init_level): Set global designator_depth.
8555         (process_init_element): Check for designated_init attribute.
8557 2014-07-20  Marek Polacek  <polacek@redhat.com>
8559         PR c/61852
8560         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
8561         (implicitly_declare): Pass location to implicit_decl_warning.
8563 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
8565         PR middle-end/61294
8566         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
8567         If non-NULL, call c_parser_check_literal_zero.
8568         (c_parser_check_literal_zero): New function.
8569         (c_parser_postfix_expression_after_primary): Adjust
8570         c_parser_expr_list caller, handle -Wmemset-transposed-args.
8572 2014-07-06  Marek Polacek  <polacek@redhat.com>
8574         PR c/6940
8575         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
8576         * c-tree.h (C_ARRAY_PARAMETER): Define.
8577         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
8578         function parameter.
8580 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
8581             Chen Gang  <gang.chen.5i5j@gmail.com>
8583         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
8584         releasing symbol.
8586 2014-07-01  Marek Polacek  <polacek@redhat.com>
8588         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
8589         instead of 0 to WARN_FOR_ASSIGNMENT.
8591 2014-07-01  Marek Polacek  <polacek@redhat.com>
8593         PR c/58286
8594         * c-typeck.c (convert_for_assignment): Pass
8595         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
8597 2014-06-30  Marek Polacek  <polacek@redhat.com>
8599         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
8600         has no_sanitize_undefined attribute.
8602 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
8604         PR middle-end/57541
8605         * c-array-notation.c (fix_builtin_array_notation_fn):
8606         Check for 0 arguments in builtin call. Check that bultin argument is
8607         correct.
8608         * c-parser.c (c_parser_array_notation): Check for incorrect initial
8609         index.
8611 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8613         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
8614         qualifiers in __auto_type for atomic types.
8615         (c_parser_typeof_specifier): Discard all type qualifiers in
8616         __typeof__ for atomic types.
8618 2014-06-25  Marek Polacek  <polacek@redhat.com>
8620         PR c/61162
8621         * c-parser.c (c_parser_statement_after_labels): Pass the location of
8622         the return expression to c_finish_return.
8624 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
8626         * c-typeck.c (c_finish_omp_clauses): Make sure
8627         OMP_CLAUSE_LINEAR_STEP has correct type.
8629 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
8631         * c-decl.c: Adjust.
8633 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
8635         * c-parser.c (c_parser_omp_for_loop): For
8636         #pragma omp parallel for simd move lastprivate clause from parallel
8637         to for rather than simd.
8639 2014-06-23  Marek Polacek  <polacek@redhat.com>
8641         * c-typeck.c (parser_build_binary_op): Don't call
8642         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
8644 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
8646         * c-parser.c (c_parser_omp_threadprivate): Likewise.
8647         * c-decl.c (merge_decls): Likewise.
8649 2014-06-09  Marek Polacek  <polacek@redhat.com>
8651         PR c/36446
8652         * c-typeck.c (error_init): Call inform instead of error_at.
8653         (pedwarn_init): Call inform instead of pedwarn.
8654         (warning_init): Call inform instead of warning_at.
8656 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
8658         * c-decl.c (merge_decls): Use set_decl_section_name.
8659         (duplicate_decls): Remove node if it exists.
8661 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
8663         PR c/53119
8664         * c-typeck.c (push_init_level, process_init_element,
8665         pop_init_level): Correct check for zero initialization, move
8666         missing brace warning to respect zero initialization.
8668 2014-06-05  Marek Polacek  <polacek@redhat.com>
8670         PR c/56724
8671         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
8673 2014-06-05  Marek Polacek  <polacek@redhat.com>
8675         PR c/49706
8676         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
8677         on the left hand side operand of a comparison.
8679 2014-06-05  Marek Polacek  <polacek@redhat.com>
8681         PR c/48062
8682         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
8683         Print note only if the warning was printed.
8685 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
8687         PR c/58942
8688         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
8689         with a pointer.
8691 2014-06-03  Marek Polacek  <polacek@redhat.com>
8693         PR c/60439
8694         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
8695         c_start_case.
8696         * c-tree.h (c_start_case): Update.
8697         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
8698         switch condition has boolean value.
8700 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
8702         * c-decl.c: Include builtins.h.
8703         * c-parser.c: Likewise.
8705 2014-05-27  Marek Polacek  <polacek@redhat.com>
8707         PR c/56724
8708         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
8709         error and warning calls to error_at and warning_at.  Pass location of
8710         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
8711         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
8712         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
8714 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
8716         PR c/61191
8717         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
8718         function parameters.
8720 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
8722         * c-decl.c (merge_decls): Preserve symtab node pointers.
8723         (duplicate_decls): Free new decl.
8725 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
8727         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
8728         initialization.
8730         * c-parser.c (c_parser_omp_target): Return bool values.
8732 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
8734         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
8735         num_teams_loc variable to num_thread_limit_loc.
8737 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
8739         * c-array-notation.c (expand_array_notations): Use void_node
8740         instead of void_zero_node.
8742 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
8744         * c-decl.c (finish_struct): Adjust.
8745         (finish_enum): Likewise.
8746         (bind): Adjust.
8747         (record_inline_static): Likewise.
8748         (push_scope): Likewise.
8749         (make_label): Likewise.
8750         (lookup_label_for_goto): Likewise.
8751         (finish_struct): Likewise.
8752         (finish_enum): Likewise.
8753         (store_parm_decls): Likewise.
8754         (c_push_function_context): Likewise.
8755         * c-lang.h: Remove usage of variable_size gty attribute.
8756         * c-parser.c (c_parse_init): Adjust.
8757         (c_parse_file): Likewise.
8759 2014-05-13  Marek Polacek  <polacek@redhat.com>
8761         PR c/61162
8762         * c-typeck.c (convert_for_assignment): Pass location to
8763         WARN_FOR_ASSIGNMENT instead of input_location.
8765 2014-05-10  Marek Polacek  <polacek@redhat.com>
8767         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
8768         maybe_warn_string_init.
8769         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
8770         maybe_warn_string_init.
8771         * c-tree.h (maybe_warn_string_init): Update declaration.
8772         * c-typeck.c (maybe_warn_string_init): Add location parameter.
8773         Call pedwarn_init with loc instead of with input_location.
8774         (digest_init): Pass init_loc to maybe_warn_string_init.
8775         (pop_init_level): Call pedwarn_init with loc instead of with
8776         input_location.
8777         (set_init_index): Likewise.
8778         (process_init_element): Likewise.
8780 2014-05-09  Marek Polacek  <polacek@redhat.com>
8782         PR c/61096
8783         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
8784         (c_parser_initelt): Pass location to set_init_label.  Pass array index
8785         location to set_init_index.
8786         * c-tree.h (push_init_level): Update declaration.
8787         (pop_init_level): Likewise.
8788         (set_init_index): Likewise.
8789         (set_init_label): Likewise.
8790         * c-typeck.c (error_init): Add location parameter.  Call error_at
8791         instead of error.
8792         (digest_init): Pass init_loc to error_init.
8793         (really_start_incremental_init):
8794         (push_init_level): Add location parameter.  Pass loc to pop_init_level
8795         and error_init.
8796         (pop_init_level): Likewise.
8797         (set_designator): Add location parameter.  Pass loc to pop_init_level,
8798         push_init_level, and error_init.
8799         (set_init_index): Add location parameter.  Pass loc to error_init and
8800         set_designator.
8801         (set_init_label): Likewise.
8802         (output_init_element): Pass loc to error_init.
8803         (process_init_element): Pass loc to error_init, pop_init_level,
8804         pedwarn_init, and push_init_level.
8806 2014-05-09  Marek Polacek  <polacek@redhat.com>
8808         PR c/50459
8809         * c-parser.c (c_parser_attributes): Parse the arguments as an
8810         expression-list if the attribute takes identifier.
8812 2014-05-08  Marek Polacek  <polacek@redhat.com>
8814         PR c/61053
8815         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8816         TYPE_ALIGN_UNIT.
8818 2014-05-08  Marek Polacek  <polacek@redhat.com>
8820         PR c/61077
8821         * c-decl.c (start_function): Warn for _Atomic-qualified return type
8822         of main.
8824 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
8825             Mike Stump  <mikestump@comcast.net>
8826             Richard Sandiford  <rdsandiford@googlemail.com>
8828         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8829         (finish_enum): Use wide-int interfaces.
8830         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8831         * c-typeck.c (build_c_cast): Likewise.
8832         (set_nonincremental_init_from_string): Likewise.
8833         (c_tree_equal): Likewise.
8835 2014-05-02  Marek Polacek  <polacek@redhat.com>
8837         PR c/25801
8838         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
8839         Return size_one_node when the type is not complete.
8840         (pointer_diff): Remove comment.
8841         (build_unary_op): Improve error messages.
8843 2014-05-02  Marek Polacek  <polacek@redhat.com>
8845         * c-typeck.c (c_finish_return): Separate warning_at calls.
8847 2014-05-02  Marek Polacek  <polacek@redhat.com>
8849         * c-tree.h (error_init): Remove declaration.
8850         (pedwarn_init): Likewise.
8851         * c-typeck.c (error_init): Make static and move above.
8852         (pedwarn_init): Likewise.
8853         (warning_init): Move above.
8854         (maybe_warn_string_init): Likewise.
8856 2014-05-01  Jeff Law  <law@redhat.com>
8858         Revert:
8860         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
8861         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8862         avoid goto.
8864 2014-05-02  Marek Polacek  <polacek@redhat.com>
8866         PR c/60784
8867         * c-typeck.c (push_init_level): Set constructor_designated to
8868         p->designated for structures.
8870 2014-05-01  Marek Polacek  <polacek@redhat.com>
8872         PR c/60915
8873         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8874         function-definition has an attribute after the declarator.
8876 2014-05-01  Marek Polacek  <polacek@redhat.com>
8878         PR c/60257
8879         * c-typeck.c (warning_init): Add location_t parameter.  Call
8880         warning_at instead of warning.
8881         (push_init_level): Pass input_location to warning_init.
8882         (add_pending_init): Add location_t parameter.  Pass loc to
8883         warning_init.
8884         (set_nonincremental_init): Pass input_location to add_pending_init.
8885         (set_nonincremental_init_from_string): Likewise.
8886         (output_init_element): Pass loc to warning_init and to
8887         add_pending_init.
8889 2014-05-01  Marek Polacek  <polacek@redhat.com>
8891         PR c/43395
8892         * c-typeck.c (c_finish_return): Distinguish between label and variable
8893         when warning about returning local address.
8895 2014-05-01  Marek Polacek  <polacek@redhat.com>
8897         PR c/29467
8898         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8899         in C89 mode.
8901 2014-05-01  Marek Polacek  <polacek@redhat.com>
8903         PR c/43245
8904         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8905         instead of 0 to WARN_FOR_QUALIFIERS.
8907 2014-05-01  Marek Polacek  <polacek@redhat.com>
8909         PR c/56989
8910         * c-typeck.c (default_conversion): Use better location for
8911         error call.
8913 2014-04-30  Marek Polacek  <polacek@redhat.com>
8915         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8916         also when SANITIZE_FLOAT_DIVIDE is on.
8918 2014-04-30  Marek Polacek  <polacek@redhat.com>
8920         PR c/60139
8921         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8922         and pedwarn_init.  Use loc insted of input_location.
8924 2014-04-30  Marek Polacek  <polacek@redhat.com>
8926         PR c/60351
8927         * c-typeck.c (build_binary_op): Use location when warning about
8928         shift count.
8930 2014-04-25  Marek Polacek  <polacek@redhat.com>
8932         PR c/18079
8933         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8934         always_inline/noinline and hot/cold attributes.
8936 2014-04-25  Marek Polacek  <polacek@redhat.com>
8938         PR c/60114
8939         * c-parser.c (c_parser_initelt): Pass input_location to
8940         process_init_element.
8941         (c_parser_initval): Pass loc to process_init_element.
8942         * c-tree.h (process_init_element): Adjust declaration.
8943         * c-typeck.c (push_init_level): Pass input_location to
8944         process_init_element.
8945         (pop_init_level): Likewise.
8946         (set_designator): Likewise.
8947         (output_init_element): Add location_t parameter.  Pass loc to
8948         digest_init.
8949         (output_pending_init_elements): Pass input_location to
8950         output_init_element.
8951         (process_init_element): Add location_t parameter.  Pass loc to
8952         output_init_element.
8954 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
8956         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8957         atomic-clause, allow comma in between atomic-clause and
8958         seq_cst.
8960 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
8962         PR c/59073
8963         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8964         fails, don't set OM_PARALLEL_COMBINED and return NULL.
8966 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
8968         PR middle-end/60469
8969         * c-array-notation.c (fix_builtin_array_notation_fn): Use
8970         create_tmp_var instead build_decl for creating temps.
8971         (build_array_notation_expr): Likewise.
8972         (fix_conditional_array_notations_1): Likewise.
8973         (fix_array_notation_expr): Likewise.
8974         (fix_array_notation_call_expr): Likewise.
8976 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
8978         PR c++/60689
8979         * c-tree.h (c_build_function_call_vec): New prototype.
8980         * c-typeck.c (build_function_call_vec): Don't call
8981         resolve_overloaded_builtin here.
8982         (c_build_function_call_vec): New wrapper function around
8983         build_function_call_vec.  Call resolve_overloaded_builtin here.
8984         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8985         Call c_build_function_call_vec instead of build_function_call_vec.
8986         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8987         * c-decl.c (finish_decl): Likewise.
8989 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8991         PR c/55383
8992         * c-typeck.c: Use correct format string in cast-qual warning
8994 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
8996         * c-decl.c (c_decl_attributes): Use
8997         lang_hooks.types.omp_mappable_type.
8998         * c-typeck.c (c_finish_omp_clauses): Likewise.
9000 2014-03-06  Marek Polacek  <polacek@redhat.com>
9002         PR c/60197
9003         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
9004         of checking tree code.
9006 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
9008         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
9009         (c_parser_parameter_declaration): Likewise.
9011 2014-02-19  Marek Polacek  <polacek@redhat.com>
9013         PR c/60195
9014         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
9015         Call mark_exp_read on exp.value.
9016         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
9017         TREE_ADDRESSABLE on old instead of val.
9018         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
9020 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
9022         * c-parser.c (c_parser_get_builtin_args): Replace calls to
9023         C_EXPR_APPEND by vec_safe_push.
9024         * c-tree.h (C_EXPR_APPEND): Remove.
9026 2014-01-31  Marek Polacek  <polacek@redhat.com>
9028         PR c/59963
9029         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
9030         build_function_call_vec.
9031         (build_function_call): Likewise.
9032         (build_atomic_assign): Likewise.
9033         (build_function_call_vec): Add arg_loc parameter.  Use it.
9034         (convert_arguments): Likewise.
9035         (convert_for_assignment): Rename rhs_loc to expr_loc.
9036         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
9037         (c_parser_objc_keywordexpr): Likewise.
9038         (c_parser_postfix_expression_after_primary): Call
9039         build_function_call_vec with expr_loc rather than op_loc.
9040         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
9041         build_function_call_vec.
9042         (c_parser_expr_list): Add locations parameter.  Fill it with locations
9043         of function arguments.
9044         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
9046 2014-01-30  Marek Polacek  <polacek@redhat.com>
9048         PR c/59940
9049         * c-typeck.c (build_function_call_vec): Use loc parameter.
9050         (convert_arguments): Add location parameter.  Use it.
9051         (ep_convert_and_check): Likewise.
9052         (build_atomic_assign): Adjust convert_for_assignment call.
9053         (build_modify_expr): Likewise.
9054         (digest_init): Likewise.
9055         (c_finish_return): Likewise.
9056         (build_conditional_expr): Adjust ep_convert_and_check calls.
9057         (convert_for_assignment): Add rhs_loc parameter.  Use it.
9058         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
9059         calls.
9061 2014-01-30  Richard Biener  <rguenther@suse.de>
9063         PR c/59905
9064         * c-typeck.c (build_function_call_vec): Do not replace calls
9065         to a function via an incompatible type with a runtime abort.
9067 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9069         * c-parser.c (c_parser_declaration_or_fndef): Replaced
9070         flag_enable_cilkplus with flag_cilkplus.
9071         (c_parser_direct_declarator_inner): Likewise.
9072         (c_parser_attribute_any_word): Likewise.
9073         (c_parser_attributes): Likewise.
9074         (c_parser_compound_statement): Likewise.
9075         (c_parser_statement_after_labels): Likewise.
9076         (c_parser_if_statement): Likewise.
9077         (c_parser_switch_statement): Likewise.
9078         (c_parser_do_statement): Likewise.
9079         (c_parser_for_statement): Likewise.
9080         (c_parser_unary_expression): Likewise.
9081         (c_parser_postfix_expression): Likewise.
9082         (c_parser_postfix_expression_after_primary): Likewise.
9083         (c_parser_postfix_expression_after_primary): Likewise.
9084         (c_parser_omp_clause_name): Likewise.
9085         (c_finish_omp_declare_simd): Likewise.
9086         (c_parser_cilk_verify_simd): Likewise.
9087         * c-typeck.c (build_array_ref): Likewise.
9088         (build_function_call_vec): Likewise.
9089         (convert_arguments): Likewise.
9090         (build_compound_expr): Likewise.
9091         (c_finish_return): Likewise.
9092         (c_finish_if_stmt): Likewise.
9093         (c_finish_loop): Likewise.
9094         (build_binary_op): Likewise.
9096 2014-01-23  Marek Polacek  <polacek@redhat.com>
9098         PR c/59846
9099         * c-typeck.c (parser_build_binary_op): Use location instead of
9100         input_location.
9101         (build_binary_op): Pass location to shorten_compare.
9103 2014-01-23  Marek Polacek  <polacek@redhat.com>
9105         PR c/58346
9106         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
9107         an empty aggregate.
9109 2014-01-23  Marek Polacek  <polacek@redhat.com>
9111         PR c/59871
9112         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
9113         of a comma expression.
9114         (emit_side_effect_warnings): Likewise.
9116 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9118         PR c/59825
9119         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
9120         function to use walk_tree and moved a lot of its functionality to
9121         expand_array_notations.
9122         (expand_array_notations): New function.
9124 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9126         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
9127         attribute an attribute without value.
9129 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
9131         PR middle-end/58809
9132         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
9133         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
9135 2014-01-22  Marek Polacek  <polacek@redhat.com>
9137         PR c/59891
9138         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
9139         of remove_c_maybe_const_expr on op1 and op2.
9141 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
9143         PR c/58943
9144         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
9145         effects, preevaluate rhs using SAVE_EXPR first.
9147 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9149         PR c++/59631
9150         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
9151         statements with if-elseif statements.
9153 2014-01-06  Marek Polacek  <polacek@redhat.com>
9155         PR c/57773
9156         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
9157         defined bit-field types only in ISO C.
9159 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
9161         Update copyright years
9163 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
9165         * c-array-notation.c: Use the standard form for the copyright notice.
9167 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9169         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
9170         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
9171         field in parser is not empty.  If not-empty, call the function
9172         c_parser_finish_omp_declare_simd.
9173         (c_parser_cilk_clause_vectorlength): Modified function to be shared
9174         between SIMD-enabled functions and #pragma simd.  Added new parameter.
9175         (c_parser_cilk_all_clauses): Modified the usage of the function
9176         c_parser_cilk_clause_vectorlength as mentioned above.
9177         (c_parser_cilk_simd_fn_vector_attrs): New function.
9178         (c_finish_cilk_simd_fn_tokens): Likewise.
9179         (is_cilkplus_vector_p): Likewise.
9180         (c_parser_omp_clause_name): Added checking for "vectorlength,"
9181         "nomask," and "mask" strings in clause name.
9182         (c_parser_omp_all_clauses): Added 3 new case statements:
9183         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
9184         PRAGMA_CILK_CLAUSE_NOMASK.
9185         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
9186         check for vector attribute and if so call the function
9187         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
9188         called the function c_finish_cilk_simd_fn_tokens.
9189         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
9190         parser field is non-empty.  If so, parse them as you would parse
9191         the omp declare simd pragma.
9192         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
9193         Added a check when step is a parameter and flag it as error.
9194         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
9195         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
9196         pragma_omp_clause.
9198 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
9200         * c-parser.c (c_parser_omp_parallel): Fix description.
9202 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9204         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
9205         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9206         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
9207         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
9209 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
9211         PR c/52023
9212         * c-parser.c (c_parser_alignas_specifier): Use
9213         c_sizeof_or_alignof_type instead of c_alignof.
9214         (c_parser_alignof_expression): Likewise, with min_alignof
9215         parameter depending on alignof spelling used.
9217 2013-12-04  Marek Polacek  <polacek@redhat.com>
9219         PR c/54113
9220         * c-decl.c (start_function): Don't warn for missing prototype for
9221         inline functions.
9223 2013-12-03  Marek Polacek  <polacek@redhat.com>
9225         PR c/59351
9226         * c-decl.c (build_compound_literal): Allow compound literals with
9227         empty initial value.
9229 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
9231         PR c/58235
9232         * c-typeck.c (build_modify_expr): Diagnose assignment to
9233         expression with array type.
9235 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
9237         PR c/42262
9238         * c-typeck.c (process_init_element): Do not treat a string as
9239         initializing a whole array when used with a designator for an
9240         individual element.
9242 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
9244         PR c/57574
9245         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
9246         an inline function following a static declaration.
9248 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
9250         PR c/59310
9251         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
9252         to p_name before calling c_parser_omp_teams instead of after.
9253         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
9254         argument.  Remove unused p_name variable.
9256 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
9257             Jakub Jelinek  <jakub@redhat.com>
9259         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
9260         external_scope is NULL.
9262 2013-11-27  Tom de Vries  <tom@codesourcery.com>
9263             Marc Glisse  <marc.glisse@inria.fr>
9265         PR c++/59032
9266         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
9268 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
9270         * c-typeck.c: Add required include files from gimple.h.
9272 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
9274         * c-decl.c (define_label, shadow_tag_warned)
9275         (check_bitfield_type_and_width, grokdeclarator, grokparms,
9276         store_parm_decls_newstyle, store_parm_decls_oldstyle)
9277         (declspecs_add_type): Remove use of in_system_header macro.
9278         * c-parser.c (c_parser_unary_expression): Likewise.
9279         * c-typeck.c (store_init_value, process_init_element)
9280         (c_start_case): Likewise.
9282         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
9283         macro.
9285         * c-parser.c (c_parser_set_source_position_from_token): Remove
9286         reference to in_system_header from comment.
9288 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9290         * c-decl.c (grokdeclarator): Update comment to refer to
9291         tree_to_[su]hwi rather than tree_low_cst.
9293 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9295         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
9296         tree_to_uhwi throughout.
9298 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9300         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
9301         throughout.
9303 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9305         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
9306         throughout.
9308 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
9310         * c-parser.c (c_parser_cilk_simd): New.
9311         (c_parser_cilk_verify_simd): New.
9312         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
9313         (c_parser_omp_for_loop): Add case for NE_EXPR.
9314         Set c_break_label for CILK_SIMD.
9315         (c_parser_cilk_clause_vectorlength): New.
9316         (c_parser_cilk_clause_linear): New.
9317         (c_parser_cilk_clause_name): New.
9318         (c_parser_cilk_all_clauses): New.
9319         * c-typeck.c (build_unary_op): Pass location argument to
9320         readonly_error.
9321         (build_modify_expr): Same.
9322         (build_asm_expr): Same.
9323         (c_finish_bc_stmt): Error on break/continue in loops.
9325 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
9327         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
9329 2013-11-14  Diego Novillo  <dnovillo@google.com>
9331         * c-decl.c: Include print-tree.h.
9332         Include stor-layout.h.
9333         Include varasm.h.
9334         Include attribs.h.
9335         Include stringpool.h.
9336         * c-lang.c: Include fold-const.h.
9337         * c-parser.c: Include stringpool.h.
9338         Include attribs.h.
9339         Include stor-layout.h.
9340         Include varasm.h.
9341         Include trans-mem.h.
9342         * c-typeck.c: Include stor-layout.h.
9343         Include trans-mem.h.
9344         Include varasm.h.
9345         Include stmt.h.
9347 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
9349         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
9350         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
9351         __auto_type.
9352         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
9353         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
9354         RID_AUTO_TYPE.
9355         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
9356         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
9357         (c_parser_declarator, c_parser_direct_declarator_inner)
9358         (c_parser_parameter_declaration, c_parser_type_name): All callers
9359         changed.
9360         (c_parser_declaration_or_fndef): Handle declarations with type
9361         determined from the initializer.
9363 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
9365         * c-typeck.c: Include gimplify.h.
9367 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
9369         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
9370         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
9371         comment.
9372         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
9373         or _Thread_local as appropriate in diagnostics.
9374         (build_null_declspecs): Initialize ret->thread_gnu_p.
9375         (declspecs_add_scspec): Handle either __thread or _Thread_local
9376         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
9377         pedantic.  Do not disallow _Thread_local extern and _Thread_local
9378         static.
9380 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
9381             Andrew MacLeod  <amacleod@redhat.com>
9383         * c-aux-info.c (gen_type): Handle atomic qualifier.
9384         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
9385         qualifiers when compating types.
9386         (shadow_tag_warned): Handle atomic_p in declspecs.
9387         (quals_from_declspecs): Likewise.
9388         (start_decl): Use c_type_promotes_to when promoting argument
9389         types.
9390         (grokdeclarator): Handle _Atomic.
9391         (get_parm_info): Diagnose any qualifier on "void" as only
9392         parameter.
9393         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
9394         comparing types.  Use c_type_promotes_to when promoting argument
9395         types.
9396         (finish_function): Use c_type_promotes_to when promoting argument
9397         types.
9398         (build_null_declspecs): Handle atomic_p in declspecs.
9399         (declspecs_add_qual): Handle RID_ATOMIC.
9400         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
9401         (c_token_starts_declspecs): Handle RID_ATOMIC.
9402         (c_parser_declspecs): Handle atomic type specifiers and
9403         qualifiers.
9404         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
9405         from types of expressions with atomic type.
9406         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
9407         (c_parser_attribute_any_word): Handle RID_ATOMIC.
9408         (c_parser_initializer, c_parser_initelt, c_parser_initval)
9409         (c_parser_statement_after_labels, c_parser_switch_statement)
9410         (c_parser_for_statement, c_parser_expr_no_commas)
9411         (c_parser_conditional_expression, c_parser_binary_expression)
9412         (c_parser_cast_expression, c_parser_unary_expression)
9413         (c_parser_postfix_expression)
9414         (c_parser_postfix_expression_after_primary, c_parser_expression):
9415         Use convert_lvalue_to_rvalue.
9416         (c_parser_expression_conv, c_parser_expr_list): Document
9417         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
9418         (c_parser_objc_synchronized_statement): Use
9419         convert_lvalue_to_rvalue.
9420         (c_parser_objc_selector): Handle RID_ATOMIC.
9421         (c_parser_objc_receiver, c_parser_array_notation): Use
9422         convert_lvalue_to_rvalue.
9423         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
9424         _Atomic (type-name).
9425         (struct c_declspecs): Add atomic_p field.
9426         (convert_lvalue_to_rvalue): Declare.
9427         * c-typeck.c (c_type_promotes_to): Promote atomic types to
9428         corresponding atomic types.
9429         (qualify_type): Don't add _Atomic qualifiers from second argument.
9430         (comp_target_types): Do not allow _Atomic mismatches.
9431         (type_lists_compatible_p): Do not remove atomic qualifiers when
9432         comparing types.
9433         (really_atomic_lvalue, convert_lvalue_to_rvalue)
9434         (build_atomic_assign): New functions.
9435         (build_unary_op): Use build_atomic_assign for atomic increment and
9436         decrement.
9437         (build_conditional_expr): Do not treat _Atomic void as a qualified
9438         version of void.
9439         (build_modify_expr): Use build_atomic_assign for atomic LHS.
9440         (find_anonymous_field_with_type, convert_to_anonymous_field)
9441         (convert_for_assignment): Do not remove atomic qualifiers when
9442         comparing types.
9443         (digest_init): Do not accept initialization of arrays of atomic
9444         elements by string constants.
9445         (build_asm_expr): Use convert_lvalue_to_rvalue.
9446         (build_binary_op): Do not treat _Atomic void as a qualified
9447         version of void.
9449 2013-11-06  DJ Delorie  <dj@redhat.com>
9451         * c-decl.c (locate_old_decl): If a previous conflicting decl is
9452         both explicit and builtin, print the location of the explicit one.
9454 2013-11-05  Tobias Burnus  <burnus@net-b.de>
9456         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
9457         c_parser_omp_distribute, c_parser_omp_teams,
9458         c_parser_omp_target, c_parser_omp_declare): Handle
9459         -fopenmp-simd.
9461 2013-11-03  Marek Polacek  <polacek@redhat.com>
9463         * c-decl.c (grokdeclarator): Add VLA instrumentation.
9465 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
9467         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
9468         check_dup_generic at the end, unless remove is true.
9469         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
9470         remove = true;.
9471         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
9473 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
9475         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
9476         with decl that is not pointer nor array.
9478 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9480         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
9481         a spawning function is found.
9482         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
9483         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
9484         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9485         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
9486         case.
9487         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
9488         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
9489         expr.
9490         (c_finish_return): Added a check to reject _Cilk_spawn in return
9491         expression.
9492         (build_cilk_spawn): New function.
9493         (build_cilk_sync): Likewise.
9494         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
9496 2013-10-27  Tobias Burnus  <burnus@net-b.de>
9498         PR other/33426
9499         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
9500         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
9501         (c_parser_statement_after_labels): Update calls.
9503 2013-10-24  Tobias Burnus  <burnus@net-b.de>
9505         PR other/33426
9506         * c-parser.c (c_parser_pragma, c_parser_for_statement):
9507         Handle PRAGMA_IVDEP.
9508         (c_parser_statement_after_labels): Update call.
9510 2013-10-24  Marek Polacek  <polacek@redhat.com>
9512         * c-parser.c (c_parser_struct_declaration): Add a comment.
9513         (c_parser_declarator): Don't allow _Alignas here.
9515 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
9517         * c-parser.c: Include omp-low.h.
9518         * c-typeck.c: Likewise.
9520 2013-10-17  Marek Polacek  <polacek@redhat.com>
9522         PR c/58267
9523         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
9524         Document syntax of the array-declarator.
9525         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
9526         are not permitted.
9527         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
9528         (c_parser_struct_declaration): Likewise.
9529         (c_parser_declarator): Likewise.
9530         (c_parser_direct_declarator_inner): Likewise.
9531         (c_parser_parameter_declaration): Likewise.
9532         (c_parser_type_name): Likewise.
9534 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
9536         * c-lang.h (current_omp_declare_target_attribute): New extern
9537         decl.
9538         * c-parser.c: Include c-lang.h.
9539         (struct c_parser): Change tokens to c_token *.
9540         Add tokens_buf field.  Change tokens_avail type to unsigned int.
9541         (c_parser_consume_token): If parser->tokens isn't
9542         &parser->tokens_buf[0], increment parser->tokens.
9543         (c_parser_consume_pragma): Likewise.
9544         (enum pragma_context): Add pragma_struct and pragma_param.
9545         (c_parser_external_declaration): Adjust
9546         c_parser_declaration_or_fndef caller.
9547         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
9548         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
9549         Adjust recursive call.
9550         (c_parser_struct_or_union_specifier): Use pragma_struct instead
9551         of pragma_external.
9552         (c_parser_parameter_declaration): Use pragma_param instead of
9553         pragma_external.
9554         (c_parser_compound_statement_nostart, c_parser_label,
9555         c_parser_for_statement): Adjust
9556         c_parser_declaration_or_fndef callers.
9557         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
9558         it through to c_parser_conditional_expression.
9559         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
9560         pass it through to c_parser_binary_expression.  Adjust recursive
9561         call.
9562         (c_parser_binary_expression): Remove prec argument, add
9563         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
9564         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
9565         binop matches it, use build2 instead of parser_build_binary_op.
9566         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
9567         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
9568         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
9569         Handle pragma_struct and pragma_param the same as pragma_external.
9570         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
9571         (c_parser_omp_variable_list): Parse array sections for
9572         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
9573         (c_parser_omp_clause_collapse): Fully fold collapse expression.
9574         (c_parser_omp_clause_reduction): Handle user defined reductions.
9575         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
9576         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
9577         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
9578         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
9579         c_parser_omp_clause_depend, c_parser_omp_clause_map,
9580         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
9581         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
9582         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
9583         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
9584         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
9585         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
9586         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
9587         (c_parser_omp_for_loop): Add CODE argument, pass it through
9588         to c_finish_omp_for.  Change last argument to cclauses,
9589         and adjust uses to grab parallel clauses from the array of all
9590         the split clauses.  Adjust c_parser_binary_expression,
9591         c_parser_declaration_or_fndef and c_finish_omp_for callers.
9592         (omp_split_clauses): New function.
9593         (c_parser_omp_simd): New function.
9594         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
9595         Allow the function to be called also when parsing combined constructs,
9596         and call c_parser_omp_simd when parsing for simd.
9597         (c_parser_omp_sections_scope): If section-sequence doesn't start with
9598         #pragma omp section, require exactly one structured-block instead of
9599         sequence of statements.
9600         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
9601         Allow the function to be called also when parsing combined constructs.
9602         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
9603         Allow the function to be called also when parsing combined
9604         constructs.
9605         (c_parser_omp_taskgroup, c_parser_omp_cancel,
9606         c_parser_omp_cancellation_point, c_parser_omp_distribute,
9607         c_parser_omp_teams, c_parser_omp_target_data,
9608         c_parser_omp_target_update, c_parser_omp_target,
9609         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
9610         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
9611         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
9612         (c_parser_omp_construct): Add p_name and mask vars.  Handle
9613         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
9614         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
9615         and c_parser_omp_sections callers.
9616         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
9617         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
9618         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
9619         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
9620         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
9621         OMP_CLAUSE_DEPEND.
9622         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
9623         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
9624         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
9625         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
9626         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
9627         * c-typeck.c: Include tree-inline.h.
9628         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
9629         handle_omp_array_sections_1, handle_omp_array_sections,
9630         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
9631         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
9632         user defined reductions.
9633         (c_tree_equal): New function.
9634         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
9635         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
9636         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
9637         c_check_omp_declare_reduction_r): New prototypes.
9638         * c-decl.c (current_omp_declare_target_attribute): New variable.
9639         (c_decl_attributes): New function.
9640         (start_decl, start_function): Use it instead of decl_attributes.
9641         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
9642         c_omp_reduction_decl, c_omp_reduction_lookup,
9643         c_check_omp_declare_reduction_r): New functions.
9645 2013-09-25  Tom Tromey  <tromey@redhat.com>
9647         * Make-lang.in (c/gccspec.o): Remove.
9648         (CFLAGS-c/gccspec.o): New variable.
9649         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
9650         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
9651         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
9653 2013-09-25  Tom Tromey  <tromey@redhat.com>
9655         * Make-lang.in (c/gccspec.o): Don't use subshell.
9657 2013-09-18  Marek Polacek  <polacek@redhat.com>
9659         PR sanitize/58443
9660         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
9661         Remove unnecessary check.
9663 2013-09-18  Marek Polacek  <polacek@redhat.com>
9665         PR sanitizer/58411
9666         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
9667         no_sanitize_undefined attribute.
9669 2013-09-13  Kai Tietz  <ktietz@redhat.com>
9671         PR target/57848
9672         * c-decl.c (c_builtin_function_ext_scope): Remove
9673         wrong assumption that it is never called on prexisting
9674         symbol.
9676 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
9678         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
9680 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9682         * c-objc-common.c (c_tree_printer): Tidy.
9684 2013-08-30  Marek Polacek  <polacek@redhat.com>
9686         * c-typeck.c (build_binary_op): Add division by zero and shift
9687         instrumentation.
9689 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
9690             Joseph Myers  <joseph@codesourcery.com>
9692         PR c/35649
9693         * c-typeck.c (c_common_type): Prefer double_type_node over
9694         other REAL_TYPE types with the same precision.
9695         (convert_arguments): Likewise.
9697 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9699         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
9700         (c_initialize_diagnostics): Call a destructor for the early printer.
9702 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9704         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
9705         printer initialization.
9707 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9709         PR c/57490
9710         * c-array-notation.c (fix_conditional_array_notations_1): Added a
9711         check for truth values.
9712         (expand_array_notation_exprs): Added truth values case.  Removed an
9713         unwanted else.  Added for-loop to walk through subtrees in default
9714         case.
9716 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9718         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
9720 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
9722         * c-parser.c (struct c_generic_association): Fix typo.
9724 2013-07-23  Tom Tromey  <tromey@redhat.com>
9725             Joseph Myers  <joseph@codesourcery.com>
9727         * c-parser.c (struct c_generic_association): New.
9728         (c_generic_association_d): New typedef.
9729         (c_parser_generic_selection): New function.
9730         (c_parser_postfix_expression): Handle RID_GENERIC.
9732 2013-07-13  Jason Merrill  <jason@redhat.com>
9734         PR c++/57793
9735         * c-decl.c (finish_struct): Check for too-large class.
9737 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
9739         PR c/57821
9740         * c-typeck.c (set_init_index): When folding, check for index overflow.
9742 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9744         * c-parser.c (c_parser_array_notation): Removed rejection of array
9745         notations in an array of function pointers.
9747 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9749         * c-array-notation.c (make_triplet_val_inv): New function.
9750         (create_cmp_incr): Likewise.
9751         (create_array_refs): Likewise.
9752         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
9753         Also modularized common parts between functions and called the function.
9754         (build_array_notation_expr): Likewise.
9755         (fix_conditional_array_notations_1): Likewise.
9756         (fix_array_notation_expr): Likewise.
9757         (fix_array_notation_call_expr): Likewise.
9759 2013-06-18  Marek Polacek  <polacek@redhat.com>
9761         PR c/57630
9762         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
9764 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9766         * c-array-notation.c (build_array_notation_expr): Reject array notation
9767         mismatch between LHS and RHS even inside a call_expr.  Also, removed
9768         a couple while statements that were dead code.
9770 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9772         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
9773         excessive precision expressions in function parameters.  Also removed
9774         couple unwanted while statements.
9776 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9778         * c-array-notation.c (expand_array_notation_exprs): Added
9779         ARRAY_NOTATION_REF case.
9781 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9783         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
9784         function to c-family/array-notation-common.c.
9785         (is_cilkplus_reduce_builtin): Likewise.
9786         (find_rank): Likewise.
9787         (extract_array_notation_exprs): Likewise.
9788         (replace_array_notations): Likewise.
9789         (find_inv_trees): Likewise.
9790         (replace_inv_trees): Likewise.
9791         (contains_array_notation_expr): Likewise.
9792         (find_correct_array_notation_type): Likewise.
9793         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9794         (struct inv_list): Moved this to c-family/array-notation-common.c.
9795         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
9797 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9799         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9800         reduction functions outside the for-loop.  Added a check if the fundecl
9801         is non-NULL.  Finally, removed an unwanted if-statement, and made the
9802         body unconditional.
9804 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9806         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9807         condition of the if-statement matches the rank of else-block and then-
9808         block when array notations are used.
9809         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9810         expression after the entire function body is parsed.
9811         (c_parser_expr_no_commas): Delayed creating array notation expressions
9812         to the end of function parsing.
9813         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9814         whole if-statement instead of just the condition.
9815         (expand_array_notation_exprs): Added MODIFY_EXPR case.
9817 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9819         PR c/57474
9820         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9821         array to NULL_TREE if they are unused.  Also added a check for the
9822         field to be NULL before its fields are used in future.
9824 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9826         PR bootstrap/57450
9827         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9828         (build_array_notation_expr): Likewise.
9830 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9832         * c-typeck.c (build_array_ref): Added a check to see if array's
9833         index is greater than one.  If true, then emit an error.
9834         (build_function_call_vec): Exclude error reporting and checking
9835         for builtin array-notation functions.
9836         (convert_arguments): Likewise.
9837         (c_finish_return): Added a check for array notations as a return
9838         expression.  If true, then emit an error.
9839         (c_finish_loop): Added a check for array notations in a loop
9840         condition.  If true then emit an error.
9841         (lvalue_p): Added a ARRAY_NOTATION_REF case.
9842         (build_binary_op): Added a check for array notation expr inside
9843         op1 and op0.  If present, we call another function to find correct
9844         type.
9845         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9846         * c-parser.c (c_parser_compound_statement): Check if array
9847         notation code is used in tree, if so, then transform them into
9848         appropriate C code.
9849         (c_parser_expr_no_commas): Check if array notation is used in LHS
9850         or RHS, if so, then build array notation expression instead of
9851         regular modify.
9852         (c_parser_postfix_expression_after_primary): Added a check for
9853         colon(s) after square braces, if so then handle it like an array
9854         notation.  Also, break up array notations in unary op if found.
9855         (c_parser_direct_declarator_inner): Added a check for array
9856         notation.
9857         (c_parser_compound_statement): Added a check for array notation in
9858         a stmt.  If one is present, then expand array notation expr.
9859         (c_parser_if_statement): Likewise.
9860         (c_parser_switch_statement): Added a check for array notations in
9861         a switch statement's condition.  If true, then output an error.
9862         (c_parser_while_statement): Similarly, but for a while.
9863         (c_parser_do_statement): Similarly, but for a do-while.
9864         (c_parser_for_statement): Similarly, but for a for-loop.
9865         (c_parser_unary_expression): Check if array notation is used in a
9866         pre-increment or pre-decrement expression.  If true, then expand
9867         them.
9868         (c_parser_array_notation): New function.
9869         * c-array-notation.c: New file.
9870         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
9872 2013-05-23  Mike Stump  <mikestump@comcast.net>
9874         * c-typeck.c (convert_for_assignment): Handle references to memory
9875         spaces better.
9877 2013-05-16  Jason Merrill  <jason@redhat.com>
9879         * Make-lang.in (cc1$(exeext)): Use link mutex.
9881 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
9883         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9884         to simply use OPT_Wpointer_arith.
9885         (build_unary_op): Likewise.
9887 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
9889         PR c/19449
9890         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9891         argument.  If set, or it temporarily for parsing of the first
9892         argument into force_folding_builtin_constant_p.
9893         (c_parser_postfix_expression): Adjust callers.
9895 2013-03-21  Richard Biener  <rguenther@suse.de>
9897         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9898         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
9900 2013-02-12  Marek Polacek  <polacek@redhat.com>
9902         PR c/44938
9903         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9904         origtypes to NULL.
9906 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
9908         PR c/56078
9909         * c-typeck.c (set_nonincremental_init_from_string): If
9910         constructor_max_index is NULL, treat it as if tree_int_cst_lt
9911         returned false.
9912         (process_init_element): Likewise.
9914 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
9916         PR c++/55619
9917         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9918         argument, don't call default_function_array_conversion
9919         nor c_fully_fold here.
9920         (c_parser_asm_statement): Adjust callers.
9921         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9922         and outputs here, and call default_function_array_conversion
9923         on inputs that don't need to be addressable.
9925 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
9927         PR c/39464
9928         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9929         warning require that both c_common_unsigned_type as well as
9930         c_common_signed_type is the same for both mvl and mvr types.
9932 2012-11-16  Diego Novillo  <dnovillo@google.com>
9934         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9936         * c-common.c: Use new vec API in vec.h.
9937         * c-common.h: Likewise.
9938         * c-gimplify.c: Likewise.
9939         * c-pragma.c: Likewise.
9940         * c-pretty-print.c: Likewise.
9941         * c-pretty-print.h: Likewise.
9942         * c-semantics.c: Likewise.
9943         * c-decl.c: Likewise.
9944         * c-parser.c: Likewise.
9945         * c-tree.h: Likewise.
9946         * c-typeck.c: Likewise.
9948 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
9950         PR c++/54930
9951         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9953 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
9955         PR c/53066
9956         * c-decl.c (warn_if_shadowing): Do not warn if a variable
9957         shadows a function, unless the variable is a function or a
9958         pointer-to-function.
9960 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
9962         PR c/54381
9963         * c-parser.c (struct c_tree_loc_pair): Removed.
9964         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9965         add location_t * and tree * arguments, fill in array of 3
9966         sizeof_arg trees and corresponding locs.
9967         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9968         c_parser_expr_list callers.
9969         (c_parser_postfix_expression_after_primary): Likewise.  Pass
9970         array of 3 sizeof_arg trees and locs (corresponding to first
9971         3 arguments) to sizeof_pointer_memaccess_warning.
9973 2012-10-09  Lawrence Crowl  <crowl@google.com>
9975         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9976         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9977         hash table.
9979 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
9981         PR c++/54194
9982         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9983         call.
9985 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
9987         PR c++/54427
9988         * c-typeck.c: Include c-common.h.
9989         (enum stv_conv): Moved to c-common.h.
9990         (scalar_to_vector): Moved to c-common.c.
9991         (build_binary_op): Adapt to scalar_to_vector's new prototype.
9992         * Make-lang.in: c-typeck.c depends on c-common.h.
9994 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
9996         * c-decl.c (c_write_global_declarations): Fix handling of
9997         -fdump-ada-spec*.
9999 2012-09-30  Sharad Singhai  <singhai@google.com>
10001         * c-decl.c (c_write_global_declarations): Use a different method
10002         to determine if the dump has ben initialized.
10004 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
10006         PR c/54552
10007         * c-typeck.c (c_cast_expr): When casting to a type requiring
10008         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
10009         c_fully_fold first.
10011 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
10013         PR c/54103
10014         * c-typeck.c (build_unary_op): Pass original argument of
10015         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
10016         any C_MAYBE_CONST_EXPR, if it has integer operands.
10017         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
10018         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
10019         to c_objc_common_truthvalue_conversion, then remove any
10020         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
10021         c_objc_common_truthvalue_conversion not
10022         c_common_truthvalue_conversion.
10023         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
10024         call note_integer_operands for arguments with integer operands
10025         that are not integer constants.
10027 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
10029         PR c/54559
10030         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
10031         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
10033 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
10035         PR c/54428
10036         * c-convert.c (convert): Don't call fold_convert_loc if
10037         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
10038         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
10039         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
10041 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
10043         PR c/54355
10044         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
10045         for nested and empty_ok arguments in the call to
10046         c_parser_declaration_or_fndef.
10048 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
10050         * c-tree.h (c_last_sizeof_arg): Declare.
10051         * c-parser.c (struct c_tree_loc_pair): New type.
10052         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
10053         non-NULL.
10054         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
10055         (c_parser_postfix_expression_after_primary): Likewise.  Call
10056         sizeof_pointer_memaccess_warning if needed.
10057         (sizeof_ptr_memacc_comptypes): New function.
10058         * c-typeck.c (c_last_sizeof_arg): New global variable.
10059         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
10061 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
10063         * c-lang.h (lang_decl): Add variable_size GTY option.
10065 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
10067         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
10068         * Make-lang.in: Fix dependencies.
10070 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
10072         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
10073         and add language Makefile hooks.
10074         * config-lang.in: New file.
10075         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
10076         add the required "normal" config-lang.in rules.
10077         * c-lang.h: Moved from gcc/ to here.
10078         * c-tree.h: Likewise.
10079         * c-objc-common.c: Likewise.
10080         * c-objc-common.h: Likewise.
10081         * c-typeck.c: Likewise.
10082         * c-convert.c: Likewise.
10083         * c-lang.c: Likewise.
10084         * c-aux-info.c: Likewise.
10085         * c-errors.c: Likewise.
10086         * gccspec.c: Likewise.
10087         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
10088         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
10090 Copyright (C) 2012-2024 Free Software Foundation, Inc.
10092 Copying and distribution of this file, with or without modification,
10093 are permitted in any medium without royalty provided the copyright
10094 notice and this notice are preserved.