1 2024-01-12 Jakub Jelinek <jakub@redhat.com>
4 * c-typeck.cc (build_array_ref): If index has BITINT_TYPE type with
5 precision larger than sizetype precision, convert it to sizetype.
7 2024-01-11 Julian Brown <julian@codesourcery.com>
9 * c-parser.cc (c_parser_braced_init, c_parser_conditional_expression):
10 Don't allow OpenMP array section.
11 (c_parser_postfix_expression): Don't allow array section in statement
13 (c_parser_postfix_expression_after_primary): Add support for OpenMP
14 array section parsing.
15 (c_parser_expr_list): Don't allow OpenMP array section here.
16 (c_parser_omp_variable_list): Change ALLOW_DEREF parameter to
17 MAP_LVALUE. Support parsing of general lvalues in "map", "to" and
19 (c_parser_omp_var_list_parens): Change ALLOW_DEREF parameter to
20 MAP_LVALUE. Update call to c_parser_omp_variable_list.
21 (c_parser_oacc_data_clause): Update calls to
22 c_parser_omp_var_list_parens.
23 (c_parser_omp_clause_reduction): Use OMP_ARRAY_SECTION tree node
24 instead of TREE_LIST for array sections.
25 (c_parser_omp_target): Allow GOMP_MAP_ATTACH.
26 * c-tree.h (c_omp_array_section_p): Add extern declaration.
27 (build_omp_array_section): Add prototype.
28 * c-typeck.cc (c_omp_array_section_p): Add flag.
29 (mark_exp_read): Support OMP_ARRAY_SECTION.
30 (build_omp_array_section): Add function.
31 (build_external_ref): Tweak error path for OpenMP array sections.
32 (handle_omp_array_sections_1): Use OMP_ARRAY_SECTION tree code instead
33 of TREE_LIST. Handle more kinds of expressions.
34 (c_oacc_check_attachments): Use OMP_ARRAY_SECTION instead of TREE_LIST
36 (c_finish_omp_clauses): Use OMP_ARRAY_SECTION instead of TREE_LIST.
37 Check for supported expression types.
39 2024-01-09 Tamar Christina <tamar.christina@arm.com>
42 * c-parser.cc (c_parser_for_statement): Skip the pragma is no cond.
44 2024-01-03 Kwok Cheung Yeung <kcy@codesourcery.com>
46 * c-parser.cc (c_parser_omp_clause_name): Move handling of indirect
47 clause to correspond to alphabetical order.
49 2023-12-30 Martin Uecker <uecker@tugraz.at>
51 * c-typeck.cc (tagged_types_tu_compatible_p): Revise.
53 2023-12-22 Martin Uecker <uecker@tugraz.at>
55 * c-typeck.cc (composite_type_internal): Adapted from
56 composite_type to support structs and unions.
57 (composite_type): New wrapper function.
58 (build_conditional_operator): Return composite type.
59 * c-decl.cc (finish_struct): Allow NULL for
60 enclosing_struct_parse_info.
62 2023-12-21 Martin Uecker <uecker@tugraz.at>
64 * c-decl.cc (c_struct_hasher): Hash stable for struct
66 (c_struct_hasher::hash, c_struct_hasher::equal): New
68 (finish_struct): Set TYPE_CANONICAL to first struct in
70 * c-objc-common.cc (c_get_alias_set): Let structs or
71 unions with variable size alias anything.
72 * c-tree.h (comptypes_equiv): New prototype.
73 * c-typeck.cc (comptypes_equiv): New function.
74 (comptypes_internal): Implement equivalence mode.
75 (tagged_types_tu_compatible): Implement equivalence mode.
77 2023-12-21 Martin Uecker <uecker@tugraz.at>
79 * c-tree.h (c_parser_enum_specifier): Add parameter.
80 * c-decl.cc (start_enum): Allow redefinition.
81 (finish_enum): Diagnose conflicts.
82 (build_enumerator): Set context.
83 (diagnose_mismatched_decls): Diagnose conflicting enumerators.
84 (push_decl): Preserve context for enumerators.
85 * c-typeck.cc (tagged_types_tu_compatible_p): Adapt.
86 * c-parser.cc (c_parser_enum_specifier): Remember when
87 seen is from an enum type which is not yet defined.
89 2023-12-21 Martin Uecker <uecker@tugraz.at>
91 * c-decl.cc (previous_tag): New function.
92 (parser_xref_tag): Find earlier definition.
93 (get_parm_info): Turn off warning for C23.
94 (start_struct): Allow redefinitons.
95 (finish_struct): Diagnose conflicts.
96 * c-tree.h (comptypes_same_p): Add prototype.
97 * c-typeck.cc (comptypes_same_p): New function.
98 (comptypes_internal): Activate comparison of tagged types.
99 (convert_for_assignment): Ignore qualifiers.
100 (digest_init): Add error.
101 (initialized_elementwise_p): Allow compatible types.
103 2023-12-20 Jakub Jelinek <jakub@redhat.com>
105 * c-parser.cc (c_parser_postfix_expression_after_primary): Grow
106 sizeof_arg and sizeof_arg_loc arrays to 6 elements. Call
107 warn_for_calloc if warn_calloc_transposed_args for functions with
108 alloc_size type attribute with 2 arguments.
109 (c_parser_expr_list): Use 6 instead of 3.
110 * c-typeck.cc (build_c_cast): Call warn_for_alloc_size for casts
111 of calls to functions with alloc_size type attribute.
112 (convert_for_assignment): Likewise.
114 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
116 * c-parser.cc (omp_construct_selectors): Delete.
117 (omp_device_selectors): Delete.
118 (omp_implementation_selectors): Delete.
119 (omp_user_selectors): Delete.
120 (c_parser_omp_context_selector): Adjust for new representations
121 and simplify dispatch logic. Uniformly warn instead of sometimes
122 error when an unknown selector is found. Adjust error messages
123 for extraneous/incorrect score.
124 (c_parser_omp_context_selector_specification): Likewise.
125 (c_finish_omp_declare_variant): Adjust for new representations.
127 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
129 * c-parser.cc (c_parser_omp_context_selector): Adjust for new
130 namelist property representation.
132 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
134 * c-parser.cc (c_parser_omp_context_selector): Use new constructors.
136 2023-12-18 Richard Biener <rguenther@suse.de>
139 * gimple-parser.cc (c_parser_gimple_postfix_expression):
140 Parse TARGET_MEM_REF extended operands for __MEM.
142 2023-12-13 Jason Merrill <jason@redhat.com>
144 * c-typeck.cc (convert_for_assignment): Adjust call to
145 warn_for_address_of_packed_member.
147 2023-12-13 Julian Brown <julian@codesourcery.com>
149 * c-parser.cc (c_parser_oacc_all_clauses): Add TARGET_P parameter. Use
150 to select region type for c_finish_omp_clauses call.
151 (c_parser_oacc_loop): Update calls to c_parser_oacc_all_clauses.
152 (c_parser_oacc_compute): Likewise.
153 (c_parser_omp_target_data, c_parser_omp_target_enter_data): Support
155 (c_parser_omp_target_exit_data): Support DETACH kind.
156 (check_clauses): Handle GOMP_MAP_POINTER and GOMP_MAP_ATTACH here.
157 * c-typeck.cc (handle_omp_array_sections_1,
158 handle_omp_array_sections, c_finish_omp_clauses): Use
159 c_omp_address_inspector class and OMP address tokenizer to analyze and
160 expand map clause expressions. Fix some diagnostics. Fix "is OpenACC"
161 condition for C_ORT_ACC_TARGET addition.
163 2023-12-13 Julian Brown <julian@codesourcery.com>
165 * c-typeck.cc (c_finish_omp_clauses): Add braces and reindent
166 OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza.
168 2023-12-11 Martin Uecker <uecker@tugraz.at>
171 * c-decl.cc (add_decl_expr): Revise.
172 (finish_struct): Create DECL_EXPR.
173 * c-parser.cc (c_parser_struct_or_union_specifier): Call
174 finish_struct with expression for VLA sizes.
175 * c-tree.h (finish_struct): Add argument.
177 2023-12-11 Tobias Burnus <tobias@codesourcery.com>
179 * c-parser.cc (c_parser_omp_requires): Handle acquires/release
180 in atomic_default_mem_order clause.
181 (c_parser_omp_atomic): Update.
183 2023-12-05 Richard Sandiford <richard.sandiford@arm.com>
185 * c-decl.cc (std_attribute_table): Add extra braces to work
186 around PR 16333 in older compilers.
188 2023-12-05 Richard Biener <rguenther@suse.de>
191 * c-typeck.cc (c_build_qualified_type): Preserve address-space
194 2023-12-02 Richard Sandiford <richard.sandiford@arm.com>
196 * c-tree.h (std_attribute_table): Declare.
197 * c-decl.cc (std_attribute_table): Change type to
198 scoped_attribute_specs, using...
199 (std_attributes): ...this as the underlying array.
200 (c_init_decl_processing): Remove call to register_scoped_attributes.
201 * c-objc-common.h (c_objc_attribute_table): New global.
202 (LANG_HOOKS_ATTRIBUTE_TABLE): Use it.
203 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
204 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
206 2023-12-01 Florian Weimer <fweimer@redhat.com>
209 * c-decl.cc (grokparms): Issue permerror for
210 OPT_Wdeclaration_missing_parameter_type instead of a pedwarn.
212 2023-12-01 Florian Weimer <fweimer@redhat.com>
215 * c-typeck.cc (build_conditional_expr): Upgrade most pointer
216 type mismatches to a permerror.
217 (convert_for_assignment): Use permerror_opt and
218 permerror_init for OPT_Wincompatible_pointer_types warnings.
220 2023-12-01 Florian Weimer <fweimer@redhat.com>
223 * c-typeck.cc (c_finish_return): Use permerrors
224 for OPT_Wreturn_mismatch diagnostics.
226 2023-12-01 Florian Weimer <fweimer@redhat.com>
228 * c-decl.cc (grokdeclarator): Do not skip -Wimplicit-int
229 warnings or errors in system headers.
231 2023-12-01 Florian Weimer <fweimer@redhat.com>
233 * c-decl.cc (warn_defaults_to): Remove.
234 (grok_declarator, start_function): Call permerror_opt
235 instead of warn_defaults_to.
236 (store_parm_decls_oldstyle): Call permerror_opt for
239 2023-12-01 Florian Weimer <fweimer@redhat.com>
243 * c-decl.cc (implicit_decl_permerror): Rename from
244 implicit_decl_warning. Call permerror_opt instead of
245 pedwarn and warning_at.
246 (implicitly_declare): Adjust callers.
248 2023-12-01 Florian Weimer <fweimer@redhat.com>
252 * c-typeck.cc (build_conditional_expr): Use permerror_opt for
253 pointer/integer type mismatches, based on -Wint-conversion.
254 (pedwarn_permerror_init, permerror_init): New function.
255 (pedwarn_init): Call pedwarn_permerror_init.
256 (convert_for_assignment): Use permerror_opt and
257 permerror_init for -Wint-conversion warnings.
259 2023-11-29 Alexandre Oliva <oliva@adacore.com>
261 * c-typeck.cc (convert_lvalue_to_rvalue): Decay hardbools.
262 * c-convert.cc (convert): Convert to hardbool through
264 * c-decl.cc (check_bitfield_type_and_width): Skip enumeral
265 truncation warnings for hardbool.
266 (finish_struct): Propagate hardbool attribute to bitfield
268 (digest_init): Convert to hardbool.
270 2023-11-28 Jason Merrill <jason@redhat.com>
274 * c-typeck.cc (array_to_pointer_conversion): Adjust -Wc++-compat
277 2023-11-28 Richard Biener <rguenther@suse.de>
280 * gimple-parser.cc (c_parser_parse_gimple_body): Also
281 set DECL_SEEN_IN_BIND_EXPR_Pfor locals.
283 2023-11-27 Alex Coplan <alex.coplan@arm.com>
284 Iain Sandoe <iain@sandoe.co.uk>
287 * c-lang.cc (c_family_register_lang_features): New.
288 * c-objc-common.cc (struct c_feature_info): New.
289 (c_register_features): New.
290 * c-objc-common.h (c_register_features): New.
292 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
294 * c-parser.cc (c_parser_omp_clause_num_threads,
295 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
296 c_parser_omp_clause_priority, c_parser_omp_clause_schedule,
297 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
298 c_parser_omp_clause_dist_schedule, c_parser_omp_depobj,
299 c_parser_omp_scan_loop_body, c_parser_omp_assumption_clauses):
300 Add OPT_Wopenmp to warning_at.
302 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
304 * c-parser.cc (c_parser_omp_depobj): Accept optionally an argument
305 to the destroy clause.
307 2023-11-23 Jakub Jelinek <jakub@redhat.com>
309 * c-parser.cc (c_parser_postfix_expression): Handle RID_BUILTIN_STDC.
310 * c-decl.cc (names_builtin_p): Likewise.
312 2023-11-14 Jakub Jelinek <jakub@redhat.com>
315 * c-typeck.cc (convert_arguments): Don't promote first argument
316 of BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
318 2023-11-10 Martin Uecker <uecker@tugraz.at>
320 * c-typeck.cc (struct comptypes_data): Add anon_field flag.
321 (comptypes, comptypes_check_unum_int,
322 comptypes_check_different_types): Remove old cache.
323 (tagged_tu_types_compatible_p): Rewrite.
325 2023-11-09 Florian Weimer <fweimer@redhat.com>
327 * c-typeck.cc (c_finish_return): Use pedwarn with
328 OPT_Wreturn_mismatch for missing/extra return expressions.
330 2023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
332 * c-decl.cc (c_decl_attributes): Add attribute for indirect
334 * c-lang.h (c_omp_declare_target_attr): Add indirect field.
335 * c-parser.cc (c_parser_omp_clause_name): Handle indirect clause.
336 (c_parser_omp_clause_indirect): New.
337 (c_parser_omp_all_clauses): Handle indirect clause.
338 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
339 (c_parser_omp_declare_target): Handle indirect clause. Emit error
340 message if device_type or indirect clauses used alone. Emit error
341 if indirect clause used with device_type that is not 'any'.
342 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
343 (c_parser_omp_begin): Handle indirect clause.
344 * c-typeck.cc (c_finish_omp_clauses): Handle indirect clause.
346 2023-11-07 Joseph Myers <joseph@codesourcery.com>
348 * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p
349 instead of c2x_auto_p. Refer to C23 instead of C2X in diagnostics
351 * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and
352 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
353 instead of C2X in comments.
354 * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x,
355 warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p
356 instead of c2x_auto_p and D_C23 instead of D_C2X. Refer to C23
357 instead of C2X in diagnostics and comments.
358 * c-tree.h: Refer to C23 instead of C2X in comments.
359 (struct c_declspecs): Rename c2x_auto_p to c23_auto_p.
360 * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and
361 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
362 instead of C2X in diagnostics and comments.
364 2023-11-06 Joseph Myers <joseph@codesourcery.com>
367 * c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
369 * c-typeck.cc (build_conditional_expr, convert_for_assignment):
370 Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.
372 2023-11-04 Jakub Jelinek <jakub@redhat.com>
374 * c-parser.h (c_maybe_parse_omp_decl): Declare.
375 * c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
376 (c_parser_std_attribute): Uncoment omp::decl handling.
377 (c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
378 don't expect any arguments, instead create clause or TREE_LIST for
380 (c_maybe_parse_omp_decl): New function.
381 (c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
382 first token isn't name or comma invoke c_parser_omp_var_list_parens.
383 * c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
384 use *node rather than non-existing *decl.
386 2023-11-04 Jakub Jelinek <jakub@redhat.com>
388 * c-tree.def: New file.
389 * c-tree.h (struct c_tree_token_vec): Forward declare.
390 (c_tree_size): Declare.
391 * c-lang.h (struct c_omp_declare_target_attr): Add attr_syntax member.
392 (struct c_omp_begin_assumes_data): New type.
393 (current_omp_begin_assumes): Change type from int to
394 vec<c_omp_begin_assumes_data, va_gc> *.
395 * c-lang.cc: Include c-family/c-pragma.h and c-parser.h.
396 * c-parser.h (struct c_tree_token_vec_struct): New type.
397 (C_TOKEN_VEC_TOKENS): New macro.
398 * c-parser.cc (struct c_parser): Add omp_attrs_forbidden_p and
399 in_omp_attribute_pragma members.
400 (c_parser_skip_until_found): Handle CPP_PRAGMA_EOL when
401 parser->in_omp_attribute_pragma.
402 (c_parser_skip_to_pragma_eol): Likewise.
403 (c_parser_translation_unit): Adjust for current_omp_begin_assumes
404 being a vector rather than counter.
405 (c_parser_declaration_or_fndef): Handle omp::directive and
406 omp::sequence attributes on attribute declaration and declare simd
407 or declare variant directives in those on function declarations.
408 (c_parser_check_balanced_raw_token_sequence): Forward declare.
409 (c_parser_omp_directive_args, c_parser_omp_sequence_args): New
411 (c_parser_std_attribute): Handle omp::directive and omp::sequence
413 (struct c_omp_attribute_data): New type.
414 (c_parser_handle_statement_omp_attributes,
415 c_parser_handle_directive_omp_attributes): New functions.
416 (c_parser_compound_statement_nostart): Handle omp::directive and
417 omp::sequence attributes on statements. Formatting fix.
418 (c_parser_all_labels): Handle omp::directive and omp::sequence
419 attributes on statements.
420 (c_parser_statement): Clear parser->omp_attrs_forbidden_p.
421 (c_parser_omp_variable_list): Handle parser->tokens
422 != &parser->tokens_buf[0] by saving/restoring it.
423 (c_parser_omp_structured_block): Set parser->omp_attrs_forbidden_p.
424 (c_parser_omp_section_scan): New function.
425 (c_parser_omp_structured_block_sequence, c_parser_omp_sections_scope):
427 (c_parser_omp_parallel): Set parser->omp_attrs_forbidden_p.
428 (c_parser_omp_task): Likewise.
429 (c_parser_omp_declare_simd): Handle function declaration after
431 (c_finish_omp_declare_simd): Don't assert all kinds are the same.
432 (c_parser_omp_declare_target): Also push attr_syntax flag.
433 (c_parser_omp_begin): Likewise. Adjust for current_omp_begin_assumes
435 (c_parser_omp_end): Adjust for current_omp_begin_assumes type
436 change. Diagnose mixing of attribute vs. pragma syntax on end assumes
437 or end declare target.
438 (c_parser_omp_declare_reduction): Handle parser->tokens
439 != &parser->tokens_buf[0] by saving/restoring it.
440 * c-decl.cc: Include c-parser.h.
441 (current_omp_begin_assumes): Change type from int to
442 vec<c_omp_begin_assumes_data, va_gc> *.
443 (struct c_tree_token_vec): New type. Add static assertions
444 for sizeof and offsetof.
445 (union lang_tree_node): Add c_token_vec member and adjust GTY
447 (c_tree_size): New function.
448 (c_decl_attributes): Diagnose invalid omp::directive attribute
450 * c-objc-common.h (LANG_HOOKS_TREE_SIZE): Redefine.
452 2023-11-02 Martin Uecker <uecker@tugraz.at>
455 * c-typeck.cc (convert_for_assignment): Add missing check.
457 2023-11-01 Martin Uecker <uecker@tugraz.at>
460 * c-typeck.cc (convert_for_assignment): Add warning.
462 2023-10-26 liuhongt <hongtao.liu@intel.com>
464 * c-typeck.cc (build_vec_cmp): Pass type of arg0 to
467 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
469 * c-parser.cc (c_parser_omp_clause_name): Return
470 'PRAGMA_OACC_CLAUSE_SELF' for "self".
471 (c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
472 (c_parser_oacc_all_clauses): Remove 'bool compute_p' formal
473 parameter, and instead locally determine whether we're called for
474 an OpenACC compute construct or OpenACC 'update' directive.
475 (c_parser_oacc_compute): Adjust.
477 2023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
479 * c-parser.cc (c_parser_oacc_compute_clause_self): New function.
480 (c_parser_oacc_all_clauses): Add new 'bool compute_p = false'
481 parameter, add parsing of self clause when compute_p is true.
482 (OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
483 (OACC_PARALLEL_CLAUSE_MASK): Likewise,
484 (OACC_SERIAL_CLAUSE_MASK): Likewise.
485 (c_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
486 set compute_p argument to true.
487 * c-typeck.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case.
489 2023-10-20 Florian Weimer <fweimer@redhat.com>
493 * c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
494 for pointer/integer mismatch warnings.
496 2023-10-20 Florian Weimer <fweimer@redhat.com>
500 * c-typeck.cc (build_conditional_expr): Use
501 OPT_Wincompatible_pointer_types for pointer mismatches.
502 Emit location information for the operand.
504 2023-10-19 Andrew Pinski <pinskia@gmail.com>
507 * c-typeck.cc (convert_argument): After erroring out
508 about an incomplete type return error_mark_node.
510 2023-10-19 Andrew Pinski <pinskia@gmail.com>
513 * c-typeck.cc (convert_for_assignment): Check for null pointer
514 before warning about an incompatible scalar storage order.
516 2023-10-18 Andrew Pinski <pinskia@gmail.com>
519 * c-decl.cc (diagnose_arglist_conflict): Test for
520 error mark before calling of c_type_promotes_to.
522 2023-10-18 Andrew Pinski <pinskia@gmail.com>
525 * c-typeck.cc (c_safe_arg_type_equiv_p): Return true for error
528 2023-10-17 Martin Uecker <uecker@tugraz.at>
531 * c-decl.cc (grokdeclarator): Add error.
533 2023-10-03 David Malcolm <dmalcolm@redhat.com>
535 * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
538 2023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
540 * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
542 2023-09-20 Jakub Jelinek <jakub@redhat.com>
544 * c-parser.cc (c_parser_postfix_expression_after_primary): Parse
545 __builtin_classify_type call with typename as argument.
547 2023-09-19 Richard Biener <rguenther@suse.de>
550 * gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
552 2023-09-19 Richard Biener <rguenther@suse.de>
555 * gimple-parser.cc (c_parser_gimple_binary_expression): Add
556 return type argument.
557 (c_parser_gimple_statement): Adjust.
558 (c_parser_gimple_paren_condition): Likewise.
559 (c_parser_gimple_binary_expression): Use passed in return type,
560 add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
561 __UNORDERED and __ORDERED.
563 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
565 * c-parser.cc (struct c_omp_loc_tree): New.
566 (c_check_omp_allocate_allocator_r): New; checking moved from ...
567 (c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
568 ICE with tree_to_shwi for invalid too-large value.
570 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
572 * c-parser.cc (c_parser_omp_construct): Move call to
573 c_parser_omp_allocate to ...
574 (c_parser_pragma): ... here.
575 (c_parser_omp_allocate): Avoid ICE is allocator could not be
576 parsed; set 'omp allocate' attribute for stack/automatic variables
577 and only reject static variables; add several additional
579 * c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
580 * c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
581 (c_mark_decl_jump_unsafe_in_current_scope): New.
582 (warn_about_goto, c_check_switch_jump_warnings): Add error for
585 2023-09-12 Martin Uecker <uecker@tugraz.at>
587 * c-typeck.cc (struct comptypes_data): Add structure.
588 (tagged_types_tu_compatible_p,
589 function_types_compatible_p, type_lists_compatible_p,
590 comptypes_internal): Add structure to interface, change
591 return type to bool, and adapt calls.
592 (comptarget_types): Change return type too bool.
593 (comptypes, comptypes_check_enum_int,
594 comptypes_check_different_types): Adapt calls.
596 2023-09-06 Jakub Jelinek <jakub@redhat.com>
599 * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
600 * c-typeck.cc (c_common_type): Emit sorry for common type between
601 _Complex integer and larger _BitInt and return the _Complex integer.
603 2023-09-06 Jakub Jelinek <jakub@redhat.com>
606 * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
607 * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
609 (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
611 (declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust
612 for added union in *specs. Handle RID_BITINT.
613 (finish_declspecs): Handle cts_bitint. Adjust for added union
615 * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
616 c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
618 (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
619 * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
620 Add cts_bitint enumerator.
621 (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
622 and add bitint_prec there as well.
623 * c-typeck.cc (c_common_type, comptypes_internal):
625 (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
627 (build_array_ref, build_unary_op, build_conditional_expr,
628 build_c_cast, convert_for_assignment, digest_init, build_binary_op):
630 * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
632 * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
634 2023-09-06 Jakub Jelinek <jakub@redhat.com>
636 * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
637 for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
640 2023-09-05 Tobias Burnus <tobias@codesourcery.com>
642 * c-parser.cc (c_parser_omp_clause_allocate): Handle
645 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
647 * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
648 (struct omp_for_parse_data): New.
649 (check_omp_intervening_code): New.
650 (add_structured_block_stmt): New.
651 (c_parser_compound_statement_nostart): Recognize intervening code,
652 nested loops, and other things that need special handling in
653 OpenMP loop constructs.
654 (c_parser_while_statement): Error on loop in intervening code.
655 (c_parser_do_statement): Likewise.
656 (c_parser_for_statement): Likewise.
657 (c_parser_postfix_expression_after_primary): Error on calls to
658 the OpenMP runtime in intervening code.
659 (c_parser_pragma): Error on OpenMP pragmas in intervening code.
660 (c_parser_omp_loop_nest): New.
661 (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
662 c_parser_omp_loop_nest to do the heavy lifting.
664 2023-08-24 Richard Sandiford <richard.sandiford@arm.com>
666 * c-parser.cc (c_parser_std_attribute): Conditionally allow
667 two colons to be used in place of ::.
668 (c_parser_std_attribute_list): New function, split out from...
669 (c_parser_std_attribute_specifier): ...here. Allow the attribute-list
670 to start with __extension__. When it does, also allow two colons
671 to be used in place of ::.
673 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
675 * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
678 2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
681 * c-typeck.cc (build_binary_op): Warning on comparing distinct
682 pointer types only when -Wcompare-distinct-pointer-types.
684 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
685 Thomas Schwinge <thomas@codesourcery.com>
687 * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
689 2023-08-11 Jakub Jelinek <jakub@redhat.com>
691 * c-parser.cc (c_parser_typeof_specifier): Handle
692 __typeof_unqual and __typeof_unqual__ as !is_std.
694 2023-08-11 Martin Uecker <uecker@tugraz.at>
697 * c-typeck.cc (build_c_cast): Add warning.
699 2023-08-05 Martin Uecker <uecker@tugraz.at>
701 * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
702 warnings branches that are known not be taken during parsing.
704 2023-08-04 Tamar Christina <tamar.christina@arm.com>
706 * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
707 c_parser_for_statement, c_parser_statement_after_labels,
708 c_parse_pragma_novector, c_parser_pragma): Wire through novector and
711 2023-08-02 Eric Feng <ef2648@columbia.edu>
714 * c-parser.cc: New functions on stashing values for the
717 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
719 * c-parser.cc (pragma_lex_discard_to_eol): New function.
720 (c_init_preprocess): New function.
722 2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
725 * c-decl.cc (start_decl): Handle
726 -Wmissing-variable-declarations.
728 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
730 * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
731 host_data construct to have an use_device clause.
733 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
736 * c-decl.cc (finish_struct): Issue warnings for new option.
738 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
740 * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
743 2023-06-29 Richard Biener <rguenther@suse.de>
746 * c-typeck.cc (convert_argument): Sink formal_prec compute
747 to where TYPE_PRECISION is valid to use.
749 2023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
751 * Make-lang.in: Pass correct stage cc1 when processing
752 profile data collected while building target libraries
754 2023-06-16 David Malcolm <dmalcolm@redhat.com>
757 * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
760 2023-06-12 Tobias Burnus <tobias@codesourcery.com>
762 * c-parser.cc (c_parser_omp_clause_map): Reword error message for
763 clearness especially with 'omp target (enter/exit) data.'
765 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
766 Tobias Burnus <tobias@codesourcery.com>
768 * c-parser.cc (c_parser_omp_clause_defaultmap,
769 c_parser_omp_clause_map): Parse 'present'.
770 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
771 (c_parser_omp_clause_from_to): New; parse to/from clauses with
772 optional present modifer.
773 (c_parser_omp_all_clauses): Update call.
774 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
775 c_parser_omp_target_exit_data): Handle new map enum values
776 for 'present' mapping.
778 2023-05-30 Tobias Burnus <tobias@codesourcery.com>
781 * c-parser.cc (c_parser_oacc_all_clauses,
782 c_parser_omp_all_clauses): Improve error wording.
784 2023-05-23 Martin Uecker <uecker@tugraz.at>
787 * c-decl.cc (add_decl_expr): New function.
788 (grokdeclarator): Add decl expr for size expression in
789 types pointed to by parameters declared as arrays.
791 2023-05-23 Martin Uecker <uecker@tugraz.at>
797 * c-decl.cc (start_decl): Make sure size expression are
798 evaluated only in correct context.
799 (grokdeclarator): Size expression in fields may need a bind
800 expression, make sure DECL_EXPR is always created.
801 (grokfield, declspecs_add_type): Pass along size expressions.
802 (finish_struct): Remove unneeded DECL_EXPR.
803 (start_function): Evaluate size expressions for nested functions.
804 * c-parser.cc (c_parser_struct_declarations,
805 c_parser_struct_or_union_specifier): Pass along size expressions.
806 (c_parser_declaration_or_fndef): Evaluate size expression.
807 (c_parser_objc_at_property_declaration,
808 c_parser_objc_class_instance_variables): Adapt.
809 * c-tree.h (grokfield): Adapt declaration.
811 2023-05-19 Martin Uecker <uecker@tugraz.at>
813 * c-decl.cc (set_type_context): Remove.
814 (pop_scope, diagnose_mismatched_decls, pushdecl):
816 * c-typeck.cc (comptypes_internal): Remove dead code.
817 (same_translation_unit_p): Remove.
818 (tagged_types_tu_compatible_p): Some fixes.
820 2023-05-19 Joseph Myers <joseph@codesourcery.com>
822 * c-decl.cc (diagnose_mismatched_decls): Do not handle
823 thread-local declarations as tentative definitions for C2x.
824 (finish_decl): Do not allow thread-local definition with
825 incomplete type for C2x.
827 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
829 * c-convert.cc (c_convert): Ditto.
830 * c-decl.cc (merge_decls): Ditto.
831 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
832 (c_parser_omp_declare_reduction): Ditto.
833 * c-typeck.cc (build_component_ref): Ditto.
834 (convert_argument): Ditto.
835 (pointer_diff): Ditto.
836 (build_unary_op): Ditto.
837 (build_c_cast): Ditto.
838 (build_modify_expr): Ditto.
839 (store_init_value): Ditto.
840 (constexpr_init_fits_real_type): Ditto.
841 (check_constexpr_init): Ditto.
842 (c_finish_return): Ditto.
843 (handle_omp_array_sections_1): Ditto.
844 (c_finish_omp_clauses): Ditto.
845 * gimple-parser.cc (c_finish_gimple_return): Ditto.
847 2023-05-16 Joseph Myers <joseph@codesourcery.com>
849 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
852 2023-05-15 Joseph Myers <joseph@codesourcery.com>
854 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
857 2023-04-30 Andrew Pinski <apinski@marvell.com>
859 * c-typeck.cc (process_init_element): Print out array type
860 for excessive elements.
862 2023-04-30 Andrew Pinski <apinski@marvell.com>
865 * c-typeck.cc (process_init_element): Move the check
866 for string cst until after the error message.
868 2023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
870 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
872 2023-04-27 Jakub Jelinek <jakub@redhat.com>
875 * c-parser.cc (c_parser_initializer): Move diagnostics about
876 initialization of variable sized object with non-empty initializer
877 after c_parser_expr_no_commas call and ret.set_error (); after it.
879 2023-04-27 Jakub Jelinek <jakub@redhat.com>
883 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
884 reject empty initializer as invalid.
886 2023-04-26 Richard Biener <rguenther@suse.de>
888 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
891 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
893 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
894 zero exec statements before/after 'omp scan'.
896 2023-04-20 Jakub Jelinek <jakub@redhat.com>
899 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
900 warning on acc_on_device declaration.
902 2023-03-28 David Malcolm <dmalcolm@redhat.com>
905 * c-typeck.cc (parser_build_binary_op): Update for new param of
906 check_for_xor_used_as_pow.
908 2023-03-10 Jakub Jelinek <jakub@redhat.com>
911 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
914 2023-02-28 Jakub Jelinek <jakub@redhat.com>
917 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
918 and rename to c_strict_flex_array_level_of.
919 (is_flexible_array_member_p): Adjust caller.
921 2023-02-18 Martin Uecker <uecker@tugraz.at>
924 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
925 (diagnose_mismatched_decl): Dito.
926 (warn_about_goto): Dito:
927 (c_check_switch_jump_warnings): Dito.
929 (finish_struct): Dito.
930 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
931 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
932 * c-objc-common.cc (c_var_mod_p): New function.
933 (c_var_unspec_p): Remove.
934 * c-objc-common.h: Set lang hook.
935 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
936 (c_parser_typeof_specifier): Dito.
937 (c_parser_has_attribute_expression): Dito.
938 (c_parser_generic_selection): Dito.
939 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
940 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
942 2023-02-16 Patrick Palka <ppalka@redhat.com>
944 * c-parser.h: Mechanically drop static from static inline
945 functions via s/^static inline/inline/g.
947 2023-02-10 Joseph Myers <joseph@codesourcery.com>
949 * c-convert.cc (c_convert): Allow conversion of a null pointer
950 constant to nullptr_t.
951 * c-typeck.cc (null_pointer_constant_p): Remove static.
952 (convert_for_assignment): Allow conversion of a null pointer
953 constant to nullptr_t.
954 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
955 * c-tree.h (null_pointer_constant_p): Declare.
957 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
959 * c-parser.cc (c_parser_omp_allocate): Parse align
960 clause and check for restrictions.
962 2023-02-08 Joseph Myers <joseph@codesourcery.com>
964 * c-typeck.cc (check_constexpr_init): Remove argument
965 null_pointer_constant. Only check pointer initializers for being
967 (digest_init): Update calls to check_constexpr_init.
969 2023-02-02 Joseph Myers <joseph@codesourcery.com>
971 * c-typeck.cc (build_binary_op): Allow comparisons between
972 pointers and nullptr_t values that are not null pointer constants.
974 2023-02-02 Joseph Myers <joseph@codesourcery.com>
976 * c-typeck.cc: Include "realmpfr.h".
977 (constexpr_init_fits_real_type): Do not allow signaling NaN
978 conversions to different types with the same mode. Handle
979 conversions from binary to decimal types.
980 (check_constexpr_init): Do not disallow real initializers for
981 complex types. Do not disallow binary initializers for decimal
984 2023-01-31 Marek Polacek <polacek@redhat.com>
988 * c-objc-common.cc (instantiation_dependent_expression_p): New.
990 2023-01-27 Joseph Myers <joseph@codesourcery.com>
992 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
993 around auto initializer.
995 2023-01-16 Jakub Jelinek <jakub@redhat.com>
998 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
999 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
1002 2023-01-14 Jakub Jelinek <jakub@redhat.com>
1005 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
1008 2023-01-13 Qing Zhao <qing.zhao@oracle.com>
1010 * c-decl.cc (strict_flex_array_level_of): ... here.
1012 2023-01-11 Jakub Jelinek <jakub@redhat.com>
1015 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
1016 markers for K&R function parameter declarations of nested functions.
1018 2023-01-09 Joseph Myers <joseph@codesourcery.com>
1020 * c-decl.cc (build_compound_literal): Call record_inline_static.
1022 2023-01-06 Joseph Myers <joseph@codesourcery.com>
1024 * c-parser.cc (c_parser_postfix_expression): Handle integer
1025 generic arguments to functions passed to __builtin_tgmath as
1026 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
1027 Do not handle integer arguments to some narrowing functions as
1030 2022-12-19 Jakub Jelinek <jakub@redhat.com>
1033 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
1034 compound literals with function type.
1036 2022-12-07 Joseph Myers <joseph@codesourcery.com>
1038 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
1039 auto, constexpr and a type used together.
1041 2022-12-06 Qing Zhao <qing.zhao@oracle.com>
1043 * c-decl.cc (is_flexible_array_member_p): Call new function
1044 strict_flex_array_level_of.
1046 2022-11-24 Florian Weimer <fweimer@redhat.com>
1049 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
1052 2022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1054 * c-decl.cc (start_function): Set the result decl source
1055 location to the location of the typespec.
1057 2022-11-17 David Malcolm <dmalcolm@redhat.com>
1060 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
1061 to cpp_create_reader, rather than ident_hash, so that the new
1062 reader gets its own hash table.
1064 2022-11-15 David Malcolm <dmalcolm@redhat.com>
1067 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
1068 (class ana::c_translation_unit): New.
1069 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
1071 2022-11-12 Joseph Myers <joseph@codesourcery.com>
1073 * c-decl.cc (start_underspecified_init)
1074 (finish_underspecified_init): Handle name == NULL_TREE for
1076 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
1077 (shadow_tag_warned): Check for constexpr.
1078 (start_decl): Add parameter do_push.
1079 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
1080 (grokdeclarator): Handle constexpr.
1081 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
1082 (declspecs_add_scspec): Handle constexpr.
1083 * c-parser.cc (c_token_starts_compound_literal)
1084 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
1085 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
1086 (c_parser_compound_literal_scspecs)
1087 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
1088 Update calls to start_init.
1089 (c_parser_declaration_or_fndef, c_parser_initializer)
1090 (c_parser_initval): Pass true for new argument of
1091 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
1092 constexpr compound literals.
1093 (c_parser_static_assert_declaration_no_semi)
1094 (c_parser_enum_specifier, c_parser_struct_declaration)
1095 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
1096 Call convert_lvalue_to_rvalue on expressions required to be
1097 integer constant expressions.
1098 (c_parser_omp_declare_reduction): Update call to start_init.
1099 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
1100 (C_DECL_DECLARED_CONSTEXPR): New macros.
1101 (struct c_declspecs): Add constexpr_p.
1102 (start_decl, convert_lvalue_to_rvalue, start_init): Update
1104 * c-typeck.cc (require_constant_value, require_constant_elements):
1106 (require_constexpr_value, maybe_get_constexpr_init)
1107 (constexpr_init_fits_real_type, check_constexpr_init): New.
1108 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
1109 maybe_get_constexpr_init.
1110 (store_init_value): Update call to digest_init.
1111 (digest_init): Add parameters int_const_expr, arith_const_expr and
1112 require_constexpr. Check constexpr initializers.
1113 (constructor_top_level): Remove.
1114 (struct initializer_stack): Remove top_level. Add
1115 require_constexpr_value.
1116 (start_init): Remove parameter top_level. Add parameters
1117 init_require_constant and init_require_constexpr. Save
1118 require_constexpr_value on stack.
1119 (pop_init_level): Use a null pointer constant for zero initializer
1120 of pointer initialized with {}.
1121 (output_init_element): Update call to digest_init. Avoid passing
1122 null pointer constants of pointer type through digest_init a
1123 second time when initializing a constexpr object.
1125 2022-11-03 Joseph Myers <joseph@codesourcery.com>
1127 * c-decl.cc (in_underspecified_init, start_underspecified_init)
1128 (finish_underspecified_init): New.
1129 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
1130 Give errors inside initializers of underspecified declarations.
1131 (grokdeclarator): Handle (erroneous) case of C2X auto on a
1133 (declspecs_add_type): Handle c2x_auto_p case.
1134 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
1136 (finish_declspecs): Handle c2x_auto_p.
1137 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
1138 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
1139 (struct c_declspecs): Add c2x_auto_p.
1140 (start_underspecified_init, finish_underspecified_init): New
1142 * c-typeck.cc (build_external_ref): Give error for underspecified
1143 declaration referenced in its initializer.
1145 2022-10-28 Joseph Myers <joseph@codesourcery.com>
1147 * c-decl.cc (grokdeclarator): Pass
1148 arg_info->no_named_args_stdarg_p to build_function_type.
1149 (grokparms): Check arg_info->no_named_args_stdarg_p before
1150 converting () to (void).
1151 (build_arg_info): Initialize no_named_args_stdarg_p.
1152 (get_parm_info): Set no_named_args_stdarg_p.
1153 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
1154 build_function_type.
1155 (store_parm_decls): Count (...) functions as prototyped.
1156 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
1157 parenthesis to start parameter list.
1158 (c_parser_parms_list_declarator): Always allow '...' with no
1159 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
1160 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
1161 * c-typeck.cc (composite_type): Handle
1162 TYPE_NO_NAMED_ARGS_STDARG_P.
1163 (function_types_compatible_p): Compare
1164 TYPE_NO_NAMED_ARGS_STDARG_P.
1166 2022-10-28 Jakub Jelinek <jakub@redhat.com>
1168 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
1169 comma before the first clause.
1170 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
1171 c_parser_omp_flush, c_parser_omp_scan_loop_body,
1172 c_parser_omp_ordered, c_finish_omp_declare_variant,
1173 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
1174 c_parser_omp_requires, c_parser_omp_error,
1175 c_parser_omp_assumption_clauses): Likewise.
1177 2022-10-28 Joseph Myers <joseph@codesourcery.com>
1180 * c-convert.cc (c_convert): Handle enums with underlying boolean
1182 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
1183 enums with enum type specifier, but give errors for storage class
1184 specifiers, qualifiers or alignment specifiers in non-definition
1185 declarations of such enums.
1186 (grokdeclarator): Give error for non-definition use of type
1187 specifier with an enum type specifier.
1188 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
1189 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
1190 (xref_tag): Update call to parser_xref_tag.
1191 (start_enum): Add argument fixed_underlying_type. Complete enum
1192 type with a fixed underlying type given in the definition. Give
1193 error for defining without a fixed underlying type in the
1194 definition if one was given in a prior declaration. Do not mark
1195 enums with fixed underlying type as packed for -fshort-enums.
1196 Store the enum type in the_enum.
1197 (finish_enum): Do not adjust types of values or check their range
1198 for an enum with a fixed underlying type. Set underlying type of
1200 (build_enumerator): Check enumeration constants for enum with
1201 fixed underlying type against that type and convert to that type.
1202 Increment in the underlying integer type, with handling for bool.
1203 (c_simulate_enum_decl): Update call to start_enum.
1204 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
1205 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
1206 rather than recomputing an underlying type based on size.
1207 * c-parser.cc (c_parser_declspecs)
1208 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
1209 Set has_enum_type_specifier for type specifiers.
1210 (c_parser_enum_specifier): Handle enum type specifiers.
1211 (c_parser_struct_or_union_specifier): Update call to
1213 (c_parser_omp_atomic): Check for boolean increment or decrement
1214 using C_BOOLEAN_TYPE_P.
1215 * c-tree.h (C_BOOLEAN_TYPE_P): New.
1216 (struct c_typespec): Add has_enum_type_specifier.
1217 (struct c_declspecs): Add enum_type_specifier_ref_p.
1218 (struct c_enum_contents): Add enum_type.
1219 (start_enum, parser_xref_tag): Update prototypes.
1220 * c-typeck.cc (composite_type): Allow for enumerated types
1221 compatible with bool.
1222 (common_type, comptypes_internal, perform_integral_promotions):
1223 Use ENUM_UNDERLYING_TYPE.
1224 (parser_build_binary_op, build_unary_op, convert_for_assignment)
1225 (c_finish_return, c_start_switch, build_binary_op): Check for
1226 boolean types using C_BOOLEAN_TYPE_P.
1228 2022-10-24 Jakub Jelinek <jakub@redhat.com>
1231 * c-typeck.cc (build_binary_op): Pass operands before excess precision
1232 promotions to scalar_to_vector call.
1234 2022-10-24 Arsen Arsenović <arsen@aarsen.me>
1236 * c-decl.cc (finish_function): Ignore hosted when deciding
1237 whether to implicitly return zero, but check noreturn.
1238 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
1239 requirements to just MAIN_NAME_P when hosted, or `int main'
1242 2022-10-20 Richard Biener <rguenther@suse.de>
1246 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
1247 the parsed IL and zap the body on error.
1249 2022-10-18 Joseph Myers <joseph@codesourcery.com>
1252 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
1253 with previous declaration visible.
1255 2022-10-18 Joseph Myers <joseph@codesourcery.com>
1258 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
1259 convert all to the type of the enumeration. pedwarn if no integer
1260 type fits all enumerators and default to
1261 widest_integer_literal_type_node in that case. Otherwise pedwarn
1262 for type wider than intmax_t.
1263 (build_enumerator): pedwarn for enumerators outside the range of
1264 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
1265 enumerators outside the range of int. On overflow, attempt to
1266 find a wider type that can hold the value of the next enumerator.
1267 Do not convert value to type determined with
1268 c_common_type_for_size.
1270 2022-10-14 Jakub Jelinek <jakub@redhat.com>
1272 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
1275 2022-10-14 Joseph Myers <joseph@codesourcery.com>
1277 * c-decl.cc (build_compound_literal): Add parameter scspecs.
1278 Handle storage class specifiers.
1279 * c-parser.cc (c_token_starts_compound_literal)
1280 (c_parser_compound_literal_scspecs): New.
1281 (c_parser_postfix_expression_after_paren_type): Add parameter
1282 scspecs. Call pedwarn_c11 for use of storage class specifiers.
1283 Update call to build_compound_literal.
1284 (c_parser_cast_expression, c_parser_sizeof_expression)
1285 (c_parser_alignof_expression): Handle storage class specifiers for
1286 compound literals. Update calls to
1287 c_parser_postfix_expression_after_paren_type.
1288 (c_parser_postfix_expression): Update syntax comment.
1289 * c-tree.h (build_compound_literal): Update prototype.
1290 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
1291 register compound literal.
1293 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
1295 * c-decl.cc (flexible_array_member_type_p): New function.
1296 (one_element_array_type_p): Likewise.
1297 (zero_length_array_type_p): Likewise.
1298 (add_flexible_array_elts_to_size): Call new utility
1299 routine flexible_array_member_type_p.
1300 (is_flexible_array_member_p): New function.
1301 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
1303 2022-10-06 Joseph Myers <joseph@codesourcery.com>
1305 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
1307 (c_keyword_starts_typename, c_token_starts_declspecs)
1308 (c_parser_declspecs, c_parser_objc_selector): Handle
1310 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
1311 Distinguish typeof for C2x from __typeof__ for all standard
1312 versions and typeof before C2x.
1313 * c-typeck.cc (build_function_call_vec): Use unqualified version
1314 of non-void return type.
1315 (build_unary_op): Use unqualified type for increment and
1318 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1320 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
1321 call for holds clause on assume construct.
1323 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1326 * c-parser.cc (handle_assume_attribute): New function.
1327 (c_parser_declaration_or_fndef): Handle assume attribute.
1328 (c_parser_attribute_arguments): Add assume_attr argument,
1329 if true, parse first argument as conditional expression.
1330 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
1331 c_parser_attribute_arguments callers.
1332 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
1335 2022-10-04 Jakub Jelinek <jakub@redhat.com>
1337 * c-lang.h (struct c_omp_declare_target_attr): New type.
1338 (current_omp_declare_target_attribute): Change type from
1339 int to vec<c_omp_declare_target_attr, va_gc> *.
1340 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
1341 If last pushed directive was begin declare target, use different
1342 wording and simplify format strings for easier translations.
1343 (c_parser_omp_clause_device_type): Uncomment
1344 check_no_duplicate_clause call.
1345 (c_parser_omp_declare_target): Adjust for the
1346 current_omp_declare_target_attribute type change, push { -1 }.
1347 Use error_at rather than warning_at for declare target with
1348 only device_type clauses.
1349 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
1350 (c_parser_omp_begin): Add begin declare target support.
1351 (c_parser_omp_end): Adjust for the
1352 current_omp_declare_target_attribute type change, adjust
1353 diagnostics wording and simplify format strings for easier
1355 * c-decl.cc (current_omp_declare_target_attribute): Change type from
1356 int to vec<c_omp_declare_target_attr, va_gc> *.
1357 (c_decl_attributes): Adjust for the
1358 current_omp_declare_target_attribute type change. If device_type
1359 was present on begin declare target, add "omp declare target host"
1360 and/or "omp declare target nohost" attributes.
1362 2022-09-29 Joseph Myers <joseph@codesourcery.com>
1364 * c-decl.cc (handle_std_noreturn_attribute): New function.
1365 (std_attribute_table): Add _Noreturn and noreturn.
1367 2022-09-27 Jakub Jelinek <jakub@redhat.com>
1369 * c-lang.h (current_omp_begin_assumes): Declare.
1370 * c-parser.cc: Include bitmap.h.
1371 (c_parser_omp_end_declare_target): Rename to ...
1372 (c_parser_omp_end): ... this. Handle also end assumes.
1373 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
1374 c_parser_omp_assumes, c_parser_omp_assume): New functions.
1375 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
1376 without corresponding #pragma omp end assumes.
1377 (c_parser_pragma): Use %s in may only be used at file scope
1378 diagnostics to decrease number of translatable messages. Handle
1379 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
1380 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
1381 for it rather than c_parser_omp_end_declare_target.
1382 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
1383 * c-decl.cc (current_omp_begin_assumes): Define.
1385 2022-09-24 Jakub Jelinek <jakub@redhat.com>
1388 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
1389 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
1390 t2 have different types.
1392 2022-09-22 David Malcolm <dmalcolm@redhat.com>
1395 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
1396 (c_parser_cast_expression): Likewise.
1397 (c_parser_alignof_expression): Likewise.
1398 (c_parser_postfix_expression_after_paren_type): Likewise.
1399 (c_parser_postfix_expression_after_primary): Likewise.
1400 (c_parser_expression): Likewise.
1401 (c_parser_omp_variable_list): Likewise.
1402 (c_parser_transaction_expression): Likewise.
1403 * c-tree.h (c_expr::set_error): Likewise.
1404 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
1405 (parser_build_unary_op): Likewise.
1406 (parser_build_binary_op): Likewise.
1407 (digest_init): Likewise.
1408 (pop_init_level): Likewise.
1409 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
1411 2022-09-19 Marek Polacek <polacek@redhat.com>
1414 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
1417 2022-09-15 Richard Biener <rguenther@suse.de>
1419 * c-decl.cc (build_void_list_node): Remove.
1421 2022-09-14 Julian Brown <julian@codesourcery.com>
1423 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
1426 2022-09-07 Joseph Myers <joseph@codesourcery.com>
1428 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
1429 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
1430 for C2x spellings of keywords.
1431 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
1433 2022-09-06 Jakub Jelinek <jakub@redhat.com>
1435 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
1436 in omp_cur_iteration - 1 has integer_type_node type.
1438 2022-09-03 Jakub Jelinek <jakub@redhat.com>
1440 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
1441 (c_parser_omp_clause_depend_sink): Renamed to ...
1442 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
1443 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
1444 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
1445 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
1446 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
1447 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
1448 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
1449 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
1450 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
1451 (c_parser_omp_clause_doacross): New function.
1452 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
1453 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
1454 OMP_CLAUSE_DEPEND_SOURCE.
1455 (c_parser_omp_for_loop): Don't diagnose here linear clause together
1456 with ordered with argument.
1457 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
1459 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1460 (c_parser_omp_ordered): Handle also doacross and adjust for it
1462 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
1463 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
1465 2022-09-02 David Malcolm <dmalcolm@redhat.com>
1468 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
1469 (c_parser_expr_no_commas): Likewise.
1470 (c_parser_conditional_expression): Likewise.
1471 (c_parser_binary_expression): Clear m_decimal when popping the
1473 (c_parser_unary_expression): Clear ret.m_decimal.
1474 (c_parser_has_attribute_expression): Likewise for result.
1475 (c_parser_predefined_identifier): Likewise for expr.
1476 (c_parser_postfix_expression): Likewise for expr.
1477 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
1479 * c-tree.h (c_expr::m_decimal): New bitfield.
1480 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
1481 (parser_build_binary_op): Call check_for_xor_used_as_pow.
1483 2022-09-01 Joseph Myers <joseph@codesourcery.com>
1485 * c-decl.cc (grokparms): Handle () in a function declaration the
1486 same as (void) for C2X.
1488 2022-08-31 Joseph Myers <joseph@codesourcery.com>
1490 * c-parser.cc (c_parser_label): Pass attributes to do_case.
1491 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
1494 2022-08-26 Jakub Jelinek <jakub@redhat.com>
1496 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
1498 2022-08-25 Marek Polacek <polacek@redhat.com>
1500 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
1501 Give a better diagnostic when converting to nullptr_t.
1502 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
1504 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
1505 (c_parser_postfix_expression): Handle RID_NULLPTR.
1506 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
1508 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
1509 (build_conditional_expr): Handle the case when the second/third operand
1510 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
1511 (convert_for_assignment): Handle converting an expression of type
1512 nullptr_t to pointer/bool.
1513 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
1514 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
1516 2022-08-25 Joseph Myers <joseph@codesourcery.com>
1518 * c-decl.cc (start_decl): Do not diagnose initialization of
1519 variable-sized objects here.
1520 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
1522 (c_parser_initializer): Diagnose initialization of variable-sized
1523 objects other than with braced initializer.
1524 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
1525 braces and update diagnostic text. Diagnose initialization of
1526 variable-sized objects with nonempty braces.
1527 * c-typeck.cc (digest_init): Update diagnostic for initialization
1528 of variable-sized objects.
1529 (really_start_incremental_init, set_designator)
1530 (process_init_element): Update comments.
1531 (pop_init_level): Allow scalar empty initializers.
1533 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
1534 Chung-Lin Tang <cltang@codesourcery.com>
1537 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
1538 instead of removed langhook.
1539 * c-typeck.cc (c_finish_omp_clauses): Likewise.
1541 2022-08-11 Marek Polacek <polacek@redhat.com>
1543 PR middle-end/102633
1544 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
1545 Call suppress_warning.
1546 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
1547 (c_parser_omp_declare_reduction): Pass omp_priv down to
1548 c_parser_initializer.
1550 2022-08-08 Tom Honermann <tom@honermann.net>
1552 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
1553 of CPP_UTF8STRING when char8_t support is enabled.
1554 * c-typeck.cc (digest_init): Allow initialization of an array
1555 of character type by a string literal with type array of
1558 2022-08-01 David Malcolm <dmalcolm@redhat.com>
1560 * c-typeck.cc (build_c_cast): Quote names of address spaces in
1562 (convert_for_assignment): Add a note to address space mismatch
1563 diagnostics, specifying the expected and actual types.
1565 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
1567 PR preprocessor/97498
1568 * c-parser.cc (c_parser_pragma): Set input_location to the
1569 location of the pragma, rather than the start of the line.
1571 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
1572 Chung-Lin Tang <cltang@codesourcery.com>
1573 Thomas Schwinge <thomas@codesourcery.com>
1575 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
1576 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
1577 OMP_REQUIRES_TARGET_USED.
1578 (c_parser_omp_requires): Remove sorry.
1580 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
1582 * c-parser.cc (c_parser_omp_target_enter_data,
1583 c_parser_omp_target_exit_data): Accept tofrom
1584 map-type modifier but use 'to' / 'from' internally.
1586 2022-06-16 David Malcolm <dmalcolm@redhat.com>
1588 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
1589 group the warning with any note.
1590 (warn_about_goto): Likewise to group error or warning with note.
1591 Bail out if the warning wasn't emitted, to avoid emitting orphan
1593 (lookup_label_for_goto): Add auto_diagnostic_group to
1594 group the error with the note.
1595 (check_earlier_gotos): Likewise.
1596 (c_check_switch_jump_warnings): Likewise for any error/warning.
1597 Conditionalize emission of the notes.
1598 (diagnose_uninitialized_cst_member): Likewise for warning,
1599 conditionalizing emission of the note.
1600 (grokdeclarator): Add auto_diagnostic_group to group the "array
1601 type has incomplete element type" error with any note.
1602 (parser_xref_tag): Add auto_diagnostic_group to group warnings
1603 with their notes. Conditionalize emission of notes.
1604 (start_struct): Add auto_diagnostic_group to group the
1605 "redefinition of" errors with any note.
1606 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
1607 (check_for_loop_decls): Likewise for pre-C99 error.
1609 2022-06-07 Jakub Jelinek <jakub@redhat.com>
1611 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
1612 style linear clause modifiers. Set
1613 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
1614 old style modifiers are used.
1615 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
1616 with val modifier on simd or for if the old style modifiers are
1619 2022-06-02 David Malcolm <dmalcolm@redhat.com>
1621 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
1622 (c_get_sarif_source_language): New.
1623 * c-tree.h (c_get_sarif_source_language): New decl.
1625 2022-05-31 Jason Merrill <jason@redhat.com>
1627 * Make-lang.in (c.tags): Look at *.cc.
1629 2022-05-31 Jakub Jelinek <jakub@redhat.com>
1631 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
1634 2022-05-28 Jakub Jelinek <jakub@redhat.com>
1636 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
1637 seen first, use "%<to%>" or "%<enter%>" depending on
1638 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
1639 "%<to%> or %<enter%>" wording.
1641 2022-05-27 Jakub Jelinek <jakub@redhat.com>
1643 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
1644 (c_parser_omp_all_clauses): For to clause on declare target, use
1645 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
1646 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
1647 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
1648 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
1649 OMP_CLAUSE_TO_DECLARE.
1650 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
1651 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
1652 name in diagnostics instead of
1653 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
1655 2022-05-25 Jakub Jelinek <jakub@redhat.com>
1658 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
1659 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
1660 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
1661 diagnostic and fixit hint if DATUM has pointer type.
1662 * c-parser.cc (c_parser_postfix_expression,
1663 c_parser_omp_variable_list): Adjust build_component_ref callers.
1664 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
1667 2022-05-24 Jakub Jelinek <jakub@redhat.com>
1670 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
1672 2022-05-18 Marek Polacek <polacek@redhat.com>
1675 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
1677 * c-tree.h (comptypes_check_enum_int): Declare.
1678 * c-typeck.cc (comptypes): No longer static.
1680 2022-05-17 Marek Polacek <polacek@redhat.com>
1682 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
1685 2022-05-17 Jakub Jelinek <jakub@redhat.com>
1687 * c-parser.cc (c_parser_omp_clause_depend): Parse
1688 inoutset depend-kind.
1689 (c_parser_omp_depobj): Likewise.
1691 2022-05-16 Martin Liska <mliska@suse.cz>
1693 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
1695 2022-05-12 Jakub Jelinek <jakub@redhat.com>
1697 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
1699 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
1700 in postfix expressions.
1701 (c_parser_omp_variable_list): Handle omp_all_memory in depend
1703 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
1704 keyword in depend clause as null_pointer_node, diagnose invalid
1707 2022-05-09 Martin Liska <mliska@suse.cz>
1709 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
1711 (c_parser_binary_expression): Likewise.
1713 2022-05-07 Marek Polacek <polacek@redhat.com>
1717 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1719 2022-04-08 Jakub Jelinek <jakub@redhat.com>
1722 * c-typeck.cc (c_build_va_arg): Reject function types.
1724 2022-03-22 Marek Polacek <polacek@redhat.com>
1728 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1729 (start_init): Set it.
1730 (finish_init): Restore constructor_designated.
1731 (push_init_level): Set constructor_designated to the value of
1732 constructor_designated in the upper constructor_stack.
1734 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1737 * c-typeck.cc (handle_omp_array_sections_1)
1738 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1739 instead of 'c_omp_map_clause_name'.
1741 2022-03-09 Joseph Myers <joseph@codesourcery.com>
1743 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1744 differently from earlier standards for unprototyped function type
1747 2022-03-09 Jakub Jelinek <jakub@redhat.com>
1750 * c-fold.cc (c_fully_fold_internal): Don't emit
1751 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1752 * c-typeck.cc (build_binary_op): Likewise.
1754 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1756 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1759 2022-02-23 Richard Biener <rguenther@suse.de>
1761 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1762 SSA names without definition.
1763 (c_parser_gimple_declaration): Handle pointer typed SSA names.
1765 2022-02-17 Jakub Jelinek <jakub@redhat.com>
1768 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1769 convert_lvalue_to_rvalue and build_indirect_ref instead of
1770 build_simple_mem_ref.
1772 2022-02-11 Richard Biener <rguenther@suse.de>
1774 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1777 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1779 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1781 (c_parser_omp_variable_list): Handle array sections.
1782 (c_parser_omp_clause_has_device_addr): Added.
1783 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1785 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1787 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1788 (c_finish_omp_clauses): Handle array sections.
1790 2022-02-09 Jakub Jelinek <jakub@redhat.com>
1793 * c-parser.cc (c_parser_postfix_expression)
1794 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1795 instead of build1_loc to build PAREN_EXPR.
1796 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1797 * c-fold.cc (c_fully_fold_internal): Likewise.
1799 2022-01-17 Martin Liska <mliska@suse.cz>
1801 * Make-lang.in: Rename .c names to .cc.
1802 * c-convert.cc: Likewise.
1803 * c-decl.cc (struct lang_identifier): Likewise.
1804 (pop_scope): Likewise.
1805 (finish_decl): Likewise.
1806 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1807 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1808 * c-parser.h (GCC_C_PARSER_H): Likewise.
1809 * c-tree.h (c_keyword_starts_typename): Likewise.
1810 (finish_declspecs): Likewise.
1811 (c_get_alias_set): Likewise.
1812 (enum c_oracle_request): Likewise.
1813 (tag_exists_p): Likewise.
1814 (set_c_expr_source_range): Likewise.
1815 * c-typeck.cc (c_common_type): Likewise.
1816 (c_finish_omp_clauses): Likewise.
1817 * config-lang.in: Likewise.
1819 2022-01-17 Martin Liska <mliska@suse.cz>
1821 * c-aux-info.c: Moved to...
1822 * c-aux-info.cc: ...here.
1823 * c-convert.c: Moved to...
1824 * c-convert.cc: ...here.
1825 * c-decl.c: Moved to...
1826 * c-decl.cc: ...here.
1827 * c-errors.c: Moved to...
1828 * c-errors.cc: ...here.
1829 * c-fold.c: Moved to...
1830 * c-fold.cc: ...here.
1831 * c-lang.c: Moved to...
1832 * c-lang.cc: ...here.
1833 * c-objc-common.c: Moved to...
1834 * c-objc-common.cc: ...here.
1835 * c-parser.c: Moved to...
1836 * c-parser.cc: ...here.
1837 * c-typeck.c: Moved to...
1838 * c-typeck.cc: ...here.
1839 * gccspec.c: Moved to...
1840 * gccspec.cc: ...here.
1841 * gimple-parser.c: Moved to...
1842 * gimple-parser.cc: ...here.
1844 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
1846 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1848 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1851 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1852 outer node for ARRAY_REFs.
1854 2022-01-01 Jakub Jelinek <jakub@redhat.com>
1857 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1858 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1860 2021-12-17 Marek Polacek <polacek@redhat.com>
1863 * c-decl.c (c_warn_unused_attributes): Don't warn for
1864 attribute_ignored_p.
1865 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1866 arguments when the attribute is ignored.
1868 2021-12-14 Jakub Jelinek <jakub@redhat.com>
1871 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1872 consume the pragma and silently skip to the pragma eol.
1874 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
1876 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1877 * c-parser.c: Likewise.
1879 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1882 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1883 to resort_data.new_value.
1885 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1887 * c-parser.c (struct omp_dim): New struct type for use inside
1888 c_parser_omp_variable_list.
1889 (c_parser_omp_variable_list): Allow multiple levels of array and
1890 component accesses in array section base-pointer expression.
1891 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1892 c_parser_omp_var_list_parens.
1893 (c_parser_omp_clause_from): Likewise.
1894 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1895 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1897 (c_finish_omp_clauses): Extend allowed ranged of expressions
1898 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1900 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1903 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1904 call to c_parser_omp_variable_list to 'true'.
1905 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1906 array base handling.
1907 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1909 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
1911 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1912 orphan loop" checking.
1914 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
1915 Thomas Schwinge <thomas@codesourcery.com>
1917 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1918 OpenACC gang reductions.
1920 2021-11-30 Richard Biener <rguenther@suse.de>
1922 * gimple-parser.c (c_parser_gimple_postfix_expression):
1923 avoid unreachable code after break.
1925 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
1928 * Make-lang.in: Use ETAGS variable in TAGS target.
1930 2021-11-29 Richard Biener <rguenther@suse.de>
1932 * c-typeck.c (c_tree_equal): Remove unreachable return.
1933 * c-parser.c (get_matching_symbol): Likewise.
1935 2021-11-23 Jakub Jelinek <jakub@redhat.com>
1937 * c-typeck.c (c_clone_omp_udr): Don't initialize
1938 id.transform_lang_insert_block.
1940 2021-11-19 Martin Sebor <msebor@redhat.com>
1944 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
1945 code resulting from macro expansion.
1947 2021-11-19 Martin Liska <mliska@suse.cz>
1950 2021-11-19 Martin Liska <mliska@suse.cz>
1952 * c-parser.c (add_debug_begin_stmt): Use option directly.
1954 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1956 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1957 * c-parser.c (c_parser_postfix_expression): Likewise.
1959 2021-11-18 Martin Liska <mliska@suse.cz>
1961 * c-parser.c (add_debug_begin_stmt): Use option directly.
1963 2021-11-17 Martin Sebor <msebor@redhat.com>
1966 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1967 bounds before deciding if they're constant.
1969 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1971 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1972 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1974 2021-11-11 Jakub Jelinek <jakub@redhat.com>
1976 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1977 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1978 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1979 OMP_CLAUSE_NUM_TEAMS_EXPR.
1980 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1981 combined target teams even lower-bound expression.
1983 2021-11-11 Richard Biener <rguenther@suse.de>
1985 * gimple-parser.c: Shuffle bitmap.h include.
1987 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1990 * c-convert.c (c_convert): New function, based on convert.
1991 (convert): Make into wrapper of c_convert.
1992 (convert_init): New function.
1993 * c-typeck.c (enum impl_conv): Add ic_init_const.
1994 (convert_for_assignment): Handle ic_init_const like ic_init. Add
1995 new argument to convert_and_check call.
1996 (digest_init): Pass ic_init_const to convert_for_assignment for
1997 initializers required to be constant.
1999 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
2001 * c-tree.h (c_simulate_record_decl): Declare.
2002 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
2003 * c-decl.c (c_simulate_record_decl): New function.
2005 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
2008 * Make-lang.in: Add dummy c.install-dvi target.
2010 2021-10-15 Richard Biener <rguenther@suse.de>
2014 (c_parser_gimple_postfix_expression_after_primary): Check
2015 for a pointer do be dereferenced by ->.
2017 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
2019 * c-parser.c (c_finish_omp_declare_variant): Change call from
2020 c_omp_check_context_selector to omp_check_context_selector. Change
2021 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
2023 2021-10-09 Jakub Jelinek <jakub@redhat.com>
2025 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
2026 (c_parser_omp_scan_loop_body): Use it.
2027 (c_parser_omp_sections_scope): Likewise.
2029 2021-10-07 Richard Biener <rguenther@suse.de>
2031 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
2033 2021-10-05 Richard Biener <rguenther@suse.de>
2036 * gimple-parser.c (c_parser_gimple_postfix_expression):
2037 Accept more address _Literals.
2039 2021-10-04 Marek Polacek <polacek@redhat.com>
2042 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
2044 2021-10-01 Martin Sebor <msebor@redhat.com>
2047 * c-typeck.c (maybe_warn_for_null_address): New function.
2048 (build_binary_op): Call it.
2050 2021-10-01 Jakub Jelinek <jakub@redhat.com>
2051 Richard Biener <rguenther@suse.de>
2054 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2055 for division even for SANITIZE_SI_OVERFLOW.
2057 2021-10-01 Jakub Jelinek <jakub@redhat.com>
2059 * c-parser.c (c_parser_omp_clause_order): Set
2060 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
2062 2021-09-28 Andrew Pinski <apinski@marvell.com>
2065 * c-parser.c (c_parser_statement_after_labels): Pass
2066 the c_expr instead of the tree to c_finish_goto_ptr.
2067 * c-typeck.c (c_finish_goto_ptr): Change the second
2068 argument type to c_expr.
2069 * c-tree.h (c_finish_goto_ptr): Likewise.
2070 Error out if the expression was not of a pointer type.
2072 2021-09-22 Jakub Jelinek <jakub@redhat.com>
2074 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
2077 2021-09-18 Jakub Jelinek <jakub@redhat.com>
2079 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
2080 and reproducible modifiers.
2081 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
2083 2021-09-18 Jakub Jelinek <jakub@redhat.com>
2085 * c-parser.c (c_parser_omp_clause_default): Handle private and
2086 firstprivate arguments, adjust diagnostics on unknown argument.
2088 2021-09-17 Jakub Jelinek <jakub@redhat.com>
2090 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
2093 2021-09-10 Jakub Jelinek <jakub@redhat.com>
2095 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
2096 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
2097 don't call build_conditional_expr, instead build a COND_EXPR directly.
2098 (c_parser_binary_expression): Avoid calling parser_build_binary_op
2099 if omp_atomic_lhs even in more cases for >, < or ==.
2100 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
2101 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
2102 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
2103 * c-typeck.c (build_binary_op): For flag_openmp only handle
2106 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
2108 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
2111 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
2113 * c-decl.c (enum deprecated_states): Add unavailable state.
2114 (merge_decls): Copy unavailability.
2115 (quals_from_declspecs): Handle unavailable case.
2116 (start_decl): Amend the logic handling suppression of nested
2117 deprecation states to include unavailability.
2118 (smallest_type_quals_location): Amend comment.
2119 (grokdeclarator): Handle the unavailable deprecation state.
2120 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
2121 * c-tree.h (struct c_declspecs): Add unavailable_p.
2122 * c-typeck.c (build_component_ref): Handle unavailability.
2123 (build_external_ref): Likewise.
2125 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
2126 Joseph Myers <joseph@codesourcery.com>
2129 * c-decl.c (duplicate_decls): On significant mismatches, mark the
2130 types of both (non-function) decls as error_mark_node, so that the
2131 middle-end can see the code is malformed.
2132 (free_attr_access_data): Don't process if the type has been set to
2135 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
2137 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
2138 and 'ancestor' in 'target device' clauses.
2140 2021-08-23 Jakub Jelinek <jakub@redhat.com>
2142 * c-parser.c (c_parser_omp_clause_num_tasks,
2143 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
2145 2021-08-22 Martin Uecker <muecker@gwdg.de>
2148 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
2149 for pointers to arrays with qualifiers.
2150 (build_conditional_expr): For C23 don't lose qualifiers for pointers
2151 to arrays when the other pointer is a void pointer. Update warnings.
2152 (convert_for_assignment): Update warnings for C2X when converting from
2153 void* with qualifiers to a pointer to array with the same qualifiers.
2155 2021-08-20 Jakub Jelinek <jakub@redhat.com>
2157 * c-parser.c (c_parser_omp_error): New function.
2158 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
2160 2021-08-20 Jakub Jelinek <jakub@redhat.com>
2162 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
2163 comma at the end of list.
2164 (c_parser_omp_requires): Likewise.
2166 2021-08-19 Jakub Jelinek <jakub@redhat.com>
2168 * c-parser.c (c_parser_omp_requires): Don't call
2169 c_parser_peek_2nd_token and optionally consume token if current
2170 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
2172 2021-08-18 Jakub Jelinek <jakub@redhat.com>
2174 * c-parser.c (c_parser_omp_nothing): New function.
2175 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
2177 2021-08-18 Jakub Jelinek <jakub@redhat.com>
2179 * c-parser.c (c_parser_statement_after_labels): Add restart label
2180 near the start of the function. If c_parser_pragma returns false,
2182 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
2183 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
2184 return what c_parser_omp_declare returned. Return true instead of
2185 false after emitting errors that the directive is not allowed in
2186 pragma_stmt context.
2187 (c_parser_omp_ordered): Return true instead of
2188 false after emitting errors that the directive is not allowed in
2189 pragma_stmt context.
2190 (c_parser_omp_target_update): Likewise.
2191 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
2192 Change return type from tree to bool, return false if the
2193 directive should be ignored in pragma_stmt contexts.
2194 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
2195 return their result directly.
2196 (c_parser_omp_cancellation_point): Change return type from void to
2197 bool, return false if the directive should be ignored in pragma_stmt
2199 (c_parser_omp_declare): Likewise.
2201 2021-08-17 Jakub Jelinek <jakub@redhat.com>
2203 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
2204 (c_parser_omp_scope): New function.
2205 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
2207 2021-08-12 Jakub Jelinek <jakub@redhat.com>
2209 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
2210 (c_parser_omp_clause_filter): New function.
2211 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
2212 (OMP_MASKED_CLAUSE_MASK): Define.
2213 (c_parser_omp_masked): New function.
2214 (c_parser_omp_parallel): Handle parallel masked.
2215 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
2216 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
2218 2021-08-12 Martin Uecker <muecker@gwdg.de>
2222 * c-typeck.c (c_expr_sizeof_type): Evaluate
2223 size expressions for structs of variable size.
2225 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
2227 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
2228 'primary' as alias for 'master'.
2230 2021-08-10 Martin Uecker <muecker@gwdg.de>
2233 * c-typeck.c (c_expr_sizeof_expr): Evaluate
2234 size expressions for structs of variable size.
2236 2021-08-06 Tamar Christina <tamar.christina@arm.com>
2238 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
2239 * c-tree.h (c_simulate_enum_decl): Likewise.
2241 2021-08-06 Martin Sebor <msebor@redhat.com>
2243 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
2244 vec arguments to by-reference.
2245 (c_finish_omp_declare_simd): Same.
2246 (c_parser_compound_statement_nostart): Same.
2247 (c_parser_for_statement): Same.
2248 (c_parser_objc_methodprotolist): Same.
2249 (c_parser_oacc_routine): Same.
2250 (c_parser_omp_for_loop): Same.
2251 (c_parser_omp_declare_simd): Same.
2253 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
2254 Joseph Myers <joseph@codesourcery.com>
2255 Cesar Philippidis <cesar@codesourcery.com>
2257 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
2258 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
2259 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
2260 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
2262 2021-07-20 Martin Sebor <msebor@redhat.com>
2264 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
2266 * c-typeck.c (c_build_function_call_vec): Same.
2268 2021-07-15 Martin Sebor <msebor@redhat.com>
2272 * c-decl.c (get_parm_array_spec): Strip nops.
2274 2021-07-06 Martin Sebor <msebor@redhat.com>
2276 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
2278 2021-07-02 Jakub Jelinek <jakub@redhat.com>
2281 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
2282 appears before a CPP_NAME.
2284 2021-06-25 Martin Sebor <msebor@redhat.com>
2286 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
2287 warning_suppressed_p, suppress_warning, and copy_no_warning.
2288 (diagnose_mismatched_decls): Same.
2289 (duplicate_decls): Same.
2290 (grokdeclarator): Same.
2291 (finish_function): Same.
2292 (c_write_global_declarations_1): Same.
2293 * c-fold.c (c_fully_fold_internal): Same.
2294 * c-parser.c (c_parser_expr_no_commas): Same.
2295 (c_parser_postfix_expression): Same.
2296 * c-typeck.c (array_to_pointer_conversion): Same.
2297 (function_to_pointer_conversion): Same.
2298 (default_function_array_conversion): Same.
2299 (convert_lvalue_to_rvalue): Same.
2300 (default_conversion): Same.
2301 (build_indirect_ref): Same.
2302 (build_function_call_vec): Same.
2303 (build_atomic_assign): Same.
2304 (build_unary_op): Same.
2305 (c_finish_return): Same.
2306 (emit_side_effect_warnings): Same.
2307 (c_finish_stmt_expr): Same.
2308 (c_omp_clause_copy_ctor): Same.
2310 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2313 * c-parser.c (c_parser_has_attribute_expression): Set source range for
2316 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2319 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
2322 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2324 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
2325 C_ORT_OMP for clauses on target construct.
2326 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
2327 (c_parser_omp_target): For non-combined target add
2328 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
2329 C_ORT_OMP_TARGET to c_finish_omp_clauses.
2330 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
2331 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
2332 never present on C_ORT_*DECLARE_SIMD.
2333 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
2334 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
2335 corresponding map clauses.
2337 2021-06-21 Jakub Jelinek <jakub@redhat.com>
2339 PR inline-asm/100785
2340 * c-typeck.c (c_mark_addressable): Diagnose trying to make
2341 bit-fields addressable.
2343 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
2345 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
2348 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
2351 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
2352 var in the error case.
2354 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
2357 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
2358 spot built-in functions.
2360 2021-06-06 Jakub Jelinek <jakub@redhat.com>
2363 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
2364 even when target is combined with other constructs.
2366 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
2369 * c-decl.c (finish_struct): Fix thinko in previous change.
2370 * c-typeck.c (convert_for_assignment): Do not warn on pointer
2371 assignment and initialization for storage order purposes if the
2372 RHS is a call to a DECL_IS_MALLOC function.
2374 2021-06-04 Martin Sebor <msebor@redhat.com>
2377 * c-objc-common.c (print_type): Handle erroneous types.
2379 2021-06-03 Jakub Jelinek <jakub@redhat.com>
2382 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
2383 after depend only cases.
2385 2021-05-31 Richard Biener <rguenther@suse.de>
2388 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
2389 * c-parser.c (c_parser_postfix_expression): Likewise.
2391 2021-05-28 Richard Biener <rguenther@suse.de>
2394 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
2395 invalid if conditions.
2397 2021-05-28 Jakub Jelinek <jakub@redhat.com>
2400 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
2401 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2402 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
2403 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
2404 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
2405 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
2406 if present in map_head, map_field_head or map_firstprivate_head
2409 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
2411 * c-parser.c (c_parser_omp_clause_affinity): New.
2412 (c_parser_omp_clause_name, c_parser_omp_variable_list,
2413 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
2414 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
2415 c_finish_omp_clauses): Likewise.
2417 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
2420 * c-decl.c (finish_struct): Warn for a union containing an aggregate
2421 field with a differing scalar storage order.
2423 2021-05-21 Jakub Jelinek <jakub@redhat.com>
2426 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
2427 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
2428 if a decl is mentioned both in map clause and in such firstprivate
2429 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
2431 2021-05-19 Jakub Jelinek <jakub@redhat.com>
2434 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
2435 master when combined with taskloop.
2436 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
2437 parallel master when not combined with taskloop.
2439 2021-05-18 Richard Biener <rguenther@suse.de>
2442 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
2443 Diagnose calls to non-functions.
2444 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
2446 2021-05-17 Richard Biener <rguenther@suse.de>
2449 * gimple-parser.c (c_parser_gimple_label): Avoid building
2450 a GIMPLE label with NULL label decl.
2452 2021-05-13 Martin Sebor <msebor@redhat.com>
2455 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
2457 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
2459 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
2462 2021-05-10 Martin Liska <mliska@suse.cz>
2464 * c-aux-info.c (affix_data_type): Use startswith
2465 function instead of strncmp.
2466 * c-typeck.c (build_function_call_vec): Likewise.
2467 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
2469 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
2471 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
2472 on the address of a pointer field in a record with reverse SSO.
2474 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
2476 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
2477 for || and && reductions.
2479 2021-04-29 Joseph Myers <joseph@codesourcery.com>
2481 * c-typeck.c (function_types_compatible_p): For C2X, treat
2482 unprototyped function as compatible with non-variadic prototyped
2483 function even if some argument types are changed by the default
2484 argument promotions.
2486 2021-04-15 Martin Sebor <msebor@redhat.com>
2490 * c-decl.c (pushdecl): Always propagate type attribute.
2492 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
2495 * c-typeck.c (c_common_type): Do not drop attributes that
2496 affect type identity.
2498 2021-04-10 Jakub Jelinek <jakub@redhat.com>
2501 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
2504 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2507 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
2510 2021-03-19 Jakub Jelinek <jakub@redhat.com>
2513 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
2514 with modifycode NOP_EXPR produces and mark the _Atomic var as read
2516 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
2517 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
2518 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
2520 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
2523 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
2524 ensure that the varpool node is marked as offloadable.
2526 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
2529 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
2531 2021-02-24 Martin Sebor <msebor@redhat.com>
2534 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
2536 2021-02-18 Jakub Jelinek <jakub@redhat.com>
2539 * c-typeck.c (c_finish_return): Don't wrap retval into
2540 EXCESS_PRECISION_EXPR in functions that return void.
2542 2021-02-11 Marek Polacek <polacek@redhat.com>
2544 * c-parser.c (c_parser_if_statement): Use vec_free.
2546 2021-02-04 Martin Sebor <msebor@redhat.com>
2549 * c-decl.c (locate_old_decl): Add type to diagnostic output.
2550 (diagnose_mismatched_decls): Same.
2551 (start_function): Introduce temporaries for better readability.
2552 * c-typeck.c (comptypes_internal): Only consider complete enum
2553 types in comparisons with integers.
2555 2021-02-01 Martin Sebor <msebor@redhat.com>
2558 * c-decl.c (free_attr_access_data): New function.
2559 (c_parse_final_cleanups): Call free_attr_access_data.
2561 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2563 * c-parser.c (c_parser_omp_clause_detach): New.
2564 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
2565 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2566 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
2567 clause. Prevent use of detach with mergeable and overriding the
2568 data sharing mode of the event handle.
2570 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2572 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
2573 unqualified element type and then call c_build_qualified_type on the
2576 2021-01-07 Richard Biener <rguenther@suse.de>
2578 * gimple-parser.c (c_parser_gimple_compound_statement): Only
2579 reallocate loop array if it is too small.
2581 2020-12-16 Martin Uecker <muecker@gwdg.de>
2584 * c-typeck.c (build_modify_expr): Drop qualifiers.
2586 2020-12-16 Martin Uecker <muecker@gwdg.de>
2589 * c-parser.c (c_parser_expression): Look into
2590 nop expression when marking expressions as read.
2592 2020-12-14 Martin Liska <mliska@suse.cz>
2595 * c-typeck.c (pointer_diff): Do not emit a top-level
2597 (build_binary_op): Likewise.
2599 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2601 * c-parser.c (c_parser_omp_allocate): New.
2602 (c_parser_omp_construct): Call it.
2604 2020-12-09 Richard Biener <rguenther@suse.de>
2607 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
2610 2020-12-07 Martin Uecker <muecker@gwdg.de>
2613 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
2614 that drops qualifiers to the end of the function.
2616 2020-11-26 Martin Uecker <muecker@gwdg.de>
2620 * c-parser.c (c_parser_declaration_or_fndef): Remove
2621 redundant code to drop qualifiers of _Atomic types for __auto_type.
2622 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
2623 types for __typeof__.
2625 2020-11-24 Jakub Jelinek <jakub@redhat.com>
2628 * c-parser.c (c_parser_binary_expression): For omp atomic binary
2629 expressions, use make_node instead of build2 to avoid checking build2
2632 2020-11-23 Joseph Myers <joseph@codesourcery.com>
2635 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
2636 for comparisons of complete and incomplete pointers.
2638 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2640 * c-aux-info.c (gen_type): Support opaque types.
2642 2020-11-20 Martin Sebor <msebor@redhat.com>
2645 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2647 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2650 * Make-lang.in (c.serial): Change from goal to a variable.
2651 (.PHONY): Drop c.serial.
2653 2020-11-20 Martin Uecker <muecker@gwdg.de>
2655 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2657 2020-11-19 Jakub Jelinek <jakub@redhat.com>
2660 * c-decl.c (get_parm_array_spec): Bail out of nelts is
2663 2020-11-18 Jakub Jelinek <jakub@redhat.com>
2665 * Make-lang.in (c.serial): New goal.
2666 (.PHONY): Add c.serial c.prev.
2667 (cc1$(exeext)): Call LINK_PROGRESS.
2669 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
2671 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
2673 * c-typeck.c (build_asm_expr): Remove an assert checking output
2674 absence for asm goto.
2676 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2678 * c-typeck.c (c_finish_omp_clauses): Don't clear
2679 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2681 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2684 * c-parser.c (c_parser_objc_class_definition): Pass the
2685 location of the class name to the interface declaration.
2687 2020-11-10 Strager Neds <strager.nds@gmail.com>
2689 * c-decl.c (merge_decls): Use new overload of
2690 set_decl_section_name.
2692 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2694 * c-parser.c (c_parser_omp_target_data): Add use of
2695 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
2696 handled map clause kind.
2697 (c_parser_omp_target_enter_data): Likewise.
2698 (c_parser_omp_target_exit_data): Likewise.
2699 (c_parser_omp_target): Likewise.
2700 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
2701 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
2702 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
2703 same struct field access to co-exist on OpenMP construct.
2705 2020-11-07 Martin Uecker <muecker@gwdg.de>
2707 * c-parser.c (c_parser_label): Implement mixing of labels and code.
2708 (c_parser_all_labels): Likewise.
2710 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2712 * c-parser.c (c_parser_objc_at_property_declaration):
2713 Improve parsing fidelity. Associate better location info
2714 with @property attributes. Clean up the interface to
2715 objc_add_property_declaration ().
2717 2020-11-06 Nathan Sidwell <nathan@acm.org>
2719 * c-decl.c (diagnose_mismatched_decls): Rename
2720 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2721 (warn_if_shadowing, implicitly_declare, names_builtin_p)
2722 (collect_source_refs): Likewise.
2723 * c-typeck.c (inform_declaration, inform_for_arg)
2724 (convert_for_assignment): Likewise.
2726 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
2728 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2730 (c_parser_omp_construct): Update call.
2732 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2735 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2736 find underlying decl to clear in the aligned_head bitmap.
2738 2020-11-04 Joseph Myers <joseph@codesourcery.com>
2740 * c-decl.c (handle_nodiscard_attribute): New.
2741 (std_attribute_table): Add nodiscard.
2742 * c-parser.c (c_parser_std_attribute): Expect argument to
2743 nodiscard attribute to be a string. Do not special-case ignoring
2745 * c-typeck.c (maybe_warn_nodiscard): New.
2746 (build_compound_expr, emit_side_effect_warnings): Call
2747 maybe_warn_nodiscard.
2748 (c_process_expr_stmt, c_finish_stmt_expr): Also call
2749 emit_side_effect_warnings if warn_unused_result.
2751 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
2753 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2755 (finish_init): Likewise.
2756 (pop_init_level): Likewise.
2758 2020-10-28 Joseph Myers <joseph@codesourcery.com>
2760 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2761 error_at for omitted parameter name.
2763 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2765 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2766 (c_parser_omp_clause_allocate): New function.
2767 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2768 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2769 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2770 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2771 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2772 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2773 PRAGMA_OMP_CLAUSE_ALLOCATE.
2774 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2776 2020-10-27 Joseph Myers <joseph@codesourcery.com>
2778 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2779 standard attributes.
2781 2020-10-23 Marek Polacek <polacek@redhat.com>
2784 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2785 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2786 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2787 * c-tree.h (char_type_p): Declare.
2788 * c-typeck.c (char_type_p): No longer static.
2790 2020-10-23 Martin Sebor <msebor@redhat.com>
2793 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2795 2020-09-19 Martin Sebor <msebor@redhat.com>
2798 * c-decl.c (lookup_last_decl): Define new function.
2799 (c_decl_attributes): Call it.
2800 (start_decl): Add argument and use it.
2801 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2802 (get_parm_array_spec): Define new function.
2803 (push_parm_decl): Call get_parm_array_spec.
2804 (start_function): Call warn_parm_array_mismatch. Build attribute
2805 access and add it to current function.
2806 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2807 in forms of array parameters.
2808 * c-tree.h (start_decl): Add argument.
2810 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2812 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2814 (in_statement): New.
2815 (start_function): Adjust for above change.
2816 (c_push_function_context, c_pop_function_context): Likewise.
2817 * c-lang.h (struct language_function): Likewise.
2818 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2819 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2821 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2822 (c_parser_switch_statement): Adjust break/switch context handling
2823 and calls to renamed functions.
2824 (c_parser_while_statement): Adjust break/switch context handling and
2826 (c_parser_do_statement): Ditto, with DO_STMT respectively.
2827 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2828 (c_parser_omp_for_loop): Adjust break/switch context handling.
2829 * c-tree.h (c_break_label, c_cont_label): Delete.
2830 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2831 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2832 (in_statement, switch_statement_break_seen_p): Declare.
2833 (c_start_case, c_finish_case): Renamed to...
2834 (c_start_switch, c_finish_switch).
2835 (c_finish_bc_stmt): Adjust arguments.
2836 * c-typeck.c (build_function_call_vec): Don't try to print
2837 statements with %qE format.
2838 (struct c_switch): Rename switch_expr field to switch_stmt.
2839 Add break_stmt_seen_p field.
2840 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
2841 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
2842 (do_case): Update for changes to struct c_switch.
2843 (c_finish_case): Rename to c_finish_switch. Update for changes to
2844 struct c_switch and change of representation from SWITCH_EXPR to
2846 (c_finish_loop): Delete.
2847 (c_finish_bc_stmt): Update to reflect changes to break/continue
2848 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
2849 of a GOTO_EXPR except for objc foreach loops.
2851 2020-09-01 Jakub Jelinek <jakub@redhat.com>
2854 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2857 2020-08-28 Martin Sebor <msebor@redhat.com>
2860 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2863 2020-08-27 Martin Liska <mliska@suse.cz>
2865 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2866 growth function to true.
2868 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
2871 * c-typeck.c (handle_omp_array_sections_1): Talk about
2872 array function parameter in the error message.
2874 2020-08-18 Jakub Jelinek <jakub@redhat.com>
2877 * c-parser.c (c_parser_generic_selection): Change match_found from bool
2878 to int, holding index of the match. Call mark_exp_read on the selector
2879 expression and on expressions other than the selected one.
2881 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
2884 * c-typeck.c (process_init_element): Split test for whether to
2885 recurse into a record, union or array into...
2886 (initialize_elementwise_p): ...this new function. Don't recurse
2887 into a vector type if the initialization value is also a vector.
2889 2020-07-31 Richard Biener <rguenther@suse.de>
2892 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2893 Define to c_common_finalize_early_debug.
2895 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2897 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2898 (c_parser_omp_critical): Permit hint(0) clause without named critical.
2899 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2901 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
2904 * c-decl.c (finish_decl): Call target hook
2905 lower_local_decl_alignment to lower local decl alignment.
2907 2020-07-09 Julian Brown <julian@codesourcery.com>
2908 Thomas Schwinge <thomas@codesourcery.com>
2911 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2912 for standalone attach/detach clauses.
2914 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
2916 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2917 set, warn for conversion between pointers that point to incompatible
2918 scalar storage orders.
2920 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
2922 * c-parser.c (c_parser_statement_after_labels): Pass correct
2923 parameters to c_parser_do_statement.
2925 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2927 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
2929 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
2930 premature c_fully_fold. Defer explicit c_fully_fold calls to after
2932 * c-tree.h (c_in_omp_for): Declare.
2933 * c-typeck.c (c_in_omp_for): Define.
2934 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
2935 (digest_init): Likewise.
2936 (build_binary_op): Likewise.
2938 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2940 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
2941 from kind by comma rather than colon.
2943 2020-06-05 Mark Wielaard <mark@klomp.org>
2945 * c-decl.c (implicit_decl_warning): When warned and olddecl is
2946 an undeclared builtin, then add a fixit header hint, if found.
2947 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
2948 warning_at about implicit builtin declaration type mismatch.
2950 2020-06-03 Mark Wielaard <mark@klomp.org>
2952 * c-parser.c (struct c_parser): Add seen_string_literal
2954 (c_parser_consume_token): Reset seen_string_literal.
2955 (c_parser_error_richloc): Add name_hint if seen_string_literal
2956 and next token is a CPP_NAME and we have a missing header
2957 suggestion for the name.
2958 (c_parser_string_literal): Set seen_string_literal.
2960 2020-06-03 Mark Wielaard <mark@klomp.org>
2962 * c-parser.c (c_parser_postfix_expression_after_primary): Add
2963 scope with matching_parens after CPP_OPEN_PAREN.
2965 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2967 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2969 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
2971 * Make-lang.in: Remove extra slash.
2973 2020-05-19 Martin Liska <mliska@suse.cz>
2975 * c-parser.c: Fix typo.
2977 2020-05-14 Jakub Jelinek <jakub@redhat.com>
2979 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2981 2020-05-07 Richard Biener <rguenther@suse.de>
2984 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2987 2020-04-30 Jakub Jelinek <jakub@redhat.com>
2990 * c-decl.c (set_labels_context_r): In addition to context-less
2991 LABEL_DECLs adjust also LABEL_DECLs with context equal to
2992 parent function if any.
2993 (store_parm_decls): Adjust comment.
2995 2020-04-19 Jakub Jelinek <jakub@redhat.com>
2998 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
2999 two CPP_COLON tokens.
3001 2020-04-17 Jakub Jelinek <jakub@redhat.com>
3004 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
3007 2020-04-15 Jakub Jelinek <jakub@redhat.com>
3010 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
3011 requires directive when not at file scope.
3013 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
3016 * c-decl.c (c_check_in_current_scope): New function.
3017 * c-tree.h (c_check_in_current_scope): Declare it.
3018 * c-parser.c (c_parser_oacc_declare): Add check that variables
3019 are declared in the same scope as the directive. Fix handling
3022 2020-04-07 Jakub Jelinek <jakub@redhat.com>
3025 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
3026 if c_parser_omp_master succeeded.
3028 2020-03-23 Jakub Jelinek <jakub@redhat.com>
3030 PR gcov-profile/94029
3032 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
3033 the function_start_locus location. Don't do that afterwards for the
3034 __GIMPLE body parsing.
3036 2020-03-19 Jakub Jelinek <jakub@redhat.com>
3038 PR gcov-profile/94029
3039 * c-tree.h (finish_function): Add location_t argument defaulted to
3041 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
3042 set it to the locus of closing } if non-NULL.
3043 (c_parser_compound_statement_nostart): Return locus of closing }.
3044 (c_parser_parse_rtl_body): Likewise.
3045 (c_parser_declaration_or_fndef): Propagate locus of closing } to
3047 * c-decl.c (finish_function): Add end_loc argument, use it instead of
3048 input_location to set function_end_locus.
3050 2020-03-17 Jakub Jelinek <jakub@redhat.com>
3053 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
3054 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
3055 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
3056 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
3058 (finish_incomplete_vars): New function, moved from finish_struct. Use
3059 relayout_decl instead of layout_decl.
3060 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
3061 being TYPE_VFIELD. Use finish_incomplete_vars.
3062 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
3063 finish_incomplete_vars.
3064 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3065 also on ENUMERAL_TYPEs.
3067 2020-03-16 Jakub Jelinek <jakub@redhat.com>
3070 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
3072 2020-03-13 Martin Sebor <msebor@redhat.com>
3075 * c-decl.c (builtin_structptr_type_count): New constant.
3076 (match_builtin_function_types): Reject decls that are incompatible
3077 in types pointed to by pointers.
3078 (diagnose_mismatched_decls): Adjust comments.
3080 2020-03-05 Joseph Myers <joseph@codesourcery.com>
3083 * c-typeck.c (pop_init_level): Do not diagnose initializers as
3084 empty when initialized type is error_mark_node.
3085 (set_designator, process_init_element): Ignore initializers for
3086 elements of a variable-size type or of error_mark_node.
3088 2020-03-01 Martin Sebor <msebor@redhat.com>
3091 * c-decl.c (types_close_enough_to_match): New function.
3092 (match_builtin_function_types):
3093 (diagnose_mismatched_decls): Add missing inform call to a warning.
3095 2020-03-01 Martin Sebor <msebor@redhat.com>
3098 * c-typeck.c (build_functype_attribute_variant): New function.
3099 (composite_type): Call it.
3101 2020-02-25 Jakub Jelinek <jakub@redhat.com>
3104 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
3105 Rename last argument from probablity to probability.
3107 2020-02-13 Jakub Jelinek <jakub@redhat.com>
3110 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
3111 *expr if it has side effects.
3113 2020-01-30 Jeff Law <law@redhat.com>
3116 * c-parser.c (c_parser_switch_statement): Make sure to request
3117 marking the switch expr as used.
3119 2020-01-22 Joseph Myers <joseph@codesourcery.com>
3122 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
3123 argument with integer operands.
3125 2020-01-16 Kerem Kat <keremkat@gmail.com>
3128 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
3129 to support 4 available tokens.
3131 2020-01-15 Joseph Myers <joseph@codesourcery.com>
3134 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
3135 determine whether to set DECL_CONTEXT.
3137 2020-01-13 Joseph Myers <joseph@codesourcery.com>
3140 * c-typeck.c (build_c_cast): Check for expressions with integer
3141 operands that can occur in an unevaluated part of an integer
3142 constant expression and call note_integer_operands as needed.
3144 2019-01-08 Richard Biener <rguenther@suse.de>
3147 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
3150 2020-01-01 Jakub Jelinek <jakub@redhat.com>
3152 Update copyright years.
3154 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3156 * c-decl.c (collect_source_ref_cb): Delete.
3157 (for_each_global_decl): Rename into...
3158 (collect_source_refs): ...this. Call collect_source_ref directly.
3159 (c_parse_final_cleanups): Always call collect_source_ref on the main
3162 2019-12-19 Julian Brown <julian@codesourcery.com>
3163 Cesar Philippidis <cesar@codesourcery.com>
3165 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
3167 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
3168 Allow deref (->) in variable lists if true.
3169 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
3170 Pass to c_parser_omp_variable_list.
3171 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
3172 call to c_parser_omp_variable_list.
3173 (c_parser_oacc_all_clauses): Support attach and detach clauses.
3174 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
3175 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
3176 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
3177 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
3178 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
3179 and detach. Support deref.
3180 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
3181 GOMP_MAP_ALWAYS_POINTER for OpenACC.
3182 (c_oacc_check_attachments): New function.
3183 (c_finish_omp_clauses): Check attach/detach arguments for being
3184 pointers using above. Support deref.
3186 2019-12-19 Julian Brown <julian@codesourcery.com>
3187 Maciej W. Rozycki <macro@codesourcery.com>
3188 Tobias Burnus <tobias@codesourcery.com>
3189 Thomas Schwinge <thomas@codesourcery.com>
3191 * c-parser.c (c_parser_omp_clause_name): Support no_create.
3192 (c_parser_oacc_data_clause): Likewise.
3193 (c_parser_oacc_all_clauses): Likewise.
3194 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3195 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
3196 PRAGMA_OACC_CLAUSE_NO_CREATE.
3197 * c-typeck.c (handle_omp_array_sections): Support
3200 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3202 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3203 Replace label_text ctor calls.
3205 2019-12-04 Joseph Myers <joseph@codesourcery.com>
3209 * c-typeck.c (convert_lvalue_to_rvalue): Call
3210 require_complete_type for arguments not of void types.
3211 (build_indirect_ref): Do not diagnose dereferencing pointers to
3213 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
3215 2019-12-03 Joseph Myers <joseph@codesourcery.com>
3218 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
3219 old-style parameter definitions.
3221 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
3225 * c-decl.c (flexible_array_type_p): Move to common code.
3227 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3229 * c-decl.c (start_decl): Allow initialization of variables whose
3230 size is a POLY_INT_CST.
3231 (finish_decl): Use verify_type_context to check whether the target
3232 allows variables with a particular type to have static or thread-local
3233 storage duration. Don't raise a second error if such variables do
3234 not have a constant size.
3235 (grokdeclarator): Use verify_type_context to check whether the
3236 target allows fields or array elements to have a particular type.
3237 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
3238 the target allows pointer difference for the types involved.
3239 (build_unary_op): Likewise for pointer increment and decrement.
3241 2019-11-29 Joseph Myers <joseph@codesourcery.com>
3243 * c-parser.c (struct c_parser): Add members raw_tokens and
3245 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
3246 using previously-lexed raw tokens.
3247 (c_parser_peek_nth_token_raw)
3248 (c_parser_check_balanced_raw_token_sequence): New functions.
3249 (c_parser_nth_token_starts_std_attributes): Use
3250 c_parser_check_balanced_raw_token_sequence for Objective-C.
3252 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3255 * c-decl.c (finish_declspecs): Use int instead of decimal
3256 floating-point types if decimal floating-point not supported.
3258 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3260 * c-tree.h (struct c_declarator): Use a structure for id member.
3261 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
3262 declarators at the start, not when handling individual declarators
3263 later. Use u.id.id instead of u.id.
3264 (grokfield): Use u.id.id instead of u.id.
3265 (build_id_declarator): Set u.id.id and u.id.attrs.
3266 (finish_declspecs): Handle postfix attributes in case of typedef
3267 name or typeof used.
3268 * c-parser.c (c_parser_direct_declarator)
3269 (c_parser_direct_declarator_inner): Place declarator for
3270 attributes inside that for function or array, not outside. Set
3271 u.id.attrs for identifiers.
3272 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
3273 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
3276 2019-11-22 Jakub Jelinek <jakub@redhat.com>
3279 * c-decl.c (identifier_global_tag): Define.
3281 2019-11-20 Richard Biener <rguenther@suse.de>
3284 * c-decl.c (grokdeclarator): Prevent inlining of nested
3285 function with VLA arguments.
3287 2019-11-20 Joseph Myers <joseph@codesourcery.com>
3289 * c-decl.c (c_warn_type_attributes): New function.
3290 (groktypename, grokdeclarator, finish_declspecs): Call
3291 c_warn_type_attributes before applying attributes to types.
3292 * c-tree.h (c_warn_type_attributes): Declare.
3294 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3296 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
3297 standard attributes.
3298 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
3299 pedwarn for unknown standard attributes and return error_mark_node
3302 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
3304 * c-parser.c (c_parser_parse_rtl_body): Always call
3305 run_rtl_passes, even if startwith pass is not provided.
3307 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3309 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
3310 duplicate standard attributes.
3312 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3314 * c-decl.c (std_attribute_table): Add maybe_unused.
3316 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3318 * c-decl.c (std_attribute_table): Add fallthrough.
3319 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
3320 attribute at top level.
3322 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3324 * c-decl.c (std_attribute_table): New.
3325 (c_init_decl_processing): Register attributes from
3326 std_attribute_table.
3327 * c-parser.c (c_parser_attribute_arguments): Add arguments
3328 require_string and allow_empty_args. All callers changed.
3329 (c_parser_std_attribute): Set require_string argument for
3330 "deprecated" attribute.
3332 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3334 * c-parser.c (c_parser_postfix_expression)
3335 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
3336 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
3338 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
3340 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
3341 of build_same_sized_truth_vector_type.
3342 (build_vec_cmp): Likewise.
3344 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3346 * c-parser.c (c_parser_omp_context_selector): Don't require score
3347 argument to fit into shwi, just to be INTEGER_CST. Diagnose
3350 * c-parser.c (c_parser_omp_context_selector): Rename
3351 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
3352 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
3353 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
3354 and string literals.
3356 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3358 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
3359 ctsk_tagfirstref_attrs.
3360 (struct c_declspecs): Update description of attrs. Add
3361 postfix_attrs and non_std_attrs_seen_p. Increase size of
3362 typespec_kind bit-field.
3363 (c_warn_unused_attributes): New declaration.
3364 (parser_xref_tag): Update prototype.
3365 * c-decl.c (c_warn_unused_attributes): New function.
3366 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
3367 ctsk_tagref_attrs. Handle attribute declarations.
3368 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
3369 (grokdeclarator): Handle standard attributes.
3370 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
3371 attributes to incomplete type reference.
3372 (xref_tag): Update call to parser_xref_tag.
3373 (declspecs_add_addrspace, declspecs_add_type)
3374 (declspecs_add_scspec, declspecs_add_attrs): Set
3375 non_std_attrs_seen_p.
3376 (finish_declspecs): Apply postfix standard attributes to type.
3377 * c-parser.c (c_token_starts_declspecs)
3378 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
3379 (c_parser_next_tokens_start_declaration): Update comments.
3380 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
3381 parser->tokens[2] to parser->tokens[1].
3382 (c_parser_nth_token_starts_std_attributes)
3383 (c_parser_std_attribute_specifier_sequence): New functions.
3384 (c_parser_declaration_or_fndef): Add arguments have_attrs and
3385 attrs. All callers changed. Handle standard attributes.
3386 (c_parser_parms_declarator, c_parser_parms_list_declarator)
3387 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
3388 All callers changed.
3389 (c_parser_declspecs): Add arguments start_std_attr_ok and
3390 end_std_attr_ok. All callers changed. Handle standard
3392 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3393 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
3394 (c_parser_compound_statement_nostart, c_parser_all_labels)
3395 (c_parser_label, c_parser_statement, c_parser_for_statement):
3396 Handle standard attributes.
3397 * c-parser.h (c_parser_declspecs): Update prototype.
3398 * gimple-parser.c (c_parser_gimple_declaration): Update call to
3401 2019-11-12 Martin Liska <mliska@suse.cz>
3403 * gimple-parser.c: Do not include params.h.
3405 2019-11-12 Martin Liska <mliska@suse.cz>
3407 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
3408 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
3411 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3412 Frederik Harwath <frederik@codesourcery.com>
3415 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
3416 (c_parser_oacc_kernels_parallel): Rename function to...
3417 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
3418 (c_parser_omp_construct): Update accordingly.
3421 2019-11-11 Jakub Jelinek <jakub@redhat.com>
3423 * c-parser.c (c_parser_translation_unit): Diagnose declare target
3424 without corresponding end declare target.
3426 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3428 * c-convert.c (convert): Only handle vector conversions if one of
3429 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
3431 * c-typeck.c (build_array_ref): Only allow vector indexing if the
3432 vectors satisfy gnu_vector_type_p.
3433 (build_unary_op): Only allow unary operators to be applied to
3434 vectors if they satisfy gnu_vector_type_p.
3435 (digest_init): Only allow by-element initialization of vectors
3436 if they satisfy gnu_vector_type_p.
3437 (really_start_incremental_init): Likewise.
3438 (push_init_level): Likewise.
3439 (pop_init_level): Likewise.
3440 (process_init_element): Likewise.
3441 (build_binary_op): Only allow binary operators to be applied to
3442 vectors if they satisfy gnu_vector_type_p.
3444 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3446 * c-decl.c (grokparms): Convert () in a function definition to
3448 (store_parm_decls_oldstyle): Pedwarn for C2x.
3449 (store_parm_decls): Update comment about () not generating a
3452 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3454 * c-parser.c (c_parser_attribute_arguments): New function.
3455 Factored out of c_parser_gnu_attribute.
3456 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
3457 (c_parser_balanced_token_sequence, c_parser_std_attribute)
3458 (c_parser_std_attribute_specifier): New functions.
3459 (c_parser_transaction_attributes): Use
3460 c_parser_std_attribute_specifier.
3462 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3464 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
3465 lex_joined_string and translate_strings_p.
3466 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
3468 (c_parser_string_literal): New function.
3469 (c_parser_static_assert_declaration_no_semi): Use
3470 c_parser_string_literal. Do not set lex_untranslated_string.
3471 (c_parser_asm_string_literal): Use c_parser_string_literal.
3472 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
3473 (c_parser_gnu_attributes): Set and restore translate_strings_p
3474 instead of lex_untranslated_string.
3475 (c_parser_asm_statement): Do not set lex_untranslated_string.
3476 (c_parser_asm_operands): Likewise.
3477 (c_parser_has_attribute_expression): Set and restore
3478 translate_strings_p instead of lex_untranslated_string.
3479 (c_parser_postfix_expression): Use c_parser_string_literal.
3480 (pragma_lex): Likewise.
3481 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
3482 (c_parse_file): Set translate_strings_p.
3483 * gimple-parser.c (c_parser_gimple_postfix_expression)
3484 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
3485 * c-parser.c (c_parser_string_literal): Declare function.
3487 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3489 * c-parser.c (c_finish_omp_declare_variant): Use
3490 omp_get_context_selector instead of c_omp_get_context_selector.
3492 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3494 * c-tree.h (c_simulate_enum_decl): Declare.
3495 * c-decl.c (c_simulate_enum_decl): New function.
3496 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
3498 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3500 * c-tree.h (c_simulate_builtin_function_decl): Declare.
3501 * c-decl.c (c_simulate_builtin_function_decl): New function.
3502 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
3505 2019-10-28 Martin Sebor <msebor@redhat.com>
3508 * c-decl.c (names_builtin_p): Define a new function.
3510 2019-10-28 Richard Biener <rguenther@suse.de>
3513 * gimple-parser.c (c_parser_parse_gimple_body): Make
3514 current_bb the entry block initially to easier recover
3516 (c_parser_gimple_compound_statement): Adjust.
3518 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3520 * c-parser.c (c_finish_omp_declare_variant): Use
3521 omp_context_selector_matches instead of
3522 c_omp_context_selector_matches.
3523 * c-decl.c (c_decl_attributes): Add "omp declare target block"
3524 attribute in between declare target and end declare target
3527 2019-10-15 Joseph Myers <joseph@codesourcery.com>
3529 * c-parser.c (c_parser_attribute_any_word): Rename to
3530 c_parser_gnu_attribute_any_word. All callers changed.
3531 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
3533 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
3535 (c_parser_declaration_or_fndef, c_parser_declspecs)
3536 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3537 (c_parser_struct_declaration, c_parser_declarator)
3538 (c_parser_gnu_attribute, c_parser_compound_statement)
3539 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
3540 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
3541 attribute-related syntax productions.
3543 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3545 * c-objc-common.c (useful_aka_type_p): Replace with...
3546 (get_aka_type): ...this new function. Given the original type,
3547 decide which aka type to print (if any). Only look through typedefs
3548 if user_facing_original_type_p.
3549 (print_type): Update accordingly.
3551 2019-10-14 Jakub Jelinek <jakub@redhat.com>
3553 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
3554 into int NESTED, if it is 2, diagnose missing commas in between
3556 (c_parser_omp_context_selector): Pass 2 as last argument to
3557 c_parser_omp_all_clauses.
3559 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3561 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
3562 For simd properties, put them directly into TREE_VALUE.
3563 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
3564 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
3565 add "omp declare variant base" attribute rather than
3566 "omp declare variant".
3568 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3570 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
3572 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3574 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
3575 true, terminate processing on closing paren and don't skip to end of
3577 (c_parser_omp_declare_simd): Handle also declare variant.
3578 (omp_construct_selectors, omp_device_selectors,
3579 omp_implementation_selectors, omp_user_selectors): New variables.
3580 (c_parser_omp_context_selector,
3581 c_parser_omp_context_selector_specification,
3582 c_finish_omp_declare_variant): New functions.
3583 (c_finish_omp_declare_simd): Handle both declare simd and
3585 (c_parser_omp_declare): Handle declare variant.
3587 2019-10-02 Joseph Myers <joseph@codesourcery.com>
3589 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
3592 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3594 * c-objc-common.c (useful_aka_type_p): New function.
3595 (print_type): Use it to decide whether an aka type is worth printing.
3597 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3600 * c-parser.c (c_parser_predefined_identifier): New function.
3601 (c_parser_postfix_expression): Use it.
3602 (c_parser_omp_variable_list): Parse predefined identifiers.
3603 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
3604 in shared and firstprivate clauses, even when they are predetermined
3607 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3609 * c-typeck.c (build_function_call_vec): Take the original function
3610 decl as an optional final parameter. Pass all built-in calls to
3611 check_builtin_function_arguments.
3613 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
3616 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
3617 of identifiers in the external scope only for variables and functions.
3619 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3622 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
3624 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3627 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
3628 after determining that the first token is not
3629 PRAGMA_GCC_PCH_PREPROCESS.
3631 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
3633 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
3634 FUNCTION_DECL to the right value in the presence of nested declarators.
3636 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3639 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
3641 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3644 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
3645 of a built_in_function.
3646 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
3648 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3650 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
3651 (c_parser_omp_clause_device_type): New function.
3652 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3653 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3654 (c_parser_omp_declare_target): Handle device_type clauses. Remove
3655 diagnostics for declare target with clauses nested in clause-less
3656 declare target declaration-definition-seq.
3657 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
3659 2019-08-09 Jakub Jelinek <jakub@redhat.com>
3661 * c-parser.c (check_no_duplicate_clause): Simplify using
3663 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
3664 directive name modifiers.
3665 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
3668 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
3669 check_no_duplicate_clause call. Comment it out, instead emit a
3670 warning for duplicate dist_schedule clauses.
3672 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
3674 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
3676 2019-08-08 Jakub Jelinek <jakub@redhat.com>
3678 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
3679 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
3680 instead of generic_head to track duplicates.
3682 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3684 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
3685 (c_parser_omp_clause_use_device_addr): New function.
3686 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3687 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3688 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
3689 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
3690 map or use_device_* clauses.
3691 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
3692 in OpenMP, require pointer type rather than pointer or array type.
3693 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
3695 2019-07-31 Jakub Jelinek <jakub@redhat.com>
3698 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
3699 even if finish is UNKNOWN_LOCATION, just use start as finish in that
3702 2019-07-25 Martin Liska <mliska@suse.cz>
3703 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
3706 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
3708 2019-07-25 Martin Liska <mliska@suse.cz>
3710 * c-decl.c (merge_decls): Use new macros
3711 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
3713 2019-07-23 Richard Biener <rguenther@suse.de>
3715 PR tree-optimization/83518
3716 * gimple-parser.c (c_parser_parse_gimple_body): When we have
3717 a CFG also rebuild cgraph edges.
3719 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3721 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3722 (c_parser_omp_clause_bind): New function.
3723 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3724 (OMP_LOOP_CLAUSE_MASK): Define.
3725 (c_parser_omp_loop): New function.
3726 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3727 loop combined with parallel or teams.
3728 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3729 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3731 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
3734 * c-decl.c (finish_function): Check targetm.warn_func_return
3735 before issuing a -Wreturn-type warning.
3737 2019-07-12 Alexandre Oliva <oliva@adacore.com>
3739 * gimple-parser.c (c_parser_gimple_try_stmt): New.
3740 (c_parser_compound_statement): Call it.
3742 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3744 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3745 (c_parser_omp_clause_order): New function.
3746 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3747 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3748 PRAGMA_OMP_CLAUSE_ORDER.
3749 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3751 2019-07-10 Richard Biener <rguenther@suse.de>
3753 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3754 _Literal (int *) &x for address literals.
3756 2019-07-09 Martin Sebor <msebor@redhat.com>
3759 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3761 (field_decl_cmp): Same.
3762 * c-parser.c (c_parser_struct_or_union_specifier): Same.
3764 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3766 2019-07-09 Martin Sebor <msebor@redhat.com>
3769 * c-decl.c: Change class-key from class to struct and vice versa
3770 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3771 * gimple-parser.c: Same.
3773 2019-07-01 Richard Biener <rguenther@suse.de>
3775 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3776 _Literal (char *) &"foo" for address literals pointing to
3779 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3781 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3782 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3783 C incompatibility if alternate "__intN__" form is used.
3785 2019-06-24 Martin Sebor <msebor@redhat.com>
3787 * c-typeck.c (build_binary_op): Hyphenate floating-point.
3789 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3791 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3792 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3793 (c_parser_omp_scan_loop_body): New function.
3794 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3795 inscan reduction clauses.
3796 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3797 non-inscan reductions on the same construct, or inscan reductions with
3798 ordered or schedule clauses, or inscan array reductions.
3800 2019-06-05 Martin Sebor <msebor@redhat.com>
3803 * c-typeck.c (c_finish_return): Only consider functions returning
3804 pointers as candidates for -Wreturn-local-addr.
3806 2019-06-05 Martin Sebor <msebor@redhat.com>
3808 * c-decl.c (start_decl): Adjust quoting and hyphenation
3810 (finish_decl): Same.
3811 (finish_enum): Same.
3812 (start_function): Same.
3813 (declspecs_add_type): Same.
3814 * c-parser.c (warn_for_abs): Same.
3815 * c-typeck.c (build_binary_op): Same.
3817 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3820 * c-parser.c (c_finish_oacc_routine): Rework checking if already
3821 marked with an OpenACC 'routine' directive.
3824 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3825 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3828 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3829 clauses from "omp declare target" attribute.
3831 2019-05-16 Martin Sebor <msebor@redhat.com>
3833 * c-decl.c (start_decl): Quote keywords, operators, and
3834 types in diagnostics.
3835 (finish_decl): Same.
3836 * c-parser.c (c_parser_asm_statement): Same.
3837 (c_parser_conditional_expression): Same.
3838 (c_parser_transaction_cancel): Same.
3839 * c-typeck.c (c_common_type): Same.
3840 (build_conditional_expr): Same.
3841 (digest_init): Same.
3842 (process_init_element): Same.
3843 (build_binary_op): Same.
3845 2019-05-17 Richard Biener <rguenther@suse.de>
3847 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3848 (c_parser_gimple_unary_expression): Likewise.
3849 (c_parser_gimple_parentized_ternary_expression): New function.
3851 2019-05-16 Richard Biener <rguenther@suse.de>
3853 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3854 (c_parser_gimple_unary_expression): Likewise.
3856 2019-05-15 Richard Biener <rguenther@suse.de>
3858 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3861 2019-05-14 Richard Biener <rguenther@suse.de>
3863 * gimple-parser.c (c_parser_gimple_statement): Remove
3864 questionable auto-promotion to VIEW_CONVERT_EXPR.
3865 (c_parser_gimple_typespec): Split out from __MEM parsing.
3866 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3867 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3868 as __VIEW_CONVERT with -gimple.
3870 2019-05-09 Martin Liska <mliska@suse.cz>
3872 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3874 (c_parser_gimple_unary_expression): Parse also binary expression
3876 (c_parser_gimple_parentized_binary_expression): New function.
3878 2019-05-09 Martin Liska <mliska@suse.cz>
3880 * gimple-parser.c (struct gimple_parser): Add probability.
3881 for gimple_parser_edge.
3882 (gimple_parser::push_edge): Add new argument probability.
3883 (c_parser_gimple_parse_bb_spec): Parse also probability
3885 (c_parser_parse_gimple_body): Set edge probability.
3886 (c_parser_gimple_compound_statement): Consume token
3887 before calling c_parser_gimple_goto_stmt.
3889 (c_parser_gimple_statement): Pass new argument.
3890 (c_parser_gimple_goto_stmt): Likewise.
3891 (c_parser_gimple_if_stmt): Likewise.
3892 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3893 * c-parser.c (c_parser_declaration_or_fndef): Pass
3894 hot_bb_threshold argument.
3895 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3897 (c_parser_gimple_parse_bb_spec_edge_probability): New.
3899 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3902 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3903 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3904 (c_parser_do_statement): Likewise.
3905 (c_parser_for_statement): Likewise. Formatting fixes.
3906 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3907 emit DEBUG_BEGIN_STMTs if needed.
3909 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3912 * c-typeck.c (struct c_switch): Remove outside_range_p member.
3913 (c_start_case): Don't clear it.
3914 (do_case): Adjust c_add_case_label caller.
3915 (c_finish_case): Adjust c_do_switch_warnings caller.
3918 * c-decl.c (merge_decls): If remove is main variant and
3919 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3920 variant that has newdecl as TYPE_NAME if any.
3922 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3925 * c-decl.c (merge_decls): When newdecl's type is its main variant,
3926 don't try to remove it from the variant list, but instead assert
3929 2019-04-01 Richard Biener <rguenther@suse.de>
3932 * c-tree.h (c_get_alias_set): Declare.
3933 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
3934 * c-objc-common.c (c_get_alias_set): Treat enumeral types
3935 as the underlying integer type.
3937 2019-03-19 Martin Sebor <msebor@redhat.com>
3939 PR tree-optimization/89688
3940 * c-decl.c (finish_decl): Call braced_lists_to_string for more
3941 kinds of initializers.
3943 2019-03-19 Jakub Jelinek <jakub@redhat.com>
3946 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
3947 return type even if quals_used is 0. Formatting fixes.
3949 2019-03-14 Richard Biener <rguenther@suse.de>
3951 * c-tree.h (enum c_declspec_il): New.
3952 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
3954 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
3955 Pass start pass and declspec_il to c_parser_parse_gimple_body.
3956 (c_parser_declspecs): Adjust.
3957 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3958 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3960 (struct gimple_parser): New.
3961 (gimple_parser::push_edge): New method.
3962 (c_parser_gimple_parse_bb_spec): New helper.
3963 (c_parser_parse_gimple_body): Get start pass and IL specification.
3964 Initialize SSA and CFG.
3965 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3966 Build a gimple_parser parsing state and pass it along.
3967 (c_parser_gimple_statement): Change intermittend __PHI internal
3968 function argument for the edge.
3969 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3970 (c_parser_gimple_goto_stmt): Record edges to build.
3971 (c_parser_gimple_if_stmt): Likewise.
3972 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3973 (c_parser_gimple_or_rtl_pass_list): Likewise.
3975 2019-03-11 Martin Liska <mliska@suse.cz>
3977 * c-decl.c (check_for_loop_decls): Wrap an option name
3978 in a string format message and fix GNU coding style.
3979 * c-parser.c (c_parser_declspecs): Likewise.
3981 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3983 PR tree-optimization/89550
3984 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3986 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3987 or warning returned true.
3989 2019-02-28 Jakub Jelinek <jakub@redhat.com>
3992 * c-typeck.c (convert_arguments): Call inform_declaration only if
3993 the previous warning_at call returned true.
3995 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
3997 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
3998 parameter. Adjust all users.
3999 (c_parser_oacc_simple_clause): Replace parser with loc formal
4000 parameter. Adjust all users.
4002 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
4005 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
4006 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
4008 2019-02-15 Jakub Jelinek <jakub@redhat.com>
4011 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
4012 before c_decl_attributes rather than after it.
4014 2019-02-06 Jakub Jelinek <jakub@redhat.com>
4017 * c-parser.c (c_parser_declaration_or_fndef): Don't update
4018 DECL_ARGUMENTS of d if it has been defined already. Use a single if
4019 instead of 3 nested ifs.
4021 2019-02-06 Joseph Myers <joseph@codesourcery.com>
4024 * c-decl.c (finish_decl): Do not complete array types for arrays
4025 with external linkage not at file scope.
4027 2019-02-05 Richard Biener <rguenther@suse.de>
4030 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
4031 all type variants when not supported.
4033 2019-01-30 Jakub Jelinek <jakub@redhat.com>
4036 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
4037 * c-decl.c (decl_jump_unsafe): Return false for
4038 C_DECL_COMPOUND_LITERAL_P decls.
4039 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
4041 2019-01-29 Jakub Jelinek <jakub@redhat.com>
4044 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
4048 * c-decl.c (last_fileptr_type): Remove.
4049 (last_structptr_types): New variable.
4050 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
4051 {old,new}rettype instead of the types themselves. Assert
4052 last_structptr_types array has the same number of elements
4053 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
4054 argument oldtype and newtype. Instead of handling
4055 just fileptr_type_node specially, handle all builtin_structptr_types
4056 pointer nodes. Formatting fix.
4058 2019-01-24 Martin Sebor <msebor@redhat.com>
4063 * c-decl.c (match_builtin_function_types): Add arguments.
4064 (diagnose_mismatched_decls): Diagnose mismatched declarations
4065 of built-ins more strictly.
4067 2019-01-24 Jakub Jelinek <jakub@redhat.com>
4070 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
4071 on #pragma omp cancel with different modifiers.
4073 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4077 * c-typeck.c (convert_for_assignment): Upate the
4078 warn_for_address_or_pointer_of_packed_member call.
4080 2019-01-16 Tom Honermann <tom@honermann.net>
4081 Jason Merrill <jason@redhat.com>
4083 * c-typeck.c (digest_init): Revised the error message produced for
4084 ill-formed cases of array initialization with a string literal.
4085 (error_init): Make variadic.
4087 2019-01-12 Jakub Jelinek <jakub@redhat.com>
4089 * c-typeck.c (convert_for_assignment): Fix a comment typo.
4091 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4094 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
4095 if current_function_decl is non-NULL.
4097 2019-01-07 Joseph Myers <joseph@codesourcery.com>
4101 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
4102 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
4103 functions declared but never defined only for external scope, not
4106 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4109 * c-parser.c (c_parser_postfix_expression): Parse
4110 __builtin_convertvector.
4112 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4114 Update copyright years.
4116 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4119 * c-typeck.c (convert_for_assignment): Call
4120 warn_for_address_or_pointer_of_packed_member.
4122 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4124 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
4125 a more specific error message (instead of just falling through).
4127 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4129 * c-parser.c (c_parser_asm_statement): Keep track of the location each
4130 asm qualifier is first seen; use that to give nicer "duplicate asm
4131 qualifier" messages. Delete 'quals" variable, instead pass the
4132 "is_volatile_ flag to build_asm_stmt directly.
4133 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
4134 * c-typeck.c (build_asm_stmt): Ditto; adjust.
4136 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4138 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
4139 "done" boolean variable.
4141 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4144 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
4145 Move from here to gcc-rich-location.h and gcc-rich-location.c.
4146 (build_binary_op): Use struct op_location_t and
4147 class binary_op_rich_location.
4149 2018-12-11 Jakub Jelinek <jakub@redhat.com>
4152 * c-convert.c (convert): Call c_fully_fold before calling
4153 ubsan_instrument_float_cast.
4155 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
4157 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
4160 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
4162 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
4163 after asm. Pass a flag for it to build_asm_expr.
4164 * c-tree.h (build_asm_expr): Update declaration.
4165 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
4168 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
4171 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
4172 combination of volatile and goto, in any order, without repetitions.
4174 2018-12-04 James Norris <jnorris@codesourcery.com>
4175 Cesar Philippidis <cesar@codesourcery.com>
4176 Julian Brown <julian@codesourcery.com>
4178 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
4181 2018-11-30 Richard Biener <rguenther@suse.de>
4183 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4184 _Literal (type) { ... } as empty aggregate or vector constructor.
4186 2018-11-29 Martin Sebor <msebor@redhat.com>
4189 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
4190 (convert_arguments): Add comments. Pass additional argument to
4193 2018-11-29 Martin Sebor <msebor@redhat.com>
4197 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
4199 2018-11-23 Martin Sebor <msebor@redhat.com>
4202 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
4203 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
4205 2018-11-20 Martin Sebor <msebor@redhat.com>
4207 * c-parser.c (c_parser_has_attribute_expression): New function.
4208 (c_parser_attribute): New function.
4209 (c_parser_attributes): Move code into c_parser_attribute.
4210 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
4212 2018-11-15 Martin Sebor <msebor@redhat.com>
4215 * c-decl.c (header_for_builtin_fn): Declare.
4216 (diagnose_mismatched_decls): Diagnose declarations of built-in
4217 functions without a prototype.
4218 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
4219 (convert_argument): Same.
4220 (convert_arguments): Factor code out into convert_argument.
4221 Detect mismatches between built-in formal arguments in calls
4222 to built-in without prototype.
4223 (build_conditional_expr): Same.
4224 (type_or_builtin_type): New function.
4225 (convert_for_assignment): Add argument. Conditionally issue
4226 warnings instead of errors for mismatches.
4228 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4230 * c-decl.c: Replace "source_location" with "location_t".
4231 * c-tree.h: Likewise.
4232 * c-typeck.c: Likewise.
4233 * gimple-parser.c: Likewise.
4235 2018-11-09 Jakub Jelinek <jakub@redhat.com>
4237 * c-parser.c (c_parser_omp_clause_final): Use
4238 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
4239 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
4240 parsing instead of c_parser_paren_condition.
4241 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
4242 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
4243 c_fully_fold instead of c_parser_condition.
4244 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
4245 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
4246 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
4247 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
4248 c_parser_expr_no_commas instead of c_parser_expression.
4250 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
4251 reduction clause with inscan modifier.
4253 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
4254 clauses other than atomic_default_mem_order.
4256 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4258 * c-parser.c: Include memmode.h.
4259 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
4260 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
4261 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
4262 task_reduction clauses.
4263 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
4264 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
4265 section, or lvalue assignment expression.
4266 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
4267 (c_parser_omp_clause_lastprivate): Parse optional
4268 conditional: modifier.
4269 (c_parser_omp_clause_hint): Require constant integer expression rather
4270 than just integer expression.
4271 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
4273 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
4274 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
4275 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
4277 (c_parser_omp_clause_depend): Parse iterator modifier and handle
4278 iterators. Parse mutexinoutset and depobj kinds.
4279 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
4281 (c_parser_omp_all_clauses): Likewise. Handle
4282 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
4283 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4284 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
4285 default memory order from requires directive if any. Adjust
4286 c_finish_omp_atomic caller.
4287 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
4288 (c_parser_omp_flush): Parse flush with memory-order-clause.
4289 (c_parser_omp_for_loop): Allow NE_EXPR even in
4290 OpenMP loops, adjust c_finish_omp_for caller.
4291 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
4292 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
4293 Allow to be called while parsing combined parallel master.
4294 Parse combined master taskloop{, simd}.
4295 (c_parser_omp_parallel): Parse combined
4296 parallel master{, taskloop{, simd}} constructs.
4297 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
4298 (OMP_TASKGROUP_CLAUSE_MASK): Define.
4299 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
4300 (OMP_TASKWAIT_CLAUSE_MASK): Define.
4301 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
4302 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
4303 around teams body. Use SET_EXPR_LOCATION.
4304 (c_parser_omp_target_data): Allow target data
4305 with only use_device_ptr clauses.
4306 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
4307 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
4308 (c_parser_omp_requires): New function.
4309 (c_finish_taskloop_clauses): New function.
4310 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
4311 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
4312 declaration. Disallow in_reduction clause when combined with parallel
4314 (c_parser_omp_construct): Adjust c_parser_omp_master and
4315 c_parser_omp_taskgroup callers.
4316 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
4318 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
4319 like OMP_CLAUSE_REDUCTION.
4320 (handle_omp_array_sections): Likewise. Call save_expr on array
4321 reductions before calling build_index_type. Handle depend clauses
4323 (struct c_find_omp_var_s): New type.
4324 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
4325 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
4326 with static, runtime or auto schedule kinds. Call save_expr for whole
4327 array reduction sizes. Diagnose reductions with zero sized elements
4328 or variable length structures. Diagnose nogroup clause used with
4329 reduction clause(s). Handle depend clause with
4330 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
4331 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
4332 some different type for other kinds. Use build_unary_op with
4333 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
4334 Handle depend clauses with iterators. Remove no longer needed special
4335 case that predetermined const qualified vars may be specified in
4336 firstprivate clause. Complain if const qualified vars are mentioned
4337 in data-sharing clauses other than firstprivate or shared. Use
4338 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
4339 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
4340 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
4341 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
4343 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4345 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
4346 logic for change to name_hint::operator bool.
4347 (undeclared_variable): Likewise.
4348 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4349 (c_parser_parameter_declaration): Likewise.
4351 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4353 * c-errors.c (pedwarn_c11): New function.
4354 * c-parser.c (disable_extension_diagnostics): Save
4355 warn_c11_c2x_compat and set it to 0.
4356 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
4357 (c_parser_static_assert_declaration_no_semi): Handle
4358 _Static_assert without string constant.
4359 * c-tree.h (pedwarn_c11): New prototype.
4361 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4363 * Make-lang.in (selftest-c): New.
4364 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4365 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
4366 from gcc/Makefile.in.
4368 2018-10-02 Richard Biener <rguenther@suse.de>
4370 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
4372 2018-09-26 Joseph Myers <joseph@codesourcery.com>
4375 * c-typeck.c (build_binary_op): Use excess precision for
4376 comparisons of integers and floating-point for C11 and later.
4378 2018-09-26 Martin Jambor <mjambor@suse.cz>
4381 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
4384 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4386 * c-objc-common.c (range_label_for_type_mismatch::get_text):
4387 Update for new param.
4388 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
4391 2018-09-17 Martin Jambor <mjambor@suse.cz>
4394 * c-parser.c: (warn_for_abs): New function.
4395 (c_parser_postfix_expression_after_primary): Call it.
4397 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4399 * c-typeck.c (digest_init): Shorten overlength strings.
4401 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4403 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
4405 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4407 * c-decl.c (finish_decl): Call braced_list_to_string here ...
4408 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
4410 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
4412 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
4413 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
4415 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4418 * c-decl.c (implicitly_declare): Update call to
4419 maybe_add_include_fixit to suggest overriding the location, as it
4421 * c-objc-common.c (c_tree_printer): Update for conversion of
4422 show_caret_p to a tri-state.
4424 2018-08-27 Martin Liska <mliska@suse.cz>
4426 * c-decl.c (locate_old_decl): Use new function
4427 fndecl_built_in_p and remove check for FUNCTION_DECL if
4429 (diagnose_mismatched_decls): Likewise.
4430 (merge_decls): Likewise.
4431 (warn_if_shadowing): Likewise.
4432 (pushdecl): Likewise.
4433 (implicitly_declare): Likewise.
4434 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4435 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
4436 * c-typeck.c (build_function_call_vec): Likewise.
4437 (convert_arguments): Likewise.
4439 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4442 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
4443 (diagnose_mismatched_decls): Likewise, in various places.
4444 (warn_if_shadowing): Likewise.
4445 (implicit_decl_warning): Likewise.
4446 (implicitly_declare): Likewise.
4447 (undeclared_variable): Likewise.
4448 (declare_label): Likewise.
4449 (grokdeclarator): Likewise.
4450 (start_function): Likewise.
4451 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4452 (c_parser_parameter_declaration): Likewise.
4453 (c_parser_binary_expression): Likewise.
4454 * c-typeck.c (c_expr_sizeof_expr): Likewise.
4455 (parser_build_binary_op): Likewise.
4456 (build_unary_op): Likewise.
4457 (error_init): Likewise.
4458 (pedwarn_init): Likewise.
4459 (warning_init): Likewise.
4460 (convert_for_assignment): Likewise.
4462 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4464 * c-objc-common.c: Include "gcc-rich-location.h".
4465 (c_tree_printer): Move implemenation of '%T' to...
4466 (print_type): ...this new function.
4467 (range_label_for_type_mismatch::get_text): New function.
4468 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
4469 range for the various ic_argpass cases.
4470 (class maybe_range_label_for_tree_type_mismatch): New class.
4471 (build_binary_op): Use it when calling binary_op_error.
4473 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4475 * c-decl.c (start_decl): Do not warn if variables is named as main
4476 and is a local variable.
4478 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4481 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
4482 objects of unknown size.
4484 2018-08-13 Martin Sebor <msebor@redhat.com>
4486 PR tree-optimization/71625
4487 * c-parser.c (c_parser_declaration_or_fndef): Call
4488 braced_list_to_string.
4490 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
4493 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
4496 2018-08-01 Martin Sebor <msebor@redhat.com>
4498 PR tree-optimization/86650
4499 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
4500 and TREE_BLOCK (t) from within percent_K_format to this callsite.
4502 2018-08-01 Jakub Jelinek <jakub@redhat.com>
4505 * c-typeck.c (init_field_decl_cmp): New function.
4506 (output_pending_init_elements): Use it for field comparisons
4507 instead of pure bit_position comparisons.
4509 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4511 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
4512 type here, instead add "omp declare target implicit" attribute.
4513 (finish_decl): Diagnose vars without mappable type here.
4515 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4516 Thomas Schwinge <thomas@codesourcery.com>
4517 Cesar Philippidis <cesar@codesourcery.com>
4519 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
4520 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
4521 to their non-present_or_* counterparts. Make 'self' an alias to
4522 PRAGMA_OACC_CLAUSE_HOST.
4523 (c_parser_oacc_data_clause): Update GOMP mappings for
4524 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
4525 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
4526 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
4527 Remove support for present_or_* clauses.
4528 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4529 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
4530 (OACC_DECLARE_CLAUSE_MASK): Likewise.
4531 (OACC_DATA_CLAUSE_MASK): Likewise.
4532 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4533 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
4534 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
4535 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
4536 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
4538 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4540 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
4541 * gimple-parser.c (c_parser_gimple_statement): Likewise.
4542 (c_parser_gimple_unary_expression): Likewise.
4544 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4547 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
4548 before doing POINTER_DIFF_EXPR.
4550 2018-06-07 Marek Polacek <polacek@redhat.com>
4553 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
4554 for loop initial declarations.
4556 2018-05-30 David Pagan <dave.pagan@oracle.com>
4559 * c-decl.c (grokdeclarator): Update check for return type warnings.
4560 (start_function): Likewise.
4561 (finish_function): Likewise.
4562 * c-typeck.c (c_finish_return): Update check for return type warnings.
4563 Pass OPT_Wreturn_type to pedwarn when appropriate.
4565 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
4567 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
4570 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4572 * gimple-parser.c: Include internal-fn.h.
4573 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
4574 (c_parser_gimple_call_internal): New function.
4575 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
4576 Fix typos in comment.
4578 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4581 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
4582 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
4584 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
4585 fold_offsetof_1, pass argtype as TYPE to it and drop the
4588 2018-05-02 David Pagan <dave.pagan@oracle.com>
4591 * c-decl.c (old_style_parameter_scope): New function.
4592 * c-parser.c (c_parser_postfix_expression): Check for statement
4593 expressions in old-style function parameter list declarations.
4594 * c-parser.h (old_style_parameter_scope): New extern declaration.
4596 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4599 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
4600 it is not TREE_STATIC.
4601 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
4602 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
4603 its COMPOUND_LITERAL_EXPR_DECL.
4605 2018-03-21 Joseph Myers <joseph@codesourcery.com>
4607 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4608 where all functions return the same _FloatN or _FloatNx type,
4609 treat integer types as _Float64 instead of double.
4611 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4614 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
4615 building vector comparison, diagnose it and return error_mark_node.
4617 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4620 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
4621 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
4622 INTEGER_TYPE element type.
4624 2018-03-13 David Pagan <dave.pagan@oracle.com>
4627 * c-typeck.c (output_init_element): Ensure field initializer
4628 expression is always evaluated if there are side effects.
4630 2018-03-06 Jakub Jelinek <jakub@redhat.com>
4633 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
4634 !building_stmt_list_p ().
4636 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
4639 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
4640 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
4641 and include the BIND_EXPR in the list of things that need to be
4644 2018-02-09 Nathan Sidwell <nathan@acm.org>
4647 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
4648 to strict_aliasing_warning.
4650 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4652 * c-typeck.c (really_start_incremental_init, push_init_level,
4653 set_nonincremental_init, output_init_element, process_init_element):
4654 Use DECL_UNNAMED_BIT_FIELD.
4656 2018-01-31 Marek Polacek <polacek@redhat.com>
4659 * c-parser.c (c_parser_compound_statement_nostart): Call
4660 expansion_point_location_if_in_system_header.
4662 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4665 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
4668 2018-01-13 Jakub Jelinek <jakub@redhat.com>
4671 * c-tree.h (decl_constant_value_1): Add a bool argument.
4672 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
4673 returning a CONSTRUCTOR if it is true. Use error_operand_p.
4674 (decl_constant_value): Adjust caller.
4675 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
4676 decl_constant_value_1 as IN_INIT. Otherwise, punt if
4677 decl_constant_value returns initializer that has BLKmode or
4679 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
4681 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4682 Alan Hayward <alan.hayward@arm.com>
4683 David Sherwood <david.sherwood@arm.com>
4685 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
4686 TYPE_VECTOR_SUBPARTS.
4688 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4690 Update copyright years.
4692 2018-01-01 Jakub Jelinek <jakub@redhat.com>
4695 * c-parser.c (c_parser_braced_init, c_parser_initelt,
4696 c_parser_conditional_expression, c_parser_cast_expression,
4697 c_parser_sizeof_expression, c_parser_alignof_expression,
4698 c_parser_postfix_expression, c_parser_omp_declare_reduction,
4699 c_parser_transaction_expression): Use set_error () method instead
4700 of setting value member to error_mark_node.
4702 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
4704 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4705 and _Float<N>X built-in functions.
4707 2017-12-22 Jakub Jelinek <jakub@redhat.com>
4710 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
4711 TYPE_STUB_DECL and call rest_of_type_compilation before processing
4712 incomplete vars rather than after it.
4715 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4716 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4717 and consider empty ones if there are no other stmts. For
4718 -Wunused-value walk all statements before the one only followed by
4721 2017-12-22 Mike Stump <mikestump@comcast.net>
4722 Eric Botcazou <ebotcazou@adacore.com>
4724 * c-parser.c (c_parser_while_statement): Add unroll parameter and
4725 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
4726 (c_parser_do_statement): Likewise.
4727 (c_parser_for_statement): Likewise.
4728 (c_parser_statement_after_labels): Adjust calls to above.
4729 (c_parse_pragma_ivdep): New static function.
4730 (c_parser_pragma_unroll): Likewise.
4731 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4732 <PRAGMA_UNROLL>: New case.
4734 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4736 * c-typeck.c (comptypes_internal, function_types_compatible_p,
4737 perform_integral_promotions, digest_init): Replace Yoda conditions
4738 with typical order conditions.
4739 * c-decl.c (check_bitfield_type_and_width): Likewise.
4741 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4743 * c-typeck.c (c_safe_arg_type_equiv_p,
4744 c_safe_function_type_cast_p): New function.
4745 (build_c_cast): Implement -Wcast-function-type.
4747 2017-12-14 Richard Biener <rguenther@suse.de>
4750 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4751 like REALPART_EXPR for the behavior of whether its operand
4754 2017-12-12 Marek Polacek <polacek@redhat.com>
4757 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4759 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4761 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4762 * c-parser.c (add_debug_begin_stmt): New.
4763 (c_parser_declaration_or_fndef): Call it.
4764 (c_parser_compound_statement_nostart): Likewise.
4765 (c_parser_statement_after_labels): Likewise.
4766 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4768 2017-12-07 Joseph Myers <joseph@codesourcery.com>
4770 * c-decl.c (build_compound_literal): Add parameter alignas_align
4771 and set alignment of decl if nonzero.
4772 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4773 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4775 (c_parser_struct_declaration): Update syntax comment.
4776 (c_parser_type_name): Add alignas_ok argument and pass it to
4778 (c_parser_cast_expression): Pass true to c_parser_type_name and
4779 give error if a cast used an _Alignas specifier.
4780 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4781 give error if sizeof (type-name) used an _Alignas specifier.
4782 (c_parser_alignof_expression): Pass true to c_parser_type_name and
4783 give error if _Alignof (type-name) used an _Alignas specifier.
4784 (c_parser_postfix_expression_after_paren_type): Check specified
4785 alignment for a compound literal and pass it to
4786 build_compound_literal.
4787 * c-parser.h (c_parser_type_name): Update prototype.
4788 * c-tree.h (build_compound_literal): Update prototype.
4790 2017-12-07 Martin Sebor <msebor@redhat.com>
4793 * c-decl.c (c_decl_attributes): Look up existing declaration and
4794 pass it to decl_attributes.
4796 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4799 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4800 reserved for use by the implementation.
4802 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4804 * c-decl.c: Include "c-family/c-spellcheck.h".
4806 2017-12-05 Martin Liska <mliska@suse.cz>
4807 Jakub Jelinek <jakub@redhat.com>
4809 * c-typeck.c (pointer_diff): Add new argument and instrument
4810 pointer subtraction.
4811 (build_binary_op): Similar for pointer comparison.
4813 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4816 * c-parser.c: Include tree-iterator.h.
4817 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4818 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4822 * c-tree.h (decl_constant_value_1): Declare.
4823 * c-typeck.c (decl_constant_value_1): New function.
4824 (decl_constant_value): Use it.
4825 * c-fold.c (c_fully_fold_internal): If in_init, use
4826 decl_constant_value_1 instead of decl_constant_value.
4828 2017-11-30 Jakub Jelinek <jakub@redhat.com>
4830 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4832 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4835 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4836 c_switch_covers_all_cases_p returns true.
4838 2017-11-28 Julia Koval <julia.koval@intel.com>
4839 Sebastian Peryt <sebastian.peryt@intel.com>
4841 * Make-lang.in (c/c-array-notation.o): Remove.
4842 * c-array-notation.c: Delete.
4843 * c-decl.c: Remove cilkplus condition.
4844 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4845 c_parser_cilk_verify_simd, c_parser_array_notation,
4846 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4847 c_parser_cilk_simd_fn_vector_attrs,
4848 c_finish_cilk_simd_fn_tokens): Delete.
4849 (c_parser_declaration_or_fndef): Remove cilkplus condition.
4850 (c_parser_direct_declarator_inner): Ditto.
4851 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4852 (c_parser_attributes, c_parser_compound_statement,
4853 c_parser_statement_after_labels, c_parser_if_statement,
4854 c_parser_switch_statement, c_parser_while_statement,
4855 c_parser_do_statement, c_parser_for_statement,
4856 c_parser_unary_expression, c_parser_postfix_expression,
4857 c_parser_postfix_expression_after_primary,
4858 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4859 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4861 * c-typeck.c (build_array_ref, build_function_call_vec,
4863 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4864 c_finish_loop, build_binary_op): Remove cilkplus support.
4866 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4868 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4871 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
4873 * Make-lang.in (c.install-plugin): Install backend import library.
4875 2017-11-23 Jakub Jelinek <jakub@redhat.com>
4877 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4878 pragma_stmt context.
4880 2017-11-23 Mike Stump <mikestump@comcast.net>
4881 Eric Botcazou <ebotcazou@adacore.com>
4883 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4885 (c_parser_do_statement): Likewise.
4886 (c_parser_for_statement): Likewise.
4888 2017-11-22 David Malcolm <dmalcolm@redhat.com>
4891 * c-objc-common.c (c_tree_printer): Convert penultimate param from
4892 bool to bool *. Within '%T' handling, if showing an "aka", use
4893 "quoted" param to add appropriate quoting.
4895 2017-11-22 Marek Polacek <polacek@redhat.com>
4900 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4902 2017-11-21 David Malcolm <dmalcolm@redhat.com>
4905 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4906 earlier failed lookups.
4908 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
4910 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4911 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4913 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4916 * c-decl.c: Include "c-family/known-headers.h".
4917 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4918 to known-headers.cc.
4919 (class suggest_missing_header): Move to known-header.h.
4920 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4921 than get_c_name_hint.
4923 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4925 * c-decl.c (get_c_name_hint): New function.
4926 (class suggest_missing_header): New class.
4927 (lookup_name_fuzzy): Call get_c_name_hint and use it to
4928 suggest missing headers to the user.
4930 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4932 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4933 Include "c-family/name-hint.h"
4934 (implicit_decl_warning): Convert "hint" from
4935 const char * to name_hint. Pass location to
4936 lookup_name_fuzzy. Suppress any deferred diagnostic if the
4937 warning was not printed.
4938 (undeclared_variable): Likewise for "guessed_id".
4939 (lookup_name_fuzzy): Convert return type from const char *
4940 to name_hint. Add location_t param.
4941 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4942 Include "c-family/name-hint.h"
4943 (c_parser_declaration_or_fndef): Convert "hint" from
4944 const char * to name_hint. Pass location to lookup_name_fuzzy.
4945 (c_parser_parameter_declaration): Likewise.
4947 2017-11-19 Jakub Jelinek <jakub@redhat.com>
4951 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
4953 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
4954 handle_omp_array_sections): Likewise.
4955 (digest_init): Don't call decl_constant_value_for_optimization.
4956 * c-tree.h (decl_constant_value_for_optimization): Removed.
4957 * c-fold.c (c_fold_array_ref): New function.
4958 (c_fully_fold_internal): Add LVAL argument, propagate it through
4959 recursive calls. For VAR_P call decl_constant_value and
4960 unshare if not LVAL and either optimizing or IN_INIT. Remove
4961 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
4962 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4963 (c_fully_fold): Add LVAL argument, pass it through to
4964 c_fully_fold_internal.
4965 (decl_constant_value_for_optimization): Removed.
4967 2017-11-15 Joseph Myers <joseph@codesourcery.com>
4970 * c-parser.c (check_tgmath_function): New function.
4971 (enum tgmath_parm_kind): New enum.
4972 (c_parser_postfix_expression): Handle __builtin_tgmath.
4974 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4976 * c-decl.c (implicit_decl_warning): Update for renaming of
4977 pedwarn_at_rich_loc and warning_at_rich_loc.
4978 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4979 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4980 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4981 (c_parser_struct_or_union_specifier): Likewise for renaming of
4982 pedwarn_at_rich_loc.
4983 (c_parser_parameter_declaration): Likewise for renaming of
4985 * c-typeck.c (build_component_ref): Likewise.
4986 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4987 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4988 (set_init_label): Likewise for renaming of error_at_rich_loc.
4990 2017-10-30 Richard Biener <rguenther@suse.de>
4992 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
4995 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4997 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
4998 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
5000 2017-10-25 David Malcolm <dmalcolm@redhat.com>
5003 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
5006 2017-10-25 Jakub Jelinek <jakub@redhat.com>
5009 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
5010 newdecl to corresponding __builtin_ if any.
5012 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
5015 * c-decl.c (diagnose_mismatched_decls): Use
5016 OPT_Wbuiltin_declaration_mismatch.
5018 2017-10-12 David Malcolm <dmalcolm@redhat.com>
5020 * c-parser.c (c_parser_require): Add "type_is_unique" param and
5021 use it to guard calls to maybe_suggest_missing_token_insertion.
5022 (c_parser_parms_list_declarator): Override default value of new
5023 "type_is_unique" param to c_parser_require.
5024 (c_parser_asm_statement): Likewise.
5025 * c-parser.h (c_parser_require): Add "type_is_unique" param,
5028 2017-10-11 Nathan Sidwell <nathan@acm.org>
5030 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
5032 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5034 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
5035 operating on trees as wide_ints.
5036 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
5037 (c_tree_equal): Likewise.
5039 2017-10-04 David Malcolm <dmalcolm@redhat.com>
5041 * c-decl.c (push_parm_decl): Store c_parm's location into the
5043 (build_c_parm): Add "loc" param and store it within the c_parm.
5044 * c-parser.c (struct c_parser): Add "last_token_location" field.
5045 (c_parser_consume_token): Store location of the token into the
5047 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
5048 when handling a FUNCTION_DECL, if it doesn't already have them.
5049 (c_parser_parameter_declaration): Generate a location for the
5050 parameter, and pass it to the call to build_c_parm.
5051 * c-tree.h (struct c_parm): Add field "loc".
5052 (build_c_parm): Add location_t param.
5053 * c-typeck.c (get_fndecl_argument_location): New function.
5054 (inform_for_arg): New function.
5055 (convert_for_assignment): Use inform_for_arg when dealing with
5058 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5060 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
5062 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
5063 don't SET_DECL_C_BIT_FIELD here.
5066 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
5067 instead of trying to set just TREE_READONLY manually.
5069 2017-09-16 Tom de Vries <tom@codesourcery.com>
5072 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
5075 2017-09-15 Joseph Myers <joseph@codesourcery.com>
5078 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
5080 (build_conditional_expr): For C11, generate result with excess
5081 precision when one argument is an integer and the other is of a
5082 type using excess precision.
5084 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5086 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
5088 2017-09-13 Marek Polacek <polacek@redhat.com>
5091 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
5092 than expr.original_type.
5094 2017-09-12 Nathan Sidwell <nathan@acm.org>
5096 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5097 resort_sorted_fields): Moved from c-family/c-common.c.
5098 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
5100 2017-09-01 Joseph Myers <joseph@codesourcery.com>
5103 * c-typeck.c (build_atomic_assign): Handle argument with excess
5104 precision. Ensure any EXCESS_PRECISION_EXPR is present in
5105 argument passed to build_binary_op and convert_for_assignment but
5106 not for call to c_fully_fold.
5107 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
5108 Ensure build_binary_op is called with argument with original
5109 semantic type. Avoid calling c_fully_fold with an
5110 EXCESS_PRECISION_EXPR from build_binary_op.
5112 2017-09-01 Jakub Jelinek <jakub@redhat.com>
5115 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
5117 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5118 Alan Hayward <alan.hayward@arm.com>
5119 David Sherwood <david.sherwood@arm.com>
5121 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
5122 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
5123 m1 and m2 to the signed equivalent of a fixed-point
5126 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5128 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
5129 than CAN_HAVE_LOCATION_P when determining whether to use the
5130 location_t value within "value".
5132 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5134 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
5135 rather than peeking the location of the first token.
5136 * c-tree.h (c_expr::get_location): New method.
5138 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5140 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
5141 to check_function_arguments.
5143 2017-08-18 Marek Polacek <polacek@redhat.com>
5145 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
5148 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5151 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
5152 (check_bitfield_type_and_width): Don't allow bit-field with
5153 warn_if_not_aligned type.
5155 2017-08-14 Martin Sebor <msebor@redhat.com>
5158 * c-objc-common.c (c_objc_common_init): Handle 'G'.
5160 2017-08-11 Marek Polacek <polacek@redhat.com>
5163 * c-decl.c (pushtag): Only print inform if the warning was printed.
5164 (grokdeclarator): Likewise.
5166 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5168 * c-parser.c (c_parser_error): Rename to...
5169 (c_parser_error_richloc): ...this, making static, and adding
5170 "richloc" parameter, passing it to the c_parse_error call,
5171 rather than calling c_parser_set_source_position_from_token.
5172 (c_parser_error): Reintroduce, reimplementing in terms of the
5173 above, converting return type from void to bool.
5174 (class token_pair): New class.
5175 (struct matching_paren_traits): New struct.
5176 (matching_parens): New typedef.
5177 (struct matching_brace_traits): New struct.
5178 (matching_braces): New typedef.
5179 (get_matching_symbol): New function.
5180 (c_parser_require): Add param MATCHING_LOCATION, using it to
5181 highlight matching "opening" tokens for missing "closing" tokens.
5182 (c_parser_skip_until_found): Likewise.
5183 (c_parser_static_assert_declaration_no_semi): Convert explicit
5184 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
5185 class matching_parens, so that the pertinent open parenthesis is
5186 highlighted when there are problems locating the close
5188 (c_parser_struct_or_union_specifier): Likewise.
5189 (c_parser_typeof_specifier): Likewise.
5190 (c_parser_alignas_specifier): Likewise.
5191 (c_parser_simple_asm_expr): Likewise.
5192 (c_parser_braced_init): Likewise, for matching_braces.
5193 (c_parser_paren_condition): Likewise, for matching_parens.
5194 (c_parser_switch_statement): Likewise.
5195 (c_parser_for_statement): Likewise.
5196 (c_parser_asm_statement): Likewise.
5197 (c_parser_asm_operands): Likewise.
5198 (c_parser_cast_expression): Likewise.
5199 (c_parser_sizeof_expression): Likewise.
5200 (c_parser_alignof_expression): Likewise.
5201 (c_parser_generic_selection): Likewise.
5202 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
5203 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
5204 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
5205 In case CPP_OPEN_PAREN, pass loc_open_paren to the
5206 c_parser_skip_until_found call.
5207 (c_parser_objc_class_definition): Use class matching_parens as
5209 (c_parser_objc_method_decl): Likewise.
5210 (c_parser_objc_try_catch_finally_statement): Likewise.
5211 (c_parser_objc_synchronized_statement): Likewise.
5212 (c_parser_objc_at_property_declaration): Likewise.
5213 (c_parser_oacc_wait_list): Likewise.
5214 (c_parser_omp_var_list_parens): Likewise.
5215 (c_parser_omp_clause_collapse): Likewise.
5216 (c_parser_omp_clause_default): Likewise.
5217 (c_parser_omp_clause_if): Likewise.
5218 (c_parser_omp_clause_num_threads): Likewise.
5219 (c_parser_omp_clause_num_tasks): Likewise.
5220 (c_parser_omp_clause_grainsize): Likewise.
5221 (c_parser_omp_clause_priority): Likewise.
5222 (c_parser_omp_clause_hint): Likewise.
5223 (c_parser_omp_clause_defaultmap): Likewise.
5224 (c_parser_oacc_single_int_clause): Likewise.
5225 (c_parser_omp_clause_ordered): Likewise.
5226 (c_parser_omp_clause_reduction): Likewise.
5227 (c_parser_omp_clause_schedule): Likewise.
5228 (c_parser_omp_clause_num_teams): Likewise.
5229 (c_parser_omp_clause_thread_limit): Likewise.
5230 (c_parser_omp_clause_aligned): Likewise.
5231 (c_parser_omp_clause_linear): Likewise.
5232 (c_parser_omp_clause_safelen): Likewise.
5233 (c_parser_omp_clause_simdlen): Likewise.
5234 (c_parser_omp_clause_depend): Likewise.
5235 (c_parser_omp_clause_map): Likewise.
5236 (c_parser_omp_clause_device): Likewise.
5237 (c_parser_omp_clause_dist_schedule): Likewise.
5238 (c_parser_omp_clause_proc_bind): Likewise.
5239 (c_parser_omp_clause_uniform): Likewise.
5240 (c_parser_omp_for_loop): Likewise.
5241 (c_parser_cilk_clause_vectorlength): Likewise.
5242 (c_parser_cilk_clause_linear): Likewise.
5243 (c_parser_transaction_expression): Likewise.
5244 * c-parser.h (c_parser_require): Add param matching_location with
5245 default UNKNOWN_LOCATION.
5246 (c_parser_error): Convert return type from void to bool.
5247 (c_parser_skip_until_found): Add param matching_location with
5248 default UNKNOWN_LOCATION.
5250 2017-08-09 Marek Polacek <polacek@redhat.com>
5252 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
5253 * c-tree.h (build_external_ref): Update declaration.
5254 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
5255 (build_external_ref): Change the type of a parameter to bool.
5256 (parser_build_binary_op): Use true/false instead of 1/0.
5257 (pointer_diff): Likewise.
5258 (build_modify_expr): Likewise.
5259 (set_designator): Change the type of a parameter to bool.
5260 (set_init_index): Use true/false instead of 1/0.
5261 (set_init_label): Likewise.
5262 (output_init_element): Change the type of a parameter to bool.
5263 (output_pending_init_elements): Use true/false instead of 1/0.
5264 (process_init_element): Likewise.
5265 (build_binary_op): Change the type of a parameter to bool.
5267 2017-08-09 Marek Polacek <polacek@redhat.com>
5270 * c-typeck.c (pedwarn_init): Make the function take a variable list.
5271 Call emit_diagnostic_valist instead of pedwarn.
5272 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
5273 Print the relevant types in diagnostics.
5275 2017-08-09 Marek Polacek <polacek@redhat.com>
5278 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
5279 build_conditional_expr.
5280 * c-parser.c (c_parser_conditional_expression): Create locations for
5281 EXP1 and EXP2 from their source ranges. Pass the locations down to
5282 build_conditional_expr.
5283 * c-tree.h (build_conditional_expr): Update declaration.
5284 * c-typeck.c (build_conditional_expr): Add location_t parameters.
5285 For -Wsign-compare, also print the types.
5287 2017-08-08 Martin Liska <mliska@suse.cz>
5289 * c-convert.c: Include header files.
5290 * c-typeck.c: Likewise.
5292 2017-08-07 Martin Liska <mliska@suse.cz>
5294 * c-parser.c (c_parser_attributes): Canonicalize name of an
5297 2017-08-02 Marek Polacek <polacek@redhat.com>
5300 * c-parser.c (c_parser_unary_expression): Use set_error.
5304 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
5305 warnings. Avoid walking MACRO_MAP_LOCATIONS.
5307 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
5308 Martin Liska <mliska@suse.cz>
5310 * c-typeck.c (c_finish_goto_label): Build gimple predict
5313 2017-07-31 Martin Liska <mliska@suse.cz>
5316 * c-convert.c (convert): Guard condition with flag_sanitize_p
5317 also with current_function_decl non-null equality.
5318 * c-decl.c (grokdeclarator): Likewise.
5319 * c-typeck.c (build_binary_op): Likewise.
5321 2017-07-25 Marek Polacek <polacek@redhat.com>
5323 * c-decl.c (grokfield): Remove local variable.
5325 2017-07-25 Marek Polacek <polacek@redhat.com>
5328 * c-parser.c (c_parser_else_body): Don't warn about multistatement
5329 macro expansion if the body is in { }.
5330 (c_parser_while_statement): Likewise.
5331 (c_parser_for_statement): Likewise.
5333 2017-07-18 Nathan Sidwell <nathan@acm.org>
5335 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
5337 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5339 * c-decl.c (implicitly_declare): When suggesting a missing
5340 #include, provide a fix-it hint.
5342 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5344 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
5345 and call that instead.
5346 * c-tree.h (selftest::run_c_tests): New decl.
5348 2017-06-26 Marek Polacek <polacek@redhat.com>
5351 * c-parser.c (c_parser_if_body): Set the location of the
5352 body of the conditional after parsing all the labels. Call
5353 warn_for_multistatement_macros.
5354 (c_parser_else_body): Likewise.
5355 (c_parser_switch_statement): Likewise.
5356 (c_parser_while_statement): Likewise.
5357 (c_parser_for_statement): Likewise.
5358 (c_parser_statement): Add a default argument. Save the location
5359 after labels have been parsed.
5360 (c_parser_c99_block_statement): Likewise.
5362 2017-06-19 Richard Biener <rguenther@suse.de>
5364 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5365 negated _Literals to parse _Literal (int) -1.
5367 2017-06-13 Martin Liska <mliska@suse.cz>
5370 * c-convert.c (convert): Use sanitize_flags_p.
5371 * c-decl.c (grokdeclarator): Likewise.
5372 * c-typeck.c (convert_for_assignment): Likewise.
5373 (c_finish_return): Likewise.
5374 (build_binary_op): Likewise.
5376 2017-06-08 Jakub Jelinek <jakub@redhat.com>
5379 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
5380 to sizetype before size_binop.
5382 2017-06-07 Jakub Jelinek <jakub@redhat.com>
5384 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
5387 2017-06-06 Marek Polacek <polacek@redhat.com>
5390 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
5392 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
5394 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5396 * c-parser.c (c_parser_binary_expression): Implement the
5397 -Wsizeof_pointer_div warning.
5398 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
5399 from a parenthesized expression.
5400 (c_parser_expr_list): Use c_last_sizeof_loc.
5401 * c-tree.h (c_last_sizeof_loc): New external.
5402 * c-typeck.c (c_last_sizeof_loc): New variable.
5403 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
5405 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
5408 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
5410 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5412 * c-objc-common.c (c_tree_printer): Gain bool and const char **
5415 2017-05-24 Martin Sebor <msebor@redhat.com>
5418 * c-fold.c (c_fully_fold_internal): Adjust.
5419 * c-typeck.c (parser_build_unary_op): Adjust.
5421 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
5423 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
5424 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
5427 2017-05-23 Marek Polacek <polacek@redhat.com>
5429 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
5432 2017-05-22 Jakub Jelinek <jakub@redhat.com>
5434 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
5435 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
5436 it returned invariant. Call tree_invariant_p unconditionally
5437 afterwards to decide whether to return expr or op0.
5439 2017-05-22 Nathan Sidwell <nathan@acm.org>
5441 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
5443 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
5445 * c-parser.c (c_parser_omp_clause_default): Handle
5446 "OMP_CLAUSE_DEFAULT_PRESENT".
5448 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5450 * config-lang.in (gtfiles): Add c-family/c-format.c.
5452 2017-05-18 Nathan Sidwell <nathan@acm.org>
5454 * c-decl.c (pushdecl_top_level): Delete unused function.
5456 2017-05-18 Marek Polacek <polacek@redhat.com>
5458 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
5459 (check_earlier_gotos): Likewise.
5460 (define_label): Likewise.
5461 (pending_xref_error): Likewise.
5462 (smallest_type_quals_location): Likewise.
5463 (grokdeclarator): Likewise.
5464 (grokparms): Likewise.
5465 (identifier_global_value): Likewise.
5466 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
5467 (find_init_member): Likewise.
5469 2017-05-18 Marek Polacek <polacek@redhat.com>
5471 * c-decl.c (start_decl): Use false/true instead of 0/1.
5472 (grokdeclarator): Likewise.
5473 (finish_struct): Likewise.
5474 (start_function): Change the return type to bool. Use false/true
5476 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
5477 * c-tree.h (start_function): Update.
5478 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
5479 (set_designator): Change the return type to bool. Use false/true
5482 2017-05-17 Marek Polacek <polacek@redhat.com>
5484 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
5485 * c-typeck.c: Likewise.
5487 2017-05-17 Marek Polacek <polacek@redhat.com>
5490 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
5491 DECL_IGNORED_P even for non-static compound literals.
5493 2017-05-17 Martin Liska <mliska@suse.cz>
5495 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
5496 use it instead of int type.
5498 2017-05-17 Marek Polacek <polacek@redhat.com>
5500 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
5502 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
5503 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
5504 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
5505 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
5507 (c_parser_conditional_expression): Likewise.
5508 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
5509 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
5510 (process_init_element): Likewise.
5511 (build_binary_op): Likewise.
5512 (handle_omp_array_sections_1): Likewise.
5514 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
5516 * c-parser.c (c_parser_omp_clause_num_gangs)
5517 (c_parser_omp_clause_num_workers)
5518 (c_parser_omp_clause_vector_length): Merge functions into...
5519 (c_parser_oacc_single_int_clause): ... this new function. Adjust
5522 2017-05-11 Nathan Sidwell <nathan@acm.org>
5524 * gimple-parser.c: Don't #include tree-dump.h.
5526 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5529 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
5531 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5534 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5535 incorrect __MEM syntax.
5537 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5540 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
5543 2017-05-09 Nathan Sidwell <nathan@acm.org>
5545 * c-tree.h (pushdecl): Declare.
5547 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5549 * c-decl.c (warn_defaults_to): Replace report_diagnostic
5550 with diagnostic_report_diagnostic.
5551 * c-errors.c (pedwarn_c99): Likewise.
5552 (pedwarn_c90): Likewise.
5554 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5557 * c-gimplify.c (c_gimplify_expr): Remove calls to
5558 cilk_gimplifY_call_params_in_spawned_fn.
5560 2017-04-25 David Malcolm <dmalcolm@redhat.com>
5562 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
5563 hint for removing extra semicolon.
5565 2017-04-21 Jakub Jelinek <jakub@redhat.com>
5568 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
5569 enabled, set specs->type to integer_type_node.
5571 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5573 * c-array-notation.c: Fix typo in comment.
5575 2017-03-29 Marek Polacek <polacek@redhat.com>
5578 * c-decl.c (finish_decl): Check VAR_P.
5580 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5583 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
5584 * c-typeck.c (c_mark_addressable): Likewise. Look through
5585 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
5587 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
5589 2017-03-23 Marek Polacek <polacek@redhat.com>
5591 * c-tree.h: Remove a C_RID_YYCODE reference.
5593 2017-03-21 Jakub Jelinek <jakub@redhat.com>
5596 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
5597 optional COMPOUND_EXPR with ubsan instrumentation.
5599 2017-03-17 Marek Polacek <polacek@redhat.com>
5601 * c-parser.c: Add C11 references.
5603 2017-03-15 Marek Polacek <polacek@redhat.com>
5605 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
5607 2017-03-11 Marek Polacek <polacek@redhat.com>
5609 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
5611 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5613 PR translation/79848
5614 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5616 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
5618 2017-03-09 Marek Polacek <polacek@redhat.com>
5621 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5622 parameter declarations with initializers.
5624 2017-03-09 Jakub Jelinek <jakub@redhat.com>
5627 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
5630 2017-03-07 Jakub Jelinek <jakub@redhat.com>
5633 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
5634 for "may only be used in compound statements" diagnostics, change it
5635 such that the same translatable string is used for all pragmas. For
5636 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
5638 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
5639 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
5640 "may only be used in compound statements" diagnostics, such that the
5641 same translatable string is used for all pragmas.
5643 2017-03-04 Marek Polacek <polacek@redhat.com>
5646 * c-decl.c (implicit_decl_warning): Add missing space.
5648 2017-03-03 Marek Polacek <polacek@redhat.com>
5651 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
5652 current_function_prototype_arg_types is error_mark_node. Fix
5653 formatting. Use TREE_VALUE instead of TREE_TYPE.
5655 2017-03-03 Jakub Jelinek <jakub@redhat.com>
5658 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
5659 %<min%> or %<max%> in the diagnostics, instead mention identifier.
5660 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
5664 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
5665 instead of %<_Generic>.
5666 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
5667 (c_parser_omp_target_exit_data): Use %<release%> instead of
5670 2017-02-28 Jakub Jelinek <jakub@redhat.com>
5672 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
5673 instead of just cond ? "..." : "...".
5674 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
5675 for "enter"/"exit" keyword.
5676 (c_finish_oacc_routine): Don't use %s to supply portions of the
5679 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5682 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
5683 handle -Wrestrict here.
5684 * c-typeck.c (build_function_call_vec): Adjust
5685 check_function_arguments caller.
5687 2017-02-23 Richard Biener <rguenther@suse.de>
5690 * gimple-parser.c (c_parser_gimple_statement): Use set_error
5691 to initialize c_exprs to return.
5692 (c_parser_gimple_binary_expression): Likewise.
5693 (c_parser_gimple_unary_expression): Likewise.
5694 (c_parser_gimple_postfix_expression): Likewise.
5696 2017-02-22 Marek Polacek <polacek@redhat.com>
5699 * c-typeck.c (convert_arguments): Handle error_mark_node.
5701 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5703 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
5704 value of c_parser_parse_ssa_name against error_mark_node and emit
5705 error if ssa name is anonymous and written as default definition.
5707 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5709 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5712 2017-02-16 Jakub Jelinek <jakub@redhat.com>
5715 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5716 ignore #pragma omp target even when not followed by identifier.
5718 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5720 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5721 (c_parser_gimple_unary_expression): Likewise.
5723 2017-02-13 Jakub Jelinek <jakub@redhat.com>
5725 * c-parser.c (c_parser_oacc_declare): Add missing space in
5728 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5731 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5732 set_c_expr_source_range when parsing ssa-name.
5734 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
5735 Richard Biener <rguenther@suse.de>
5737 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5738 building IL when arguments are error_mark_node.
5739 (c_parser_gimple_unary_expression): Likewise.
5740 (c_parser_gimple_if_stmt): Likewise.
5741 (c_parser_gimple_switch_stmt): Likewise.
5742 (c_parser_gimple_return_stmt): Likewise.
5743 (c_parser_parse_ssa_name): When name lookup fails do not build
5744 an SSA name. Use undeclared rather than not declared in error
5747 2017-02-09 Marek Polacek <polacek@redhat.com>
5750 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5751 instead of c_parser_skip_until_found.
5753 2017-02-09 Jakub Jelinek <jakub@redhat.com>
5756 * c-parser.c (c_parser_omp_declare_target): Don't invoke
5757 symtab_node::get on automatic variables.
5759 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
5760 Chung-Lin Tang <cltang@codesourcery.com>
5762 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5763 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5765 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5767 2017-02-07 Richard Biener <rguenther@suse.de>
5769 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5770 (c_parser_gimple_postfix_expression_after_primary):
5771 Do not use c_build_function_call_vec to avoid folding and promotion.
5774 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5777 * c-decl.c (pop_scope): Pass main_input_filename to
5778 build_translation_unit_decl.
5780 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5782 * c-parser.c: Include "read-rtl-function.h" and
5784 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5785 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
5786 production. Update for renaming of field "gimple_pass" to
5787 "gimple_or_rtl_pass". If __RTL was seen, call
5788 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
5789 to an auto_timevar, to cope with early exit.
5790 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5791 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5792 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5794 (c_parser_parse_rtl_body): New function.
5795 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5796 (struct c_declspecs): Rename field "gimple_pass" to
5797 "gimple_or_rtl_pass". Add field "rtl_p".
5798 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5799 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5800 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5801 (c_parser_gimple_or_rtl_pass_list): ...this.
5803 2017-01-20 Marek Polacek <polacek@redhat.com>
5806 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5808 2017-01-13 Richard Biener <rguenther@suse.de>
5810 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5813 2017-01-13 Richard Biener <rguenther@suse.de>
5815 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5816 _Literal ( type-name ) number.
5818 2017-01-12 Richard Biener <rguenther@suse.de>
5820 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5823 2017-01-11 Jakub Jelinek <jakub@redhat.com>
5826 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5829 2017-01-11 Richard Biener <rguenther@suse.de>
5832 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5833 returns on parse errors.
5835 2017-01-04 Marek Polacek <polacek@redhat.com>
5838 * c-parser.c (c_parser_postfix_expression): Mark zero character
5839 constants by setting original_type in c_expr.
5840 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5841 with a zero character constant.
5842 (char_type_p): New function.
5844 2017-01-04 David Malcolm <dmalcolm@redhat.com>
5846 * c-parser.c (c_parser_declaration_or_fndef): Create a
5847 rich_location at init_loc and parse it to start_init.
5848 (last_init_list_comma): New global.
5849 (c_parser_braced_init): Update last_init_list_comma when parsing
5850 commas. Pass it to pop_init_level. Pass location of closing
5851 brace to pop_init_level.
5852 (c_parser_postfix_expression_after_paren_type): Create a
5853 rich_location at type_loc and parse it to start_init.
5854 (c_parser_omp_declare_reduction): Likewise for loc.
5855 * c-tree.h (start_init): Add rich_location * param.
5856 (pop_init_level): Add location_t param.
5857 * c-typeck.c (struct initializer_stack): Add field
5858 "missing_brace_richloc".
5859 (start_init): Add richloc param, use it to initialize
5860 the stack node's missing_brace_richloc.
5861 (last_init_list_comma): New decl.
5862 (finish_implicit_inits): Pass last_init_list_comma to
5864 (push_init_level): When finding missing open braces, add fix-it
5865 hints to the richloc.
5866 (pop_init_level): Add "insert_before" param and pass it
5867 when calling pop_init_level. Add fixits about missing
5868 close braces to any richloc. Use the richloc for the
5869 -Wmissing-braces warning.
5870 (set_designator): Pass last_init_list_comma to pop_init_level.
5871 (process_init_element): Likewise.
5873 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5875 Update copyright years.
5877 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5880 * c-typeck.c (build_function_call_vec): If check_function_arguments
5881 returns true, set TREE_NO_WARNING on CALL_EXPR.
5884 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5885 to *expr instead of overwriting it.
5887 2016-12-20 Richard Biener <rguenther@suse.de>
5889 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5891 (c_parser_gimple_statement): Only build assigns for non-error
5893 (c_parser_gimple_postfix_expression_after): Improve error recovery.
5895 2016-12-14 Martin Jambor <mjambor@suse.cz>
5897 * c-parser.c: Include omp-general.h and omp-offload.h instead of
5899 (c_finish_oacc_routine): Adjusted call to
5900 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5901 to use their new names.
5902 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5904 (c_parser_oacc_update): Likewise.
5905 (c_parser_omp_simd): Likewise.
5906 (c_parser_omp_target_update): Likewise.
5907 * c-typeck.c: Include omp-general.h instead of omp-low.h.
5908 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5910 (c_finish_omp_cancellation_point): Likewise.
5911 * gimple-parser.c: Do not include omp-low.h
5913 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
5914 James Norris <jnorris@codesourcery.com>
5916 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5917 EXIT_DATA,WAIT} are not used in compound statements.
5918 (c_parser_oacc_enter_exit_data): Update diagnostics.
5920 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5923 * c-decl.c (diagnose_mismatched_decls): Use
5924 OPT_Wbuiltin_declaration_mismatch here too.
5926 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
5927 Alan Hayward <alan.hayward@arm.com>
5928 David Sherwood <david.sherwood@arm.com>
5930 * c-decl.c (merge_decls): Use SET_DECL_MODE.
5931 (make_label, finish_struct): Likewise.
5933 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
5934 Richard Biener <rguenther@suse.de>
5936 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5937 * config-lang.in (gtfiles): Add c/c-parser.h.
5938 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
5939 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
5940 * c-parser.c (enum c_id_kind, struct c_token,
5941 c_parser_next_token_is, c_parser_next_token_is_not,
5942 c_parser_next_token_is_keyword,
5943 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
5945 * c-parser.h: ... new header.
5946 * c-parser.c: Include c-parser.h and gimple-parser.h.
5947 (c_parser_peek_token, c_parser_peek_2nd_token,
5948 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5949 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5950 c_parser_error, c_parser_require, c_parser_skip_until_found,
5951 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5952 c_parser_type_name): Export.
5953 (c_parser_tokens_buf): New function.
5954 (c_parser_error): Likewise.
5955 (c_parser_set_error): Likewise.
5956 (c_parser_declspecs): Handle RID_GIMPLE.
5957 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5958 via c_parser_parse_gimple_body.
5959 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5960 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5961 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5962 c_parser_error, c_parser_require, c_parser_skip_until_found,
5963 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5964 c_parser_type_name): Declare.
5965 (struct c_parser): Declare forward.
5966 (c_parser_tokens_buf): Declare.
5967 (c_parser_error): Likewise.
5968 (c_parser_set_error): Likewise.
5969 * gimple-parser.c: New file.
5970 * gimple-parser.h: Likewise.
5972 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5975 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5978 2016-09-11 Le-Chun Wu <lcwu@google.com>
5979 Mark Wielaard <mjw@redhat.com>
5981 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5982 to the given -Wshadow= variant.
5984 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5986 * c-typeck.c: Include memmodel.h.
5988 2016-10-13 Jakub Jelinek <jakub@redhat.com>
5991 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5992 instead of lhd_return_null_tree_v.
5994 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
5997 * c-decl.c (smallest_type_quals_location): New static function.
5998 (grokdeclarator): Try to find the correct location for an ignored
6001 2016-09-26 Marek Polacek <polacek@redhat.com>
6004 * c-decl.c (pop_scope): Add gcc_fallthrough.
6006 2016-09-26 Marek Polacek <polacek@redhat.com>
6009 * c-parser.c (struct c_token): Add flags field.
6010 (c_lex_one_token): Pass it to c_lex_with_flags.
6011 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
6012 into IFN_FALLTHROUGH.
6013 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
6014 attribute fallthrough after a case label or default label.
6015 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
6017 2016-09-24 Marek Polacek <polacek@redhat.com>
6020 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
6021 have boolean value. Warn about ++/-- on booleans.
6023 2016-09-23 Jakub Jelinek <jakub@redhat.com>
6025 * c-parser.c (incomplete_record_decls): Remove unnecessary
6026 = vNULL initialization of file scope vec.
6028 2016-09-16 Marek Polacek <polacek@redhat.com>
6030 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
6032 2016-09-14 Marek Polacek <polacek@redhat.com>
6034 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
6035 (fix_array_notation_expr): Likewise.
6036 * c-decl.c (finish_decl): Likewise.
6037 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6038 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
6039 (function_to_pointer_conversion): Use false instead of 0.
6040 (convert_lvalue_to_rvalue): Likewise.
6041 (parser_build_unary_op): Likewise.
6042 (build_atomic_assign): Likewise.
6043 (build_unary_op): Change nonconvert parameter type to bool, use
6044 true/false instead of 1/0.
6045 (build_binary_op): Use true instead of 1.
6047 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6049 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
6050 of add_fixit_insert to add_fixit_insert_before.
6052 2016-09-13 Marek Polacek <polacek@redhat.com>
6054 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
6057 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6060 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
6061 COMPOUND_EXPR to warn_for_omitted_condop.
6063 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6065 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
6066 c_get_substring_location for this new langhook.
6068 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6071 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
6073 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
6074 instead of mark_exp_read on low_bound/length expression.
6075 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
6076 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6077 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6078 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
6079 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
6080 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
6081 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
6082 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
6083 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
6084 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
6085 instead of mark_expr_read.
6086 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
6087 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
6088 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
6089 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
6090 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
6091 array section bases outside of depend clause, for depend clause
6092 use convert_lvalue_to_rvalue on the base.
6093 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
6094 linear, aligned, map, to and from clauses.
6095 (c_omp_clause_copy_ctor): New function.
6097 2016-09-01 Marek Polacek <polacek@redhat.com>
6100 * c-typeck.c (composite_type): Add FALLTHRU comment.
6102 2016-08-31 David Malcolm <dmalcolm@redhat.com>
6104 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
6105 to the insertion fixits for "struct", "union", and "enum".
6107 2016-08-30 David Malcolm <dmalcolm@redhat.com>
6109 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
6110 rather than add_fixit_misspelled_id.
6111 (undeclared_variable): Likewise.
6112 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
6113 now-redundant "here" params from add_fixit_insert method calls.
6114 (c_parser_parameter_declaration): Likewise.
6115 * c-typeck.c (build_component_ref): Remove now-redundant range
6116 param from add_fixit_replace method calls.
6118 2016-08-25 Marek Polacek <polacek@redhat.com>
6120 * c-typeck.c (parser_build_binary_op): Pass LHS to
6121 warn_logical_not_parentheses.
6123 2016-08-25 Marek Polacek <polacek@redhat.com>
6126 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
6127 or _FloatN or _FloatNx is not supported.
6128 (finish_declspecs): Set type to integer_type_node when _FloatN or
6129 _FloatNx is not supported.
6131 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6134 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
6135 (struct c_declspecs): Add field floatn_nx_idx.
6136 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
6137 and _FloatNx type specifiers.
6138 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
6139 (c_parser_declspecs, c_parser_attribute_any_word)
6140 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
6141 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
6142 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
6143 narrower than double.
6145 2016-08-12 Jakub Jelinek <jakub@redhat.com>
6146 Martin Liska <mliska@suse.cz>
6149 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
6150 % to determine val element to change. Assert that
6151 wchar_bytes * charwidth fits into val array.
6153 2016-08-12 Marek Polacek <polacek@redhat.com>
6156 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
6157 (c_parser_postfix_expression): Likewise.
6158 * c-typeck.c (build_unary_op): Adjust fall through comment.
6159 (c_mark_addressable): Likewise.
6161 2016-08-11 Jakub Jelinek <jakub@redhat.com>
6164 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
6165 array member through typedef, for orig_qual_indirect == 0 clear
6168 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6171 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
6172 this up to selftest::run_c_tests.
6173 (selftest::run_c_tests): New function.
6175 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
6177 * c-parser.c (struct oacc_routine_data): Add error_seen and
6178 fndecl_seen members.
6179 (c_finish_oacc_routine): Use these.
6180 (c_parser_declaration_or_fndef): Adjust.
6181 (c_parser_oacc_routine): Likewise. Support more C language
6182 constructs, and improve diagnostics. Move pragma context
6184 (c_parser_pragma): ... here.
6186 * c-parser.c (struct oacc_routine_data): New.
6187 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
6189 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
6190 declare target" attribute.
6192 2016-08-01 Jan Beulich <jbeulich@suse.com>
6194 * c-fold.c (c_fully_fold_internal): Also emit shift count
6195 warnings for vector types.
6196 * c-typeck.c (build_binary_op): Likewise.
6198 2016-07-29 Marek Polacek <polacek@redhat.com>
6201 * c-decl.c (finish_struct): Rephrase an error message.
6204 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
6205 to error node for invalid code.
6208 * c-decl.c (implicitly_declare): Return decl early not only for
6209 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
6211 2016-07-29 Jakub Jelinek <jakub@redhat.com>
6214 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
6215 on GNU extern inline functions.
6217 2016-07-29 Marek Polacek <polacek@redhat.com>
6220 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
6223 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
6225 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
6227 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6229 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
6231 (best_macro_match): Likewise, converting from a typedef to a
6233 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
6234 (lookup_name_fuzzy): Update for change of best_macro_match to a
6235 subclass with a ctor that calls cpp_forall_identifiers.
6237 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6239 * c-decl.c (implicit_decl_warning): Update for conversion of
6240 return type of lookup_name_fuzzy to const char *.
6241 (undeclared_variable): Likewise.
6242 (lookup_name_fuzzy): Convert return type from tree to
6244 * c-parser.c (c_parser_declaration_or_fndef): Update for
6245 conversion of return type of lookup_name_fuzzy to const char *.
6246 (c_parser_parameter_declaration): Likewise.
6248 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
6250 * c-parser.c (c_parser_oacc_declare): Don't scan for
6252 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
6253 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
6254 zero-length subarrays.
6256 2016-07-15 Jakub Jelinek <jakub@redhat.com>
6259 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
6260 instead of FUZZY_LOOKUP_NAME.
6261 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
6262 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
6264 2016-07-14 Jakub Jelinek <jakub@redhat.com>
6267 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
6269 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6271 * c-parser.c (c_parser_generic_selection): Make type of variable
6273 (c_parser_omp_declare_simd): Likewise.
6275 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6277 * c-decl.c (struct c_struct_parse_info): Change member types
6278 from vec to auto_vec.
6279 (start_struct): Adjust.
6280 (finish_struct): Likewise.
6282 2016-07-02 Jakub Jelinek <jakub@redhat.com>
6285 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
6287 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6289 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
6290 Move pragma context checking into...
6291 (c_parser_omp_cancellation_point): ... here, and improve
6292 diagnostic messages.
6293 * c-typeck.c (c_finish_omp_cancel)
6294 (c_finish_omp_cancellation_point): Improve diagnostic messages.
6296 2016-06-29 Jakub Jelinek <jakub@redhat.com>
6299 * c-typeck.c (c_build_qualified_type): Don't clear
6300 C_TYPE_INCOMPLETE_VARS for the main variant.
6302 2016-06-28 Martin Sebor <msebor@redhat.com>
6305 * c-typeck.c (output_init_element): Diagnose incompatible types
6306 before non-constant initializers.
6308 2016-06-28 Jakub Jelinek <jakub@redhat.com>
6310 * Make-lang.in: Don't cat ../stage_current if it does not exist.
6312 2016-06-23 Andi Kleen <ak@linux.intel.com>
6314 * Make-lang.in: Add support for autofdo.
6316 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6319 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
6320 (implicit_decl_warning): When issuing warnings for implicit
6321 declarations, attempt to provide a suggestion via
6323 (undeclared_variable): Likewise when issuing errors.
6324 (lookup_name_in_scope): Likewise.
6325 (struct edit_distance_traits<cpp_hashnode *>): New struct.
6326 (best_macro_match): New typedef.
6327 (find_closest_macro_cpp_cb): New function.
6328 (lookup_name_fuzzy): New function.
6329 * c-parser.c: Include gcc-rich-location.h.
6330 (c_token_starts_typename): Split out case CPP_KEYWORD into...
6331 (c_keyword_starts_typename): ...this new function.
6332 (c_parser_declaration_or_fndef): When issuing errors about
6333 missing "struct" etc, add a fixit. For other kinds of errors,
6334 attempt to provide a suggestion via lookup_name_fuzzy.
6335 (c_parser_parms_declarator): When looking ahead to detect typos in
6336 type names, also reject CPP_KEYWORD.
6337 (c_parser_parameter_declaration): When issuing errors about
6338 unknown type names, attempt to provide a suggestion via
6340 * c-tree.h (c_keyword_starts_typename): New prototype.
6342 2016-06-20 Joseph Myers <joseph@codesourcery.com>
6345 * c-typeck.c (build_conditional_expr): Return error_mark_node if
6346 c_common_type returns error_mark_node.
6348 2016-06-19 Martin Sebor <msebor@redhat.com>
6351 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
6352 __alignof__ (expression).
6354 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6356 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
6358 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6360 * c-typeck.c (build_component_ref): Simplify fixit code by
6361 using gcc_rich_location::add_fixit_misspelled_id.
6362 (set_init_label): Likewise.
6364 2016-06-13 David Malcolm <dmalcolm@redhat.com>
6366 * c-parser.c (c_parser_initelt): Provide location of name for new
6367 location_t param of set_init_label.
6368 * c-tree.h (set_init_label): Add location_t param.
6369 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
6370 param and use it when issuing error messages about unrecognized
6371 field names. Attempt to provide a fixit hint if appropriate,
6372 otherwise update the error message to provide the type name.
6374 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
6377 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
6380 2016-06-08 Martin Sebor <msebor@redhat.com>
6381 Jakub Jelinek <jakub@redhat.com>
6385 * c-typeck.c (convert_arguments): Don't promote last argument
6386 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6388 2016-06-08 Marek Polacek <polacek@redhat.com>
6391 * c-decl.c (grokdeclarator): Check TYPE_P.
6394 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
6397 2016-06-07 David Malcolm <dmalcolm@redhat.com>
6399 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
6400 and structure element reference, capture the location of the
6401 element name token and pass it to build_component_ref.
6402 (c_parser_postfix_expression_after_primary): Likewise for
6403 structure element dereference.
6404 (c_parser_omp_variable_list): Likewise for
6405 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
6406 * c-tree.h (build_component_ref): Add location_t param.
6407 * c-typeck.c (build_component_ref): Add location_t param
6408 COMPONENT_LOC. Use it, if available, when issuing hints about
6409 mispelled member names to provide a fixit replacement hint.
6411 2016-06-06 Marek Polacek <polacek@redhat.com>
6414 * c-parser.c (c_parser_direct_declarator): Set location.
6416 2016-06-06 Marek Polacek <polacek@redhat.com>
6418 * c-typeck.c (comptypes_internal): Handle comparisons of
6419 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
6420 TYPE_REF_CAN_ALIAS_ALL.
6422 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
6424 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
6425 arguments as addressable when async clause exists.
6427 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6430 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
6431 when combined with target construct.
6433 2016-05-26 Jakub Jelinek <jakub@redhat.com>
6435 * c-parser.c (c_parser_omp_clause_schedule): Warn if
6436 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
6438 2016-05-25 Marek Polacek <polacek@redhat.com>
6441 * c-decl.c (c_make_fname_decl): Don't check seen_error.
6444 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
6446 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
6448 * c-parser.c (c_parser_oacc_declare): Add support for
6449 GOMP_MAP_FIRSTPRIVATE_POINTER.
6450 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
6451 argument with enum c_omp_region_type ort.
6452 (handle_omp_array_sections): Likewise. Update call to
6453 handle_omp_array_sections_1.
6454 (c_finish_omp_clauses): Add specific errors and warning messages for
6455 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
6456 call to handle_omp_array_sections.
6458 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
6460 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
6462 2016-05-24 Richard Biener <rguenther@suse.de>
6466 * c-typeck.c (build_array_ref): Do not complain about indexing
6467 non-lvalue vectors. Adjust for function name change.
6469 2016-05-20 Martin Sebor <msebor@redhat.com>
6472 * c-typeck.c (error_init): Use
6473 expansion_point_location_if_in_system_header.
6474 (warning_init): Same.
6476 2016-05-19 David Malcolm <dmalcolm@redhat.com>
6479 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
6481 (c_parser_postfix_expression): Likewise.
6482 * c-tree.h (c_expr::set_error): New method.
6483 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
6484 that result's range is initialized.
6486 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6488 * c-typeck.c (parser_build_unary_op): Fix formatting.
6490 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
6492 * c-decl.c (grokdeclarator): Remove errmsg and use of
6493 targetm.invalid_return_type.
6494 (grokparms): Remove errmsg and use of
6495 targetm.invalid_parameter_type.
6497 2016-05-13 Joseph Myers <joseph@codesourcery.com>
6499 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
6500 function return type.
6502 2016-05-12 Marek Polacek <polacek@redhat.com>
6505 * c-decl.c (build_compound_literal): Pass LOC down to
6506 c_incomplete_type_error.
6507 * c-tree.h (require_complete_type): Adjust declaration.
6508 (c_incomplete_type_error): Likewise.
6509 * c-typeck.c (require_complete_type): Add location parameter, pass it
6510 down to c_incomplete_type_error.
6511 (c_incomplete_type_error): Add location parameter, pass it down to
6513 (build_component_ref): Pass location down to c_incomplete_type_error.
6514 (default_conversion): Pass location down to require_complete_type.
6515 (build_array_ref): Likewise.
6516 (build_function_call_vec): Likewise.
6517 (convert_arguments): Likewise.
6518 (build_unary_op): Likewise.
6519 (build_c_cast): Likewise.
6520 (build_modify_expr): Likewise.
6521 (convert_for_assignment): Likewise.
6522 (c_finish_omp_clauses): Likewise.
6524 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6527 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
6529 * c-errors.c (pedwarn_c90): Return true if warned.
6530 * c-tree.h (pedwarn_c90): Change return type to bool.
6531 (enum c_declspec_word): Add new enumerator cdw_atomic.
6533 2016-05-11 Marek Polacek <polacek@redhat.com>
6536 * c-decl.c (diagnose_mismatched_decls): Factor out code to
6537 diagnose_mismatched_attributes and call it.
6539 2016-05-10 Marek Polacek <polacek@redhat.com>
6542 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
6543 on a declaration following the definition.
6545 2016-05-05 Jakub Jelinek <jakub@redhat.com>
6547 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
6548 parse it through to c_parser_c99_block_statement.
6549 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
6552 2016-05-04 Marek Polacek <polacek@redhat.com>
6554 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
6557 2016-05-04 Marek Polacek <polacek@redhat.com>
6560 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
6561 for macro expansions.
6563 2016-05-03 Marek Polacek <polacek@redhat.com>
6566 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
6567 check_builtin_function_arguments.
6569 2016-05-03 Richard Biener <rguenther@suse.de>
6571 * Make-lang.in (cc1-checksum.c): For stage-final re-use
6572 the checksum from the previous stage.
6574 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6576 * c-parser.c (c_parser_oacc_all_clauses): Update call to
6577 c_finish_omp_clauses.
6578 (c_parser_omp_all_clauses): Likewise.
6579 (c_parser_oacc_cache): Likewise.
6580 (c_parser_oacc_loop): Likewise.
6581 (omp_split_clauses): Likewise.
6582 (c_parser_omp_declare_target): Likewise.
6583 (c_parser_cilk_all_clauses): Likewise.
6584 (c_parser_cilk_for): Likewise.
6585 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
6586 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
6588 2016-05-02 Marek Polacek <polacek@redhat.com>
6591 * c-decl.c (grokdeclarator): Diagnose when array's size has an
6594 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6597 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
6598 OACC_LOOP_CLAUSE_MASK.
6599 (c_parser_oacc_kernels_parallel): Update call to
6600 c_oacc_split_loop_clauses.
6602 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
6604 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
6605 argument to build_modify_expr in two cases.
6607 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6609 * c-parser.c (c_parser_postfix_expression_after_primary): Call
6610 warn_for_memset instead of warning directly here.
6612 2016-04-26 Marek Polacek <polacek@redhat.com>
6615 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
6617 (c_parser_for_statement): ... here.
6618 (c_parser_if_statement): Use it.
6619 (c_parser_switch_statement): Use it.
6620 (c_parser_while_statement): Use it.
6623 * c-decl.c (pushdecl): Pass LOCUS down to warning.
6625 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6628 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
6629 instead of c_finish_cilk_clauses.
6630 * c-tree.h (c_finish_omp_clauses): Add new default argument.
6631 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
6632 floating-point variables in the linear clause for Cilk Plus.
6634 2016-04-18 Michael Matz <matz@suse.de>
6636 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
6637 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
6639 2016-04-15 Marek Polacek <polacek@redhat.com>
6642 * c-typeck.c (build_unary_op): Pass location down to error and
6645 2016-04-15 Jakub Jelinek <jakub@redhat.com>
6648 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
6650 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
6651 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
6652 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
6653 Adjust c_parser_pragma callers.
6654 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
6656 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
6658 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
6659 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
6660 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
6661 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
6662 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
6663 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
6664 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
6665 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
6667 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
6668 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
6671 2016-04-13 Marek Polacek <polacek@redhat.com>
6674 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
6676 (c_parser_statement): Likewise.
6677 (c_parser_c99_block_statement): Likewise.
6678 (c_parser_while_statement): Likewise.
6679 (c_parser_for_statement): Likewise.
6680 (c_parser_if_body): Don't set IF_P here.
6681 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
6682 about dangling else here.
6683 * c-tree.h (c_finish_if_stmt): Adjust declaration.
6684 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
6685 warn about dangling else here.
6687 2016-04-04 Marek Polacek <polacek@redhat.com>
6690 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
6692 2016-03-31 Marek Polacek <polacek@redhat.com>
6695 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
6697 2016-03-18 David Malcolm <dmalcolm@redhat.com>
6700 * c-parser.c (c_parser_postfix_expression): Set the source range
6701 for uses of "__builtin_types_compatible_p".
6703 2016-03-17 Jakub Jelinek <jakub@redhat.com>
6706 * c-typeck.c (composite_type): Don't count void_list_node
6707 into len, if the list is terminated by void_list_node, start
6708 with void_list_node instead of NULL for newargs. Stop
6711 2016-03-16 Marek Polacek <polacek@redhat.com>
6714 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
6715 nested functions returning VM types.
6717 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
6719 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6720 when calling c_finish_omp_clauses.
6722 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
6725 * c-decl.c (get_parm_info): Don't queue implicit function declarations
6728 2016-03-04 Marek Polacek <polacek@redhat.com>
6731 * c-parser.c (c_parser_postfix_expression): Call
6732 c_parser_cast_expression rather than c_parser_postfix_expression.
6734 2016-03-01 Jakub Jelinek <jakub@redhat.com>
6738 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6739 of incomplete decls to error_mark_node.
6741 2016-02-24 Marek Polacek <polacek@redhat.com>
6744 * c-decl.c (finish_decl): Don't update the copy of the type of a
6745 different decl type.
6747 2016-02-23 Jakub Jelinek <jakub@redhat.com>
6750 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6751 in id_kind reclassification.
6753 2016-02-16 Jakub Jelinek <jakub@redhat.com>
6756 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6758 2016-02-16 James Norris <jnorris@codesourcery.com>
6761 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6763 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
6765 * c-decl.c (build_null_declspecs): Zero the entire struct.
6768 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
6769 callers changed. If nested_p is true, use it to call
6770 finish_implicit_inits.
6771 * c-tree.h (finish_implicit_inits): Declare.
6772 * c-typeck.c (finish_implicit_inits): New function. Move code
6774 (push_init_level): ... here.
6775 (set_designator, process_init_element): Call finish_implicit_inits.
6777 2016-02-11 Jakub Jelinek <jakub@redhat.com>
6780 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6781 arguments for -Waddress warning.
6783 2016-02-04 Jakub Jelinek <jakub@redhat.com>
6786 * c-decl.c (finish_enum): When honoring mode attribute,
6787 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6789 2016-01-29 Jakub Jelinek <jakub@redhat.com>
6792 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6793 all type variants, not just TYPE_MAIN_VARIANT.
6795 2016-01-27 Jakub Jelinek <jakub@redhat.com>
6798 * c-decl.c (c_write_global_declarations_1): Warn with
6799 warn_unused_function if static prototype without definition
6802 2016-01-27 Marek Polacek <polacek@redhat.com>
6805 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6806 to unsigned, if needed. Add -Wsign-compare warning.
6808 2016-01-26 Jakub Jelinek <jakub@redhat.com>
6810 PR tree-optimization/69483
6811 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6813 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6816 * c-tree.h (incomplete_record_decls): Declare.
6817 * c-parser.c (incomplete_record_decls): Define.
6818 (c_parser_translation_unit): Iterate through incomplete_record_decls and
6819 report error if any decl has zero size.
6820 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6821 or enum type to incomplete_record_decls.
6823 2016-01-14 Tom de Vries <tom@codesourcery.com>
6825 PR tree-optimization/68773
6826 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6829 2016-01-14 Marek Polacek <polacek@redhat.com>
6832 * c-decl.c (grokdeclarator): Provide more information for invalid
6835 2016-01-06 David Malcolm <dmalcolm@redhat.com>
6837 * c-parser.c (c_parser_unary_expression): For dereferences, build
6838 a combined location before calling build_indirect_ref, so that
6839 error reports cover the full range, manually updating the c_expr
6842 2016-01-06 Marek Polacek <polacek@redhat.com>
6845 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
6846 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
6849 2016-01-04 Jakub Jelinek <jakub@redhat.com>
6851 Update copyright years.
6853 2016-01-04 Marek Polacek <polacek@redhat.com>
6856 * c-typeck.c (build_atomic_assign): Improve commentary. Add
6857 optimization to use __atomic_fetch_* built-in if possible.
6859 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
6861 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6863 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
6866 2015-12-22 Marek Polacek <polacek@redhat.com>
6869 * c-typeck.c (build_component_ref): Warn when acessing elements of
6870 atomic structures or unions.
6872 2015-12-21 David Malcolm <dmalcolm@redhat.com>
6874 * c-typeck.c: Include "gcc-rich-location.h".
6875 (build_binary_op): In the two places that call binary_op_error,
6876 create a gcc_rich_location and populate it with the location of
6877 the binary op and its two operands.
6879 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6881 * c-parser.c (c_parser_statement_after_labels): When calling
6882 c_finish_return, Use the return expression's location if it has
6883 one, falling back to the location of the first token within it.
6884 * c-typeck.c (c_finish_return): When issuing warnings about
6885 the incorrect presence/absence of a return value, issue a note
6886 showing the declaration of the function.
6888 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6890 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6892 (c_parser_peek_nth_token): New function.
6893 (c_parser_peek_conflict_marker): New function.
6894 (c_parser_error): Detect conflict markers and report them as such.
6896 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6898 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6899 to preserve range information for the primary expression
6900 in the call to c_parser_postfix_expression_after_primary.
6902 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6904 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6905 expression location, falling back on the first token location,
6906 rather than always using the latter.
6908 2015-12-16 Marek Polacek <polacek@redhat.com>
6911 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6914 2015-12-15 Marek Polacek <polacek@redhat.com>
6917 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6920 2015-12-08 David Malcolm <dmalcolm@redhat.com>
6922 * c-parser.c (c_parser_alignof_expression): Capture location of
6923 closing parenthesis (if any), or of end of unary expression, and
6924 use it to build a src_range for the expression.
6926 2015-12-08 David Malcolm <dmalcolm@redhat.com>
6929 * c-parser.c (c_parser_get_builtin_args): Add
6930 "out_close_paren_loc" param, and write back to it.
6931 (c_parser_postfix_expression): Capture the closing
6932 parenthesis location for RID_CHOOSE_EXPR,
6933 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
6934 RID_BUILTIN_SHUFFLE and use it to set the source range
6935 for such expressions; within RID_BUILTIN_COMPLEX set
6936 the underlying location.
6938 2015-12-07 Marek Polacek <polacek@redhat.com>
6941 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
6942 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
6944 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
6946 * c-tree.h (c_build_va_arg): Adjust prototype.
6947 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
6948 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6949 parameter, adjust throughout and issue an error if EXPR is a component
6950 with reverse storage order.
6952 2015-12-02 Jason Merrill <jason@redhat.com>
6954 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6955 (c_fully_fold_internal, decl_constant_value_for_optimization):
6956 Move from c-common.c.
6957 * c-tree.h: Declare decl_constant_value_for_optimization.
6958 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6960 2015-12-02 Joseph Myers <joseph@codesourcery.com>
6963 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6964 following link from declarator to next declarator. Track original
6965 qualified type and pass it to c_build_qualified_type.
6966 * c-typeck.c (c_build_qualified_type): Add arguments
6967 orig_qual_type and orig_qual_indirect.
6969 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
6971 * c-parser.c (c_parser_omp_clause_name)
6972 (c_parser_oacc_all_clauses): Alphabetical sorting.
6974 2015-12-02 Jakub Jelinek <jakub@redhat.com>
6977 * c-decl.c (get_parm_info): Use b->locus instead of input_location
6980 2015-12-01 Julian Brown <julian@codesourcery.com>
6981 Cesar Philippidis <cesar@codesourcery.com>
6982 James Norris <James_Norris@mentor.com>
6984 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6985 (c_parser_oacc_clause_use_device): New function.
6986 (c_parser_oacc_all_clauses): Add use_device support.
6987 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6988 (c_parser_oacc_host_data): New function.
6989 (c_parser_omp_construct): Add host_data support.
6990 * c-tree.h (c_finish_oacc_host_data): Add prototype.
6991 * c-typeck.c (c_finish_oacc_host_data): New function.
6992 (c_finish_omp_clauses): Add use_device support.
6994 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
6997 * c-decl.c: Set TYPE_PACKED in variants.
6999 2015-11-27 Martin Liska <mliska@suse.cz>
7002 * c-array-notation.c (fix_builtin_array_notation_fn):
7003 Use release_vec_vec instead of vec::release.
7004 (build_array_notation_expr): Likewise.
7005 (fix_conditional_array_notations_1): Likewise.
7006 (fix_array_notation_expr): Likewise.
7007 (fix_array_notation_call_expr): Likewise.
7009 2015-11-27 Jakub Jelinek <jakub@redhat.com>
7012 * c-parser.c (c_parser_compound_statement_nostart): If
7013 last_label is true, use pragma_stmt instead of pragma_compound
7014 as second c_parser_pragma argument.
7015 (c_parser_omp_ordered, c_parser_omp_target_update,
7016 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
7017 false as second argument to c_parser_skip_to_pragma_eol after
7018 diagnosing standalone directives used in pragma_stmt context.
7020 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
7022 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
7023 with "if (ENABLE_OFFLOADING)".
7025 2015-11-23 David Malcolm <dmalcolm@redhat.com>
7028 * c-parser.c (c_parser_postfix_expression): Set up source ranges
7029 for various Objective-C constructs: Class.name syntax,
7030 @selector(), @protocol(), @encode(), and [] message syntax.
7032 2015-11-20 David Malcolm <dmalcolm@redhat.com>
7035 * c-typeck.c (should_suggest_deref_p): New function.
7036 (build_component_ref): Special-case POINTER_TYPE when
7037 generating a "not a structure of union" error message, and
7038 suggest a "->" rather than a ".", providing a fix-it hint.
7040 2015-11-19 David Malcolm <dmalcolm@redhat.com>
7042 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
7043 candidate into a new function, find_closest_identifier.
7045 2015-11-19 Marek Polacek <polacek@redhat.com>
7048 * c-typeck.c (parser_build_binary_op): Properly handle
7049 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
7051 2015-11-17 David Malcolm <dmalcolm@redhat.com>
7053 * c-parser.c (set_c_expr_source_range): Bulletproof both
7054 overloaded implementations against NULL expr->value.
7055 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
7057 (c_parser_unary_expression): Likewise when handling addresses of
7059 (c_parser_postfix_expression): Likewise for statement expressions,
7060 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
7061 __builtin_va_arg, and for __builtin_offset_of.
7062 (c_parser_postfix_expression_after_paren_type): Initialize expr's
7063 src_range using the range of the braced initializer.
7064 (c_parser_transaction_expression): Set src_range for "ret" to a
7065 sane pair of values.
7067 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7069 * c-parser.c (c_finish_omp_declare_simd): Look for
7070 "simd" attribute as well. Update error message.
7072 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7074 * c-parser.c (c_parser_omp_declare_target): Adjust.
7076 2015-11-14 Jakub Jelinek <jakub@redhat.com>
7078 * c-typeck.c (c_finish_omp_clauses): Don't mark
7079 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
7081 2015-11-14 Marek Polacek <polacek@redhat.com>
7083 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
7084 * c-typeck.c: Likewise.
7086 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7088 * c-decl.c (warn_defaults_to): Pass line_table to
7090 * c-errors.c (pedwarn_c99): Likewise.
7091 (pedwarn_c90): Likewise.
7092 * c-parser.c (set_c_expr_source_range): New functions.
7093 (c_token::get_range): New method.
7094 (c_token::get_finish): New method.
7095 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
7096 based on the range from the start of the LHS to the end of the
7098 (c_parser_conditional_expression): Likewise, based on the range
7099 from the start of the cond.value to the end of exp2.value.
7100 (c_parser_binary_expression): Call set_c_expr_source_range on
7101 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
7102 (c_parser_cast_expression): Call set_c_expr_source_range on ret
7103 based on the cast_loc through to the end of the expr.
7104 (c_parser_unary_expression): Likewise, based on the
7105 op_loc through to the end of op.
7106 (c_parser_sizeof_expression) Likewise, based on the start of the
7107 sizeof token through to either the closing paren or the end of
7109 (c_parser_postfix_expression): Likewise, using the token range,
7110 or from the open paren through to the close paren for
7111 parenthesized expressions.
7112 (c_parser_postfix_expression_after_primary): Likewise, for
7113 various kinds of expression.
7114 * c-tree.h (struct c_expr): Add field "src_range".
7115 (c_expr::get_start): New method.
7116 (c_expr::get_finish): New method.
7117 (set_c_expr_source_range): New decls.
7118 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
7119 on ret for prefix unary ops.
7120 (parser_build_binary_op): Likewise, running from the start of
7121 arg1.value through to the end of arg2.value.
7123 2015-11-13 Marek Polacek <polacek@redhat.com>
7126 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
7128 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7130 * c-typeck.c: Include spellcheck.h.
7131 (lookup_field_fuzzy_find_candidates): New function.
7132 (lookup_field_fuzzy): New function.
7133 (build_component_ref): If the field was not found, try using
7134 lookup_field_fuzzy and potentially offer a suggestion.
7136 2015-11-12 James Norris <jnorris@codesourcery.com>
7137 Joseph Myers <joseph@codesourcery.com>
7139 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
7140 (c_parser_omp_clause_name): Handle 'device_resident' clause.
7141 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7142 and PRAGMA_OMP_CLAUSE_LINK.
7143 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7144 and PRAGMA_OACC_CLAUSE_LINK.
7145 (OACC_DECLARE_CLAUSE_MASK): New definition.
7146 (c_parser_oacc_declare): New function.
7148 2015-11-12 Marek Polacek <polacek@redhat.com>
7151 * c-parser.c (c_parser_for_statement): Reclassify the token in
7154 2015-11-11 Marek Polacek <polacek@redhat.com>
7158 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
7159 checking the size of an array.
7161 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7163 * c-array-notation.c: Remove unused header files.
7164 * c-aux-info.c: Likewise.
7165 * c-convert.c: Likewise.
7166 * c-decl.c: Likewise.
7167 * c-errors.c: Likewise.
7168 * c-lang.c: Likewise.
7169 * c-objc-common.c: Likewise.
7170 * c-parser.c: Likewise.
7171 * c-typeck.c: Likewise.
7172 * gccspec.c: Likewise.
7174 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7175 Cesar Philippidis <cesar@codesourcery.com>
7176 James Norris <jnorris@codesourcery.com>
7177 Julian Brown <julian@codesourcery.com>
7178 Nathan Sidwell <nathan@codesourcery.com>
7180 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
7182 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
7183 (c_parser_pragma): Parse 'acc routine'.
7184 (OACC_ROUTINE_CLAUSE_MARK): Define.
7185 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
7187 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
7190 * c-typeck.c (c_finish_loop): For unconditional loops, set the
7191 location of the backward-goto to the start of the loop body.
7193 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
7196 * c-parser.c (c_parser_while_statement): Finish the loop before
7197 parsing ahead for misleading indentation.
7198 (c_parser_for_statement): Likewise.
7200 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7202 * c-decl.c (finish_struct): If the structure has reverse storage
7203 order, rewrite the type of array fields with scalar component. Call
7204 maybe_apply_pragma_scalar_storage_order on entry.
7205 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
7206 errors on bit-fields and reverse SSO here and not...
7207 (c_mark_addressable): ...here.
7208 (output_init_element): Adjust call to initializer_constant_valid_p.
7209 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
7211 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7213 * c-decl.c (warn_defaults_to): Update for change in signature
7214 of diagnostic_set_info.
7215 * c-errors.c (pedwarn_c99): Likewise.
7216 (pedwarn_c90): Likewise.
7217 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
7218 for textinfo::set_location.
7220 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7221 Thomas Schwinge <thomas@codesourcery.com>
7222 James Norris <jnorris@codesourcery.com>
7224 * c-parser.c (c_parser_omp_clause_name): Add support for
7225 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
7226 (c_parser_omp_clause_default): Add is_oacc argument. Handle
7227 default(none) in OpenACC.
7228 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
7230 (c_parser_oacc_clause_tile): New function.
7231 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
7232 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
7233 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
7235 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
7236 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
7238 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
7239 (c_parser_oacc_update): Update the error message for missing clauses.
7240 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
7241 and OMP_CLAUSE_INDEPENDENT.
7243 2015-11-05 Marek Polacek <polacek@redhat.com>
7246 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
7247 deal with pre-evaluation on invalid types.
7249 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7250 Ilya Verbin <ilya.verbin@intel.com>
7252 * c-parser.c: Include context.h and gimple-expr.h.
7253 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
7254 monotonic together with nonmonotonic.
7255 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
7256 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
7257 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
7258 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
7259 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
7260 expressions on combined target teams before the target.
7261 (c_parser_omp_declare_target): If decl has "omp declare target" or
7262 "omp declare target link" attribute, and cgraph or varpool node already
7263 exists, then set corresponding flags. Call c_finish_omp_clauses
7264 in the parenthesized extended-list syntax case.
7265 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
7267 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
7268 on OMP_CLAUSE_REDUCTION array sections.
7269 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
7270 into the constant offset, or for variable low-bound using
7271 POINTER_PLUS_EXPR. For structure element based array sections use
7272 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
7273 (c_finish_omp_clauses): Drop generic_field_head, structure
7274 elements are now always mapped even as array section bases,
7275 diagnose same var in data sharing and mapping clauses. Diagnose if
7276 linear step on declare simd is neither a constant nor a uniform
7277 parameter. Look through POINTER_PLUS_EXPR for array section
7278 reductions. Diagnose the same var or function appearing multiple
7279 times on the same directive. Fix up wording for the to clause if t
7280 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
7281 modifier on kinds other than dynamic or guided or nonmonotonic
7282 modifier together with ordered clause.
7284 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7285 Chung-Lin Tang <cltang@codesourcery.com>
7287 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
7289 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7291 * c-array-notation.c: Reorder #include's and remove duplicates.
7292 * c-aux-info.c: Likewise.
7293 * c-convert.c: Likewise.
7294 * c-decl.c: Likewise.
7295 * c-errors.c: Likewise.
7296 * c-lang.c: Likewise.
7297 * c-objc-common.c: Likewise.
7298 * c-parser.c: Likewise.
7299 * c-typeck.c: Likewise.
7301 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
7304 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
7305 after calling build_qualified_type.
7307 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
7308 Thomas Schwinge <thomas@codesourcery.com>
7309 James Norris <jnorris@codesourcery.com>
7310 Joseph Myers <joseph@codesourcery.com>
7311 Julian Brown <julian@codesourcery.com>
7312 Bernd Schmidt <bschmidt@redhat.com>
7314 * c-parser.c (c_parser_oacc_shape_clause): New.
7315 (c_parser_oacc_simple_clause): New.
7316 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
7317 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
7319 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7320 James Norris <jnorris@codesourcery.com>
7321 Cesar Philippidis <cesar@codesourcery.com>
7325 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
7326 parameters, and handle these. Adjust all users.
7327 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
7329 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
7331 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
7333 (c_finish_omp_construct): Declare function.
7334 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
7335 Merge functions into...
7336 (c_finish_omp_construct): ... this new function.
7338 2015-10-22 Richard Biener <rguenther@suse.de>
7340 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
7341 before folding a MINUS_EXPR.
7343 2015-10-21 Marek Polacek <polacek@redhat.com>
7346 * c-decl.c (start_function): Warn about vararg functions without
7349 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
7351 * c-typeck.c (build_conditional_expr): Use boolean vector
7352 type for vector comparison.
7353 (build_vec_cmp): New.
7354 (build_binary_op): Use build_vec_cmp for comparison.
7356 2015-10-20 Marek Polacek <polacek@redhat.com>
7358 * c-parser.c (is_cilkplus_vector_p): Don't define here.
7360 2015-10-20 Marek Polacek <polacek@redhat.com>
7363 * c-parser.c (c_parser_attributes): Break out of the loop if the
7364 token after an attribute isn't a comma.
7366 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7367 Aldy Hernandez <aldyh@redhat.com>
7369 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
7370 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
7371 (c_parser_omp_variable_list): Handle structure elements for
7372 map, to and from clauses. Handle array sections in reduction
7373 clause. Formatting fixes.
7374 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
7375 if clause modifiers.
7376 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
7377 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
7378 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
7379 c_parser_omp_clause_is_device_ptr): New functions.
7380 (c_parser_omp_clause_ordered): Parse optional parameter.
7381 (c_parser_omp_clause_reduction): Handle array reductions.
7382 (c_parser_omp_clause_schedule): Parse optional simd modifier.
7383 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
7385 (c_parser_omp_clause_linear): Parse linear clause modifiers.
7386 (c_parser_omp_clause_depend_sink): New function.
7387 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
7388 (c_parser_omp_clause_map): Parse release/delete map kinds and
7389 optional always modifier.
7390 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
7391 and c_finish_omp_clauses callers.
7392 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
7393 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
7394 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
7395 (OMP_CRITICAL_CLAUSE_MASK): Define.
7396 (c_parser_omp_critical): Parse critical clauses.
7397 (c_parser_omp_for_loop): Handle doacross loops, adjust
7398 c_finish_omp_for and c_finish_omp_clauses callers.
7399 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
7400 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
7401 (OMP_FOR_CLAUSE_MASK): Add linear clause.
7402 (c_parser_omp_for): Disallow ordered clause when combined with
7403 distribute. Disallow linear clause when combined with distribute
7404 and not combined with simd.
7405 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
7406 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
7407 parse clauses and if depend clause is found, don't parse a body.
7408 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
7409 Allow target parallel without for after it.
7410 (OMP_TASK_CLAUSE_MASK): Add priority clause.
7411 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
7412 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
7414 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
7415 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
7416 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
7417 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
7419 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
7420 defaultmap and is_device_ptr clauses.
7421 (c_parser_omp_target): Parse target parallel and target simd. Set
7422 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
7423 and target exit data. Diagnose invalid map kinds.
7424 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
7425 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
7427 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
7429 (OMP_TASKLOOP_CLAUSE_MASK): Define.
7430 (c_parser_omp_taskloop): New function.
7431 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
7432 handle PRAGMA_OMP_TASKLOOP.
7433 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
7434 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
7435 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
7436 Add IS_OMP argument, handle structure element bases, diagnose
7437 bitfields, pass IS_OMP recursively, diagnose known zero length
7438 array sections in depend clauses, handle array sections in reduction
7439 clause, diagnose negative length even for pointers.
7440 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
7441 types, pass IS_OMP down to handle_omp_array_sections_1, handle
7442 array sections in reduction clause, set
7443 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
7444 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
7445 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
7446 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
7448 2015-10-06 Marek Polacek <polacek@redhat.com>
7450 * c-parser.c (c_parser_statement_after_labels): Use
7451 protected_set_expr_location.
7452 (c_parser_omp_clause_num_gangs): Likewise.
7453 (c_parser_omp_clause_num_threads): Likewise.
7454 (c_parser_omp_clause_num_workers): Likewise.
7455 (c_parser_omp_clause_vector_length): Likewise.
7456 (c_parser_omp_clause_num_teams): Likewise.
7457 (c_parser_omp_clause_thread_limit): Likewise.
7458 * c-typeck.c (build_c_cast): Likewise.
7459 (c_cast_expr): Likewise.
7461 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7463 * c-typeck.c (c_tree_equal): Use real_equal instead of
7466 2015-10-04 Jason Merrill <jason@redhat.com>
7468 * c-parser.c (c_lex_one_token): Handle @synchronized.
7469 * c-decl.c (match_builtin_function_types): A declaration of a built-in
7470 can change whether the function is transaction_safe.
7472 2015-10-02 Marek Polacek <polacek@redhat.com>
7475 * c-typeck.c (convert_for_assignment): Use the expansion point
7476 location throughout.
7478 2015-10-02 Marek Polacek <polacek@redhat.com>
7481 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
7482 and pass it down to c_parser_if_statement.
7483 (c_parser_else_body): Add CHAIN parameter and pass it down to
7484 c_parser_statement_after_labels.
7485 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
7486 duplicated if-else-if conditions.
7488 2015-10-01 Marek Polacek <polacek@redhat.com>
7490 * c-typeck.c (convert_for_assignment): Improve commentary.
7492 2015-09-30 Marek Polacek <polacek@redhat.com>
7495 * c-typeck.c (c_finish_return): Use the expansion point location for
7496 certain "return with value" warnings.
7498 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7500 * c-parser.c (pragma_lex): Add loc argument.
7502 2015-09-15 Marek Polacek <polacek@redhat.com>
7505 * c-decl.c (tag_exists_p): New function.
7506 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
7507 struct/union/enum keywords are missing.
7508 * c-tree.h (tag_exists_p): Declare.
7510 2015-09-15 Marek Polacek <polacek@redhat.com>
7512 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
7513 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
7514 Return NULL_TREE instead of 0.
7515 (lookup_name): Return NULL_TREE instead of 0.
7516 (lookup_name_in_scope): Likewise.
7517 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
7518 (parser_xref_tag): Use false instead of 0.
7519 (start_struct): Use true instead of 1.
7520 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
7522 2015-09-14 Marek Polacek <polacek@redhat.com>
7524 * c-typeck.c (set_nonincremental_init_from_string): Use
7525 HOST_WIDE_INT_M1U when shifting a negative value.
7527 2015-09-09 Mark Wielaard <mjw@redhat.com>
7529 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
7532 2015-09-10 Jakub Jelinek <jakub@redhat.com>
7535 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
7536 into OMP_FOR_PRE_BODY rather than before the loop.
7538 2015-09-09 Jakub Jelinek <jakub@redhat.com>
7541 * c-parser.c (c_parser_oacc_all_clauses,
7542 c_parser_omp_all_clauses): Remove invalid clause from
7543 list of clauses even if parser->error is set.
7546 * c-parser.c (c_parser_omp_clause_aligned,
7547 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
7549 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
7553 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
7554 instead of c_parser_unary_expression. If the result is !lvalue_p,
7555 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
7557 2015-09-04 Marek Polacek <polacek@redhat.com>
7560 * c-typeck.c (build_binary_op): Don't instrument static initializers.
7562 2015-09-03 Martin Sebor <msebor@redhat.com>
7565 * c-typeck.c (convert_arguments, parser_build_unary_op,
7566 build_conditional_expr, c_cast_expr, convert_for_assignment,
7567 build_binary_op, _objc_common_truthvalue_conversion): Call
7569 (c_decl_implicit): Define.
7571 2015-09-02 Marek Polacek <polacek@redhat.com>
7574 * c-parser.c (c_parser_enum_specifier): Give a better error for
7577 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7579 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
7581 2015-08-12 Marek Polacek <polacek@redhat.com>
7583 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
7586 2015-08-03 Marek Polacek <polacek@redhat.com>
7589 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
7591 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
7593 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7595 * c-parser.c (c_parser_if_body): Take token_indent_info
7596 argument. Call warn_for_misleading_indentation even when the
7597 body is a semicolon. Extract token_indent_infos corresponding
7598 to the guard, body and next tokens. Adjust call to
7599 warn_for_misleading_indentation accordingly.
7600 (c_parser_else_body): Likewise.
7601 (c_parser_if_statement): Likewise.
7602 (c_parser_while_statement): Likewise.
7603 (c_parser_for_statement): Likewise.
7605 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
7606 Manuel López-Ibáñez <manu@gcc.gnu.org>
7608 * c-decl.c (get_parm_info): Remove static var. Update warning
7611 2015-07-27 Marek Polacek <polacek@redhat.com>
7615 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
7617 2015-07-20 Marek Polacek <polacek@redhat.com>
7620 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
7621 (build_binary_op): Warn about left shift overflows.
7623 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7625 * c-array-notation.c: Adjust includes for flags.h changes.
7626 * c-objc-common.c: Likewise.
7628 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7630 * c-array-notation.c: Adjust includes.
7631 * c-aux-info.c: Likewise.
7632 * c-convert.c: Likewise.
7633 * c-decl.c: Likewise.
7634 * c-errors.c: Likewise.
7635 * c-lang.c: Likewise.
7636 * c-objc-common.c: Likewise.
7637 * c-parser.c: Likewise.
7638 * c-typeck.c: Likewise.
7640 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7643 * c-decl.c (finish_function): Call do_warn_unused_parameter.
7645 2015-06-29 Marek Polacek <polacek@redhat.com>
7648 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
7649 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
7650 about -Wswitch-bool here.
7651 (do_case): Update c_add_case_label call.
7652 (c_finish_case): Update c_do_switch_warnings call.
7654 2015-06-27 Marek Polacek <polacek@redhat.com>
7656 * c-typeck.c: Use VECTOR_TYPE_P throughout.
7658 2015-06-26 Marek Polacek <polacek@redhat.com>
7660 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7662 * c-typeck.c (array_to_pointer_conversion): Likewise.
7663 (build_unary_op): Likewise.
7664 (c_finish_return): Likewise.
7666 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7668 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
7669 * c-parser.c: Likewise.
7671 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7673 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
7674 instead of pointer_hash.
7675 (detect_field_duplicates): Likewise.
7677 2015-06-25 Marek Polacek <polacek@redhat.com>
7679 * c-array-notation.c: Use VAR_P throughout.
7680 * c-decl.c: Likewise.
7681 * c-objc-common.c: Likewise.
7682 * c-parser.c: Likewise.
7683 * c-typeck.c: Likewise.
7685 2015-06-25 Marek Polacek <polacek@redhat.com>
7687 * c-decl.c: Use is_global_var throughout.
7688 * c-parser.c: Likewise.
7689 * c-typeck.c: Likewise.
7691 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
7693 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
7694 * c-aux-info.c: Likewise.
7695 * c-convert.c: Likewise.
7696 * c-decl.c: Likewise.
7697 * c-errors.c: Likewise.
7698 * c-lang.c: Likewise.
7699 * c-objc-common.c: Likewise.
7700 * c-parser.c: Likewise.
7701 * c-typeck.c: Likewise.
7703 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
7706 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
7709 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
7711 * c-decl.c (pop_scope): Register the main translation unit
7712 through the new debug hook.
7714 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
7716 * c-array-notation.c : Adjust include files.
7717 * c-aux-info.c : Likewise.
7718 * c-convert.c : Likewise.
7719 * c-decl.c : Likewise.
7720 * c-errors.c : Likewise.
7721 * c-lang.c : Likewise.
7722 * c-lang.h : Likewise.
7723 * c-objc-common.c : Likewise.
7724 * c-parser.c : Likewise.
7725 * c-typeck.c : Likewise.
7727 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
7729 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7730 immediately clobber it.
7731 (c_write_global_declarations_1): Remove call to
7732 check_global_declaration_1.
7733 (c_write_global_declarations_2): Remove.
7734 (c_write_final_cleanups): Rename from c_write_global_declarations.
7735 Remove call to finalize_compilation_unit.
7736 Remove calls to debugging hooks.
7737 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7738 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7739 * c-tree.h: Remove c_write_global_declarations.
7741 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
7743 * c-array-notation.c: Adjust includes for restructured coretypes.h.
7744 * c-aux-info.c: Likewise.
7745 * c-convert.c: Likewise.
7746 * c-decl.c: Likewise.
7747 * c-errors.c: Likewise.
7748 * c-lang.c: Likewise.
7749 * c-objc-common.c: Likewise.
7750 * c-parser.c: Likewise.
7751 * c-typeck.c: Likewise.
7753 2015-06-04 Marek Polacek <polacek@redhat.com>
7756 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7759 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7761 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7762 Warn for empty struct.
7763 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7765 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
7767 * c-decl.c (start_function): Call plugin before parsing.
7768 (finish_function): Call plugin after parsing.
7770 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7773 * c-decl.c (merge_decls): Merge DECL_COMMON.
7775 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
7777 * Make-lang.in (check_gcc_pallelize): Define.
7779 2015-05-22 Marek Polacek <polacek@redhat.com>
7782 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7785 2015-05-21 Marek Polacek <polacek@redhat.com>
7787 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7790 2015-05-20 Marek Polacek <polacek@redhat.com>
7792 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7793 * c-typeck.c: Likewise.
7795 2015-05-19 Marek Polacek <polacek@redhat.com>
7797 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7799 2015-05-19 Jakub Jelinek <jakub@redhat.com>
7802 * c-parser.c (c_parser_omp_for_loop): Don't add
7803 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7804 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7805 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7808 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7810 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
7813 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7816 * c-objc-common.c (c_tree_printer): Replace locus pointer with
7819 2015-05-14 Marek Polacek <polacek@redhat.com>
7823 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7826 2015-05-12 David Malcolm <dmalcolm@redhat.com>
7828 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7829 to add a call to warn_for_misleading_indentation.
7830 (c_parser_else_body): Likewise, adding param "else_loc".
7831 (c_parser_if_statement): Check for misleading indentation.
7832 (c_parser_while_statement): Likewise.
7833 (c_parser_for_statement): Likewise.
7835 2015-05-08 Marek Polacek <polacek@redhat.com>
7838 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7839 (output_init_element): Likewise.
7841 2015-05-07 Marek Polacek <polacek@redhat.com>
7844 * c-typeck.c (build_binary_op): Warn when left shifting a negative
7847 2015-04-30 Marek Polacek <polacek@redhat.com>
7849 * c-typeck.c (set_init_label): Call error_at instead of error and
7852 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
7855 * c-typeck.c (c_build_va_arg): Clarify the error message.
7857 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
7859 * c-parser.c (c_parser_oacc_enter_exit_data): Use
7860 OMP_STANDALONE_CLAUSES.
7862 2015-04-28 Marek Polacek <polacek@redhat.com>
7864 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7866 2015-04-28 Marek Polacek <polacek@redhat.com>
7869 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7871 2015-04-25 Marek Polacek <polacek@redhat.com>
7874 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
7877 2015-04-23 Marek Polacek <polacek@redhat.com>
7880 * c-decl.c (set_labels_context_r): New function.
7881 (store_parm_decls): Call it via walk_tree_without_duplicates.
7882 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7883 instead of create_tmp_var. Build TARGET_EXPR instead of
7885 (build_atomic_assign): Use create_tmp_var_raw instead of
7886 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
7888 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
7890 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7891 (c_parser_omp_target_update): Add missed %> to error_at ().
7893 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7896 * c-decl.c (c_default_pointer_mode): Remove definition.
7897 * c-tree.h (c_default_pointer_mode): Remove declaration.
7899 2015-03-27 Tobias Burnus <burnus@net-b.de>
7902 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7904 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7905 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7906 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7908 2015-03-19 Jakub Jelinek <jakub@redhat.com>
7910 * c-decl.c (c_decl_attributes): Also add "omp declare target"
7911 attribute for DECL_EXTERNAL VAR_DECLs.
7913 2015-03-11 Jakub Jelinek <jakub@redhat.com>
7915 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7918 2015-03-10 Jakub Jelinek <jakub@redhat.com>
7921 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7922 before preparing arguments to warn_logical_not_parentheses.
7924 2015-03-09 Jakub Jelinek <jakub@redhat.com>
7927 * c-typeck.c (parser_build_binary_op): Don't warn for
7928 !!x == y or !b == y where b is _Bool.
7930 2015-03-09 Marek Polacek <polacek@redhat.com>
7932 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
7933 * c-decl.c (grokdeclarator): Likewise.
7934 * c-typeck.c (build_binary_op): Likewise.
7936 2015-02-27 Marek Polacek <polacek@redhat.com>
7939 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
7941 2015-02-14 Marek Polacek <polacek@redhat.com>
7944 * c-decl.c (grokdeclarator): Set the range of a flexible array member
7945 declared through a typedef name.
7947 2015-02-13 Marek Polacek <polacek@redhat.com>
7950 * c-decl.c (grokdeclarator): Print also the type when giving
7951 the error message about array's incomplete element type.
7953 2015-02-11 Jakub Jelinek <jakub@redhat.com>
7956 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7957 check in the POP macro.
7959 2015-02-09 Marek Polacek <polacek@redhat.com>
7962 * c-typeck.c (process_init_element): Don't always wrap
7963 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7964 initializing a range of elements.
7966 2015-02-04 Jakub Jelinek <jakub@redhat.com>
7970 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7972 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
7974 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7975 processing enum declaration.
7977 2015-01-29 Marek Polacek <polacek@redhat.com>
7980 * c-typeck.c (pop_init_level): If constructor_elements has
7981 exactly one element with integer_zerop value, set constructor_zeroinit
7982 to 1. Remove braces around warning_init call.
7984 2015-01-27 Jakub Jelinek <jakub@redhat.com>
7987 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7988 of FUNCTION_DECLs with error_mark_node.
7990 2015-01-26 Jakub Jelinek <jakub@redhat.com>
7993 * c-typeck.c (convert_arguments): Return -1 if there are
7994 error_args, even if we've diagnosed too many arguments.
7996 2015-01-21 Richard Biener <rguenther@suse.de>
7999 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
8000 for builtins the user declared correctly.
8002 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8003 Bernd Schmidt <bernds@codesourcery.com>
8004 Cesar Philippidis <cesar@codesourcery.com>
8005 James Norris <jnorris@codesourcery.com>
8006 Jakub Jelinek <jakub@redhat.com>
8007 Ilmir Usmanov <i.usmanov@samsung.com>
8009 * c-parser.c: Include "gomp-constants.h".
8010 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
8011 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
8012 Use OMP_CLAUSE_SET_MAP_KIND.
8013 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
8014 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
8015 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
8016 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
8017 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
8018 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
8019 "copyout", "create", "delete", "deviceptr", "gang", "host",
8020 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
8021 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
8022 "present_or_create", "pcreate", "seq", "self", "vector",
8023 "vector_length", "wait", "worker".
8024 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
8025 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
8026 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
8027 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
8028 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
8029 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
8030 (c_parser_oacc_data_clause_deviceptr)
8031 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
8032 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
8033 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
8034 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
8035 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
8036 (c_parser_oacc_parallel, c_parser_oacc_update)
8037 (c_parser_oacc_wait): New functions.
8038 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
8039 (c_finish_oacc_data): New prototypes.
8040 * c-typeck.c: Include "gomp-constants.h".
8041 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
8042 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
8043 OMP_CLAUSE_SET_MAP_KIND.
8044 (c_finish_oacc_parallel, c_finish_oacc_kernels)
8045 (c_finish_oacc_data): New functions.
8046 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
8047 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
8048 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
8049 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
8050 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
8051 GOMP_MAP_FORCE_DEVICEPTR.
8053 2015-01-09 Michael Collison <michael.collison@linaro.org>
8055 * c-array-notation.c: Include hash-set.h, machmode.h,
8056 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8057 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8058 * c-aux-info.c: Ditto.
8059 * c-convert.c: Ditto.
8061 * c-errors.c: Ditto.
8062 * c-lang.c: Dittoxs.
8063 * c-objc-common.c: Ditto.
8064 * c-parser.c: Ditto.
8065 * c-typeck.c: Include hash-set.h, machmode.h,
8066 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8067 fold-const.h, wide-int.h, inchash.h, real.h and
8068 fixed-value.h due to flattening of tree.h.
8070 2015-01-07 Marek Polacek <polacek@redhat.com>
8073 * c-typeck.c (process_init_element): Disallow initialization of
8074 a flexible array member with a string constant if the structure
8077 2015-01-05 Jakub Jelinek <jakub@redhat.com>
8080 * c-typeck.c (convert_for_assignment, c_finish_return): For
8081 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
8082 types also set in_late_binary_op around convert call.
8083 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
8084 to integral type casts, if not in_late_binary_op, pass c_fully_fold
8085 result on expr as last argument to ubsan_instrument_float_cast,
8086 if in_late_binary_op, don't use c_save_expr but save_expr.
8088 Update copyright years.
8090 2015-01-05 Marek Polacek <polacek@redhat.com>
8093 * c-typeck.c (build_array_ref): Pass loc down to
8094 warn_array_subscript_with_type_char.
8096 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8098 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8099 (common-pointer-type): For pointers to arrays take qualifiers from
8101 (build_conditional_expr): Add warnings for lost qualifiers.
8102 (comp-target-types): Allow pointers to arrays with different qualifiers.
8103 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
8104 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8105 to PEDWARN_FOR_QUALIFIERS.
8107 2014-12-17 Jakub Jelinek <jakub@redhat.com>
8110 * c-convert.c: Include ubsan.h.
8111 (convert): For real -> integral casts and
8112 -fsanitize=float-cast-overflow don't call convert_to_integer, but
8113 instead instrument the float cast directly.
8115 2014-11-29 Jakub Jelinek <jakub@redhat.com>
8117 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
8118 c_finish_stmt_expr): Remove NULL last argument from
8119 create_tmp_var_raw and create_tmp_var calls.
8120 * c-array-notation.c (fix_builtin_array_notation_fn,
8121 build_array_notation_expr, fix_conditional_array_notations_1,
8122 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
8124 2014-11-28 Marek Polacek <polacek@redhat.com>
8127 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
8128 convert the right operand to integer type.
8130 2014-11-25 Marek Polacek <polacek@redhat.com>
8133 * c-decl.c (start_function): Disable -Wmissing-declarations warning
8134 for inline functions.
8136 2014-11-21 Jakub Jelinek <jakub@redhat.com>
8139 * c-typeck.c (build_array_ref): Adjust
8140 convert_vector_to_pointer_for_subscript caller. If it returns true,
8141 call non_lvalue_loc on the result.
8143 2014-11-11 Richard Biener <rguenther@suse.de>
8145 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
8148 2014-11-10 Andi Kleen <ak@linux.intel.com>
8151 * c-parser.c (c_parser_statement_after_labels): Call
8153 (c_parser_if_statement): Dito.
8154 (c_parser_switch_statement): Dito.
8155 (c_parser_while_statement): Dito.
8156 (c_parser_do_statement): Dito.
8157 (c_parser_for_statement): Dito.
8158 * c-typeck.c (c_finish_loop): Dito.
8160 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8162 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
8163 OPT_Wshift_count_overflow in the warnings.
8165 2014-10-30 Marek Polacek <polacek@redhat.com>
8167 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
8168 print the stripped version as well, if they're not the same.
8170 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8172 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
8175 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
8177 * c-decl.c: Adjust include files.
8178 * c-parser.c: Ditto.
8180 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
8181 Tom Tromey <tromey@redhat.com>
8183 * c-tree.h (enum c_oracle_request): New.
8184 (c_binding_oracle_function): New typedef.
8185 (c_binding_oracle, c_pushtag, c_bind): Declare.
8186 * c-decl.c (c_binding_oracle): New global.
8187 (I_SYMBOL_CHECKED): New macro.
8188 (i_symbol_binding): New function.
8189 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
8190 (I_TAG_CHECKED): New macro.
8191 (i_tag_binding): New function.
8192 (I_TAG_BINDING, I_TAG_DECL): Redefine.
8193 (I_LABEL_CHECKED): New macro.
8194 (i_label_binding): New function.
8195 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
8196 (c_print_identifier): Save and restore c_binding_oracle.
8197 (c_pushtag, c_bind): New functions.
8199 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
8201 * c-typeck.c: Adjust include files.
8203 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8206 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
8207 initialization here...
8208 (c_initialize_diagnostics): ... but here. Set defaults after
8209 building pretty-printer.
8211 2014-10-23 Marek Polacek <polacek@redhat.com>
8214 * c-decl.c (pop_scope): Don't print warning in external_scope.
8216 2014-10-19 Marek Polacek <polacek@redhat.com>
8219 * c-typeck.c (output_init_element): Allow initializing objects with
8220 static storage duration with compound literals even in C99 and add
8223 2014-10-17 Marek Polacek <polacek@redhat.com>
8226 * c-typeck.c (digest_init): Allow initializing objects with static
8227 storage duration with compound literals even in C99 and add pedwarn
8230 2014-10-17 Marek Polacek <polacek@redhat.com>
8233 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
8234 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
8235 error multiple times. Print the type.
8237 2014-10-17 Marek Polacek <polacek@redhat.com>
8240 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
8243 2014-10-17 Marek Polacek <polacek@redhat.com>
8245 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
8246 (start_function): Use OPT_Wimplicit_int instead of 0.
8247 (store_parm_decls_oldstyle): Likewise.
8249 2014-10-17 Alan Modra <amodra@gmail.com>
8252 * c-decl.c (merge_decls): Don't merge section name or tls model
8253 to newdecl symtab node, instead merge to olddecl. Override
8254 existing olddecl section name. Set tls_model for all thread-local
8255 vars, not just OMP thread-private ones. Remove incorrect comment.
8257 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
8259 * c-decl.c: Adjust include files.
8261 2014-10-14 DJ Delorie <dj@redhat.com>
8263 * c-parser.c (c_parse_init): Add RID entries for each __intN.
8264 (c_token_starts_typename): Check all __intN, not just __int128.
8265 (c_token_starts_declspecs): Likewise.
8266 (c_parser_declspecs): Likewise.
8267 (c_parser_attribute_any_word): Likewise.
8268 (c_parser_objc_selector): Likewise.
8269 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
8270 (struct c_declspecs): Add int_n_idx field to record *which* __intN
8272 * c-decl.c (declspecs_add_type): Check for all __intN, not just
8274 (finish_declspecs): Likewise.
8276 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
8278 * c-parser.c (c_parser_all_labels): New function to replace
8280 (c_parser_statement): Call the new function.
8282 2014-10-09 Marek Polacek <polacek@redhat.com>
8285 * c-typeck.c (pop_init_level): Don't warn about initializing
8288 2014-10-07 Marek Polacek <polacek@redhat.com>
8291 * c-decl.c (header_for_builtin_fn): New function.
8292 (implicitly_declare): Suggest which header to include.
8294 2014-10-07 Marek Polacek <polacek@redhat.com>
8296 * c-convert.c (convert): Use error_operand_p.
8297 * c-typeck.c (require_complete_type): Likewise.
8298 (really_atomic_lvalue): Likewise.
8299 (digest_init): Likewise.
8300 (handle_omp_array_sections_1): Likewise.
8302 2014-10-03 Marek Polacek <polacek@redhat.com>
8305 * c-decl.c (pop_scope): Don't warn about "inline function declared
8306 but never defined" for functions marked with gnu_inline attribute.
8308 2014-09-25 Jakub Jelinek <jakub@redhat.com>
8311 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
8312 on low_bound and length.
8314 2014-09-24 Marek Polacek <polacek@redhat.com>
8318 * c-parser.c: Don't define CPP_KEYWORD.
8319 (c_parser_switch_statement): Pass original type to c_finish_case.
8320 * c-tree.h (c_finish_case): Update declaration.
8321 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
8322 conditionally to c_do_switch_warnings.
8324 2014-09-03 Marek Polacek <polacek@redhat.com>
8327 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
8330 2014-09-02 Jakub Jelinek <jakub@redhat.com>
8331 Balaji V. Iyer <balaji.v.iyer@intel.com>
8332 Igor Zamyatin <igor.zamyatin@intel.com>
8334 * c-parser.c (c_parser_cilk_for): New function.
8335 (c_parser_cilk_grainsize): Likewise.
8336 (c_get_temp_regvar): Likewise.
8337 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
8338 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
8339 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
8340 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
8343 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
8345 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
8346 with using HOST_WIDE_INT without truncation to 'int'
8348 2014-08-22 Marek Polacek <polacek@redhat.com>
8351 * c-typeck.c (parser_build_binary_op): Adjust call to
8352 warn_logical_not_parentheses.
8354 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
8357 * c-parser.c (c_parser_array_notation): Check for correct
8358 type of an array added.
8360 2014-08-19 Marek Polacek <polacek@redhat.com>
8363 * c-typeck.c (build_binary_op): If either operand of a comparison
8364 is a boolean expression, call maybe_warn_bool_compare.
8366 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
8369 * c-typeck.c (build_c_cast): Do a conversion even when the
8370 TYPE_MAIN_VARIANTs are the same.
8372 2014-08-19 Marek Polacek <polacek@redhat.com>
8374 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
8375 pedwarn_c99 instead of pedwarn.
8376 (grokfield): Likewise.
8377 (warn_defaults_to): New function.
8378 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
8379 Unconditionally call pedwarn_c99 instead of pedwarn.
8380 (start_function): Call warn_defaults_to instead of pedwarn_c99.
8381 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
8382 check flag_isoc11 before.
8383 * c-errors.c (pedwarn_c99): Change the return type to bool.
8384 Handle -Wc99-c11-compat.
8385 * c-parser.c (disable_extension_diagnostics): Handle
8386 warn_c99_c11_compat.
8387 (restore_extension_diagnostics): Likewise.
8388 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
8389 instead of pedwarn, don't check flag_isoc11 before.
8390 (c_parser_declspecs): Likewise.
8391 (c_parser_alignas_specifier): Likewise.
8392 (c_parser_alignof_expression): Likewise.
8393 (c_parser_generic_selection): Likewise.
8394 * c-tree.h (pedwarn_c99): Update declaration.
8395 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
8398 2014-08-19 Marek Polacek <polacek@redhat.com>
8400 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
8402 * c-errors.c: Include "opts.h".
8403 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
8404 * c-parser.c (disable_extension_diagnostics): Handle negative value
8405 of warn_c90_c99_compat, too.
8406 (restore_extension_diagnostics): Likewise.
8407 (c_parser_compound_statement_nostart): Pass
8408 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
8410 2014-08-12 Marek Polacek <polacek@redhat.com>
8412 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
8414 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
8416 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
8418 2014-08-10 Marek Polacek <polacek@redhat.com>
8421 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
8422 Call pedwarn_c90 instead of pedwarn.
8423 (check_bitfield_type_and_width): Likewise.
8424 (declspecs_add_qual): Likewise.
8425 (declspecs_add_type): Likewise.
8426 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
8427 Adjust to only call pedwarn_c90.
8428 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
8429 pedwarn_c90 instead of pedwarn.
8430 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
8431 * c-parser.c (disable_extension_diagnostics): Handle
8432 warn_c90_c99_compat.
8433 (restore_extension_diagnostics): Likewise.
8434 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
8435 pedwarn_c90 instead of pedwarn.
8436 (c_parser_initelt): Likewise.
8437 (c_parser_postfix_expression): Likewise.
8438 (c_parser_postfix_expression_after_paren_type): Likewise.
8439 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
8440 * c-tree.h: Fix formatting.
8441 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
8442 pedwarn_c90 instead of pedwarn.
8444 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8446 * c-typeck.c: Remove include of pointer-set.h.
8448 2014-08-07 Marek Polacek <polacek@redhat.com>
8450 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
8452 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8454 * c-typeck.c: Use hash_map instead of pointer_map.
8456 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8458 * c-decl.c: Use hash_set instead of pointer_set.
8460 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8463 * c-array-notation.c (expand_array_notations): Handling
8466 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
8469 * c-typeck.c (c_finish_return): Return 0 instead of the address of
8472 2014-07-30 Tom Tromey <tromey@redhat.com>
8474 * c-typeck.c (struct constructor_stack) <designator_depth>: New
8476 (really_start_incremental_init, push_init_level): Initialize
8478 (pop_init_level): Set global designator_depth.
8479 (process_init_element): Check for designated_init attribute.
8481 2014-07-20 Marek Polacek <polacek@redhat.com>
8484 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
8485 (implicitly_declare): Pass location to implicit_decl_warning.
8487 2014-07-14 Jakub Jelinek <jakub@redhat.com>
8490 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
8491 If non-NULL, call c_parser_check_literal_zero.
8492 (c_parser_check_literal_zero): New function.
8493 (c_parser_postfix_expression_after_primary): Adjust
8494 c_parser_expr_list caller, handle -Wmemset-transposed-args.
8496 2014-07-06 Marek Polacek <polacek@redhat.com>
8499 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
8500 * c-tree.h (C_ARRAY_PARAMETER): Define.
8501 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
8504 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
8505 Chen Gang <gang.chen.5i5j@gmail.com>
8507 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
8510 2014-07-01 Marek Polacek <polacek@redhat.com>
8512 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
8513 instead of 0 to WARN_FOR_ASSIGNMENT.
8515 2014-07-01 Marek Polacek <polacek@redhat.com>
8518 * c-typeck.c (convert_for_assignment): Pass
8519 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
8521 2014-06-30 Marek Polacek <polacek@redhat.com>
8523 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
8524 has no_sanitize_undefined attribute.
8526 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
8529 * c-array-notation.c (fix_builtin_array_notation_fn):
8530 Check for 0 arguments in builtin call. Check that bultin argument is
8532 * c-parser.c (c_parser_array_notation): Check for incorrect initial
8535 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
8537 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
8538 qualifiers in __auto_type for atomic types.
8539 (c_parser_typeof_specifier): Discard all type qualifiers in
8540 __typeof__ for atomic types.
8542 2014-06-25 Marek Polacek <polacek@redhat.com>
8545 * c-parser.c (c_parser_statement_after_labels): Pass the location of
8546 the return expression to c_finish_return.
8548 2014-06-25 Jakub Jelinek <jakub@redhat.com>
8550 * c-typeck.c (c_finish_omp_clauses): Make sure
8551 OMP_CLAUSE_LINEAR_STEP has correct type.
8553 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
8557 2014-06-24 Jakub Jelinek <jakub@redhat.com>
8559 * c-parser.c (c_parser_omp_for_loop): For
8560 #pragma omp parallel for simd move lastprivate clause from parallel
8561 to for rather than simd.
8563 2014-06-23 Marek Polacek <polacek@redhat.com>
8565 * c-typeck.c (parser_build_binary_op): Don't call
8566 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
8568 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
8570 * c-parser.c (c_parser_omp_threadprivate): Likewise.
8571 * c-decl.c (merge_decls): Likewise.
8573 2014-06-09 Marek Polacek <polacek@redhat.com>
8576 * c-typeck.c (error_init): Call inform instead of error_at.
8577 (pedwarn_init): Call inform instead of pedwarn.
8578 (warning_init): Call inform instead of warning_at.
8580 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
8582 * c-decl.c (merge_decls): Use set_decl_section_name.
8583 (duplicate_decls): Remove node if it exists.
8585 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
8588 * c-typeck.c (push_init_level, process_init_element,
8589 pop_init_level): Correct check for zero initialization, move
8590 missing brace warning to respect zero initialization.
8592 2014-06-05 Marek Polacek <polacek@redhat.com>
8595 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
8597 2014-06-05 Marek Polacek <polacek@redhat.com>
8600 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
8601 on the left hand side operand of a comparison.
8603 2014-06-05 Marek Polacek <polacek@redhat.com>
8606 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
8607 Print note only if the warning was printed.
8609 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
8612 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
8615 2014-06-03 Marek Polacek <polacek@redhat.com>
8618 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
8620 * c-tree.h (c_start_case): Update.
8621 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
8622 switch condition has boolean value.
8624 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
8626 * c-decl.c: Include builtins.h.
8627 * c-parser.c: Likewise.
8629 2014-05-27 Marek Polacek <polacek@redhat.com>
8632 * c-typeck.c (convert_arguments): Get location of a parameter. Change
8633 error and warning calls to error_at and warning_at. Pass location of
8634 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
8635 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
8636 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
8638 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
8641 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
8642 function parameters.
8644 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
8646 * c-decl.c (merge_decls): Preserve symtab node pointers.
8647 (duplicate_decls): Free new decl.
8649 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
8651 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
8654 * c-parser.c (c_parser_omp_target): Return bool values.
8656 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8658 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
8659 num_teams_loc variable to num_thread_limit_loc.
8661 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8663 * c-array-notation.c (expand_array_notations): Use void_node
8664 instead of void_zero_node.
8666 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8668 * c-decl.c (finish_struct): Adjust.
8669 (finish_enum): Likewise.
8671 (record_inline_static): Likewise.
8672 (push_scope): Likewise.
8673 (make_label): Likewise.
8674 (lookup_label_for_goto): Likewise.
8675 (finish_struct): Likewise.
8676 (finish_enum): Likewise.
8677 (store_parm_decls): Likewise.
8678 (c_push_function_context): Likewise.
8679 * c-lang.h: Remove usage of variable_size gty attribute.
8680 * c-parser.c (c_parse_init): Adjust.
8681 (c_parse_file): Likewise.
8683 2014-05-13 Marek Polacek <polacek@redhat.com>
8686 * c-typeck.c (convert_for_assignment): Pass location to
8687 WARN_FOR_ASSIGNMENT instead of input_location.
8689 2014-05-10 Marek Polacek <polacek@redhat.com>
8691 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
8692 maybe_warn_string_init.
8693 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
8694 maybe_warn_string_init.
8695 * c-tree.h (maybe_warn_string_init): Update declaration.
8696 * c-typeck.c (maybe_warn_string_init): Add location parameter.
8697 Call pedwarn_init with loc instead of with input_location.
8698 (digest_init): Pass init_loc to maybe_warn_string_init.
8699 (pop_init_level): Call pedwarn_init with loc instead of with
8701 (set_init_index): Likewise.
8702 (process_init_element): Likewise.
8704 2014-05-09 Marek Polacek <polacek@redhat.com>
8707 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
8708 (c_parser_initelt): Pass location to set_init_label. Pass array index
8709 location to set_init_index.
8710 * c-tree.h (push_init_level): Update declaration.
8711 (pop_init_level): Likewise.
8712 (set_init_index): Likewise.
8713 (set_init_label): Likewise.
8714 * c-typeck.c (error_init): Add location parameter. Call error_at
8716 (digest_init): Pass init_loc to error_init.
8717 (really_start_incremental_init):
8718 (push_init_level): Add location parameter. Pass loc to pop_init_level
8720 (pop_init_level): Likewise.
8721 (set_designator): Add location parameter. Pass loc to pop_init_level,
8722 push_init_level, and error_init.
8723 (set_init_index): Add location parameter. Pass loc to error_init and
8725 (set_init_label): Likewise.
8726 (output_init_element): Pass loc to error_init.
8727 (process_init_element): Pass loc to error_init, pop_init_level,
8728 pedwarn_init, and push_init_level.
8730 2014-05-09 Marek Polacek <polacek@redhat.com>
8733 * c-parser.c (c_parser_attributes): Parse the arguments as an
8734 expression-list if the attribute takes identifier.
8736 2014-05-08 Marek Polacek <polacek@redhat.com>
8739 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8742 2014-05-08 Marek Polacek <polacek@redhat.com>
8745 * c-decl.c (start_function): Warn for _Atomic-qualified return type
8748 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8749 Mike Stump <mikestump@comcast.net>
8750 Richard Sandiford <rdsandiford@googlemail.com>
8752 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8753 (finish_enum): Use wide-int interfaces.
8754 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8755 * c-typeck.c (build_c_cast): Likewise.
8756 (set_nonincremental_init_from_string): Likewise.
8757 (c_tree_equal): Likewise.
8759 2014-05-02 Marek Polacek <polacek@redhat.com>
8762 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
8763 Return size_one_node when the type is not complete.
8764 (pointer_diff): Remove comment.
8765 (build_unary_op): Improve error messages.
8767 2014-05-02 Marek Polacek <polacek@redhat.com>
8769 * c-typeck.c (c_finish_return): Separate warning_at calls.
8771 2014-05-02 Marek Polacek <polacek@redhat.com>
8773 * c-tree.h (error_init): Remove declaration.
8774 (pedwarn_init): Likewise.
8775 * c-typeck.c (error_init): Make static and move above.
8776 (pedwarn_init): Likewise.
8777 (warning_init): Move above.
8778 (maybe_warn_string_init): Likewise.
8780 2014-05-01 Jeff Law <law@redhat.com>
8784 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8785 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8788 2014-05-02 Marek Polacek <polacek@redhat.com>
8791 * c-typeck.c (push_init_level): Set constructor_designated to
8792 p->designated for structures.
8794 2014-05-01 Marek Polacek <polacek@redhat.com>
8797 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8798 function-definition has an attribute after the declarator.
8800 2014-05-01 Marek Polacek <polacek@redhat.com>
8803 * c-typeck.c (warning_init): Add location_t parameter. Call
8804 warning_at instead of warning.
8805 (push_init_level): Pass input_location to warning_init.
8806 (add_pending_init): Add location_t parameter. Pass loc to
8808 (set_nonincremental_init): Pass input_location to add_pending_init.
8809 (set_nonincremental_init_from_string): Likewise.
8810 (output_init_element): Pass loc to warning_init and to
8813 2014-05-01 Marek Polacek <polacek@redhat.com>
8816 * c-typeck.c (c_finish_return): Distinguish between label and variable
8817 when warning about returning local address.
8819 2014-05-01 Marek Polacek <polacek@redhat.com>
8822 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8825 2014-05-01 Marek Polacek <polacek@redhat.com>
8828 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8829 instead of 0 to WARN_FOR_QUALIFIERS.
8831 2014-05-01 Marek Polacek <polacek@redhat.com>
8834 * c-typeck.c (default_conversion): Use better location for
8837 2014-04-30 Marek Polacek <polacek@redhat.com>
8839 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8840 also when SANITIZE_FLOAT_DIVIDE is on.
8842 2014-04-30 Marek Polacek <polacek@redhat.com>
8845 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8846 and pedwarn_init. Use loc insted of input_location.
8848 2014-04-30 Marek Polacek <polacek@redhat.com>
8851 * c-typeck.c (build_binary_op): Use location when warning about
8854 2014-04-25 Marek Polacek <polacek@redhat.com>
8857 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8858 always_inline/noinline and hot/cold attributes.
8860 2014-04-25 Marek Polacek <polacek@redhat.com>
8863 * c-parser.c (c_parser_initelt): Pass input_location to
8864 process_init_element.
8865 (c_parser_initval): Pass loc to process_init_element.
8866 * c-tree.h (process_init_element): Adjust declaration.
8867 * c-typeck.c (push_init_level): Pass input_location to
8868 process_init_element.
8869 (pop_init_level): Likewise.
8870 (set_designator): Likewise.
8871 (output_init_element): Add location_t parameter. Pass loc to
8873 (output_pending_init_elements): Pass input_location to
8874 output_init_element.
8875 (process_init_element): Add location_t parameter. Pass loc to
8876 output_init_element.
8878 2014-04-24 Jakub Jelinek <jakub@redhat.com>
8880 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8881 atomic-clause, allow comma in between atomic-clause and
8884 2014-04-22 Jakub Jelinek <jakub@redhat.com>
8887 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8888 fails, don't set OM_PARALLEL_COMBINED and return NULL.
8890 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8893 * c-array-notation.c (fix_builtin_array_notation_fn): Use
8894 create_tmp_var instead build_decl for creating temps.
8895 (build_array_notation_expr): Likewise.
8896 (fix_conditional_array_notations_1): Likewise.
8897 (fix_array_notation_expr): Likewise.
8898 (fix_array_notation_call_expr): Likewise.
8900 2014-03-28 Jakub Jelinek <jakub@redhat.com>
8903 * c-tree.h (c_build_function_call_vec): New prototype.
8904 * c-typeck.c (build_function_call_vec): Don't call
8905 resolve_overloaded_builtin here.
8906 (c_build_function_call_vec): New wrapper function around
8907 build_function_call_vec. Call resolve_overloaded_builtin here.
8908 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8909 Call c_build_function_call_vec instead of build_function_call_vec.
8910 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8911 * c-decl.c (finish_decl): Likewise.
8913 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8916 * c-typeck.c: Use correct format string in cast-qual warning
8918 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
8920 * c-decl.c (c_decl_attributes): Use
8921 lang_hooks.types.omp_mappable_type.
8922 * c-typeck.c (c_finish_omp_clauses): Likewise.
8924 2014-03-06 Marek Polacek <polacek@redhat.com>
8927 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
8928 of checking tree code.
8930 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8932 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
8933 (c_parser_parameter_declaration): Likewise.
8935 2014-02-19 Marek Polacek <polacek@redhat.com>
8938 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
8939 Call mark_exp_read on exp.value.
8940 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
8941 TREE_ADDRESSABLE on old instead of val.
8942 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
8944 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8946 * c-parser.c (c_parser_get_builtin_args): Replace calls to
8947 C_EXPR_APPEND by vec_safe_push.
8948 * c-tree.h (C_EXPR_APPEND): Remove.
8950 2014-01-31 Marek Polacek <polacek@redhat.com>
8953 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
8954 build_function_call_vec.
8955 (build_function_call): Likewise.
8956 (build_atomic_assign): Likewise.
8957 (build_function_call_vec): Add arg_loc parameter. Use it.
8958 (convert_arguments): Likewise.
8959 (convert_for_assignment): Rename rhs_loc to expr_loc.
8960 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8961 (c_parser_objc_keywordexpr): Likewise.
8962 (c_parser_postfix_expression_after_primary): Call
8963 build_function_call_vec with expr_loc rather than op_loc.
8964 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
8965 build_function_call_vec.
8966 (c_parser_expr_list): Add locations parameter. Fill it with locations
8967 of function arguments.
8968 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8970 2014-01-30 Marek Polacek <polacek@redhat.com>
8973 * c-typeck.c (build_function_call_vec): Use loc parameter.
8974 (convert_arguments): Add location parameter. Use it.
8975 (ep_convert_and_check): Likewise.
8976 (build_atomic_assign): Adjust convert_for_assignment call.
8977 (build_modify_expr): Likewise.
8978 (digest_init): Likewise.
8979 (c_finish_return): Likewise.
8980 (build_conditional_expr): Adjust ep_convert_and_check calls.
8981 (convert_for_assignment): Add rhs_loc parameter. Use it.
8982 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8985 2014-01-30 Richard Biener <rguenther@suse.de>
8988 * c-typeck.c (build_function_call_vec): Do not replace calls
8989 to a function via an incompatible type with a runtime abort.
8991 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8993 * c-parser.c (c_parser_declaration_or_fndef): Replaced
8994 flag_enable_cilkplus with flag_cilkplus.
8995 (c_parser_direct_declarator_inner): Likewise.
8996 (c_parser_attribute_any_word): Likewise.
8997 (c_parser_attributes): Likewise.
8998 (c_parser_compound_statement): Likewise.
8999 (c_parser_statement_after_labels): Likewise.
9000 (c_parser_if_statement): Likewise.
9001 (c_parser_switch_statement): Likewise.
9002 (c_parser_do_statement): Likewise.
9003 (c_parser_for_statement): Likewise.
9004 (c_parser_unary_expression): Likewise.
9005 (c_parser_postfix_expression): Likewise.
9006 (c_parser_postfix_expression_after_primary): Likewise.
9007 (c_parser_postfix_expression_after_primary): Likewise.
9008 (c_parser_omp_clause_name): Likewise.
9009 (c_finish_omp_declare_simd): Likewise.
9010 (c_parser_cilk_verify_simd): Likewise.
9011 * c-typeck.c (build_array_ref): Likewise.
9012 (build_function_call_vec): Likewise.
9013 (convert_arguments): Likewise.
9014 (build_compound_expr): Likewise.
9015 (c_finish_return): Likewise.
9016 (c_finish_if_stmt): Likewise.
9017 (c_finish_loop): Likewise.
9018 (build_binary_op): Likewise.
9020 2014-01-23 Marek Polacek <polacek@redhat.com>
9023 * c-typeck.c (parser_build_binary_op): Use location instead of
9025 (build_binary_op): Pass location to shorten_compare.
9027 2014-01-23 Marek Polacek <polacek@redhat.com>
9030 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
9033 2014-01-23 Marek Polacek <polacek@redhat.com>
9036 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
9037 of a comma expression.
9038 (emit_side_effect_warnings): Likewise.
9040 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
9043 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
9044 function to use walk_tree and moved a lot of its functionality to
9045 expand_array_notations.
9046 (expand_array_notations): New function.
9048 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
9050 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
9051 attribute an attribute without value.
9053 2014-01-23 Jakub Jelinek <jakub@redhat.com>
9056 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
9057 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
9059 2014-01-22 Marek Polacek <polacek@redhat.com>
9062 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
9063 of remove_c_maybe_const_expr on op1 and op2.
9065 2014-01-15 Jakub Jelinek <jakub@redhat.com>
9068 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
9069 effects, preevaluate rhs using SAVE_EXPR first.
9071 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
9074 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
9075 statements with if-elseif statements.
9077 2014-01-06 Marek Polacek <polacek@redhat.com>
9080 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
9081 defined bit-field types only in ISO C.
9083 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9085 Update copyright years
9087 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9089 * c-array-notation.c: Use the standard form for the copyright notice.
9091 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9093 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
9094 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
9095 field in parser is not empty. If not-empty, call the function
9096 c_parser_finish_omp_declare_simd.
9097 (c_parser_cilk_clause_vectorlength): Modified function to be shared
9098 between SIMD-enabled functions and #pragma simd. Added new parameter.
9099 (c_parser_cilk_all_clauses): Modified the usage of the function
9100 c_parser_cilk_clause_vectorlength as mentioned above.
9101 (c_parser_cilk_simd_fn_vector_attrs): New function.
9102 (c_finish_cilk_simd_fn_tokens): Likewise.
9103 (is_cilkplus_vector_p): Likewise.
9104 (c_parser_omp_clause_name): Added checking for "vectorlength,"
9105 "nomask," and "mask" strings in clause name.
9106 (c_parser_omp_all_clauses): Added 3 new case statements:
9107 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
9108 PRAGMA_CILK_CLAUSE_NOMASK.
9109 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
9110 check for vector attribute and if so call the function
9111 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
9112 called the function c_finish_cilk_simd_fn_tokens.
9113 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
9114 parser field is non-empty. If so, parse them as you would parse
9115 the omp declare simd pragma.
9116 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
9117 Added a check when step is a parameter and flag it as error.
9118 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
9119 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
9122 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
9124 * c-parser.c (c_parser_omp_parallel): Fix description.
9126 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9128 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
9129 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9130 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
9131 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
9133 2013-12-04 Joseph Myers <joseph@codesourcery.com>
9136 * c-parser.c (c_parser_alignas_specifier): Use
9137 c_sizeof_or_alignof_type instead of c_alignof.
9138 (c_parser_alignof_expression): Likewise, with min_alignof
9139 parameter depending on alignof spelling used.
9141 2013-12-04 Marek Polacek <polacek@redhat.com>
9144 * c-decl.c (start_function): Don't warn for missing prototype for
9147 2013-12-03 Marek Polacek <polacek@redhat.com>
9150 * c-decl.c (build_compound_literal): Allow compound literals with
9151 empty initial value.
9153 2013-12-02 Joseph Myers <joseph@codesourcery.com>
9156 * c-typeck.c (build_modify_expr): Diagnose assignment to
9157 expression with array type.
9159 2013-11-29 Joseph Myers <joseph@codesourcery.com>
9162 * c-typeck.c (process_init_element): Do not treat a string as
9163 initializing a whole array when used with a designator for an
9166 2013-11-29 Joseph Myers <joseph@codesourcery.com>
9169 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
9170 an inline function following a static declaration.
9172 2013-11-28 Jakub Jelinek <jakub@redhat.com>
9175 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
9176 to p_name before calling c_parser_omp_teams instead of after.
9177 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
9178 argument. Remove unused p_name variable.
9180 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
9181 Jakub Jelinek <jakub@redhat.com>
9183 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
9184 external_scope is NULL.
9186 2013-11-27 Tom de Vries <tom@codesourcery.com>
9187 Marc Glisse <marc.glisse@inria.fr>
9190 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
9192 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
9194 * c-typeck.c: Add required include files from gimple.h.
9196 2013-11-22 David Malcolm <dmalcolm@redhat.com>
9198 * c-decl.c (define_label, shadow_tag_warned)
9199 (check_bitfield_type_and_width, grokdeclarator, grokparms,
9200 store_parm_decls_newstyle, store_parm_decls_oldstyle)
9201 (declspecs_add_type): Remove use of in_system_header macro.
9202 * c-parser.c (c_parser_unary_expression): Likewise.
9203 * c-typeck.c (store_init_value, process_init_element)
9204 (c_start_case): Likewise.
9206 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
9209 * c-parser.c (c_parser_set_source_position_from_token): Remove
9210 reference to in_system_header from comment.
9212 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9214 * c-decl.c (grokdeclarator): Update comment to refer to
9215 tree_to_[su]hwi rather than tree_low_cst.
9217 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9219 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
9220 tree_to_uhwi throughout.
9222 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9224 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
9227 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9229 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
9232 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
9234 * c-parser.c (c_parser_cilk_simd): New.
9235 (c_parser_cilk_verify_simd): New.
9236 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
9237 (c_parser_omp_for_loop): Add case for NE_EXPR.
9238 Set c_break_label for CILK_SIMD.
9239 (c_parser_cilk_clause_vectorlength): New.
9240 (c_parser_cilk_clause_linear): New.
9241 (c_parser_cilk_clause_name): New.
9242 (c_parser_cilk_all_clauses): New.
9243 * c-typeck.c (build_unary_op): Pass location argument to
9245 (build_modify_expr): Same.
9246 (build_asm_expr): Same.
9247 (c_finish_bc_stmt): Error on break/continue in loops.
9249 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
9251 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
9253 2013-11-14 Diego Novillo <dnovillo@google.com>
9255 * c-decl.c: Include print-tree.h.
9256 Include stor-layout.h.
9259 Include stringpool.h.
9260 * c-lang.c: Include fold-const.h.
9261 * c-parser.c: Include stringpool.h.
9263 Include stor-layout.h.
9265 Include trans-mem.h.
9266 * c-typeck.c: Include stor-layout.h.
9267 Include trans-mem.h.
9271 2013-11-13 Joseph Myers <joseph@codesourcery.com>
9273 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
9274 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
9276 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
9277 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
9279 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
9280 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
9281 (c_parser_declarator, c_parser_direct_declarator_inner)
9282 (c_parser_parameter_declaration, c_parser_type_name): All callers
9284 (c_parser_declaration_or_fndef): Handle declarations with type
9285 determined from the initializer.
9287 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
9289 * c-typeck.c: Include gimplify.h.
9291 2013-11-12 Joseph Myers <joseph@codesourcery.com>
9293 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
9294 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
9296 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
9297 or _Thread_local as appropriate in diagnostics.
9298 (build_null_declspecs): Initialize ret->thread_gnu_p.
9299 (declspecs_add_scspec): Handle either __thread or _Thread_local
9300 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
9301 pedantic. Do not disallow _Thread_local extern and _Thread_local
9304 2013-11-07 Joseph Myers <joseph@codesourcery.com>
9305 Andrew MacLeod <amacleod@redhat.com>
9307 * c-aux-info.c (gen_type): Handle atomic qualifier.
9308 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
9309 qualifiers when compating types.
9310 (shadow_tag_warned): Handle atomic_p in declspecs.
9311 (quals_from_declspecs): Likewise.
9312 (start_decl): Use c_type_promotes_to when promoting argument
9314 (grokdeclarator): Handle _Atomic.
9315 (get_parm_info): Diagnose any qualifier on "void" as only
9317 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
9318 comparing types. Use c_type_promotes_to when promoting argument
9320 (finish_function): Use c_type_promotes_to when promoting argument
9322 (build_null_declspecs): Handle atomic_p in declspecs.
9323 (declspecs_add_qual): Handle RID_ATOMIC.
9324 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
9325 (c_token_starts_declspecs): Handle RID_ATOMIC.
9326 (c_parser_declspecs): Handle atomic type specifiers and
9328 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
9329 from types of expressions with atomic type.
9330 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
9331 (c_parser_attribute_any_word): Handle RID_ATOMIC.
9332 (c_parser_initializer, c_parser_initelt, c_parser_initval)
9333 (c_parser_statement_after_labels, c_parser_switch_statement)
9334 (c_parser_for_statement, c_parser_expr_no_commas)
9335 (c_parser_conditional_expression, c_parser_binary_expression)
9336 (c_parser_cast_expression, c_parser_unary_expression)
9337 (c_parser_postfix_expression)
9338 (c_parser_postfix_expression_after_primary, c_parser_expression):
9339 Use convert_lvalue_to_rvalue.
9340 (c_parser_expression_conv, c_parser_expr_list): Document
9341 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
9342 (c_parser_objc_synchronized_statement): Use
9343 convert_lvalue_to_rvalue.
9344 (c_parser_objc_selector): Handle RID_ATOMIC.
9345 (c_parser_objc_receiver, c_parser_array_notation): Use
9346 convert_lvalue_to_rvalue.
9347 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
9348 _Atomic (type-name).
9349 (struct c_declspecs): Add atomic_p field.
9350 (convert_lvalue_to_rvalue): Declare.
9351 * c-typeck.c (c_type_promotes_to): Promote atomic types to
9352 corresponding atomic types.
9353 (qualify_type): Don't add _Atomic qualifiers from second argument.
9354 (comp_target_types): Do not allow _Atomic mismatches.
9355 (type_lists_compatible_p): Do not remove atomic qualifiers when
9357 (really_atomic_lvalue, convert_lvalue_to_rvalue)
9358 (build_atomic_assign): New functions.
9359 (build_unary_op): Use build_atomic_assign for atomic increment and
9361 (build_conditional_expr): Do not treat _Atomic void as a qualified
9363 (build_modify_expr): Use build_atomic_assign for atomic LHS.
9364 (find_anonymous_field_with_type, convert_to_anonymous_field)
9365 (convert_for_assignment): Do not remove atomic qualifiers when
9367 (digest_init): Do not accept initialization of arrays of atomic
9368 elements by string constants.
9369 (build_asm_expr): Use convert_lvalue_to_rvalue.
9370 (build_binary_op): Do not treat _Atomic void as a qualified
9373 2013-11-06 DJ Delorie <dj@redhat.com>
9375 * c-decl.c (locate_old_decl): If a previous conflicting decl is
9376 both explicit and builtin, print the location of the explicit one.
9378 2013-11-05 Tobias Burnus <burnus@net-b.de>
9380 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
9381 c_parser_omp_distribute, c_parser_omp_teams,
9382 c_parser_omp_target, c_parser_omp_declare): Handle
9385 2013-11-03 Marek Polacek <polacek@redhat.com>
9387 * c-decl.c (grokdeclarator): Add VLA instrumentation.
9389 2013-11-01 Jakub Jelinek <jakub@redhat.com>
9391 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
9392 check_dup_generic at the end, unless remove is true.
9393 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
9395 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
9397 2013-10-31 Jakub Jelinek <jakub@redhat.com>
9399 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
9400 with decl that is not pointer nor array.
9402 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9404 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
9405 a spawning function is found.
9406 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
9407 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
9408 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9409 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
9411 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
9412 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
9414 (c_finish_return): Added a check to reject _Cilk_spawn in return
9416 (build_cilk_spawn): New function.
9417 (build_cilk_sync): Likewise.
9418 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
9420 2013-10-27 Tobias Burnus <burnus@net-b.de>
9423 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
9424 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
9425 (c_parser_statement_after_labels): Update calls.
9427 2013-10-24 Tobias Burnus <burnus@net-b.de>
9430 * c-parser.c (c_parser_pragma, c_parser_for_statement):
9431 Handle PRAGMA_IVDEP.
9432 (c_parser_statement_after_labels): Update call.
9434 2013-10-24 Marek Polacek <polacek@redhat.com>
9436 * c-parser.c (c_parser_struct_declaration): Add a comment.
9437 (c_parser_declarator): Don't allow _Alignas here.
9439 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
9441 * c-parser.c: Include omp-low.h.
9442 * c-typeck.c: Likewise.
9444 2013-10-17 Marek Polacek <polacek@redhat.com>
9447 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
9448 Document syntax of the array-declarator.
9449 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
9451 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
9452 (c_parser_struct_declaration): Likewise.
9453 (c_parser_declarator): Likewise.
9454 (c_parser_direct_declarator_inner): Likewise.
9455 (c_parser_parameter_declaration): Likewise.
9456 (c_parser_type_name): Likewise.
9458 2013-10-11 Jakub Jelinek <jakub@redhat.com>
9460 * c-lang.h (current_omp_declare_target_attribute): New extern
9462 * c-parser.c: Include c-lang.h.
9463 (struct c_parser): Change tokens to c_token *.
9464 Add tokens_buf field. Change tokens_avail type to unsigned int.
9465 (c_parser_consume_token): If parser->tokens isn't
9466 &parser->tokens_buf[0], increment parser->tokens.
9467 (c_parser_consume_pragma): Likewise.
9468 (enum pragma_context): Add pragma_struct and pragma_param.
9469 (c_parser_external_declaration): Adjust
9470 c_parser_declaration_or_fndef caller.
9471 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
9472 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
9473 Adjust recursive call.
9474 (c_parser_struct_or_union_specifier): Use pragma_struct instead
9476 (c_parser_parameter_declaration): Use pragma_param instead of
9478 (c_parser_compound_statement_nostart, c_parser_label,
9479 c_parser_for_statement): Adjust
9480 c_parser_declaration_or_fndef callers.
9481 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
9482 it through to c_parser_conditional_expression.
9483 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
9484 pass it through to c_parser_binary_expression. Adjust recursive
9486 (c_parser_binary_expression): Remove prec argument, add
9487 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
9488 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
9489 binop matches it, use build2 instead of parser_build_binary_op.
9490 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
9491 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
9492 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
9493 Handle pragma_struct and pragma_param the same as pragma_external.
9494 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
9495 (c_parser_omp_variable_list): Parse array sections for
9496 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
9497 (c_parser_omp_clause_collapse): Fully fold collapse expression.
9498 (c_parser_omp_clause_reduction): Handle user defined reductions.
9499 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
9500 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
9501 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
9502 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
9503 c_parser_omp_clause_depend, c_parser_omp_clause_map,
9504 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
9505 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
9506 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
9507 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
9508 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
9509 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
9510 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
9511 (c_parser_omp_for_loop): Add CODE argument, pass it through
9512 to c_finish_omp_for. Change last argument to cclauses,
9513 and adjust uses to grab parallel clauses from the array of all
9514 the split clauses. Adjust c_parser_binary_expression,
9515 c_parser_declaration_or_fndef and c_finish_omp_for callers.
9516 (omp_split_clauses): New function.
9517 (c_parser_omp_simd): New function.
9518 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
9519 Allow the function to be called also when parsing combined constructs,
9520 and call c_parser_omp_simd when parsing for simd.
9521 (c_parser_omp_sections_scope): If section-sequence doesn't start with
9522 #pragma omp section, require exactly one structured-block instead of
9523 sequence of statements.
9524 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
9525 Allow the function to be called also when parsing combined constructs.
9526 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
9527 Allow the function to be called also when parsing combined
9529 (c_parser_omp_taskgroup, c_parser_omp_cancel,
9530 c_parser_omp_cancellation_point, c_parser_omp_distribute,
9531 c_parser_omp_teams, c_parser_omp_target_data,
9532 c_parser_omp_target_update, c_parser_omp_target,
9533 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
9534 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
9535 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
9536 (c_parser_omp_construct): Add p_name and mask vars. Handle
9537 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
9538 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
9539 and c_parser_omp_sections callers.
9540 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
9541 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
9542 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
9543 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
9544 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
9546 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
9547 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
9548 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
9549 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
9550 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
9551 * c-typeck.c: Include tree-inline.h.
9552 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
9553 handle_omp_array_sections_1, handle_omp_array_sections,
9554 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
9555 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
9556 user defined reductions.
9557 (c_tree_equal): New function.
9558 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
9559 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
9560 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
9561 c_check_omp_declare_reduction_r): New prototypes.
9562 * c-decl.c (current_omp_declare_target_attribute): New variable.
9563 (c_decl_attributes): New function.
9564 (start_decl, start_function): Use it instead of decl_attributes.
9565 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
9566 c_omp_reduction_decl, c_omp_reduction_lookup,
9567 c_check_omp_declare_reduction_r): New functions.
9569 2013-09-25 Tom Tromey <tromey@redhat.com>
9571 * Make-lang.in (c/gccspec.o): Remove.
9572 (CFLAGS-c/gccspec.o): New variable.
9573 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
9574 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
9575 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
9577 2013-09-25 Tom Tromey <tromey@redhat.com>
9579 * Make-lang.in (c/gccspec.o): Don't use subshell.
9581 2013-09-18 Marek Polacek <polacek@redhat.com>
9584 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
9585 Remove unnecessary check.
9587 2013-09-18 Marek Polacek <polacek@redhat.com>
9590 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
9591 no_sanitize_undefined attribute.
9593 2013-09-13 Kai Tietz <ktietz@redhat.com>
9596 * c-decl.c (c_builtin_function_ext_scope): Remove
9597 wrong assumption that it is never called on prexisting
9600 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9602 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
9604 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9606 * c-objc-common.c (c_tree_printer): Tidy.
9608 2013-08-30 Marek Polacek <polacek@redhat.com>
9610 * c-typeck.c (build_binary_op): Add division by zero and shift
9613 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
9614 Joseph Myers <joseph@codesourcery.com>
9617 * c-typeck.c (c_common_type): Prefer double_type_node over
9618 other REAL_TYPE types with the same precision.
9619 (convert_arguments): Likewise.
9621 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
9623 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
9624 (c_initialize_diagnostics): Call a destructor for the early printer.
9626 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9628 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
9629 printer initialization.
9631 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
9634 * c-array-notation.c (fix_conditional_array_notations_1): Added a
9635 check for truth values.
9636 (expand_array_notation_exprs): Added truth values case. Removed an
9637 unwanted else. Added for-loop to walk through subtrees in default
9640 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9642 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
9644 2013-07-23 Joseph Myers <joseph@codesourcery.com>
9646 * c-parser.c (struct c_generic_association): Fix typo.
9648 2013-07-23 Tom Tromey <tromey@redhat.com>
9649 Joseph Myers <joseph@codesourcery.com>
9651 * c-parser.c (struct c_generic_association): New.
9652 (c_generic_association_d): New typedef.
9653 (c_parser_generic_selection): New function.
9654 (c_parser_postfix_expression): Handle RID_GENERIC.
9656 2013-07-13 Jason Merrill <jason@redhat.com>
9659 * c-decl.c (finish_struct): Check for too-large class.
9661 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
9664 * c-typeck.c (set_init_index): When folding, check for index overflow.
9666 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9668 * c-parser.c (c_parser_array_notation): Removed rejection of array
9669 notations in an array of function pointers.
9671 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9673 * c-array-notation.c (make_triplet_val_inv): New function.
9674 (create_cmp_incr): Likewise.
9675 (create_array_refs): Likewise.
9676 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
9677 Also modularized common parts between functions and called the function.
9678 (build_array_notation_expr): Likewise.
9679 (fix_conditional_array_notations_1): Likewise.
9680 (fix_array_notation_expr): Likewise.
9681 (fix_array_notation_call_expr): Likewise.
9683 2013-06-18 Marek Polacek <polacek@redhat.com>
9686 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
9688 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
9690 * c-array-notation.c (build_array_notation_expr): Reject array notation
9691 mismatch between LHS and RHS even inside a call_expr. Also, removed
9692 a couple while statements that were dead code.
9694 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
9696 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
9697 excessive precision expressions in function parameters. Also removed
9698 couple unwanted while statements.
9700 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9702 * c-array-notation.c (expand_array_notation_exprs): Added
9703 ARRAY_NOTATION_REF case.
9705 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9707 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
9708 function to c-family/array-notation-common.c.
9709 (is_cilkplus_reduce_builtin): Likewise.
9710 (find_rank): Likewise.
9711 (extract_array_notation_exprs): Likewise.
9712 (replace_array_notations): Likewise.
9713 (find_inv_trees): Likewise.
9714 (replace_inv_trees): Likewise.
9715 (contains_array_notation_expr): Likewise.
9716 (find_correct_array_notation_type): Likewise.
9717 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9718 (struct inv_list): Moved this to c-family/array-notation-common.c.
9719 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
9721 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
9723 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9724 reduction functions outside the for-loop. Added a check if the fundecl
9725 is non-NULL. Finally, removed an unwanted if-statement, and made the
9728 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9730 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9731 condition of the if-statement matches the rank of else-block and then-
9732 block when array notations are used.
9733 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9734 expression after the entire function body is parsed.
9735 (c_parser_expr_no_commas): Delayed creating array notation expressions
9736 to the end of function parsing.
9737 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9738 whole if-statement instead of just the condition.
9739 (expand_array_notation_exprs): Added MODIFY_EXPR case.
9741 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9744 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9745 array to NULL_TREE if they are unused. Also added a check for the
9746 field to be NULL before its fields are used in future.
9748 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9751 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9752 (build_array_notation_expr): Likewise.
9754 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9756 * c-typeck.c (build_array_ref): Added a check to see if array's
9757 index is greater than one. If true, then emit an error.
9758 (build_function_call_vec): Exclude error reporting and checking
9759 for builtin array-notation functions.
9760 (convert_arguments): Likewise.
9761 (c_finish_return): Added a check for array notations as a return
9762 expression. If true, then emit an error.
9763 (c_finish_loop): Added a check for array notations in a loop
9764 condition. If true then emit an error.
9765 (lvalue_p): Added a ARRAY_NOTATION_REF case.
9766 (build_binary_op): Added a check for array notation expr inside
9767 op1 and op0. If present, we call another function to find correct
9769 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9770 * c-parser.c (c_parser_compound_statement): Check if array
9771 notation code is used in tree, if so, then transform them into
9773 (c_parser_expr_no_commas): Check if array notation is used in LHS
9774 or RHS, if so, then build array notation expression instead of
9776 (c_parser_postfix_expression_after_primary): Added a check for
9777 colon(s) after square braces, if so then handle it like an array
9778 notation. Also, break up array notations in unary op if found.
9779 (c_parser_direct_declarator_inner): Added a check for array
9781 (c_parser_compound_statement): Added a check for array notation in
9782 a stmt. If one is present, then expand array notation expr.
9783 (c_parser_if_statement): Likewise.
9784 (c_parser_switch_statement): Added a check for array notations in
9785 a switch statement's condition. If true, then output an error.
9786 (c_parser_while_statement): Similarly, but for a while.
9787 (c_parser_do_statement): Similarly, but for a do-while.
9788 (c_parser_for_statement): Similarly, but for a for-loop.
9789 (c_parser_unary_expression): Check if array notation is used in a
9790 pre-increment or pre-decrement expression. If true, then expand
9792 (c_parser_array_notation): New function.
9793 * c-array-notation.c: New file.
9794 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
9796 2013-05-23 Mike Stump <mikestump@comcast.net>
9798 * c-typeck.c (convert_for_assignment): Handle references to memory
9801 2013-05-16 Jason Merrill <jason@redhat.com>
9803 * Make-lang.in (cc1$(exeext)): Use link mutex.
9805 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9807 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9808 to simply use OPT_Wpointer_arith.
9809 (build_unary_op): Likewise.
9811 2013-04-03 Jakub Jelinek <jakub@redhat.com>
9814 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9815 argument. If set, or it temporarily for parsing of the first
9816 argument into force_folding_builtin_constant_p.
9817 (c_parser_postfix_expression): Adjust callers.
9819 2013-03-21 Richard Biener <rguenther@suse.de>
9821 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9822 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
9824 2013-02-12 Marek Polacek <polacek@redhat.com>
9827 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9830 2013-01-24 Jakub Jelinek <jakub@redhat.com>
9833 * c-typeck.c (set_nonincremental_init_from_string): If
9834 constructor_max_index is NULL, treat it as if tree_int_cst_lt
9836 (process_init_element): Likewise.
9838 2012-12-20 Jakub Jelinek <jakub@redhat.com>
9841 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9842 argument, don't call default_function_array_conversion
9843 nor c_fully_fold here.
9844 (c_parser_asm_statement): Adjust callers.
9845 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9846 and outputs here, and call default_function_array_conversion
9847 on inputs that don't need to be addressable.
9849 2012-12-18 Jakub Jelinek <jakub@redhat.com>
9852 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9853 warning require that both c_common_unsigned_type as well as
9854 c_common_signed_type is the same for both mvl and mvr types.
9856 2012-11-16 Diego Novillo <dnovillo@google.com>
9858 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9860 * c-common.c: Use new vec API in vec.h.
9861 * c-common.h: Likewise.
9862 * c-gimplify.c: Likewise.
9863 * c-pragma.c: Likewise.
9864 * c-pretty-print.c: Likewise.
9865 * c-pretty-print.h: Likewise.
9866 * c-semantics.c: Likewise.
9867 * c-decl.c: Likewise.
9868 * c-parser.c: Likewise.
9869 * c-tree.h: Likewise.
9870 * c-typeck.c: Likewise.
9872 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9875 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9877 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9880 * c-decl.c (warn_if_shadowing): Do not warn if a variable
9881 shadows a function, unless the variable is a function or a
9882 pointer-to-function.
9884 2012-10-12 Jakub Jelinek <jakub@redhat.com>
9887 * c-parser.c (struct c_tree_loc_pair): Removed.
9888 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9889 add location_t * and tree * arguments, fill in array of 3
9890 sizeof_arg trees and corresponding locs.
9891 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9892 c_parser_expr_list callers.
9893 (c_parser_postfix_expression_after_primary): Likewise. Pass
9894 array of 3 sizeof_arg trees and locs (corresponding to first
9895 3 arguments) to sizeof_pointer_memaccess_warning.
9897 2012-10-09 Lawrence Crowl <crowl@google.com>
9899 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9900 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9903 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9906 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9909 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
9912 * c-typeck.c: Include c-common.h.
9913 (enum stv_conv): Moved to c-common.h.
9914 (scalar_to_vector): Moved to c-common.c.
9915 (build_binary_op): Adapt to scalar_to_vector's new prototype.
9916 * Make-lang.in: c-typeck.c depends on c-common.h.
9918 2012-10-04 Arnaud Charlet <charlet@adacore.com>
9920 * c-decl.c (c_write_global_declarations): Fix handling of
9923 2012-09-30 Sharad Singhai <singhai@google.com>
9925 * c-decl.c (c_write_global_declarations): Use a different method
9926 to determine if the dump has ben initialized.
9928 2012-09-14 Joseph Myers <joseph@codesourcery.com>
9931 * c-typeck.c (c_cast_expr): When casting to a type requiring
9932 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
9935 2012-09-14 Joseph Myers <joseph@codesourcery.com>
9938 * c-typeck.c (build_unary_op): Pass original argument of
9939 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
9940 any C_MAYBE_CONST_EXPR, if it has integer operands.
9941 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
9942 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
9943 to c_objc_common_truthvalue_conversion, then remove any
9944 C_MAYBE_CONST_EXPR, if they have integer operands. Use
9945 c_objc_common_truthvalue_conversion not
9946 c_common_truthvalue_conversion.
9947 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
9948 call note_integer_operands for arguments with integer operands
9949 that are not integer constants.
9951 2012-09-13 Jakub Jelinek <jakub@redhat.com>
9954 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
9955 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9957 2012-08-31 Jakub Jelinek <jakub@redhat.com>
9960 * c-convert.c (convert): Don't call fold_convert_loc if
9961 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9962 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
9963 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9965 2012-08-24 Jakub Jelinek <jakub@redhat.com>
9968 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9969 for nested and empty_ok arguments in the call to
9970 c_parser_declaration_or_fndef.
9972 2012-08-17 Jakub Jelinek <jakub@redhat.com>
9974 * c-tree.h (c_last_sizeof_arg): Declare.
9975 * c-parser.c (struct c_tree_loc_pair): New type.
9976 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
9978 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9979 (c_parser_postfix_expression_after_primary): Likewise. Call
9980 sizeof_pointer_memaccess_warning if needed.
9981 (sizeof_ptr_memacc_comptypes): New function.
9982 * c-typeck.c (c_last_sizeof_arg): New global variable.
9983 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9985 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
9987 * c-lang.h (lang_decl): Add variable_size GTY option.
9989 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9991 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9992 * Make-lang.in: Fix dependencies.
9994 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9996 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
9997 and add language Makefile hooks.
9998 * config-lang.in: New file.
9999 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
10000 add the required "normal" config-lang.in rules.
10001 * c-lang.h: Moved from gcc/ to here.
10002 * c-tree.h: Likewise.
10003 * c-objc-common.c: Likewise.
10004 * c-objc-common.h: Likewise.
10005 * c-typeck.c: Likewise.
10006 * c-convert.c: Likewise.
10007 * c-lang.c: Likewise.
10008 * c-aux-info.c: Likewise.
10009 * c-errors.c: Likewise.
10010 * gccspec.c: Likewise.
10011 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
10012 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
10014 Copyright (C) 2012-2024 Free Software Foundation, Inc.
10016 Copying and distribution of this file, with or without modification,
10017 are permitted in any medium without royalty provided the copyright
10018 notice and this notice are preserved.