1 2024-01-09 Tamar Christina <tamar.christina@arm.com>
4 * c-parser.cc (c_parser_for_statement): Skip the pragma is no cond.
6 2024-01-03 Kwok Cheung Yeung <kcy@codesourcery.com>
8 * c-parser.cc (c_parser_omp_clause_name): Move handling of indirect
9 clause to correspond to alphabetical order.
11 2023-12-30 Martin Uecker <uecker@tugraz.at>
13 * c-typeck.cc (tagged_types_tu_compatible_p): Revise.
15 2023-12-22 Martin Uecker <uecker@tugraz.at>
17 * c-typeck.cc (composite_type_internal): Adapted from
18 composite_type to support structs and unions.
19 (composite_type): New wrapper function.
20 (build_conditional_operator): Return composite type.
21 * c-decl.cc (finish_struct): Allow NULL for
22 enclosing_struct_parse_info.
24 2023-12-21 Martin Uecker <uecker@tugraz.at>
26 * c-decl.cc (c_struct_hasher): Hash stable for struct
28 (c_struct_hasher::hash, c_struct_hasher::equal): New
30 (finish_struct): Set TYPE_CANONICAL to first struct in
32 * c-objc-common.cc (c_get_alias_set): Let structs or
33 unions with variable size alias anything.
34 * c-tree.h (comptypes_equiv): New prototype.
35 * c-typeck.cc (comptypes_equiv): New function.
36 (comptypes_internal): Implement equivalence mode.
37 (tagged_types_tu_compatible): Implement equivalence mode.
39 2023-12-21 Martin Uecker <uecker@tugraz.at>
41 * c-tree.h (c_parser_enum_specifier): Add parameter.
42 * c-decl.cc (start_enum): Allow redefinition.
43 (finish_enum): Diagnose conflicts.
44 (build_enumerator): Set context.
45 (diagnose_mismatched_decls): Diagnose conflicting enumerators.
46 (push_decl): Preserve context for enumerators.
47 * c-typeck.cc (tagged_types_tu_compatible_p): Adapt.
48 * c-parser.cc (c_parser_enum_specifier): Remember when
49 seen is from an enum type which is not yet defined.
51 2023-12-21 Martin Uecker <uecker@tugraz.at>
53 * c-decl.cc (previous_tag): New function.
54 (parser_xref_tag): Find earlier definition.
55 (get_parm_info): Turn off warning for C23.
56 (start_struct): Allow redefinitons.
57 (finish_struct): Diagnose conflicts.
58 * c-tree.h (comptypes_same_p): Add prototype.
59 * c-typeck.cc (comptypes_same_p): New function.
60 (comptypes_internal): Activate comparison of tagged types.
61 (convert_for_assignment): Ignore qualifiers.
62 (digest_init): Add error.
63 (initialized_elementwise_p): Allow compatible types.
65 2023-12-20 Jakub Jelinek <jakub@redhat.com>
67 * c-parser.cc (c_parser_postfix_expression_after_primary): Grow
68 sizeof_arg and sizeof_arg_loc arrays to 6 elements. Call
69 warn_for_calloc if warn_calloc_transposed_args for functions with
70 alloc_size type attribute with 2 arguments.
71 (c_parser_expr_list): Use 6 instead of 3.
72 * c-typeck.cc (build_c_cast): Call warn_for_alloc_size for casts
73 of calls to functions with alloc_size type attribute.
74 (convert_for_assignment): Likewise.
76 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
78 * c-parser.cc (omp_construct_selectors): Delete.
79 (omp_device_selectors): Delete.
80 (omp_implementation_selectors): Delete.
81 (omp_user_selectors): Delete.
82 (c_parser_omp_context_selector): Adjust for new representations
83 and simplify dispatch logic. Uniformly warn instead of sometimes
84 error when an unknown selector is found. Adjust error messages
85 for extraneous/incorrect score.
86 (c_parser_omp_context_selector_specification): Likewise.
87 (c_finish_omp_declare_variant): Adjust for new representations.
89 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
91 * c-parser.cc (c_parser_omp_context_selector): Adjust for new
92 namelist property representation.
94 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
96 * c-parser.cc (c_parser_omp_context_selector): Use new constructors.
98 2023-12-18 Richard Biener <rguenther@suse.de>
101 * gimple-parser.cc (c_parser_gimple_postfix_expression):
102 Parse TARGET_MEM_REF extended operands for __MEM.
104 2023-12-13 Jason Merrill <jason@redhat.com>
106 * c-typeck.cc (convert_for_assignment): Adjust call to
107 warn_for_address_of_packed_member.
109 2023-12-13 Julian Brown <julian@codesourcery.com>
111 * c-parser.cc (c_parser_oacc_all_clauses): Add TARGET_P parameter. Use
112 to select region type for c_finish_omp_clauses call.
113 (c_parser_oacc_loop): Update calls to c_parser_oacc_all_clauses.
114 (c_parser_oacc_compute): Likewise.
115 (c_parser_omp_target_data, c_parser_omp_target_enter_data): Support
117 (c_parser_omp_target_exit_data): Support DETACH kind.
118 (check_clauses): Handle GOMP_MAP_POINTER and GOMP_MAP_ATTACH here.
119 * c-typeck.cc (handle_omp_array_sections_1,
120 handle_omp_array_sections, c_finish_omp_clauses): Use
121 c_omp_address_inspector class and OMP address tokenizer to analyze and
122 expand map clause expressions. Fix some diagnostics. Fix "is OpenACC"
123 condition for C_ORT_ACC_TARGET addition.
125 2023-12-13 Julian Brown <julian@codesourcery.com>
127 * c-typeck.cc (c_finish_omp_clauses): Add braces and reindent
128 OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza.
130 2023-12-11 Martin Uecker <uecker@tugraz.at>
133 * c-decl.cc (add_decl_expr): Revise.
134 (finish_struct): Create DECL_EXPR.
135 * c-parser.cc (c_parser_struct_or_union_specifier): Call
136 finish_struct with expression for VLA sizes.
137 * c-tree.h (finish_struct): Add argument.
139 2023-12-11 Tobias Burnus <tobias@codesourcery.com>
141 * c-parser.cc (c_parser_omp_requires): Handle acquires/release
142 in atomic_default_mem_order clause.
143 (c_parser_omp_atomic): Update.
145 2023-12-05 Richard Sandiford <richard.sandiford@arm.com>
147 * c-decl.cc (std_attribute_table): Add extra braces to work
148 around PR 16333 in older compilers.
150 2023-12-05 Richard Biener <rguenther@suse.de>
153 * c-typeck.cc (c_build_qualified_type): Preserve address-space
156 2023-12-02 Richard Sandiford <richard.sandiford@arm.com>
158 * c-tree.h (std_attribute_table): Declare.
159 * c-decl.cc (std_attribute_table): Change type to
160 scoped_attribute_specs, using...
161 (std_attributes): ...this as the underlying array.
162 (c_init_decl_processing): Remove call to register_scoped_attributes.
163 * c-objc-common.h (c_objc_attribute_table): New global.
164 (LANG_HOOKS_ATTRIBUTE_TABLE): Use it.
165 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
166 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
168 2023-12-01 Florian Weimer <fweimer@redhat.com>
171 * c-decl.cc (grokparms): Issue permerror for
172 OPT_Wdeclaration_missing_parameter_type instead of a pedwarn.
174 2023-12-01 Florian Weimer <fweimer@redhat.com>
177 * c-typeck.cc (build_conditional_expr): Upgrade most pointer
178 type mismatches to a permerror.
179 (convert_for_assignment): Use permerror_opt and
180 permerror_init for OPT_Wincompatible_pointer_types warnings.
182 2023-12-01 Florian Weimer <fweimer@redhat.com>
185 * c-typeck.cc (c_finish_return): Use permerrors
186 for OPT_Wreturn_mismatch diagnostics.
188 2023-12-01 Florian Weimer <fweimer@redhat.com>
190 * c-decl.cc (grokdeclarator): Do not skip -Wimplicit-int
191 warnings or errors in system headers.
193 2023-12-01 Florian Weimer <fweimer@redhat.com>
195 * c-decl.cc (warn_defaults_to): Remove.
196 (grok_declarator, start_function): Call permerror_opt
197 instead of warn_defaults_to.
198 (store_parm_decls_oldstyle): Call permerror_opt for
201 2023-12-01 Florian Weimer <fweimer@redhat.com>
205 * c-decl.cc (implicit_decl_permerror): Rename from
206 implicit_decl_warning. Call permerror_opt instead of
207 pedwarn and warning_at.
208 (implicitly_declare): Adjust callers.
210 2023-12-01 Florian Weimer <fweimer@redhat.com>
214 * c-typeck.cc (build_conditional_expr): Use permerror_opt for
215 pointer/integer type mismatches, based on -Wint-conversion.
216 (pedwarn_permerror_init, permerror_init): New function.
217 (pedwarn_init): Call pedwarn_permerror_init.
218 (convert_for_assignment): Use permerror_opt and
219 permerror_init for -Wint-conversion warnings.
221 2023-11-29 Alexandre Oliva <oliva@adacore.com>
223 * c-typeck.cc (convert_lvalue_to_rvalue): Decay hardbools.
224 * c-convert.cc (convert): Convert to hardbool through
226 * c-decl.cc (check_bitfield_type_and_width): Skip enumeral
227 truncation warnings for hardbool.
228 (finish_struct): Propagate hardbool attribute to bitfield
230 (digest_init): Convert to hardbool.
232 2023-11-28 Jason Merrill <jason@redhat.com>
236 * c-typeck.cc (array_to_pointer_conversion): Adjust -Wc++-compat
239 2023-11-28 Richard Biener <rguenther@suse.de>
242 * gimple-parser.cc (c_parser_parse_gimple_body): Also
243 set DECL_SEEN_IN_BIND_EXPR_Pfor locals.
245 2023-11-27 Alex Coplan <alex.coplan@arm.com>
246 Iain Sandoe <iain@sandoe.co.uk>
249 * c-lang.cc (c_family_register_lang_features): New.
250 * c-objc-common.cc (struct c_feature_info): New.
251 (c_register_features): New.
252 * c-objc-common.h (c_register_features): New.
254 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
256 * c-parser.cc (c_parser_omp_clause_num_threads,
257 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
258 c_parser_omp_clause_priority, c_parser_omp_clause_schedule,
259 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
260 c_parser_omp_clause_dist_schedule, c_parser_omp_depobj,
261 c_parser_omp_scan_loop_body, c_parser_omp_assumption_clauses):
262 Add OPT_Wopenmp to warning_at.
264 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
266 * c-parser.cc (c_parser_omp_depobj): Accept optionally an argument
267 to the destroy clause.
269 2023-11-23 Jakub Jelinek <jakub@redhat.com>
271 * c-parser.cc (c_parser_postfix_expression): Handle RID_BUILTIN_STDC.
272 * c-decl.cc (names_builtin_p): Likewise.
274 2023-11-14 Jakub Jelinek <jakub@redhat.com>
277 * c-typeck.cc (convert_arguments): Don't promote first argument
278 of BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
280 2023-11-10 Martin Uecker <uecker@tugraz.at>
282 * c-typeck.cc (struct comptypes_data): Add anon_field flag.
283 (comptypes, comptypes_check_unum_int,
284 comptypes_check_different_types): Remove old cache.
285 (tagged_tu_types_compatible_p): Rewrite.
287 2023-11-09 Florian Weimer <fweimer@redhat.com>
289 * c-typeck.cc (c_finish_return): Use pedwarn with
290 OPT_Wreturn_mismatch for missing/extra return expressions.
292 2023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
294 * c-decl.cc (c_decl_attributes): Add attribute for indirect
296 * c-lang.h (c_omp_declare_target_attr): Add indirect field.
297 * c-parser.cc (c_parser_omp_clause_name): Handle indirect clause.
298 (c_parser_omp_clause_indirect): New.
299 (c_parser_omp_all_clauses): Handle indirect clause.
300 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
301 (c_parser_omp_declare_target): Handle indirect clause. Emit error
302 message if device_type or indirect clauses used alone. Emit error
303 if indirect clause used with device_type that is not 'any'.
304 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
305 (c_parser_omp_begin): Handle indirect clause.
306 * c-typeck.cc (c_finish_omp_clauses): Handle indirect clause.
308 2023-11-07 Joseph Myers <joseph@codesourcery.com>
310 * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p
311 instead of c2x_auto_p. Refer to C23 instead of C2X in diagnostics
313 * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and
314 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
315 instead of C2X in comments.
316 * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x,
317 warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p
318 instead of c2x_auto_p and D_C23 instead of D_C2X. Refer to C23
319 instead of C2X in diagnostics and comments.
320 * c-tree.h: Refer to C23 instead of C2X in comments.
321 (struct c_declspecs): Rename c2x_auto_p to c23_auto_p.
322 * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and
323 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
324 instead of C2X in diagnostics and comments.
326 2023-11-06 Joseph Myers <joseph@codesourcery.com>
329 * c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
331 * c-typeck.cc (build_conditional_expr, convert_for_assignment):
332 Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.
334 2023-11-04 Jakub Jelinek <jakub@redhat.com>
336 * c-parser.h (c_maybe_parse_omp_decl): Declare.
337 * c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
338 (c_parser_std_attribute): Uncoment omp::decl handling.
339 (c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
340 don't expect any arguments, instead create clause or TREE_LIST for
342 (c_maybe_parse_omp_decl): New function.
343 (c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
344 first token isn't name or comma invoke c_parser_omp_var_list_parens.
345 * c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
346 use *node rather than non-existing *decl.
348 2023-11-04 Jakub Jelinek <jakub@redhat.com>
350 * c-tree.def: New file.
351 * c-tree.h (struct c_tree_token_vec): Forward declare.
352 (c_tree_size): Declare.
353 * c-lang.h (struct c_omp_declare_target_attr): Add attr_syntax member.
354 (struct c_omp_begin_assumes_data): New type.
355 (current_omp_begin_assumes): Change type from int to
356 vec<c_omp_begin_assumes_data, va_gc> *.
357 * c-lang.cc: Include c-family/c-pragma.h and c-parser.h.
358 * c-parser.h (struct c_tree_token_vec_struct): New type.
359 (C_TOKEN_VEC_TOKENS): New macro.
360 * c-parser.cc (struct c_parser): Add omp_attrs_forbidden_p and
361 in_omp_attribute_pragma members.
362 (c_parser_skip_until_found): Handle CPP_PRAGMA_EOL when
363 parser->in_omp_attribute_pragma.
364 (c_parser_skip_to_pragma_eol): Likewise.
365 (c_parser_translation_unit): Adjust for current_omp_begin_assumes
366 being a vector rather than counter.
367 (c_parser_declaration_or_fndef): Handle omp::directive and
368 omp::sequence attributes on attribute declaration and declare simd
369 or declare variant directives in those on function declarations.
370 (c_parser_check_balanced_raw_token_sequence): Forward declare.
371 (c_parser_omp_directive_args, c_parser_omp_sequence_args): New
373 (c_parser_std_attribute): Handle omp::directive and omp::sequence
375 (struct c_omp_attribute_data): New type.
376 (c_parser_handle_statement_omp_attributes,
377 c_parser_handle_directive_omp_attributes): New functions.
378 (c_parser_compound_statement_nostart): Handle omp::directive and
379 omp::sequence attributes on statements. Formatting fix.
380 (c_parser_all_labels): Handle omp::directive and omp::sequence
381 attributes on statements.
382 (c_parser_statement): Clear parser->omp_attrs_forbidden_p.
383 (c_parser_omp_variable_list): Handle parser->tokens
384 != &parser->tokens_buf[0] by saving/restoring it.
385 (c_parser_omp_structured_block): Set parser->omp_attrs_forbidden_p.
386 (c_parser_omp_section_scan): New function.
387 (c_parser_omp_structured_block_sequence, c_parser_omp_sections_scope):
389 (c_parser_omp_parallel): Set parser->omp_attrs_forbidden_p.
390 (c_parser_omp_task): Likewise.
391 (c_parser_omp_declare_simd): Handle function declaration after
393 (c_finish_omp_declare_simd): Don't assert all kinds are the same.
394 (c_parser_omp_declare_target): Also push attr_syntax flag.
395 (c_parser_omp_begin): Likewise. Adjust for current_omp_begin_assumes
397 (c_parser_omp_end): Adjust for current_omp_begin_assumes type
398 change. Diagnose mixing of attribute vs. pragma syntax on end assumes
399 or end declare target.
400 (c_parser_omp_declare_reduction): Handle parser->tokens
401 != &parser->tokens_buf[0] by saving/restoring it.
402 * c-decl.cc: Include c-parser.h.
403 (current_omp_begin_assumes): Change type from int to
404 vec<c_omp_begin_assumes_data, va_gc> *.
405 (struct c_tree_token_vec): New type. Add static assertions
406 for sizeof and offsetof.
407 (union lang_tree_node): Add c_token_vec member and adjust GTY
409 (c_tree_size): New function.
410 (c_decl_attributes): Diagnose invalid omp::directive attribute
412 * c-objc-common.h (LANG_HOOKS_TREE_SIZE): Redefine.
414 2023-11-02 Martin Uecker <uecker@tugraz.at>
417 * c-typeck.cc (convert_for_assignment): Add missing check.
419 2023-11-01 Martin Uecker <uecker@tugraz.at>
422 * c-typeck.cc (convert_for_assignment): Add warning.
424 2023-10-26 liuhongt <hongtao.liu@intel.com>
426 * c-typeck.cc (build_vec_cmp): Pass type of arg0 to
429 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
431 * c-parser.cc (c_parser_omp_clause_name): Return
432 'PRAGMA_OACC_CLAUSE_SELF' for "self".
433 (c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
434 (c_parser_oacc_all_clauses): Remove 'bool compute_p' formal
435 parameter, and instead locally determine whether we're called for
436 an OpenACC compute construct or OpenACC 'update' directive.
437 (c_parser_oacc_compute): Adjust.
439 2023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
441 * c-parser.cc (c_parser_oacc_compute_clause_self): New function.
442 (c_parser_oacc_all_clauses): Add new 'bool compute_p = false'
443 parameter, add parsing of self clause when compute_p is true.
444 (OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
445 (OACC_PARALLEL_CLAUSE_MASK): Likewise,
446 (OACC_SERIAL_CLAUSE_MASK): Likewise.
447 (c_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
448 set compute_p argument to true.
449 * c-typeck.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case.
451 2023-10-20 Florian Weimer <fweimer@redhat.com>
455 * c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
456 for pointer/integer mismatch warnings.
458 2023-10-20 Florian Weimer <fweimer@redhat.com>
462 * c-typeck.cc (build_conditional_expr): Use
463 OPT_Wincompatible_pointer_types for pointer mismatches.
464 Emit location information for the operand.
466 2023-10-19 Andrew Pinski <pinskia@gmail.com>
469 * c-typeck.cc (convert_argument): After erroring out
470 about an incomplete type return error_mark_node.
472 2023-10-19 Andrew Pinski <pinskia@gmail.com>
475 * c-typeck.cc (convert_for_assignment): Check for null pointer
476 before warning about an incompatible scalar storage order.
478 2023-10-18 Andrew Pinski <pinskia@gmail.com>
481 * c-decl.cc (diagnose_arglist_conflict): Test for
482 error mark before calling of c_type_promotes_to.
484 2023-10-18 Andrew Pinski <pinskia@gmail.com>
487 * c-typeck.cc (c_safe_arg_type_equiv_p): Return true for error
490 2023-10-17 Martin Uecker <uecker@tugraz.at>
493 * c-decl.cc (grokdeclarator): Add error.
495 2023-10-03 David Malcolm <dmalcolm@redhat.com>
497 * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
500 2023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
502 * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
504 2023-09-20 Jakub Jelinek <jakub@redhat.com>
506 * c-parser.cc (c_parser_postfix_expression_after_primary): Parse
507 __builtin_classify_type call with typename as argument.
509 2023-09-19 Richard Biener <rguenther@suse.de>
512 * gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
514 2023-09-19 Richard Biener <rguenther@suse.de>
517 * gimple-parser.cc (c_parser_gimple_binary_expression): Add
518 return type argument.
519 (c_parser_gimple_statement): Adjust.
520 (c_parser_gimple_paren_condition): Likewise.
521 (c_parser_gimple_binary_expression): Use passed in return type,
522 add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
523 __UNORDERED and __ORDERED.
525 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
527 * c-parser.cc (struct c_omp_loc_tree): New.
528 (c_check_omp_allocate_allocator_r): New; checking moved from ...
529 (c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
530 ICE with tree_to_shwi for invalid too-large value.
532 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
534 * c-parser.cc (c_parser_omp_construct): Move call to
535 c_parser_omp_allocate to ...
536 (c_parser_pragma): ... here.
537 (c_parser_omp_allocate): Avoid ICE is allocator could not be
538 parsed; set 'omp allocate' attribute for stack/automatic variables
539 and only reject static variables; add several additional
541 * c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
542 * c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
543 (c_mark_decl_jump_unsafe_in_current_scope): New.
544 (warn_about_goto, c_check_switch_jump_warnings): Add error for
547 2023-09-12 Martin Uecker <uecker@tugraz.at>
549 * c-typeck.cc (struct comptypes_data): Add structure.
550 (tagged_types_tu_compatible_p,
551 function_types_compatible_p, type_lists_compatible_p,
552 comptypes_internal): Add structure to interface, change
553 return type to bool, and adapt calls.
554 (comptarget_types): Change return type too bool.
555 (comptypes, comptypes_check_enum_int,
556 comptypes_check_different_types): Adapt calls.
558 2023-09-06 Jakub Jelinek <jakub@redhat.com>
561 * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
562 * c-typeck.cc (c_common_type): Emit sorry for common type between
563 _Complex integer and larger _BitInt and return the _Complex integer.
565 2023-09-06 Jakub Jelinek <jakub@redhat.com>
568 * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
569 * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
571 (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
573 (declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust
574 for added union in *specs. Handle RID_BITINT.
575 (finish_declspecs): Handle cts_bitint. Adjust for added union
577 * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
578 c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
580 (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
581 * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
582 Add cts_bitint enumerator.
583 (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
584 and add bitint_prec there as well.
585 * c-typeck.cc (c_common_type, comptypes_internal):
587 (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
589 (build_array_ref, build_unary_op, build_conditional_expr,
590 build_c_cast, convert_for_assignment, digest_init, build_binary_op):
592 * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
594 * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
596 2023-09-06 Jakub Jelinek <jakub@redhat.com>
598 * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
599 for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
602 2023-09-05 Tobias Burnus <tobias@codesourcery.com>
604 * c-parser.cc (c_parser_omp_clause_allocate): Handle
607 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
609 * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
610 (struct omp_for_parse_data): New.
611 (check_omp_intervening_code): New.
612 (add_structured_block_stmt): New.
613 (c_parser_compound_statement_nostart): Recognize intervening code,
614 nested loops, and other things that need special handling in
615 OpenMP loop constructs.
616 (c_parser_while_statement): Error on loop in intervening code.
617 (c_parser_do_statement): Likewise.
618 (c_parser_for_statement): Likewise.
619 (c_parser_postfix_expression_after_primary): Error on calls to
620 the OpenMP runtime in intervening code.
621 (c_parser_pragma): Error on OpenMP pragmas in intervening code.
622 (c_parser_omp_loop_nest): New.
623 (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
624 c_parser_omp_loop_nest to do the heavy lifting.
626 2023-08-24 Richard Sandiford <richard.sandiford@arm.com>
628 * c-parser.cc (c_parser_std_attribute): Conditionally allow
629 two colons to be used in place of ::.
630 (c_parser_std_attribute_list): New function, split out from...
631 (c_parser_std_attribute_specifier): ...here. Allow the attribute-list
632 to start with __extension__. When it does, also allow two colons
633 to be used in place of ::.
635 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
637 * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
640 2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
643 * c-typeck.cc (build_binary_op): Warning on comparing distinct
644 pointer types only when -Wcompare-distinct-pointer-types.
646 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
647 Thomas Schwinge <thomas@codesourcery.com>
649 * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
651 2023-08-11 Jakub Jelinek <jakub@redhat.com>
653 * c-parser.cc (c_parser_typeof_specifier): Handle
654 __typeof_unqual and __typeof_unqual__ as !is_std.
656 2023-08-11 Martin Uecker <uecker@tugraz.at>
659 * c-typeck.cc (build_c_cast): Add warning.
661 2023-08-05 Martin Uecker <uecker@tugraz.at>
663 * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
664 warnings branches that are known not be taken during parsing.
666 2023-08-04 Tamar Christina <tamar.christina@arm.com>
668 * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
669 c_parser_for_statement, c_parser_statement_after_labels,
670 c_parse_pragma_novector, c_parser_pragma): Wire through novector and
673 2023-08-02 Eric Feng <ef2648@columbia.edu>
676 * c-parser.cc: New functions on stashing values for the
679 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
681 * c-parser.cc (pragma_lex_discard_to_eol): New function.
682 (c_init_preprocess): New function.
684 2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
687 * c-decl.cc (start_decl): Handle
688 -Wmissing-variable-declarations.
690 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
692 * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
693 host_data construct to have an use_device clause.
695 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
698 * c-decl.cc (finish_struct): Issue warnings for new option.
700 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
702 * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
705 2023-06-29 Richard Biener <rguenther@suse.de>
708 * c-typeck.cc (convert_argument): Sink formal_prec compute
709 to where TYPE_PRECISION is valid to use.
711 2023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
713 * Make-lang.in: Pass correct stage cc1 when processing
714 profile data collected while building target libraries
716 2023-06-16 David Malcolm <dmalcolm@redhat.com>
719 * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
722 2023-06-12 Tobias Burnus <tobias@codesourcery.com>
724 * c-parser.cc (c_parser_omp_clause_map): Reword error message for
725 clearness especially with 'omp target (enter/exit) data.'
727 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
728 Tobias Burnus <tobias@codesourcery.com>
730 * c-parser.cc (c_parser_omp_clause_defaultmap,
731 c_parser_omp_clause_map): Parse 'present'.
732 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
733 (c_parser_omp_clause_from_to): New; parse to/from clauses with
734 optional present modifer.
735 (c_parser_omp_all_clauses): Update call.
736 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
737 c_parser_omp_target_exit_data): Handle new map enum values
738 for 'present' mapping.
740 2023-05-30 Tobias Burnus <tobias@codesourcery.com>
743 * c-parser.cc (c_parser_oacc_all_clauses,
744 c_parser_omp_all_clauses): Improve error wording.
746 2023-05-23 Martin Uecker <uecker@tugraz.at>
749 * c-decl.cc (add_decl_expr): New function.
750 (grokdeclarator): Add decl expr for size expression in
751 types pointed to by parameters declared as arrays.
753 2023-05-23 Martin Uecker <uecker@tugraz.at>
759 * c-decl.cc (start_decl): Make sure size expression are
760 evaluated only in correct context.
761 (grokdeclarator): Size expression in fields may need a bind
762 expression, make sure DECL_EXPR is always created.
763 (grokfield, declspecs_add_type): Pass along size expressions.
764 (finish_struct): Remove unneeded DECL_EXPR.
765 (start_function): Evaluate size expressions for nested functions.
766 * c-parser.cc (c_parser_struct_declarations,
767 c_parser_struct_or_union_specifier): Pass along size expressions.
768 (c_parser_declaration_or_fndef): Evaluate size expression.
769 (c_parser_objc_at_property_declaration,
770 c_parser_objc_class_instance_variables): Adapt.
771 * c-tree.h (grokfield): Adapt declaration.
773 2023-05-19 Martin Uecker <uecker@tugraz.at>
775 * c-decl.cc (set_type_context): Remove.
776 (pop_scope, diagnose_mismatched_decls, pushdecl):
778 * c-typeck.cc (comptypes_internal): Remove dead code.
779 (same_translation_unit_p): Remove.
780 (tagged_types_tu_compatible_p): Some fixes.
782 2023-05-19 Joseph Myers <joseph@codesourcery.com>
784 * c-decl.cc (diagnose_mismatched_decls): Do not handle
785 thread-local declarations as tentative definitions for C2x.
786 (finish_decl): Do not allow thread-local definition with
787 incomplete type for C2x.
789 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
791 * c-convert.cc (c_convert): Ditto.
792 * c-decl.cc (merge_decls): Ditto.
793 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
794 (c_parser_omp_declare_reduction): Ditto.
795 * c-typeck.cc (build_component_ref): Ditto.
796 (convert_argument): Ditto.
797 (pointer_diff): Ditto.
798 (build_unary_op): Ditto.
799 (build_c_cast): Ditto.
800 (build_modify_expr): Ditto.
801 (store_init_value): Ditto.
802 (constexpr_init_fits_real_type): Ditto.
803 (check_constexpr_init): Ditto.
804 (c_finish_return): Ditto.
805 (handle_omp_array_sections_1): Ditto.
806 (c_finish_omp_clauses): Ditto.
807 * gimple-parser.cc (c_finish_gimple_return): Ditto.
809 2023-05-16 Joseph Myers <joseph@codesourcery.com>
811 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
814 2023-05-15 Joseph Myers <joseph@codesourcery.com>
816 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
819 2023-04-30 Andrew Pinski <apinski@marvell.com>
821 * c-typeck.cc (process_init_element): Print out array type
822 for excessive elements.
824 2023-04-30 Andrew Pinski <apinski@marvell.com>
827 * c-typeck.cc (process_init_element): Move the check
828 for string cst until after the error message.
830 2023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
832 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
834 2023-04-27 Jakub Jelinek <jakub@redhat.com>
837 * c-parser.cc (c_parser_initializer): Move diagnostics about
838 initialization of variable sized object with non-empty initializer
839 after c_parser_expr_no_commas call and ret.set_error (); after it.
841 2023-04-27 Jakub Jelinek <jakub@redhat.com>
845 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
846 reject empty initializer as invalid.
848 2023-04-26 Richard Biener <rguenther@suse.de>
850 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
853 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
855 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
856 zero exec statements before/after 'omp scan'.
858 2023-04-20 Jakub Jelinek <jakub@redhat.com>
861 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
862 warning on acc_on_device declaration.
864 2023-03-28 David Malcolm <dmalcolm@redhat.com>
867 * c-typeck.cc (parser_build_binary_op): Update for new param of
868 check_for_xor_used_as_pow.
870 2023-03-10 Jakub Jelinek <jakub@redhat.com>
873 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
876 2023-02-28 Jakub Jelinek <jakub@redhat.com>
879 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
880 and rename to c_strict_flex_array_level_of.
881 (is_flexible_array_member_p): Adjust caller.
883 2023-02-18 Martin Uecker <uecker@tugraz.at>
886 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
887 (diagnose_mismatched_decl): Dito.
888 (warn_about_goto): Dito:
889 (c_check_switch_jump_warnings): Dito.
891 (finish_struct): Dito.
892 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
893 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
894 * c-objc-common.cc (c_var_mod_p): New function.
895 (c_var_unspec_p): Remove.
896 * c-objc-common.h: Set lang hook.
897 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
898 (c_parser_typeof_specifier): Dito.
899 (c_parser_has_attribute_expression): Dito.
900 (c_parser_generic_selection): Dito.
901 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
902 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
904 2023-02-16 Patrick Palka <ppalka@redhat.com>
906 * c-parser.h: Mechanically drop static from static inline
907 functions via s/^static inline/inline/g.
909 2023-02-10 Joseph Myers <joseph@codesourcery.com>
911 * c-convert.cc (c_convert): Allow conversion of a null pointer
912 constant to nullptr_t.
913 * c-typeck.cc (null_pointer_constant_p): Remove static.
914 (convert_for_assignment): Allow conversion of a null pointer
915 constant to nullptr_t.
916 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
917 * c-tree.h (null_pointer_constant_p): Declare.
919 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
921 * c-parser.cc (c_parser_omp_allocate): Parse align
922 clause and check for restrictions.
924 2023-02-08 Joseph Myers <joseph@codesourcery.com>
926 * c-typeck.cc (check_constexpr_init): Remove argument
927 null_pointer_constant. Only check pointer initializers for being
929 (digest_init): Update calls to check_constexpr_init.
931 2023-02-02 Joseph Myers <joseph@codesourcery.com>
933 * c-typeck.cc (build_binary_op): Allow comparisons between
934 pointers and nullptr_t values that are not null pointer constants.
936 2023-02-02 Joseph Myers <joseph@codesourcery.com>
938 * c-typeck.cc: Include "realmpfr.h".
939 (constexpr_init_fits_real_type): Do not allow signaling NaN
940 conversions to different types with the same mode. Handle
941 conversions from binary to decimal types.
942 (check_constexpr_init): Do not disallow real initializers for
943 complex types. Do not disallow binary initializers for decimal
946 2023-01-31 Marek Polacek <polacek@redhat.com>
950 * c-objc-common.cc (instantiation_dependent_expression_p): New.
952 2023-01-27 Joseph Myers <joseph@codesourcery.com>
954 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
955 around auto initializer.
957 2023-01-16 Jakub Jelinek <jakub@redhat.com>
960 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
961 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
964 2023-01-14 Jakub Jelinek <jakub@redhat.com>
967 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
970 2023-01-13 Qing Zhao <qing.zhao@oracle.com>
972 * c-decl.cc (strict_flex_array_level_of): ... here.
974 2023-01-11 Jakub Jelinek <jakub@redhat.com>
977 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
978 markers for K&R function parameter declarations of nested functions.
980 2023-01-09 Joseph Myers <joseph@codesourcery.com>
982 * c-decl.cc (build_compound_literal): Call record_inline_static.
984 2023-01-06 Joseph Myers <joseph@codesourcery.com>
986 * c-parser.cc (c_parser_postfix_expression): Handle integer
987 generic arguments to functions passed to __builtin_tgmath as
988 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
989 Do not handle integer arguments to some narrowing functions as
992 2022-12-19 Jakub Jelinek <jakub@redhat.com>
995 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
996 compound literals with function type.
998 2022-12-07 Joseph Myers <joseph@codesourcery.com>
1000 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
1001 auto, constexpr and a type used together.
1003 2022-12-06 Qing Zhao <qing.zhao@oracle.com>
1005 * c-decl.cc (is_flexible_array_member_p): Call new function
1006 strict_flex_array_level_of.
1008 2022-11-24 Florian Weimer <fweimer@redhat.com>
1011 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
1014 2022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1016 * c-decl.cc (start_function): Set the result decl source
1017 location to the location of the typespec.
1019 2022-11-17 David Malcolm <dmalcolm@redhat.com>
1022 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
1023 to cpp_create_reader, rather than ident_hash, so that the new
1024 reader gets its own hash table.
1026 2022-11-15 David Malcolm <dmalcolm@redhat.com>
1029 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
1030 (class ana::c_translation_unit): New.
1031 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
1033 2022-11-12 Joseph Myers <joseph@codesourcery.com>
1035 * c-decl.cc (start_underspecified_init)
1036 (finish_underspecified_init): Handle name == NULL_TREE for
1038 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
1039 (shadow_tag_warned): Check for constexpr.
1040 (start_decl): Add parameter do_push.
1041 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
1042 (grokdeclarator): Handle constexpr.
1043 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
1044 (declspecs_add_scspec): Handle constexpr.
1045 * c-parser.cc (c_token_starts_compound_literal)
1046 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
1047 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
1048 (c_parser_compound_literal_scspecs)
1049 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
1050 Update calls to start_init.
1051 (c_parser_declaration_or_fndef, c_parser_initializer)
1052 (c_parser_initval): Pass true for new argument of
1053 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
1054 constexpr compound literals.
1055 (c_parser_static_assert_declaration_no_semi)
1056 (c_parser_enum_specifier, c_parser_struct_declaration)
1057 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
1058 Call convert_lvalue_to_rvalue on expressions required to be
1059 integer constant expressions.
1060 (c_parser_omp_declare_reduction): Update call to start_init.
1061 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
1062 (C_DECL_DECLARED_CONSTEXPR): New macros.
1063 (struct c_declspecs): Add constexpr_p.
1064 (start_decl, convert_lvalue_to_rvalue, start_init): Update
1066 * c-typeck.cc (require_constant_value, require_constant_elements):
1068 (require_constexpr_value, maybe_get_constexpr_init)
1069 (constexpr_init_fits_real_type, check_constexpr_init): New.
1070 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
1071 maybe_get_constexpr_init.
1072 (store_init_value): Update call to digest_init.
1073 (digest_init): Add parameters int_const_expr, arith_const_expr and
1074 require_constexpr. Check constexpr initializers.
1075 (constructor_top_level): Remove.
1076 (struct initializer_stack): Remove top_level. Add
1077 require_constexpr_value.
1078 (start_init): Remove parameter top_level. Add parameters
1079 init_require_constant and init_require_constexpr. Save
1080 require_constexpr_value on stack.
1081 (pop_init_level): Use a null pointer constant for zero initializer
1082 of pointer initialized with {}.
1083 (output_init_element): Update call to digest_init. Avoid passing
1084 null pointer constants of pointer type through digest_init a
1085 second time when initializing a constexpr object.
1087 2022-11-03 Joseph Myers <joseph@codesourcery.com>
1089 * c-decl.cc (in_underspecified_init, start_underspecified_init)
1090 (finish_underspecified_init): New.
1091 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
1092 Give errors inside initializers of underspecified declarations.
1093 (grokdeclarator): Handle (erroneous) case of C2X auto on a
1095 (declspecs_add_type): Handle c2x_auto_p case.
1096 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
1098 (finish_declspecs): Handle c2x_auto_p.
1099 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
1100 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
1101 (struct c_declspecs): Add c2x_auto_p.
1102 (start_underspecified_init, finish_underspecified_init): New
1104 * c-typeck.cc (build_external_ref): Give error for underspecified
1105 declaration referenced in its initializer.
1107 2022-10-28 Joseph Myers <joseph@codesourcery.com>
1109 * c-decl.cc (grokdeclarator): Pass
1110 arg_info->no_named_args_stdarg_p to build_function_type.
1111 (grokparms): Check arg_info->no_named_args_stdarg_p before
1112 converting () to (void).
1113 (build_arg_info): Initialize no_named_args_stdarg_p.
1114 (get_parm_info): Set no_named_args_stdarg_p.
1115 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
1116 build_function_type.
1117 (store_parm_decls): Count (...) functions as prototyped.
1118 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
1119 parenthesis to start parameter list.
1120 (c_parser_parms_list_declarator): Always allow '...' with no
1121 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
1122 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
1123 * c-typeck.cc (composite_type): Handle
1124 TYPE_NO_NAMED_ARGS_STDARG_P.
1125 (function_types_compatible_p): Compare
1126 TYPE_NO_NAMED_ARGS_STDARG_P.
1128 2022-10-28 Jakub Jelinek <jakub@redhat.com>
1130 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
1131 comma before the first clause.
1132 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
1133 c_parser_omp_flush, c_parser_omp_scan_loop_body,
1134 c_parser_omp_ordered, c_finish_omp_declare_variant,
1135 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
1136 c_parser_omp_requires, c_parser_omp_error,
1137 c_parser_omp_assumption_clauses): Likewise.
1139 2022-10-28 Joseph Myers <joseph@codesourcery.com>
1142 * c-convert.cc (c_convert): Handle enums with underlying boolean
1144 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
1145 enums with enum type specifier, but give errors for storage class
1146 specifiers, qualifiers or alignment specifiers in non-definition
1147 declarations of such enums.
1148 (grokdeclarator): Give error for non-definition use of type
1149 specifier with an enum type specifier.
1150 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
1151 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
1152 (xref_tag): Update call to parser_xref_tag.
1153 (start_enum): Add argument fixed_underlying_type. Complete enum
1154 type with a fixed underlying type given in the definition. Give
1155 error for defining without a fixed underlying type in the
1156 definition if one was given in a prior declaration. Do not mark
1157 enums with fixed underlying type as packed for -fshort-enums.
1158 Store the enum type in the_enum.
1159 (finish_enum): Do not adjust types of values or check their range
1160 for an enum with a fixed underlying type. Set underlying type of
1162 (build_enumerator): Check enumeration constants for enum with
1163 fixed underlying type against that type and convert to that type.
1164 Increment in the underlying integer type, with handling for bool.
1165 (c_simulate_enum_decl): Update call to start_enum.
1166 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
1167 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
1168 rather than recomputing an underlying type based on size.
1169 * c-parser.cc (c_parser_declspecs)
1170 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
1171 Set has_enum_type_specifier for type specifiers.
1172 (c_parser_enum_specifier): Handle enum type specifiers.
1173 (c_parser_struct_or_union_specifier): Update call to
1175 (c_parser_omp_atomic): Check for boolean increment or decrement
1176 using C_BOOLEAN_TYPE_P.
1177 * c-tree.h (C_BOOLEAN_TYPE_P): New.
1178 (struct c_typespec): Add has_enum_type_specifier.
1179 (struct c_declspecs): Add enum_type_specifier_ref_p.
1180 (struct c_enum_contents): Add enum_type.
1181 (start_enum, parser_xref_tag): Update prototypes.
1182 * c-typeck.cc (composite_type): Allow for enumerated types
1183 compatible with bool.
1184 (common_type, comptypes_internal, perform_integral_promotions):
1185 Use ENUM_UNDERLYING_TYPE.
1186 (parser_build_binary_op, build_unary_op, convert_for_assignment)
1187 (c_finish_return, c_start_switch, build_binary_op): Check for
1188 boolean types using C_BOOLEAN_TYPE_P.
1190 2022-10-24 Jakub Jelinek <jakub@redhat.com>
1193 * c-typeck.cc (build_binary_op): Pass operands before excess precision
1194 promotions to scalar_to_vector call.
1196 2022-10-24 Arsen Arsenović <arsen@aarsen.me>
1198 * c-decl.cc (finish_function): Ignore hosted when deciding
1199 whether to implicitly return zero, but check noreturn.
1200 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
1201 requirements to just MAIN_NAME_P when hosted, or `int main'
1204 2022-10-20 Richard Biener <rguenther@suse.de>
1208 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
1209 the parsed IL and zap the body on error.
1211 2022-10-18 Joseph Myers <joseph@codesourcery.com>
1214 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
1215 with previous declaration visible.
1217 2022-10-18 Joseph Myers <joseph@codesourcery.com>
1220 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
1221 convert all to the type of the enumeration. pedwarn if no integer
1222 type fits all enumerators and default to
1223 widest_integer_literal_type_node in that case. Otherwise pedwarn
1224 for type wider than intmax_t.
1225 (build_enumerator): pedwarn for enumerators outside the range of
1226 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
1227 enumerators outside the range of int. On overflow, attempt to
1228 find a wider type that can hold the value of the next enumerator.
1229 Do not convert value to type determined with
1230 c_common_type_for_size.
1232 2022-10-14 Jakub Jelinek <jakub@redhat.com>
1234 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
1237 2022-10-14 Joseph Myers <joseph@codesourcery.com>
1239 * c-decl.cc (build_compound_literal): Add parameter scspecs.
1240 Handle storage class specifiers.
1241 * c-parser.cc (c_token_starts_compound_literal)
1242 (c_parser_compound_literal_scspecs): New.
1243 (c_parser_postfix_expression_after_paren_type): Add parameter
1244 scspecs. Call pedwarn_c11 for use of storage class specifiers.
1245 Update call to build_compound_literal.
1246 (c_parser_cast_expression, c_parser_sizeof_expression)
1247 (c_parser_alignof_expression): Handle storage class specifiers for
1248 compound literals. Update calls to
1249 c_parser_postfix_expression_after_paren_type.
1250 (c_parser_postfix_expression): Update syntax comment.
1251 * c-tree.h (build_compound_literal): Update prototype.
1252 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
1253 register compound literal.
1255 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
1257 * c-decl.cc (flexible_array_member_type_p): New function.
1258 (one_element_array_type_p): Likewise.
1259 (zero_length_array_type_p): Likewise.
1260 (add_flexible_array_elts_to_size): Call new utility
1261 routine flexible_array_member_type_p.
1262 (is_flexible_array_member_p): New function.
1263 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
1265 2022-10-06 Joseph Myers <joseph@codesourcery.com>
1267 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
1269 (c_keyword_starts_typename, c_token_starts_declspecs)
1270 (c_parser_declspecs, c_parser_objc_selector): Handle
1272 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
1273 Distinguish typeof for C2x from __typeof__ for all standard
1274 versions and typeof before C2x.
1275 * c-typeck.cc (build_function_call_vec): Use unqualified version
1276 of non-void return type.
1277 (build_unary_op): Use unqualified type for increment and
1280 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1282 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
1283 call for holds clause on assume construct.
1285 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1288 * c-parser.cc (handle_assume_attribute): New function.
1289 (c_parser_declaration_or_fndef): Handle assume attribute.
1290 (c_parser_attribute_arguments): Add assume_attr argument,
1291 if true, parse first argument as conditional expression.
1292 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
1293 c_parser_attribute_arguments callers.
1294 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
1297 2022-10-04 Jakub Jelinek <jakub@redhat.com>
1299 * c-lang.h (struct c_omp_declare_target_attr): New type.
1300 (current_omp_declare_target_attribute): Change type from
1301 int to vec<c_omp_declare_target_attr, va_gc> *.
1302 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
1303 If last pushed directive was begin declare target, use different
1304 wording and simplify format strings for easier translations.
1305 (c_parser_omp_clause_device_type): Uncomment
1306 check_no_duplicate_clause call.
1307 (c_parser_omp_declare_target): Adjust for the
1308 current_omp_declare_target_attribute type change, push { -1 }.
1309 Use error_at rather than warning_at for declare target with
1310 only device_type clauses.
1311 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
1312 (c_parser_omp_begin): Add begin declare target support.
1313 (c_parser_omp_end): Adjust for the
1314 current_omp_declare_target_attribute type change, adjust
1315 diagnostics wording and simplify format strings for easier
1317 * c-decl.cc (current_omp_declare_target_attribute): Change type from
1318 int to vec<c_omp_declare_target_attr, va_gc> *.
1319 (c_decl_attributes): Adjust for the
1320 current_omp_declare_target_attribute type change. If device_type
1321 was present on begin declare target, add "omp declare target host"
1322 and/or "omp declare target nohost" attributes.
1324 2022-09-29 Joseph Myers <joseph@codesourcery.com>
1326 * c-decl.cc (handle_std_noreturn_attribute): New function.
1327 (std_attribute_table): Add _Noreturn and noreturn.
1329 2022-09-27 Jakub Jelinek <jakub@redhat.com>
1331 * c-lang.h (current_omp_begin_assumes): Declare.
1332 * c-parser.cc: Include bitmap.h.
1333 (c_parser_omp_end_declare_target): Rename to ...
1334 (c_parser_omp_end): ... this. Handle also end assumes.
1335 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
1336 c_parser_omp_assumes, c_parser_omp_assume): New functions.
1337 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
1338 without corresponding #pragma omp end assumes.
1339 (c_parser_pragma): Use %s in may only be used at file scope
1340 diagnostics to decrease number of translatable messages. Handle
1341 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
1342 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
1343 for it rather than c_parser_omp_end_declare_target.
1344 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
1345 * c-decl.cc (current_omp_begin_assumes): Define.
1347 2022-09-24 Jakub Jelinek <jakub@redhat.com>
1350 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
1351 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
1352 t2 have different types.
1354 2022-09-22 David Malcolm <dmalcolm@redhat.com>
1357 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
1358 (c_parser_cast_expression): Likewise.
1359 (c_parser_alignof_expression): Likewise.
1360 (c_parser_postfix_expression_after_paren_type): Likewise.
1361 (c_parser_postfix_expression_after_primary): Likewise.
1362 (c_parser_expression): Likewise.
1363 (c_parser_omp_variable_list): Likewise.
1364 (c_parser_transaction_expression): Likewise.
1365 * c-tree.h (c_expr::set_error): Likewise.
1366 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
1367 (parser_build_unary_op): Likewise.
1368 (parser_build_binary_op): Likewise.
1369 (digest_init): Likewise.
1370 (pop_init_level): Likewise.
1371 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
1373 2022-09-19 Marek Polacek <polacek@redhat.com>
1376 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
1379 2022-09-15 Richard Biener <rguenther@suse.de>
1381 * c-decl.cc (build_void_list_node): Remove.
1383 2022-09-14 Julian Brown <julian@codesourcery.com>
1385 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
1388 2022-09-07 Joseph Myers <joseph@codesourcery.com>
1390 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
1391 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
1392 for C2x spellings of keywords.
1393 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
1395 2022-09-06 Jakub Jelinek <jakub@redhat.com>
1397 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
1398 in omp_cur_iteration - 1 has integer_type_node type.
1400 2022-09-03 Jakub Jelinek <jakub@redhat.com>
1402 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
1403 (c_parser_omp_clause_depend_sink): Renamed to ...
1404 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
1405 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
1406 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
1407 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
1408 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
1409 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
1410 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
1411 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
1412 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
1413 (c_parser_omp_clause_doacross): New function.
1414 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
1415 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
1416 OMP_CLAUSE_DEPEND_SOURCE.
1417 (c_parser_omp_for_loop): Don't diagnose here linear clause together
1418 with ordered with argument.
1419 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
1421 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1422 (c_parser_omp_ordered): Handle also doacross and adjust for it
1424 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
1425 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
1427 2022-09-02 David Malcolm <dmalcolm@redhat.com>
1430 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
1431 (c_parser_expr_no_commas): Likewise.
1432 (c_parser_conditional_expression): Likewise.
1433 (c_parser_binary_expression): Clear m_decimal when popping the
1435 (c_parser_unary_expression): Clear ret.m_decimal.
1436 (c_parser_has_attribute_expression): Likewise for result.
1437 (c_parser_predefined_identifier): Likewise for expr.
1438 (c_parser_postfix_expression): Likewise for expr.
1439 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
1441 * c-tree.h (c_expr::m_decimal): New bitfield.
1442 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
1443 (parser_build_binary_op): Call check_for_xor_used_as_pow.
1445 2022-09-01 Joseph Myers <joseph@codesourcery.com>
1447 * c-decl.cc (grokparms): Handle () in a function declaration the
1448 same as (void) for C2X.
1450 2022-08-31 Joseph Myers <joseph@codesourcery.com>
1452 * c-parser.cc (c_parser_label): Pass attributes to do_case.
1453 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
1456 2022-08-26 Jakub Jelinek <jakub@redhat.com>
1458 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
1460 2022-08-25 Marek Polacek <polacek@redhat.com>
1462 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
1463 Give a better diagnostic when converting to nullptr_t.
1464 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
1466 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
1467 (c_parser_postfix_expression): Handle RID_NULLPTR.
1468 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
1470 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
1471 (build_conditional_expr): Handle the case when the second/third operand
1472 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
1473 (convert_for_assignment): Handle converting an expression of type
1474 nullptr_t to pointer/bool.
1475 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
1476 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
1478 2022-08-25 Joseph Myers <joseph@codesourcery.com>
1480 * c-decl.cc (start_decl): Do not diagnose initialization of
1481 variable-sized objects here.
1482 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
1484 (c_parser_initializer): Diagnose initialization of variable-sized
1485 objects other than with braced initializer.
1486 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
1487 braces and update diagnostic text. Diagnose initialization of
1488 variable-sized objects with nonempty braces.
1489 * c-typeck.cc (digest_init): Update diagnostic for initialization
1490 of variable-sized objects.
1491 (really_start_incremental_init, set_designator)
1492 (process_init_element): Update comments.
1493 (pop_init_level): Allow scalar empty initializers.
1495 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
1496 Chung-Lin Tang <cltang@codesourcery.com>
1499 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
1500 instead of removed langhook.
1501 * c-typeck.cc (c_finish_omp_clauses): Likewise.
1503 2022-08-11 Marek Polacek <polacek@redhat.com>
1505 PR middle-end/102633
1506 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
1507 Call suppress_warning.
1508 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
1509 (c_parser_omp_declare_reduction): Pass omp_priv down to
1510 c_parser_initializer.
1512 2022-08-08 Tom Honermann <tom@honermann.net>
1514 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
1515 of CPP_UTF8STRING when char8_t support is enabled.
1516 * c-typeck.cc (digest_init): Allow initialization of an array
1517 of character type by a string literal with type array of
1520 2022-08-01 David Malcolm <dmalcolm@redhat.com>
1522 * c-typeck.cc (build_c_cast): Quote names of address spaces in
1524 (convert_for_assignment): Add a note to address space mismatch
1525 diagnostics, specifying the expected and actual types.
1527 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
1529 PR preprocessor/97498
1530 * c-parser.cc (c_parser_pragma): Set input_location to the
1531 location of the pragma, rather than the start of the line.
1533 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
1534 Chung-Lin Tang <cltang@codesourcery.com>
1535 Thomas Schwinge <thomas@codesourcery.com>
1537 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
1538 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
1539 OMP_REQUIRES_TARGET_USED.
1540 (c_parser_omp_requires): Remove sorry.
1542 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
1544 * c-parser.cc (c_parser_omp_target_enter_data,
1545 c_parser_omp_target_exit_data): Accept tofrom
1546 map-type modifier but use 'to' / 'from' internally.
1548 2022-06-16 David Malcolm <dmalcolm@redhat.com>
1550 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
1551 group the warning with any note.
1552 (warn_about_goto): Likewise to group error or warning with note.
1553 Bail out if the warning wasn't emitted, to avoid emitting orphan
1555 (lookup_label_for_goto): Add auto_diagnostic_group to
1556 group the error with the note.
1557 (check_earlier_gotos): Likewise.
1558 (c_check_switch_jump_warnings): Likewise for any error/warning.
1559 Conditionalize emission of the notes.
1560 (diagnose_uninitialized_cst_member): Likewise for warning,
1561 conditionalizing emission of the note.
1562 (grokdeclarator): Add auto_diagnostic_group to group the "array
1563 type has incomplete element type" error with any note.
1564 (parser_xref_tag): Add auto_diagnostic_group to group warnings
1565 with their notes. Conditionalize emission of notes.
1566 (start_struct): Add auto_diagnostic_group to group the
1567 "redefinition of" errors with any note.
1568 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
1569 (check_for_loop_decls): Likewise for pre-C99 error.
1571 2022-06-07 Jakub Jelinek <jakub@redhat.com>
1573 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
1574 style linear clause modifiers. Set
1575 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
1576 old style modifiers are used.
1577 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
1578 with val modifier on simd or for if the old style modifiers are
1581 2022-06-02 David Malcolm <dmalcolm@redhat.com>
1583 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
1584 (c_get_sarif_source_language): New.
1585 * c-tree.h (c_get_sarif_source_language): New decl.
1587 2022-05-31 Jason Merrill <jason@redhat.com>
1589 * Make-lang.in (c.tags): Look at *.cc.
1591 2022-05-31 Jakub Jelinek <jakub@redhat.com>
1593 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
1596 2022-05-28 Jakub Jelinek <jakub@redhat.com>
1598 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
1599 seen first, use "%<to%>" or "%<enter%>" depending on
1600 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
1601 "%<to%> or %<enter%>" wording.
1603 2022-05-27 Jakub Jelinek <jakub@redhat.com>
1605 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
1606 (c_parser_omp_all_clauses): For to clause on declare target, use
1607 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
1608 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
1609 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
1610 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
1611 OMP_CLAUSE_TO_DECLARE.
1612 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
1613 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
1614 name in diagnostics instead of
1615 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
1617 2022-05-25 Jakub Jelinek <jakub@redhat.com>
1620 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
1621 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
1622 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
1623 diagnostic and fixit hint if DATUM has pointer type.
1624 * c-parser.cc (c_parser_postfix_expression,
1625 c_parser_omp_variable_list): Adjust build_component_ref callers.
1626 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
1629 2022-05-24 Jakub Jelinek <jakub@redhat.com>
1632 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
1634 2022-05-18 Marek Polacek <polacek@redhat.com>
1637 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
1639 * c-tree.h (comptypes_check_enum_int): Declare.
1640 * c-typeck.cc (comptypes): No longer static.
1642 2022-05-17 Marek Polacek <polacek@redhat.com>
1644 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
1647 2022-05-17 Jakub Jelinek <jakub@redhat.com>
1649 * c-parser.cc (c_parser_omp_clause_depend): Parse
1650 inoutset depend-kind.
1651 (c_parser_omp_depobj): Likewise.
1653 2022-05-16 Martin Liska <mliska@suse.cz>
1655 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
1657 2022-05-12 Jakub Jelinek <jakub@redhat.com>
1659 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
1661 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
1662 in postfix expressions.
1663 (c_parser_omp_variable_list): Handle omp_all_memory in depend
1665 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
1666 keyword in depend clause as null_pointer_node, diagnose invalid
1669 2022-05-09 Martin Liska <mliska@suse.cz>
1671 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
1673 (c_parser_binary_expression): Likewise.
1675 2022-05-07 Marek Polacek <polacek@redhat.com>
1679 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1681 2022-04-08 Jakub Jelinek <jakub@redhat.com>
1684 * c-typeck.cc (c_build_va_arg): Reject function types.
1686 2022-03-22 Marek Polacek <polacek@redhat.com>
1690 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1691 (start_init): Set it.
1692 (finish_init): Restore constructor_designated.
1693 (push_init_level): Set constructor_designated to the value of
1694 constructor_designated in the upper constructor_stack.
1696 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1699 * c-typeck.cc (handle_omp_array_sections_1)
1700 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1701 instead of 'c_omp_map_clause_name'.
1703 2022-03-09 Joseph Myers <joseph@codesourcery.com>
1705 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1706 differently from earlier standards for unprototyped function type
1709 2022-03-09 Jakub Jelinek <jakub@redhat.com>
1712 * c-fold.cc (c_fully_fold_internal): Don't emit
1713 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1714 * c-typeck.cc (build_binary_op): Likewise.
1716 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1718 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1721 2022-02-23 Richard Biener <rguenther@suse.de>
1723 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1724 SSA names without definition.
1725 (c_parser_gimple_declaration): Handle pointer typed SSA names.
1727 2022-02-17 Jakub Jelinek <jakub@redhat.com>
1730 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1731 convert_lvalue_to_rvalue and build_indirect_ref instead of
1732 build_simple_mem_ref.
1734 2022-02-11 Richard Biener <rguenther@suse.de>
1736 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1739 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1741 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1743 (c_parser_omp_variable_list): Handle array sections.
1744 (c_parser_omp_clause_has_device_addr): Added.
1745 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1747 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1749 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1750 (c_finish_omp_clauses): Handle array sections.
1752 2022-02-09 Jakub Jelinek <jakub@redhat.com>
1755 * c-parser.cc (c_parser_postfix_expression)
1756 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1757 instead of build1_loc to build PAREN_EXPR.
1758 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1759 * c-fold.cc (c_fully_fold_internal): Likewise.
1761 2022-01-17 Martin Liska <mliska@suse.cz>
1763 * Make-lang.in: Rename .c names to .cc.
1764 * c-convert.cc: Likewise.
1765 * c-decl.cc (struct lang_identifier): Likewise.
1766 (pop_scope): Likewise.
1767 (finish_decl): Likewise.
1768 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1769 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1770 * c-parser.h (GCC_C_PARSER_H): Likewise.
1771 * c-tree.h (c_keyword_starts_typename): Likewise.
1772 (finish_declspecs): Likewise.
1773 (c_get_alias_set): Likewise.
1774 (enum c_oracle_request): Likewise.
1775 (tag_exists_p): Likewise.
1776 (set_c_expr_source_range): Likewise.
1777 * c-typeck.cc (c_common_type): Likewise.
1778 (c_finish_omp_clauses): Likewise.
1779 * config-lang.in: Likewise.
1781 2022-01-17 Martin Liska <mliska@suse.cz>
1783 * c-aux-info.c: Moved to...
1784 * c-aux-info.cc: ...here.
1785 * c-convert.c: Moved to...
1786 * c-convert.cc: ...here.
1787 * c-decl.c: Moved to...
1788 * c-decl.cc: ...here.
1789 * c-errors.c: Moved to...
1790 * c-errors.cc: ...here.
1791 * c-fold.c: Moved to...
1792 * c-fold.cc: ...here.
1793 * c-lang.c: Moved to...
1794 * c-lang.cc: ...here.
1795 * c-objc-common.c: Moved to...
1796 * c-objc-common.cc: ...here.
1797 * c-parser.c: Moved to...
1798 * c-parser.cc: ...here.
1799 * c-typeck.c: Moved to...
1800 * c-typeck.cc: ...here.
1801 * gccspec.c: Moved to...
1802 * gccspec.cc: ...here.
1803 * gimple-parser.c: Moved to...
1804 * gimple-parser.cc: ...here.
1806 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
1808 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1810 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1813 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1814 outer node for ARRAY_REFs.
1816 2022-01-01 Jakub Jelinek <jakub@redhat.com>
1819 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1820 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1822 2021-12-17 Marek Polacek <polacek@redhat.com>
1825 * c-decl.c (c_warn_unused_attributes): Don't warn for
1826 attribute_ignored_p.
1827 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1828 arguments when the attribute is ignored.
1830 2021-12-14 Jakub Jelinek <jakub@redhat.com>
1833 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1834 consume the pragma and silently skip to the pragma eol.
1836 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
1838 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1839 * c-parser.c: Likewise.
1841 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1844 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1845 to resort_data.new_value.
1847 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1849 * c-parser.c (struct omp_dim): New struct type for use inside
1850 c_parser_omp_variable_list.
1851 (c_parser_omp_variable_list): Allow multiple levels of array and
1852 component accesses in array section base-pointer expression.
1853 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1854 c_parser_omp_var_list_parens.
1855 (c_parser_omp_clause_from): Likewise.
1856 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1857 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1859 (c_finish_omp_clauses): Extend allowed ranged of expressions
1860 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1862 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1865 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1866 call to c_parser_omp_variable_list to 'true'.
1867 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1868 array base handling.
1869 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1871 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
1873 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1874 orphan loop" checking.
1876 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
1877 Thomas Schwinge <thomas@codesourcery.com>
1879 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1880 OpenACC gang reductions.
1882 2021-11-30 Richard Biener <rguenther@suse.de>
1884 * gimple-parser.c (c_parser_gimple_postfix_expression):
1885 avoid unreachable code after break.
1887 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
1890 * Make-lang.in: Use ETAGS variable in TAGS target.
1892 2021-11-29 Richard Biener <rguenther@suse.de>
1894 * c-typeck.c (c_tree_equal): Remove unreachable return.
1895 * c-parser.c (get_matching_symbol): Likewise.
1897 2021-11-23 Jakub Jelinek <jakub@redhat.com>
1899 * c-typeck.c (c_clone_omp_udr): Don't initialize
1900 id.transform_lang_insert_block.
1902 2021-11-19 Martin Sebor <msebor@redhat.com>
1906 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
1907 code resulting from macro expansion.
1909 2021-11-19 Martin Liska <mliska@suse.cz>
1912 2021-11-19 Martin Liska <mliska@suse.cz>
1914 * c-parser.c (add_debug_begin_stmt): Use option directly.
1916 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1918 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1919 * c-parser.c (c_parser_postfix_expression): Likewise.
1921 2021-11-18 Martin Liska <mliska@suse.cz>
1923 * c-parser.c (add_debug_begin_stmt): Use option directly.
1925 2021-11-17 Martin Sebor <msebor@redhat.com>
1928 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1929 bounds before deciding if they're constant.
1931 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1933 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1934 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1936 2021-11-11 Jakub Jelinek <jakub@redhat.com>
1938 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1939 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1940 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1941 OMP_CLAUSE_NUM_TEAMS_EXPR.
1942 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1943 combined target teams even lower-bound expression.
1945 2021-11-11 Richard Biener <rguenther@suse.de>
1947 * gimple-parser.c: Shuffle bitmap.h include.
1949 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1952 * c-convert.c (c_convert): New function, based on convert.
1953 (convert): Make into wrapper of c_convert.
1954 (convert_init): New function.
1955 * c-typeck.c (enum impl_conv): Add ic_init_const.
1956 (convert_for_assignment): Handle ic_init_const like ic_init. Add
1957 new argument to convert_and_check call.
1958 (digest_init): Pass ic_init_const to convert_for_assignment for
1959 initializers required to be constant.
1961 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
1963 * c-tree.h (c_simulate_record_decl): Declare.
1964 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
1965 * c-decl.c (c_simulate_record_decl): New function.
1967 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
1970 * Make-lang.in: Add dummy c.install-dvi target.
1972 2021-10-15 Richard Biener <rguenther@suse.de>
1976 (c_parser_gimple_postfix_expression_after_primary): Check
1977 for a pointer do be dereferenced by ->.
1979 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1981 * c-parser.c (c_finish_omp_declare_variant): Change call from
1982 c_omp_check_context_selector to omp_check_context_selector. Change
1983 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
1985 2021-10-09 Jakub Jelinek <jakub@redhat.com>
1987 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
1988 (c_parser_omp_scan_loop_body): Use it.
1989 (c_parser_omp_sections_scope): Likewise.
1991 2021-10-07 Richard Biener <rguenther@suse.de>
1993 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1995 2021-10-05 Richard Biener <rguenther@suse.de>
1998 * gimple-parser.c (c_parser_gimple_postfix_expression):
1999 Accept more address _Literals.
2001 2021-10-04 Marek Polacek <polacek@redhat.com>
2004 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
2006 2021-10-01 Martin Sebor <msebor@redhat.com>
2009 * c-typeck.c (maybe_warn_for_null_address): New function.
2010 (build_binary_op): Call it.
2012 2021-10-01 Jakub Jelinek <jakub@redhat.com>
2013 Richard Biener <rguenther@suse.de>
2016 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2017 for division even for SANITIZE_SI_OVERFLOW.
2019 2021-10-01 Jakub Jelinek <jakub@redhat.com>
2021 * c-parser.c (c_parser_omp_clause_order): Set
2022 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
2024 2021-09-28 Andrew Pinski <apinski@marvell.com>
2027 * c-parser.c (c_parser_statement_after_labels): Pass
2028 the c_expr instead of the tree to c_finish_goto_ptr.
2029 * c-typeck.c (c_finish_goto_ptr): Change the second
2030 argument type to c_expr.
2031 * c-tree.h (c_finish_goto_ptr): Likewise.
2032 Error out if the expression was not of a pointer type.
2034 2021-09-22 Jakub Jelinek <jakub@redhat.com>
2036 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
2039 2021-09-18 Jakub Jelinek <jakub@redhat.com>
2041 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
2042 and reproducible modifiers.
2043 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
2045 2021-09-18 Jakub Jelinek <jakub@redhat.com>
2047 * c-parser.c (c_parser_omp_clause_default): Handle private and
2048 firstprivate arguments, adjust diagnostics on unknown argument.
2050 2021-09-17 Jakub Jelinek <jakub@redhat.com>
2052 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
2055 2021-09-10 Jakub Jelinek <jakub@redhat.com>
2057 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
2058 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
2059 don't call build_conditional_expr, instead build a COND_EXPR directly.
2060 (c_parser_binary_expression): Avoid calling parser_build_binary_op
2061 if omp_atomic_lhs even in more cases for >, < or ==.
2062 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
2063 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
2064 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
2065 * c-typeck.c (build_binary_op): For flag_openmp only handle
2068 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
2070 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
2073 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
2075 * c-decl.c (enum deprecated_states): Add unavailable state.
2076 (merge_decls): Copy unavailability.
2077 (quals_from_declspecs): Handle unavailable case.
2078 (start_decl): Amend the logic handling suppression of nested
2079 deprecation states to include unavailability.
2080 (smallest_type_quals_location): Amend comment.
2081 (grokdeclarator): Handle the unavailable deprecation state.
2082 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
2083 * c-tree.h (struct c_declspecs): Add unavailable_p.
2084 * c-typeck.c (build_component_ref): Handle unavailability.
2085 (build_external_ref): Likewise.
2087 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
2088 Joseph Myers <joseph@codesourcery.com>
2091 * c-decl.c (duplicate_decls): On significant mismatches, mark the
2092 types of both (non-function) decls as error_mark_node, so that the
2093 middle-end can see the code is malformed.
2094 (free_attr_access_data): Don't process if the type has been set to
2097 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
2099 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
2100 and 'ancestor' in 'target device' clauses.
2102 2021-08-23 Jakub Jelinek <jakub@redhat.com>
2104 * c-parser.c (c_parser_omp_clause_num_tasks,
2105 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
2107 2021-08-22 Martin Uecker <muecker@gwdg.de>
2110 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
2111 for pointers to arrays with qualifiers.
2112 (build_conditional_expr): For C23 don't lose qualifiers for pointers
2113 to arrays when the other pointer is a void pointer. Update warnings.
2114 (convert_for_assignment): Update warnings for C2X when converting from
2115 void* with qualifiers to a pointer to array with the same qualifiers.
2117 2021-08-20 Jakub Jelinek <jakub@redhat.com>
2119 * c-parser.c (c_parser_omp_error): New function.
2120 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
2122 2021-08-20 Jakub Jelinek <jakub@redhat.com>
2124 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
2125 comma at the end of list.
2126 (c_parser_omp_requires): Likewise.
2128 2021-08-19 Jakub Jelinek <jakub@redhat.com>
2130 * c-parser.c (c_parser_omp_requires): Don't call
2131 c_parser_peek_2nd_token and optionally consume token if current
2132 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
2134 2021-08-18 Jakub Jelinek <jakub@redhat.com>
2136 * c-parser.c (c_parser_omp_nothing): New function.
2137 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
2139 2021-08-18 Jakub Jelinek <jakub@redhat.com>
2141 * c-parser.c (c_parser_statement_after_labels): Add restart label
2142 near the start of the function. If c_parser_pragma returns false,
2144 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
2145 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
2146 return what c_parser_omp_declare returned. Return true instead of
2147 false after emitting errors that the directive is not allowed in
2148 pragma_stmt context.
2149 (c_parser_omp_ordered): Return true instead of
2150 false after emitting errors that the directive is not allowed in
2151 pragma_stmt context.
2152 (c_parser_omp_target_update): Likewise.
2153 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
2154 Change return type from tree to bool, return false if the
2155 directive should be ignored in pragma_stmt contexts.
2156 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
2157 return their result directly.
2158 (c_parser_omp_cancellation_point): Change return type from void to
2159 bool, return false if the directive should be ignored in pragma_stmt
2161 (c_parser_omp_declare): Likewise.
2163 2021-08-17 Jakub Jelinek <jakub@redhat.com>
2165 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
2166 (c_parser_omp_scope): New function.
2167 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
2169 2021-08-12 Jakub Jelinek <jakub@redhat.com>
2171 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
2172 (c_parser_omp_clause_filter): New function.
2173 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
2174 (OMP_MASKED_CLAUSE_MASK): Define.
2175 (c_parser_omp_masked): New function.
2176 (c_parser_omp_parallel): Handle parallel masked.
2177 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
2178 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
2180 2021-08-12 Martin Uecker <muecker@gwdg.de>
2184 * c-typeck.c (c_expr_sizeof_type): Evaluate
2185 size expressions for structs of variable size.
2187 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
2189 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
2190 'primary' as alias for 'master'.
2192 2021-08-10 Martin Uecker <muecker@gwdg.de>
2195 * c-typeck.c (c_expr_sizeof_expr): Evaluate
2196 size expressions for structs of variable size.
2198 2021-08-06 Tamar Christina <tamar.christina@arm.com>
2200 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
2201 * c-tree.h (c_simulate_enum_decl): Likewise.
2203 2021-08-06 Martin Sebor <msebor@redhat.com>
2205 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
2206 vec arguments to by-reference.
2207 (c_finish_omp_declare_simd): Same.
2208 (c_parser_compound_statement_nostart): Same.
2209 (c_parser_for_statement): Same.
2210 (c_parser_objc_methodprotolist): Same.
2211 (c_parser_oacc_routine): Same.
2212 (c_parser_omp_for_loop): Same.
2213 (c_parser_omp_declare_simd): Same.
2215 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
2216 Joseph Myers <joseph@codesourcery.com>
2217 Cesar Philippidis <cesar@codesourcery.com>
2219 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
2220 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
2221 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
2222 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
2224 2021-07-20 Martin Sebor <msebor@redhat.com>
2226 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
2228 * c-typeck.c (c_build_function_call_vec): Same.
2230 2021-07-15 Martin Sebor <msebor@redhat.com>
2234 * c-decl.c (get_parm_array_spec): Strip nops.
2236 2021-07-06 Martin Sebor <msebor@redhat.com>
2238 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
2240 2021-07-02 Jakub Jelinek <jakub@redhat.com>
2243 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
2244 appears before a CPP_NAME.
2246 2021-06-25 Martin Sebor <msebor@redhat.com>
2248 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
2249 warning_suppressed_p, suppress_warning, and copy_no_warning.
2250 (diagnose_mismatched_decls): Same.
2251 (duplicate_decls): Same.
2252 (grokdeclarator): Same.
2253 (finish_function): Same.
2254 (c_write_global_declarations_1): Same.
2255 * c-fold.c (c_fully_fold_internal): Same.
2256 * c-parser.c (c_parser_expr_no_commas): Same.
2257 (c_parser_postfix_expression): Same.
2258 * c-typeck.c (array_to_pointer_conversion): Same.
2259 (function_to_pointer_conversion): Same.
2260 (default_function_array_conversion): Same.
2261 (convert_lvalue_to_rvalue): Same.
2262 (default_conversion): Same.
2263 (build_indirect_ref): Same.
2264 (build_function_call_vec): Same.
2265 (build_atomic_assign): Same.
2266 (build_unary_op): Same.
2267 (c_finish_return): Same.
2268 (emit_side_effect_warnings): Same.
2269 (c_finish_stmt_expr): Same.
2270 (c_omp_clause_copy_ctor): Same.
2272 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2275 * c-parser.c (c_parser_has_attribute_expression): Set source range for
2278 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2281 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
2284 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2286 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
2287 C_ORT_OMP for clauses on target construct.
2288 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
2289 (c_parser_omp_target): For non-combined target add
2290 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
2291 C_ORT_OMP_TARGET to c_finish_omp_clauses.
2292 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
2293 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
2294 never present on C_ORT_*DECLARE_SIMD.
2295 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
2296 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
2297 corresponding map clauses.
2299 2021-06-21 Jakub Jelinek <jakub@redhat.com>
2301 PR inline-asm/100785
2302 * c-typeck.c (c_mark_addressable): Diagnose trying to make
2303 bit-fields addressable.
2305 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
2307 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
2310 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
2313 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
2314 var in the error case.
2316 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
2319 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
2320 spot built-in functions.
2322 2021-06-06 Jakub Jelinek <jakub@redhat.com>
2325 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
2326 even when target is combined with other constructs.
2328 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
2331 * c-decl.c (finish_struct): Fix thinko in previous change.
2332 * c-typeck.c (convert_for_assignment): Do not warn on pointer
2333 assignment and initialization for storage order purposes if the
2334 RHS is a call to a DECL_IS_MALLOC function.
2336 2021-06-04 Martin Sebor <msebor@redhat.com>
2339 * c-objc-common.c (print_type): Handle erroneous types.
2341 2021-06-03 Jakub Jelinek <jakub@redhat.com>
2344 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
2345 after depend only cases.
2347 2021-05-31 Richard Biener <rguenther@suse.de>
2350 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
2351 * c-parser.c (c_parser_postfix_expression): Likewise.
2353 2021-05-28 Richard Biener <rguenther@suse.de>
2356 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
2357 invalid if conditions.
2359 2021-05-28 Jakub Jelinek <jakub@redhat.com>
2362 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
2363 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2364 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
2365 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
2366 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
2367 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
2368 if present in map_head, map_field_head or map_firstprivate_head
2371 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
2373 * c-parser.c (c_parser_omp_clause_affinity): New.
2374 (c_parser_omp_clause_name, c_parser_omp_variable_list,
2375 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
2376 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
2377 c_finish_omp_clauses): Likewise.
2379 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
2382 * c-decl.c (finish_struct): Warn for a union containing an aggregate
2383 field with a differing scalar storage order.
2385 2021-05-21 Jakub Jelinek <jakub@redhat.com>
2388 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
2389 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
2390 if a decl is mentioned both in map clause and in such firstprivate
2391 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
2393 2021-05-19 Jakub Jelinek <jakub@redhat.com>
2396 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
2397 master when combined with taskloop.
2398 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
2399 parallel master when not combined with taskloop.
2401 2021-05-18 Richard Biener <rguenther@suse.de>
2404 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
2405 Diagnose calls to non-functions.
2406 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
2408 2021-05-17 Richard Biener <rguenther@suse.de>
2411 * gimple-parser.c (c_parser_gimple_label): Avoid building
2412 a GIMPLE label with NULL label decl.
2414 2021-05-13 Martin Sebor <msebor@redhat.com>
2417 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
2419 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
2421 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
2424 2021-05-10 Martin Liska <mliska@suse.cz>
2426 * c-aux-info.c (affix_data_type): Use startswith
2427 function instead of strncmp.
2428 * c-typeck.c (build_function_call_vec): Likewise.
2429 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
2431 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
2433 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
2434 on the address of a pointer field in a record with reverse SSO.
2436 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
2438 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
2439 for || and && reductions.
2441 2021-04-29 Joseph Myers <joseph@codesourcery.com>
2443 * c-typeck.c (function_types_compatible_p): For C2X, treat
2444 unprototyped function as compatible with non-variadic prototyped
2445 function even if some argument types are changed by the default
2446 argument promotions.
2448 2021-04-15 Martin Sebor <msebor@redhat.com>
2452 * c-decl.c (pushdecl): Always propagate type attribute.
2454 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
2457 * c-typeck.c (c_common_type): Do not drop attributes that
2458 affect type identity.
2460 2021-04-10 Jakub Jelinek <jakub@redhat.com>
2463 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
2466 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2469 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
2472 2021-03-19 Jakub Jelinek <jakub@redhat.com>
2475 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
2476 with modifycode NOP_EXPR produces and mark the _Atomic var as read
2478 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
2479 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
2480 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
2482 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
2485 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
2486 ensure that the varpool node is marked as offloadable.
2488 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
2491 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
2493 2021-02-24 Martin Sebor <msebor@redhat.com>
2496 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
2498 2021-02-18 Jakub Jelinek <jakub@redhat.com>
2501 * c-typeck.c (c_finish_return): Don't wrap retval into
2502 EXCESS_PRECISION_EXPR in functions that return void.
2504 2021-02-11 Marek Polacek <polacek@redhat.com>
2506 * c-parser.c (c_parser_if_statement): Use vec_free.
2508 2021-02-04 Martin Sebor <msebor@redhat.com>
2511 * c-decl.c (locate_old_decl): Add type to diagnostic output.
2512 (diagnose_mismatched_decls): Same.
2513 (start_function): Introduce temporaries for better readability.
2514 * c-typeck.c (comptypes_internal): Only consider complete enum
2515 types in comparisons with integers.
2517 2021-02-01 Martin Sebor <msebor@redhat.com>
2520 * c-decl.c (free_attr_access_data): New function.
2521 (c_parse_final_cleanups): Call free_attr_access_data.
2523 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2525 * c-parser.c (c_parser_omp_clause_detach): New.
2526 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
2527 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2528 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
2529 clause. Prevent use of detach with mergeable and overriding the
2530 data sharing mode of the event handle.
2532 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2534 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
2535 unqualified element type and then call c_build_qualified_type on the
2538 2021-01-07 Richard Biener <rguenther@suse.de>
2540 * gimple-parser.c (c_parser_gimple_compound_statement): Only
2541 reallocate loop array if it is too small.
2543 2020-12-16 Martin Uecker <muecker@gwdg.de>
2546 * c-typeck.c (build_modify_expr): Drop qualifiers.
2548 2020-12-16 Martin Uecker <muecker@gwdg.de>
2551 * c-parser.c (c_parser_expression): Look into
2552 nop expression when marking expressions as read.
2554 2020-12-14 Martin Liska <mliska@suse.cz>
2557 * c-typeck.c (pointer_diff): Do not emit a top-level
2559 (build_binary_op): Likewise.
2561 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2563 * c-parser.c (c_parser_omp_allocate): New.
2564 (c_parser_omp_construct): Call it.
2566 2020-12-09 Richard Biener <rguenther@suse.de>
2569 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
2572 2020-12-07 Martin Uecker <muecker@gwdg.de>
2575 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
2576 that drops qualifiers to the end of the function.
2578 2020-11-26 Martin Uecker <muecker@gwdg.de>
2582 * c-parser.c (c_parser_declaration_or_fndef): Remove
2583 redundant code to drop qualifiers of _Atomic types for __auto_type.
2584 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
2585 types for __typeof__.
2587 2020-11-24 Jakub Jelinek <jakub@redhat.com>
2590 * c-parser.c (c_parser_binary_expression): For omp atomic binary
2591 expressions, use make_node instead of build2 to avoid checking build2
2594 2020-11-23 Joseph Myers <joseph@codesourcery.com>
2597 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
2598 for comparisons of complete and incomplete pointers.
2600 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2602 * c-aux-info.c (gen_type): Support opaque types.
2604 2020-11-20 Martin Sebor <msebor@redhat.com>
2607 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2609 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2612 * Make-lang.in (c.serial): Change from goal to a variable.
2613 (.PHONY): Drop c.serial.
2615 2020-11-20 Martin Uecker <muecker@gwdg.de>
2617 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2619 2020-11-19 Jakub Jelinek <jakub@redhat.com>
2622 * c-decl.c (get_parm_array_spec): Bail out of nelts is
2625 2020-11-18 Jakub Jelinek <jakub@redhat.com>
2627 * Make-lang.in (c.serial): New goal.
2628 (.PHONY): Add c.serial c.prev.
2629 (cc1$(exeext)): Call LINK_PROGRESS.
2631 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
2633 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
2635 * c-typeck.c (build_asm_expr): Remove an assert checking output
2636 absence for asm goto.
2638 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2640 * c-typeck.c (c_finish_omp_clauses): Don't clear
2641 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2643 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2646 * c-parser.c (c_parser_objc_class_definition): Pass the
2647 location of the class name to the interface declaration.
2649 2020-11-10 Strager Neds <strager.nds@gmail.com>
2651 * c-decl.c (merge_decls): Use new overload of
2652 set_decl_section_name.
2654 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2656 * c-parser.c (c_parser_omp_target_data): Add use of
2657 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
2658 handled map clause kind.
2659 (c_parser_omp_target_enter_data): Likewise.
2660 (c_parser_omp_target_exit_data): Likewise.
2661 (c_parser_omp_target): Likewise.
2662 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
2663 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
2664 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
2665 same struct field access to co-exist on OpenMP construct.
2667 2020-11-07 Martin Uecker <muecker@gwdg.de>
2669 * c-parser.c (c_parser_label): Implement mixing of labels and code.
2670 (c_parser_all_labels): Likewise.
2672 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2674 * c-parser.c (c_parser_objc_at_property_declaration):
2675 Improve parsing fidelity. Associate better location info
2676 with @property attributes. Clean up the interface to
2677 objc_add_property_declaration ().
2679 2020-11-06 Nathan Sidwell <nathan@acm.org>
2681 * c-decl.c (diagnose_mismatched_decls): Rename
2682 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2683 (warn_if_shadowing, implicitly_declare, names_builtin_p)
2684 (collect_source_refs): Likewise.
2685 * c-typeck.c (inform_declaration, inform_for_arg)
2686 (convert_for_assignment): Likewise.
2688 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
2690 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2692 (c_parser_omp_construct): Update call.
2694 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2697 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2698 find underlying decl to clear in the aligned_head bitmap.
2700 2020-11-04 Joseph Myers <joseph@codesourcery.com>
2702 * c-decl.c (handle_nodiscard_attribute): New.
2703 (std_attribute_table): Add nodiscard.
2704 * c-parser.c (c_parser_std_attribute): Expect argument to
2705 nodiscard attribute to be a string. Do not special-case ignoring
2707 * c-typeck.c (maybe_warn_nodiscard): New.
2708 (build_compound_expr, emit_side_effect_warnings): Call
2709 maybe_warn_nodiscard.
2710 (c_process_expr_stmt, c_finish_stmt_expr): Also call
2711 emit_side_effect_warnings if warn_unused_result.
2713 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
2715 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2717 (finish_init): Likewise.
2718 (pop_init_level): Likewise.
2720 2020-10-28 Joseph Myers <joseph@codesourcery.com>
2722 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2723 error_at for omitted parameter name.
2725 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2727 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2728 (c_parser_omp_clause_allocate): New function.
2729 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2730 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2731 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2732 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2733 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2734 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2735 PRAGMA_OMP_CLAUSE_ALLOCATE.
2736 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2738 2020-10-27 Joseph Myers <joseph@codesourcery.com>
2740 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2741 standard attributes.
2743 2020-10-23 Marek Polacek <polacek@redhat.com>
2746 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2747 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2748 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2749 * c-tree.h (char_type_p): Declare.
2750 * c-typeck.c (char_type_p): No longer static.
2752 2020-10-23 Martin Sebor <msebor@redhat.com>
2755 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2757 2020-09-19 Martin Sebor <msebor@redhat.com>
2760 * c-decl.c (lookup_last_decl): Define new function.
2761 (c_decl_attributes): Call it.
2762 (start_decl): Add argument and use it.
2763 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2764 (get_parm_array_spec): Define new function.
2765 (push_parm_decl): Call get_parm_array_spec.
2766 (start_function): Call warn_parm_array_mismatch. Build attribute
2767 access and add it to current function.
2768 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2769 in forms of array parameters.
2770 * c-tree.h (start_decl): Add argument.
2772 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2774 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2776 (in_statement): New.
2777 (start_function): Adjust for above change.
2778 (c_push_function_context, c_pop_function_context): Likewise.
2779 * c-lang.h (struct language_function): Likewise.
2780 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2781 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2783 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2784 (c_parser_switch_statement): Adjust break/switch context handling
2785 and calls to renamed functions.
2786 (c_parser_while_statement): Adjust break/switch context handling and
2788 (c_parser_do_statement): Ditto, with DO_STMT respectively.
2789 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2790 (c_parser_omp_for_loop): Adjust break/switch context handling.
2791 * c-tree.h (c_break_label, c_cont_label): Delete.
2792 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2793 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2794 (in_statement, switch_statement_break_seen_p): Declare.
2795 (c_start_case, c_finish_case): Renamed to...
2796 (c_start_switch, c_finish_switch).
2797 (c_finish_bc_stmt): Adjust arguments.
2798 * c-typeck.c (build_function_call_vec): Don't try to print
2799 statements with %qE format.
2800 (struct c_switch): Rename switch_expr field to switch_stmt.
2801 Add break_stmt_seen_p field.
2802 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
2803 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
2804 (do_case): Update for changes to struct c_switch.
2805 (c_finish_case): Rename to c_finish_switch. Update for changes to
2806 struct c_switch and change of representation from SWITCH_EXPR to
2808 (c_finish_loop): Delete.
2809 (c_finish_bc_stmt): Update to reflect changes to break/continue
2810 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
2811 of a GOTO_EXPR except for objc foreach loops.
2813 2020-09-01 Jakub Jelinek <jakub@redhat.com>
2816 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2819 2020-08-28 Martin Sebor <msebor@redhat.com>
2822 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2825 2020-08-27 Martin Liska <mliska@suse.cz>
2827 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2828 growth function to true.
2830 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
2833 * c-typeck.c (handle_omp_array_sections_1): Talk about
2834 array function parameter in the error message.
2836 2020-08-18 Jakub Jelinek <jakub@redhat.com>
2839 * c-parser.c (c_parser_generic_selection): Change match_found from bool
2840 to int, holding index of the match. Call mark_exp_read on the selector
2841 expression and on expressions other than the selected one.
2843 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
2846 * c-typeck.c (process_init_element): Split test for whether to
2847 recurse into a record, union or array into...
2848 (initialize_elementwise_p): ...this new function. Don't recurse
2849 into a vector type if the initialization value is also a vector.
2851 2020-07-31 Richard Biener <rguenther@suse.de>
2854 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2855 Define to c_common_finalize_early_debug.
2857 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2859 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2860 (c_parser_omp_critical): Permit hint(0) clause without named critical.
2861 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2863 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
2866 * c-decl.c (finish_decl): Call target hook
2867 lower_local_decl_alignment to lower local decl alignment.
2869 2020-07-09 Julian Brown <julian@codesourcery.com>
2870 Thomas Schwinge <thomas@codesourcery.com>
2873 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2874 for standalone attach/detach clauses.
2876 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
2878 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2879 set, warn for conversion between pointers that point to incompatible
2880 scalar storage orders.
2882 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
2884 * c-parser.c (c_parser_statement_after_labels): Pass correct
2885 parameters to c_parser_do_statement.
2887 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2889 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
2891 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
2892 premature c_fully_fold. Defer explicit c_fully_fold calls to after
2894 * c-tree.h (c_in_omp_for): Declare.
2895 * c-typeck.c (c_in_omp_for): Define.
2896 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
2897 (digest_init): Likewise.
2898 (build_binary_op): Likewise.
2900 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2902 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
2903 from kind by comma rather than colon.
2905 2020-06-05 Mark Wielaard <mark@klomp.org>
2907 * c-decl.c (implicit_decl_warning): When warned and olddecl is
2908 an undeclared builtin, then add a fixit header hint, if found.
2909 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
2910 warning_at about implicit builtin declaration type mismatch.
2912 2020-06-03 Mark Wielaard <mark@klomp.org>
2914 * c-parser.c (struct c_parser): Add seen_string_literal
2916 (c_parser_consume_token): Reset seen_string_literal.
2917 (c_parser_error_richloc): Add name_hint if seen_string_literal
2918 and next token is a CPP_NAME and we have a missing header
2919 suggestion for the name.
2920 (c_parser_string_literal): Set seen_string_literal.
2922 2020-06-03 Mark Wielaard <mark@klomp.org>
2924 * c-parser.c (c_parser_postfix_expression_after_primary): Add
2925 scope with matching_parens after CPP_OPEN_PAREN.
2927 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2929 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2931 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
2933 * Make-lang.in: Remove extra slash.
2935 2020-05-19 Martin Liska <mliska@suse.cz>
2937 * c-parser.c: Fix typo.
2939 2020-05-14 Jakub Jelinek <jakub@redhat.com>
2941 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2943 2020-05-07 Richard Biener <rguenther@suse.de>
2946 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2949 2020-04-30 Jakub Jelinek <jakub@redhat.com>
2952 * c-decl.c (set_labels_context_r): In addition to context-less
2953 LABEL_DECLs adjust also LABEL_DECLs with context equal to
2954 parent function if any.
2955 (store_parm_decls): Adjust comment.
2957 2020-04-19 Jakub Jelinek <jakub@redhat.com>
2960 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
2961 two CPP_COLON tokens.
2963 2020-04-17 Jakub Jelinek <jakub@redhat.com>
2966 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
2969 2020-04-15 Jakub Jelinek <jakub@redhat.com>
2972 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
2973 requires directive when not at file scope.
2975 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
2978 * c-decl.c (c_check_in_current_scope): New function.
2979 * c-tree.h (c_check_in_current_scope): Declare it.
2980 * c-parser.c (c_parser_oacc_declare): Add check that variables
2981 are declared in the same scope as the directive. Fix handling
2984 2020-04-07 Jakub Jelinek <jakub@redhat.com>
2987 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2988 if c_parser_omp_master succeeded.
2990 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2992 PR gcov-profile/94029
2994 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2995 the function_start_locus location. Don't do that afterwards for the
2996 __GIMPLE body parsing.
2998 2020-03-19 Jakub Jelinek <jakub@redhat.com>
3000 PR gcov-profile/94029
3001 * c-tree.h (finish_function): Add location_t argument defaulted to
3003 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
3004 set it to the locus of closing } if non-NULL.
3005 (c_parser_compound_statement_nostart): Return locus of closing }.
3006 (c_parser_parse_rtl_body): Likewise.
3007 (c_parser_declaration_or_fndef): Propagate locus of closing } to
3009 * c-decl.c (finish_function): Add end_loc argument, use it instead of
3010 input_location to set function_end_locus.
3012 2020-03-17 Jakub Jelinek <jakub@redhat.com>
3015 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
3016 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
3017 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
3018 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
3020 (finish_incomplete_vars): New function, moved from finish_struct. Use
3021 relayout_decl instead of layout_decl.
3022 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
3023 being TYPE_VFIELD. Use finish_incomplete_vars.
3024 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
3025 finish_incomplete_vars.
3026 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3027 also on ENUMERAL_TYPEs.
3029 2020-03-16 Jakub Jelinek <jakub@redhat.com>
3032 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
3034 2020-03-13 Martin Sebor <msebor@redhat.com>
3037 * c-decl.c (builtin_structptr_type_count): New constant.
3038 (match_builtin_function_types): Reject decls that are incompatible
3039 in types pointed to by pointers.
3040 (diagnose_mismatched_decls): Adjust comments.
3042 2020-03-05 Joseph Myers <joseph@codesourcery.com>
3045 * c-typeck.c (pop_init_level): Do not diagnose initializers as
3046 empty when initialized type is error_mark_node.
3047 (set_designator, process_init_element): Ignore initializers for
3048 elements of a variable-size type or of error_mark_node.
3050 2020-03-01 Martin Sebor <msebor@redhat.com>
3053 * c-decl.c (types_close_enough_to_match): New function.
3054 (match_builtin_function_types):
3055 (diagnose_mismatched_decls): Add missing inform call to a warning.
3057 2020-03-01 Martin Sebor <msebor@redhat.com>
3060 * c-typeck.c (build_functype_attribute_variant): New function.
3061 (composite_type): Call it.
3063 2020-02-25 Jakub Jelinek <jakub@redhat.com>
3066 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
3067 Rename last argument from probablity to probability.
3069 2020-02-13 Jakub Jelinek <jakub@redhat.com>
3072 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
3073 *expr if it has side effects.
3075 2020-01-30 Jeff Law <law@redhat.com>
3078 * c-parser.c (c_parser_switch_statement): Make sure to request
3079 marking the switch expr as used.
3081 2020-01-22 Joseph Myers <joseph@codesourcery.com>
3084 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
3085 argument with integer operands.
3087 2020-01-16 Kerem Kat <keremkat@gmail.com>
3090 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
3091 to support 4 available tokens.
3093 2020-01-15 Joseph Myers <joseph@codesourcery.com>
3096 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
3097 determine whether to set DECL_CONTEXT.
3099 2020-01-13 Joseph Myers <joseph@codesourcery.com>
3102 * c-typeck.c (build_c_cast): Check for expressions with integer
3103 operands that can occur in an unevaluated part of an integer
3104 constant expression and call note_integer_operands as needed.
3106 2019-01-08 Richard Biener <rguenther@suse.de>
3109 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
3112 2020-01-01 Jakub Jelinek <jakub@redhat.com>
3114 Update copyright years.
3116 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3118 * c-decl.c (collect_source_ref_cb): Delete.
3119 (for_each_global_decl): Rename into...
3120 (collect_source_refs): ...this. Call collect_source_ref directly.
3121 (c_parse_final_cleanups): Always call collect_source_ref on the main
3124 2019-12-19 Julian Brown <julian@codesourcery.com>
3125 Cesar Philippidis <cesar@codesourcery.com>
3127 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
3129 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
3130 Allow deref (->) in variable lists if true.
3131 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
3132 Pass to c_parser_omp_variable_list.
3133 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
3134 call to c_parser_omp_variable_list.
3135 (c_parser_oacc_all_clauses): Support attach and detach clauses.
3136 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
3137 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
3138 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
3139 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
3140 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
3141 and detach. Support deref.
3142 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
3143 GOMP_MAP_ALWAYS_POINTER for OpenACC.
3144 (c_oacc_check_attachments): New function.
3145 (c_finish_omp_clauses): Check attach/detach arguments for being
3146 pointers using above. Support deref.
3148 2019-12-19 Julian Brown <julian@codesourcery.com>
3149 Maciej W. Rozycki <macro@codesourcery.com>
3150 Tobias Burnus <tobias@codesourcery.com>
3151 Thomas Schwinge <thomas@codesourcery.com>
3153 * c-parser.c (c_parser_omp_clause_name): Support no_create.
3154 (c_parser_oacc_data_clause): Likewise.
3155 (c_parser_oacc_all_clauses): Likewise.
3156 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3157 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
3158 PRAGMA_OACC_CLAUSE_NO_CREATE.
3159 * c-typeck.c (handle_omp_array_sections): Support
3162 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3164 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3165 Replace label_text ctor calls.
3167 2019-12-04 Joseph Myers <joseph@codesourcery.com>
3171 * c-typeck.c (convert_lvalue_to_rvalue): Call
3172 require_complete_type for arguments not of void types.
3173 (build_indirect_ref): Do not diagnose dereferencing pointers to
3175 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
3177 2019-12-03 Joseph Myers <joseph@codesourcery.com>
3180 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
3181 old-style parameter definitions.
3183 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
3187 * c-decl.c (flexible_array_type_p): Move to common code.
3189 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3191 * c-decl.c (start_decl): Allow initialization of variables whose
3192 size is a POLY_INT_CST.
3193 (finish_decl): Use verify_type_context to check whether the target
3194 allows variables with a particular type to have static or thread-local
3195 storage duration. Don't raise a second error if such variables do
3196 not have a constant size.
3197 (grokdeclarator): Use verify_type_context to check whether the
3198 target allows fields or array elements to have a particular type.
3199 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
3200 the target allows pointer difference for the types involved.
3201 (build_unary_op): Likewise for pointer increment and decrement.
3203 2019-11-29 Joseph Myers <joseph@codesourcery.com>
3205 * c-parser.c (struct c_parser): Add members raw_tokens and
3207 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
3208 using previously-lexed raw tokens.
3209 (c_parser_peek_nth_token_raw)
3210 (c_parser_check_balanced_raw_token_sequence): New functions.
3211 (c_parser_nth_token_starts_std_attributes): Use
3212 c_parser_check_balanced_raw_token_sequence for Objective-C.
3214 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3217 * c-decl.c (finish_declspecs): Use int instead of decimal
3218 floating-point types if decimal floating-point not supported.
3220 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3222 * c-tree.h (struct c_declarator): Use a structure for id member.
3223 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
3224 declarators at the start, not when handling individual declarators
3225 later. Use u.id.id instead of u.id.
3226 (grokfield): Use u.id.id instead of u.id.
3227 (build_id_declarator): Set u.id.id and u.id.attrs.
3228 (finish_declspecs): Handle postfix attributes in case of typedef
3229 name or typeof used.
3230 * c-parser.c (c_parser_direct_declarator)
3231 (c_parser_direct_declarator_inner): Place declarator for
3232 attributes inside that for function or array, not outside. Set
3233 u.id.attrs for identifiers.
3234 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
3235 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
3238 2019-11-22 Jakub Jelinek <jakub@redhat.com>
3241 * c-decl.c (identifier_global_tag): Define.
3243 2019-11-20 Richard Biener <rguenther@suse.de>
3246 * c-decl.c (grokdeclarator): Prevent inlining of nested
3247 function with VLA arguments.
3249 2019-11-20 Joseph Myers <joseph@codesourcery.com>
3251 * c-decl.c (c_warn_type_attributes): New function.
3252 (groktypename, grokdeclarator, finish_declspecs): Call
3253 c_warn_type_attributes before applying attributes to types.
3254 * c-tree.h (c_warn_type_attributes): Declare.
3256 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3258 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
3259 standard attributes.
3260 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
3261 pedwarn for unknown standard attributes and return error_mark_node
3264 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
3266 * c-parser.c (c_parser_parse_rtl_body): Always call
3267 run_rtl_passes, even if startwith pass is not provided.
3269 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3271 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
3272 duplicate standard attributes.
3274 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3276 * c-decl.c (std_attribute_table): Add maybe_unused.
3278 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3280 * c-decl.c (std_attribute_table): Add fallthrough.
3281 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
3282 attribute at top level.
3284 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3286 * c-decl.c (std_attribute_table): New.
3287 (c_init_decl_processing): Register attributes from
3288 std_attribute_table.
3289 * c-parser.c (c_parser_attribute_arguments): Add arguments
3290 require_string and allow_empty_args. All callers changed.
3291 (c_parser_std_attribute): Set require_string argument for
3292 "deprecated" attribute.
3294 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3296 * c-parser.c (c_parser_postfix_expression)
3297 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
3298 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
3300 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
3302 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
3303 of build_same_sized_truth_vector_type.
3304 (build_vec_cmp): Likewise.
3306 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3308 * c-parser.c (c_parser_omp_context_selector): Don't require score
3309 argument to fit into shwi, just to be INTEGER_CST. Diagnose
3312 * c-parser.c (c_parser_omp_context_selector): Rename
3313 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
3314 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
3315 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
3316 and string literals.
3318 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3320 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
3321 ctsk_tagfirstref_attrs.
3322 (struct c_declspecs): Update description of attrs. Add
3323 postfix_attrs and non_std_attrs_seen_p. Increase size of
3324 typespec_kind bit-field.
3325 (c_warn_unused_attributes): New declaration.
3326 (parser_xref_tag): Update prototype.
3327 * c-decl.c (c_warn_unused_attributes): New function.
3328 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
3329 ctsk_tagref_attrs. Handle attribute declarations.
3330 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
3331 (grokdeclarator): Handle standard attributes.
3332 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
3333 attributes to incomplete type reference.
3334 (xref_tag): Update call to parser_xref_tag.
3335 (declspecs_add_addrspace, declspecs_add_type)
3336 (declspecs_add_scspec, declspecs_add_attrs): Set
3337 non_std_attrs_seen_p.
3338 (finish_declspecs): Apply postfix standard attributes to type.
3339 * c-parser.c (c_token_starts_declspecs)
3340 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
3341 (c_parser_next_tokens_start_declaration): Update comments.
3342 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
3343 parser->tokens[2] to parser->tokens[1].
3344 (c_parser_nth_token_starts_std_attributes)
3345 (c_parser_std_attribute_specifier_sequence): New functions.
3346 (c_parser_declaration_or_fndef): Add arguments have_attrs and
3347 attrs. All callers changed. Handle standard attributes.
3348 (c_parser_parms_declarator, c_parser_parms_list_declarator)
3349 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
3350 All callers changed.
3351 (c_parser_declspecs): Add arguments start_std_attr_ok and
3352 end_std_attr_ok. All callers changed. Handle standard
3354 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3355 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
3356 (c_parser_compound_statement_nostart, c_parser_all_labels)
3357 (c_parser_label, c_parser_statement, c_parser_for_statement):
3358 Handle standard attributes.
3359 * c-parser.h (c_parser_declspecs): Update prototype.
3360 * gimple-parser.c (c_parser_gimple_declaration): Update call to
3363 2019-11-12 Martin Liska <mliska@suse.cz>
3365 * gimple-parser.c: Do not include params.h.
3367 2019-11-12 Martin Liska <mliska@suse.cz>
3369 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
3370 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
3373 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3374 Frederik Harwath <frederik@codesourcery.com>
3377 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
3378 (c_parser_oacc_kernels_parallel): Rename function to...
3379 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
3380 (c_parser_omp_construct): Update accordingly.
3383 2019-11-11 Jakub Jelinek <jakub@redhat.com>
3385 * c-parser.c (c_parser_translation_unit): Diagnose declare target
3386 without corresponding end declare target.
3388 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3390 * c-convert.c (convert): Only handle vector conversions if one of
3391 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
3393 * c-typeck.c (build_array_ref): Only allow vector indexing if the
3394 vectors satisfy gnu_vector_type_p.
3395 (build_unary_op): Only allow unary operators to be applied to
3396 vectors if they satisfy gnu_vector_type_p.
3397 (digest_init): Only allow by-element initialization of vectors
3398 if they satisfy gnu_vector_type_p.
3399 (really_start_incremental_init): Likewise.
3400 (push_init_level): Likewise.
3401 (pop_init_level): Likewise.
3402 (process_init_element): Likewise.
3403 (build_binary_op): Only allow binary operators to be applied to
3404 vectors if they satisfy gnu_vector_type_p.
3406 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3408 * c-decl.c (grokparms): Convert () in a function definition to
3410 (store_parm_decls_oldstyle): Pedwarn for C2x.
3411 (store_parm_decls): Update comment about () not generating a
3414 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3416 * c-parser.c (c_parser_attribute_arguments): New function.
3417 Factored out of c_parser_gnu_attribute.
3418 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
3419 (c_parser_balanced_token_sequence, c_parser_std_attribute)
3420 (c_parser_std_attribute_specifier): New functions.
3421 (c_parser_transaction_attributes): Use
3422 c_parser_std_attribute_specifier.
3424 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3426 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
3427 lex_joined_string and translate_strings_p.
3428 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
3430 (c_parser_string_literal): New function.
3431 (c_parser_static_assert_declaration_no_semi): Use
3432 c_parser_string_literal. Do not set lex_untranslated_string.
3433 (c_parser_asm_string_literal): Use c_parser_string_literal.
3434 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
3435 (c_parser_gnu_attributes): Set and restore translate_strings_p
3436 instead of lex_untranslated_string.
3437 (c_parser_asm_statement): Do not set lex_untranslated_string.
3438 (c_parser_asm_operands): Likewise.
3439 (c_parser_has_attribute_expression): Set and restore
3440 translate_strings_p instead of lex_untranslated_string.
3441 (c_parser_postfix_expression): Use c_parser_string_literal.
3442 (pragma_lex): Likewise.
3443 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
3444 (c_parse_file): Set translate_strings_p.
3445 * gimple-parser.c (c_parser_gimple_postfix_expression)
3446 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
3447 * c-parser.c (c_parser_string_literal): Declare function.
3449 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3451 * c-parser.c (c_finish_omp_declare_variant): Use
3452 omp_get_context_selector instead of c_omp_get_context_selector.
3454 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3456 * c-tree.h (c_simulate_enum_decl): Declare.
3457 * c-decl.c (c_simulate_enum_decl): New function.
3458 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
3460 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3462 * c-tree.h (c_simulate_builtin_function_decl): Declare.
3463 * c-decl.c (c_simulate_builtin_function_decl): New function.
3464 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
3467 2019-10-28 Martin Sebor <msebor@redhat.com>
3470 * c-decl.c (names_builtin_p): Define a new function.
3472 2019-10-28 Richard Biener <rguenther@suse.de>
3475 * gimple-parser.c (c_parser_parse_gimple_body): Make
3476 current_bb the entry block initially to easier recover
3478 (c_parser_gimple_compound_statement): Adjust.
3480 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3482 * c-parser.c (c_finish_omp_declare_variant): Use
3483 omp_context_selector_matches instead of
3484 c_omp_context_selector_matches.
3485 * c-decl.c (c_decl_attributes): Add "omp declare target block"
3486 attribute in between declare target and end declare target
3489 2019-10-15 Joseph Myers <joseph@codesourcery.com>
3491 * c-parser.c (c_parser_attribute_any_word): Rename to
3492 c_parser_gnu_attribute_any_word. All callers changed.
3493 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
3495 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
3497 (c_parser_declaration_or_fndef, c_parser_declspecs)
3498 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3499 (c_parser_struct_declaration, c_parser_declarator)
3500 (c_parser_gnu_attribute, c_parser_compound_statement)
3501 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
3502 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
3503 attribute-related syntax productions.
3505 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3507 * c-objc-common.c (useful_aka_type_p): Replace with...
3508 (get_aka_type): ...this new function. Given the original type,
3509 decide which aka type to print (if any). Only look through typedefs
3510 if user_facing_original_type_p.
3511 (print_type): Update accordingly.
3513 2019-10-14 Jakub Jelinek <jakub@redhat.com>
3515 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
3516 into int NESTED, if it is 2, diagnose missing commas in between
3518 (c_parser_omp_context_selector): Pass 2 as last argument to
3519 c_parser_omp_all_clauses.
3521 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3523 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
3524 For simd properties, put them directly into TREE_VALUE.
3525 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
3526 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
3527 add "omp declare variant base" attribute rather than
3528 "omp declare variant".
3530 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3532 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
3534 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3536 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
3537 true, terminate processing on closing paren and don't skip to end of
3539 (c_parser_omp_declare_simd): Handle also declare variant.
3540 (omp_construct_selectors, omp_device_selectors,
3541 omp_implementation_selectors, omp_user_selectors): New variables.
3542 (c_parser_omp_context_selector,
3543 c_parser_omp_context_selector_specification,
3544 c_finish_omp_declare_variant): New functions.
3545 (c_finish_omp_declare_simd): Handle both declare simd and
3547 (c_parser_omp_declare): Handle declare variant.
3549 2019-10-02 Joseph Myers <joseph@codesourcery.com>
3551 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
3554 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3556 * c-objc-common.c (useful_aka_type_p): New function.
3557 (print_type): Use it to decide whether an aka type is worth printing.
3559 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3562 * c-parser.c (c_parser_predefined_identifier): New function.
3563 (c_parser_postfix_expression): Use it.
3564 (c_parser_omp_variable_list): Parse predefined identifiers.
3565 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
3566 in shared and firstprivate clauses, even when they are predetermined
3569 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3571 * c-typeck.c (build_function_call_vec): Take the original function
3572 decl as an optional final parameter. Pass all built-in calls to
3573 check_builtin_function_arguments.
3575 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
3578 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
3579 of identifiers in the external scope only for variables and functions.
3581 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3584 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
3586 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3589 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
3590 after determining that the first token is not
3591 PRAGMA_GCC_PCH_PREPROCESS.
3593 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
3595 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
3596 FUNCTION_DECL to the right value in the presence of nested declarators.
3598 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3601 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
3603 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3606 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
3607 of a built_in_function.
3608 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
3610 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3612 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
3613 (c_parser_omp_clause_device_type): New function.
3614 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3615 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3616 (c_parser_omp_declare_target): Handle device_type clauses. Remove
3617 diagnostics for declare target with clauses nested in clause-less
3618 declare target declaration-definition-seq.
3619 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
3621 2019-08-09 Jakub Jelinek <jakub@redhat.com>
3623 * c-parser.c (check_no_duplicate_clause): Simplify using
3625 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
3626 directive name modifiers.
3627 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
3630 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
3631 check_no_duplicate_clause call. Comment it out, instead emit a
3632 warning for duplicate dist_schedule clauses.
3634 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
3636 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
3638 2019-08-08 Jakub Jelinek <jakub@redhat.com>
3640 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
3641 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
3642 instead of generic_head to track duplicates.
3644 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3646 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
3647 (c_parser_omp_clause_use_device_addr): New function.
3648 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3649 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3650 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
3651 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
3652 map or use_device_* clauses.
3653 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
3654 in OpenMP, require pointer type rather than pointer or array type.
3655 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
3657 2019-07-31 Jakub Jelinek <jakub@redhat.com>
3660 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
3661 even if finish is UNKNOWN_LOCATION, just use start as finish in that
3664 2019-07-25 Martin Liska <mliska@suse.cz>
3665 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
3668 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
3670 2019-07-25 Martin Liska <mliska@suse.cz>
3672 * c-decl.c (merge_decls): Use new macros
3673 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
3675 2019-07-23 Richard Biener <rguenther@suse.de>
3677 PR tree-optimization/83518
3678 * gimple-parser.c (c_parser_parse_gimple_body): When we have
3679 a CFG also rebuild cgraph edges.
3681 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3683 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3684 (c_parser_omp_clause_bind): New function.
3685 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3686 (OMP_LOOP_CLAUSE_MASK): Define.
3687 (c_parser_omp_loop): New function.
3688 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3689 loop combined with parallel or teams.
3690 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3691 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3693 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
3696 * c-decl.c (finish_function): Check targetm.warn_func_return
3697 before issuing a -Wreturn-type warning.
3699 2019-07-12 Alexandre Oliva <oliva@adacore.com>
3701 * gimple-parser.c (c_parser_gimple_try_stmt): New.
3702 (c_parser_compound_statement): Call it.
3704 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3706 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3707 (c_parser_omp_clause_order): New function.
3708 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3709 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3710 PRAGMA_OMP_CLAUSE_ORDER.
3711 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3713 2019-07-10 Richard Biener <rguenther@suse.de>
3715 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3716 _Literal (int *) &x for address literals.
3718 2019-07-09 Martin Sebor <msebor@redhat.com>
3721 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3723 (field_decl_cmp): Same.
3724 * c-parser.c (c_parser_struct_or_union_specifier): Same.
3726 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3728 2019-07-09 Martin Sebor <msebor@redhat.com>
3731 * c-decl.c: Change class-key from class to struct and vice versa
3732 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3733 * gimple-parser.c: Same.
3735 2019-07-01 Richard Biener <rguenther@suse.de>
3737 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3738 _Literal (char *) &"foo" for address literals pointing to
3741 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3743 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3744 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3745 C incompatibility if alternate "__intN__" form is used.
3747 2019-06-24 Martin Sebor <msebor@redhat.com>
3749 * c-typeck.c (build_binary_op): Hyphenate floating-point.
3751 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3753 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3754 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3755 (c_parser_omp_scan_loop_body): New function.
3756 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3757 inscan reduction clauses.
3758 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3759 non-inscan reductions on the same construct, or inscan reductions with
3760 ordered or schedule clauses, or inscan array reductions.
3762 2019-06-05 Martin Sebor <msebor@redhat.com>
3765 * c-typeck.c (c_finish_return): Only consider functions returning
3766 pointers as candidates for -Wreturn-local-addr.
3768 2019-06-05 Martin Sebor <msebor@redhat.com>
3770 * c-decl.c (start_decl): Adjust quoting and hyphenation
3772 (finish_decl): Same.
3773 (finish_enum): Same.
3774 (start_function): Same.
3775 (declspecs_add_type): Same.
3776 * c-parser.c (warn_for_abs): Same.
3777 * c-typeck.c (build_binary_op): Same.
3779 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3782 * c-parser.c (c_finish_oacc_routine): Rework checking if already
3783 marked with an OpenACC 'routine' directive.
3786 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3787 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3790 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3791 clauses from "omp declare target" attribute.
3793 2019-05-16 Martin Sebor <msebor@redhat.com>
3795 * c-decl.c (start_decl): Quote keywords, operators, and
3796 types in diagnostics.
3797 (finish_decl): Same.
3798 * c-parser.c (c_parser_asm_statement): Same.
3799 (c_parser_conditional_expression): Same.
3800 (c_parser_transaction_cancel): Same.
3801 * c-typeck.c (c_common_type): Same.
3802 (build_conditional_expr): Same.
3803 (digest_init): Same.
3804 (process_init_element): Same.
3805 (build_binary_op): Same.
3807 2019-05-17 Richard Biener <rguenther@suse.de>
3809 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3810 (c_parser_gimple_unary_expression): Likewise.
3811 (c_parser_gimple_parentized_ternary_expression): New function.
3813 2019-05-16 Richard Biener <rguenther@suse.de>
3815 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3816 (c_parser_gimple_unary_expression): Likewise.
3818 2019-05-15 Richard Biener <rguenther@suse.de>
3820 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3823 2019-05-14 Richard Biener <rguenther@suse.de>
3825 * gimple-parser.c (c_parser_gimple_statement): Remove
3826 questionable auto-promotion to VIEW_CONVERT_EXPR.
3827 (c_parser_gimple_typespec): Split out from __MEM parsing.
3828 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3829 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3830 as __VIEW_CONVERT with -gimple.
3832 2019-05-09 Martin Liska <mliska@suse.cz>
3834 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3836 (c_parser_gimple_unary_expression): Parse also binary expression
3838 (c_parser_gimple_parentized_binary_expression): New function.
3840 2019-05-09 Martin Liska <mliska@suse.cz>
3842 * gimple-parser.c (struct gimple_parser): Add probability.
3843 for gimple_parser_edge.
3844 (gimple_parser::push_edge): Add new argument probability.
3845 (c_parser_gimple_parse_bb_spec): Parse also probability
3847 (c_parser_parse_gimple_body): Set edge probability.
3848 (c_parser_gimple_compound_statement): Consume token
3849 before calling c_parser_gimple_goto_stmt.
3851 (c_parser_gimple_statement): Pass new argument.
3852 (c_parser_gimple_goto_stmt): Likewise.
3853 (c_parser_gimple_if_stmt): Likewise.
3854 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3855 * c-parser.c (c_parser_declaration_or_fndef): Pass
3856 hot_bb_threshold argument.
3857 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3859 (c_parser_gimple_parse_bb_spec_edge_probability): New.
3861 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3864 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3865 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3866 (c_parser_do_statement): Likewise.
3867 (c_parser_for_statement): Likewise. Formatting fixes.
3868 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3869 emit DEBUG_BEGIN_STMTs if needed.
3871 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3874 * c-typeck.c (struct c_switch): Remove outside_range_p member.
3875 (c_start_case): Don't clear it.
3876 (do_case): Adjust c_add_case_label caller.
3877 (c_finish_case): Adjust c_do_switch_warnings caller.
3880 * c-decl.c (merge_decls): If remove is main variant and
3881 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3882 variant that has newdecl as TYPE_NAME if any.
3884 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3887 * c-decl.c (merge_decls): When newdecl's type is its main variant,
3888 don't try to remove it from the variant list, but instead assert
3891 2019-04-01 Richard Biener <rguenther@suse.de>
3894 * c-tree.h (c_get_alias_set): Declare.
3895 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
3896 * c-objc-common.c (c_get_alias_set): Treat enumeral types
3897 as the underlying integer type.
3899 2019-03-19 Martin Sebor <msebor@redhat.com>
3901 PR tree-optimization/89688
3902 * c-decl.c (finish_decl): Call braced_lists_to_string for more
3903 kinds of initializers.
3905 2019-03-19 Jakub Jelinek <jakub@redhat.com>
3908 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
3909 return type even if quals_used is 0. Formatting fixes.
3911 2019-03-14 Richard Biener <rguenther@suse.de>
3913 * c-tree.h (enum c_declspec_il): New.
3914 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
3916 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
3917 Pass start pass and declspec_il to c_parser_parse_gimple_body.
3918 (c_parser_declspecs): Adjust.
3919 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3920 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3922 (struct gimple_parser): New.
3923 (gimple_parser::push_edge): New method.
3924 (c_parser_gimple_parse_bb_spec): New helper.
3925 (c_parser_parse_gimple_body): Get start pass and IL specification.
3926 Initialize SSA and CFG.
3927 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3928 Build a gimple_parser parsing state and pass it along.
3929 (c_parser_gimple_statement): Change intermittend __PHI internal
3930 function argument for the edge.
3931 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3932 (c_parser_gimple_goto_stmt): Record edges to build.
3933 (c_parser_gimple_if_stmt): Likewise.
3934 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3935 (c_parser_gimple_or_rtl_pass_list): Likewise.
3937 2019-03-11 Martin Liska <mliska@suse.cz>
3939 * c-decl.c (check_for_loop_decls): Wrap an option name
3940 in a string format message and fix GNU coding style.
3941 * c-parser.c (c_parser_declspecs): Likewise.
3943 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3945 PR tree-optimization/89550
3946 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3948 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3949 or warning returned true.
3951 2019-02-28 Jakub Jelinek <jakub@redhat.com>
3954 * c-typeck.c (convert_arguments): Call inform_declaration only if
3955 the previous warning_at call returned true.
3957 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
3959 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
3960 parameter. Adjust all users.
3961 (c_parser_oacc_simple_clause): Replace parser with loc formal
3962 parameter. Adjust all users.
3964 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
3967 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
3968 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
3970 2019-02-15 Jakub Jelinek <jakub@redhat.com>
3973 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
3974 before c_decl_attributes rather than after it.
3976 2019-02-06 Jakub Jelinek <jakub@redhat.com>
3979 * c-parser.c (c_parser_declaration_or_fndef): Don't update
3980 DECL_ARGUMENTS of d if it has been defined already. Use a single if
3981 instead of 3 nested ifs.
3983 2019-02-06 Joseph Myers <joseph@codesourcery.com>
3986 * c-decl.c (finish_decl): Do not complete array types for arrays
3987 with external linkage not at file scope.
3989 2019-02-05 Richard Biener <rguenther@suse.de>
3992 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3993 all type variants when not supported.
3995 2019-01-30 Jakub Jelinek <jakub@redhat.com>
3998 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3999 * c-decl.c (decl_jump_unsafe): Return false for
4000 C_DECL_COMPOUND_LITERAL_P decls.
4001 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
4003 2019-01-29 Jakub Jelinek <jakub@redhat.com>
4006 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
4010 * c-decl.c (last_fileptr_type): Remove.
4011 (last_structptr_types): New variable.
4012 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
4013 {old,new}rettype instead of the types themselves. Assert
4014 last_structptr_types array has the same number of elements
4015 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
4016 argument oldtype and newtype. Instead of handling
4017 just fileptr_type_node specially, handle all builtin_structptr_types
4018 pointer nodes. Formatting fix.
4020 2019-01-24 Martin Sebor <msebor@redhat.com>
4025 * c-decl.c (match_builtin_function_types): Add arguments.
4026 (diagnose_mismatched_decls): Diagnose mismatched declarations
4027 of built-ins more strictly.
4029 2019-01-24 Jakub Jelinek <jakub@redhat.com>
4032 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
4033 on #pragma omp cancel with different modifiers.
4035 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4039 * c-typeck.c (convert_for_assignment): Upate the
4040 warn_for_address_or_pointer_of_packed_member call.
4042 2019-01-16 Tom Honermann <tom@honermann.net>
4043 Jason Merrill <jason@redhat.com>
4045 * c-typeck.c (digest_init): Revised the error message produced for
4046 ill-formed cases of array initialization with a string literal.
4047 (error_init): Make variadic.
4049 2019-01-12 Jakub Jelinek <jakub@redhat.com>
4051 * c-typeck.c (convert_for_assignment): Fix a comment typo.
4053 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4056 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
4057 if current_function_decl is non-NULL.
4059 2019-01-07 Joseph Myers <joseph@codesourcery.com>
4063 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
4064 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
4065 functions declared but never defined only for external scope, not
4068 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4071 * c-parser.c (c_parser_postfix_expression): Parse
4072 __builtin_convertvector.
4074 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4076 Update copyright years.
4078 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4081 * c-typeck.c (convert_for_assignment): Call
4082 warn_for_address_or_pointer_of_packed_member.
4084 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4086 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
4087 a more specific error message (instead of just falling through).
4089 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4091 * c-parser.c (c_parser_asm_statement): Keep track of the location each
4092 asm qualifier is first seen; use that to give nicer "duplicate asm
4093 qualifier" messages. Delete 'quals" variable, instead pass the
4094 "is_volatile_ flag to build_asm_stmt directly.
4095 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
4096 * c-typeck.c (build_asm_stmt): Ditto; adjust.
4098 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4100 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
4101 "done" boolean variable.
4103 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4106 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
4107 Move from here to gcc-rich-location.h and gcc-rich-location.c.
4108 (build_binary_op): Use struct op_location_t and
4109 class binary_op_rich_location.
4111 2018-12-11 Jakub Jelinek <jakub@redhat.com>
4114 * c-convert.c (convert): Call c_fully_fold before calling
4115 ubsan_instrument_float_cast.
4117 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
4119 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
4122 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
4124 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
4125 after asm. Pass a flag for it to build_asm_expr.
4126 * c-tree.h (build_asm_expr): Update declaration.
4127 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
4130 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
4133 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
4134 combination of volatile and goto, in any order, without repetitions.
4136 2018-12-04 James Norris <jnorris@codesourcery.com>
4137 Cesar Philippidis <cesar@codesourcery.com>
4138 Julian Brown <julian@codesourcery.com>
4140 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
4143 2018-11-30 Richard Biener <rguenther@suse.de>
4145 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4146 _Literal (type) { ... } as empty aggregate or vector constructor.
4148 2018-11-29 Martin Sebor <msebor@redhat.com>
4151 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
4152 (convert_arguments): Add comments. Pass additional argument to
4155 2018-11-29 Martin Sebor <msebor@redhat.com>
4159 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
4161 2018-11-23 Martin Sebor <msebor@redhat.com>
4164 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
4165 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
4167 2018-11-20 Martin Sebor <msebor@redhat.com>
4169 * c-parser.c (c_parser_has_attribute_expression): New function.
4170 (c_parser_attribute): New function.
4171 (c_parser_attributes): Move code into c_parser_attribute.
4172 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
4174 2018-11-15 Martin Sebor <msebor@redhat.com>
4177 * c-decl.c (header_for_builtin_fn): Declare.
4178 (diagnose_mismatched_decls): Diagnose declarations of built-in
4179 functions without a prototype.
4180 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
4181 (convert_argument): Same.
4182 (convert_arguments): Factor code out into convert_argument.
4183 Detect mismatches between built-in formal arguments in calls
4184 to built-in without prototype.
4185 (build_conditional_expr): Same.
4186 (type_or_builtin_type): New function.
4187 (convert_for_assignment): Add argument. Conditionally issue
4188 warnings instead of errors for mismatches.
4190 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4192 * c-decl.c: Replace "source_location" with "location_t".
4193 * c-tree.h: Likewise.
4194 * c-typeck.c: Likewise.
4195 * gimple-parser.c: Likewise.
4197 2018-11-09 Jakub Jelinek <jakub@redhat.com>
4199 * c-parser.c (c_parser_omp_clause_final): Use
4200 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
4201 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
4202 parsing instead of c_parser_paren_condition.
4203 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
4204 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
4205 c_fully_fold instead of c_parser_condition.
4206 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
4207 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
4208 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
4209 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
4210 c_parser_expr_no_commas instead of c_parser_expression.
4212 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
4213 reduction clause with inscan modifier.
4215 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
4216 clauses other than atomic_default_mem_order.
4218 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4220 * c-parser.c: Include memmode.h.
4221 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
4222 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
4223 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
4224 task_reduction clauses.
4225 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
4226 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
4227 section, or lvalue assignment expression.
4228 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
4229 (c_parser_omp_clause_lastprivate): Parse optional
4230 conditional: modifier.
4231 (c_parser_omp_clause_hint): Require constant integer expression rather
4232 than just integer expression.
4233 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
4235 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
4236 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
4237 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
4239 (c_parser_omp_clause_depend): Parse iterator modifier and handle
4240 iterators. Parse mutexinoutset and depobj kinds.
4241 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
4243 (c_parser_omp_all_clauses): Likewise. Handle
4244 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
4245 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4246 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
4247 default memory order from requires directive if any. Adjust
4248 c_finish_omp_atomic caller.
4249 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
4250 (c_parser_omp_flush): Parse flush with memory-order-clause.
4251 (c_parser_omp_for_loop): Allow NE_EXPR even in
4252 OpenMP loops, adjust c_finish_omp_for caller.
4253 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
4254 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
4255 Allow to be called while parsing combined parallel master.
4256 Parse combined master taskloop{, simd}.
4257 (c_parser_omp_parallel): Parse combined
4258 parallel master{, taskloop{, simd}} constructs.
4259 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
4260 (OMP_TASKGROUP_CLAUSE_MASK): Define.
4261 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
4262 (OMP_TASKWAIT_CLAUSE_MASK): Define.
4263 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
4264 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
4265 around teams body. Use SET_EXPR_LOCATION.
4266 (c_parser_omp_target_data): Allow target data
4267 with only use_device_ptr clauses.
4268 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
4269 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
4270 (c_parser_omp_requires): New function.
4271 (c_finish_taskloop_clauses): New function.
4272 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
4273 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
4274 declaration. Disallow in_reduction clause when combined with parallel
4276 (c_parser_omp_construct): Adjust c_parser_omp_master and
4277 c_parser_omp_taskgroup callers.
4278 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
4280 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
4281 like OMP_CLAUSE_REDUCTION.
4282 (handle_omp_array_sections): Likewise. Call save_expr on array
4283 reductions before calling build_index_type. Handle depend clauses
4285 (struct c_find_omp_var_s): New type.
4286 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
4287 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
4288 with static, runtime or auto schedule kinds. Call save_expr for whole
4289 array reduction sizes. Diagnose reductions with zero sized elements
4290 or variable length structures. Diagnose nogroup clause used with
4291 reduction clause(s). Handle depend clause with
4292 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
4293 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
4294 some different type for other kinds. Use build_unary_op with
4295 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
4296 Handle depend clauses with iterators. Remove no longer needed special
4297 case that predetermined const qualified vars may be specified in
4298 firstprivate clause. Complain if const qualified vars are mentioned
4299 in data-sharing clauses other than firstprivate or shared. Use
4300 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
4301 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
4302 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
4303 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
4305 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4307 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
4308 logic for change to name_hint::operator bool.
4309 (undeclared_variable): Likewise.
4310 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4311 (c_parser_parameter_declaration): Likewise.
4313 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4315 * c-errors.c (pedwarn_c11): New function.
4316 * c-parser.c (disable_extension_diagnostics): Save
4317 warn_c11_c2x_compat and set it to 0.
4318 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
4319 (c_parser_static_assert_declaration_no_semi): Handle
4320 _Static_assert without string constant.
4321 * c-tree.h (pedwarn_c11): New prototype.
4323 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4325 * Make-lang.in (selftest-c): New.
4326 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4327 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
4328 from gcc/Makefile.in.
4330 2018-10-02 Richard Biener <rguenther@suse.de>
4332 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
4334 2018-09-26 Joseph Myers <joseph@codesourcery.com>
4337 * c-typeck.c (build_binary_op): Use excess precision for
4338 comparisons of integers and floating-point for C11 and later.
4340 2018-09-26 Martin Jambor <mjambor@suse.cz>
4343 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
4346 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4348 * c-objc-common.c (range_label_for_type_mismatch::get_text):
4349 Update for new param.
4350 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
4353 2018-09-17 Martin Jambor <mjambor@suse.cz>
4356 * c-parser.c: (warn_for_abs): New function.
4357 (c_parser_postfix_expression_after_primary): Call it.
4359 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4361 * c-typeck.c (digest_init): Shorten overlength strings.
4363 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4365 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
4367 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4369 * c-decl.c (finish_decl): Call braced_list_to_string here ...
4370 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
4372 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
4374 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
4375 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
4377 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4380 * c-decl.c (implicitly_declare): Update call to
4381 maybe_add_include_fixit to suggest overriding the location, as it
4383 * c-objc-common.c (c_tree_printer): Update for conversion of
4384 show_caret_p to a tri-state.
4386 2018-08-27 Martin Liska <mliska@suse.cz>
4388 * c-decl.c (locate_old_decl): Use new function
4389 fndecl_built_in_p and remove check for FUNCTION_DECL if
4391 (diagnose_mismatched_decls): Likewise.
4392 (merge_decls): Likewise.
4393 (warn_if_shadowing): Likewise.
4394 (pushdecl): Likewise.
4395 (implicitly_declare): Likewise.
4396 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4397 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
4398 * c-typeck.c (build_function_call_vec): Likewise.
4399 (convert_arguments): Likewise.
4401 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4404 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
4405 (diagnose_mismatched_decls): Likewise, in various places.
4406 (warn_if_shadowing): Likewise.
4407 (implicit_decl_warning): Likewise.
4408 (implicitly_declare): Likewise.
4409 (undeclared_variable): Likewise.
4410 (declare_label): Likewise.
4411 (grokdeclarator): Likewise.
4412 (start_function): Likewise.
4413 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4414 (c_parser_parameter_declaration): Likewise.
4415 (c_parser_binary_expression): Likewise.
4416 * c-typeck.c (c_expr_sizeof_expr): Likewise.
4417 (parser_build_binary_op): Likewise.
4418 (build_unary_op): Likewise.
4419 (error_init): Likewise.
4420 (pedwarn_init): Likewise.
4421 (warning_init): Likewise.
4422 (convert_for_assignment): Likewise.
4424 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4426 * c-objc-common.c: Include "gcc-rich-location.h".
4427 (c_tree_printer): Move implemenation of '%T' to...
4428 (print_type): ...this new function.
4429 (range_label_for_type_mismatch::get_text): New function.
4430 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
4431 range for the various ic_argpass cases.
4432 (class maybe_range_label_for_tree_type_mismatch): New class.
4433 (build_binary_op): Use it when calling binary_op_error.
4435 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4437 * c-decl.c (start_decl): Do not warn if variables is named as main
4438 and is a local variable.
4440 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4443 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
4444 objects of unknown size.
4446 2018-08-13 Martin Sebor <msebor@redhat.com>
4448 PR tree-optimization/71625
4449 * c-parser.c (c_parser_declaration_or_fndef): Call
4450 braced_list_to_string.
4452 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
4455 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
4458 2018-08-01 Martin Sebor <msebor@redhat.com>
4460 PR tree-optimization/86650
4461 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
4462 and TREE_BLOCK (t) from within percent_K_format to this callsite.
4464 2018-08-01 Jakub Jelinek <jakub@redhat.com>
4467 * c-typeck.c (init_field_decl_cmp): New function.
4468 (output_pending_init_elements): Use it for field comparisons
4469 instead of pure bit_position comparisons.
4471 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4473 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
4474 type here, instead add "omp declare target implicit" attribute.
4475 (finish_decl): Diagnose vars without mappable type here.
4477 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4478 Thomas Schwinge <thomas@codesourcery.com>
4479 Cesar Philippidis <cesar@codesourcery.com>
4481 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
4482 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
4483 to their non-present_or_* counterparts. Make 'self' an alias to
4484 PRAGMA_OACC_CLAUSE_HOST.
4485 (c_parser_oacc_data_clause): Update GOMP mappings for
4486 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
4487 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
4488 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
4489 Remove support for present_or_* clauses.
4490 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4491 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
4492 (OACC_DECLARE_CLAUSE_MASK): Likewise.
4493 (OACC_DATA_CLAUSE_MASK): Likewise.
4494 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4495 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
4496 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
4497 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
4498 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
4500 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4502 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
4503 * gimple-parser.c (c_parser_gimple_statement): Likewise.
4504 (c_parser_gimple_unary_expression): Likewise.
4506 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4509 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
4510 before doing POINTER_DIFF_EXPR.
4512 2018-06-07 Marek Polacek <polacek@redhat.com>
4515 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
4516 for loop initial declarations.
4518 2018-05-30 David Pagan <dave.pagan@oracle.com>
4521 * c-decl.c (grokdeclarator): Update check for return type warnings.
4522 (start_function): Likewise.
4523 (finish_function): Likewise.
4524 * c-typeck.c (c_finish_return): Update check for return type warnings.
4525 Pass OPT_Wreturn_type to pedwarn when appropriate.
4527 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
4529 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
4532 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4534 * gimple-parser.c: Include internal-fn.h.
4535 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
4536 (c_parser_gimple_call_internal): New function.
4537 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
4538 Fix typos in comment.
4540 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4543 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
4544 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
4546 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
4547 fold_offsetof_1, pass argtype as TYPE to it and drop the
4550 2018-05-02 David Pagan <dave.pagan@oracle.com>
4553 * c-decl.c (old_style_parameter_scope): New function.
4554 * c-parser.c (c_parser_postfix_expression): Check for statement
4555 expressions in old-style function parameter list declarations.
4556 * c-parser.h (old_style_parameter_scope): New extern declaration.
4558 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4561 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
4562 it is not TREE_STATIC.
4563 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
4564 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
4565 its COMPOUND_LITERAL_EXPR_DECL.
4567 2018-03-21 Joseph Myers <joseph@codesourcery.com>
4569 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4570 where all functions return the same _FloatN or _FloatNx type,
4571 treat integer types as _Float64 instead of double.
4573 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4576 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
4577 building vector comparison, diagnose it and return error_mark_node.
4579 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4582 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
4583 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
4584 INTEGER_TYPE element type.
4586 2018-03-13 David Pagan <dave.pagan@oracle.com>
4589 * c-typeck.c (output_init_element): Ensure field initializer
4590 expression is always evaluated if there are side effects.
4592 2018-03-06 Jakub Jelinek <jakub@redhat.com>
4595 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
4596 !building_stmt_list_p ().
4598 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
4601 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
4602 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
4603 and include the BIND_EXPR in the list of things that need to be
4606 2018-02-09 Nathan Sidwell <nathan@acm.org>
4609 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
4610 to strict_aliasing_warning.
4612 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4614 * c-typeck.c (really_start_incremental_init, push_init_level,
4615 set_nonincremental_init, output_init_element, process_init_element):
4616 Use DECL_UNNAMED_BIT_FIELD.
4618 2018-01-31 Marek Polacek <polacek@redhat.com>
4621 * c-parser.c (c_parser_compound_statement_nostart): Call
4622 expansion_point_location_if_in_system_header.
4624 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4627 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
4630 2018-01-13 Jakub Jelinek <jakub@redhat.com>
4633 * c-tree.h (decl_constant_value_1): Add a bool argument.
4634 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
4635 returning a CONSTRUCTOR if it is true. Use error_operand_p.
4636 (decl_constant_value): Adjust caller.
4637 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
4638 decl_constant_value_1 as IN_INIT. Otherwise, punt if
4639 decl_constant_value returns initializer that has BLKmode or
4641 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
4643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4644 Alan Hayward <alan.hayward@arm.com>
4645 David Sherwood <david.sherwood@arm.com>
4647 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
4648 TYPE_VECTOR_SUBPARTS.
4650 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4652 Update copyright years.
4654 2018-01-01 Jakub Jelinek <jakub@redhat.com>
4657 * c-parser.c (c_parser_braced_init, c_parser_initelt,
4658 c_parser_conditional_expression, c_parser_cast_expression,
4659 c_parser_sizeof_expression, c_parser_alignof_expression,
4660 c_parser_postfix_expression, c_parser_omp_declare_reduction,
4661 c_parser_transaction_expression): Use set_error () method instead
4662 of setting value member to error_mark_node.
4664 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
4666 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4667 and _Float<N>X built-in functions.
4669 2017-12-22 Jakub Jelinek <jakub@redhat.com>
4672 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
4673 TYPE_STUB_DECL and call rest_of_type_compilation before processing
4674 incomplete vars rather than after it.
4677 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4678 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4679 and consider empty ones if there are no other stmts. For
4680 -Wunused-value walk all statements before the one only followed by
4683 2017-12-22 Mike Stump <mikestump@comcast.net>
4684 Eric Botcazou <ebotcazou@adacore.com>
4686 * c-parser.c (c_parser_while_statement): Add unroll parameter and
4687 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
4688 (c_parser_do_statement): Likewise.
4689 (c_parser_for_statement): Likewise.
4690 (c_parser_statement_after_labels): Adjust calls to above.
4691 (c_parse_pragma_ivdep): New static function.
4692 (c_parser_pragma_unroll): Likewise.
4693 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4694 <PRAGMA_UNROLL>: New case.
4696 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4698 * c-typeck.c (comptypes_internal, function_types_compatible_p,
4699 perform_integral_promotions, digest_init): Replace Yoda conditions
4700 with typical order conditions.
4701 * c-decl.c (check_bitfield_type_and_width): Likewise.
4703 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4705 * c-typeck.c (c_safe_arg_type_equiv_p,
4706 c_safe_function_type_cast_p): New function.
4707 (build_c_cast): Implement -Wcast-function-type.
4709 2017-12-14 Richard Biener <rguenther@suse.de>
4712 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4713 like REALPART_EXPR for the behavior of whether its operand
4716 2017-12-12 Marek Polacek <polacek@redhat.com>
4719 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4721 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4723 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4724 * c-parser.c (add_debug_begin_stmt): New.
4725 (c_parser_declaration_or_fndef): Call it.
4726 (c_parser_compound_statement_nostart): Likewise.
4727 (c_parser_statement_after_labels): Likewise.
4728 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4730 2017-12-07 Joseph Myers <joseph@codesourcery.com>
4732 * c-decl.c (build_compound_literal): Add parameter alignas_align
4733 and set alignment of decl if nonzero.
4734 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4735 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4737 (c_parser_struct_declaration): Update syntax comment.
4738 (c_parser_type_name): Add alignas_ok argument and pass it to
4740 (c_parser_cast_expression): Pass true to c_parser_type_name and
4741 give error if a cast used an _Alignas specifier.
4742 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4743 give error if sizeof (type-name) used an _Alignas specifier.
4744 (c_parser_alignof_expression): Pass true to c_parser_type_name and
4745 give error if _Alignof (type-name) used an _Alignas specifier.
4746 (c_parser_postfix_expression_after_paren_type): Check specified
4747 alignment for a compound literal and pass it to
4748 build_compound_literal.
4749 * c-parser.h (c_parser_type_name): Update prototype.
4750 * c-tree.h (build_compound_literal): Update prototype.
4752 2017-12-07 Martin Sebor <msebor@redhat.com>
4755 * c-decl.c (c_decl_attributes): Look up existing declaration and
4756 pass it to decl_attributes.
4758 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4761 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4762 reserved for use by the implementation.
4764 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4766 * c-decl.c: Include "c-family/c-spellcheck.h".
4768 2017-12-05 Martin Liska <mliska@suse.cz>
4769 Jakub Jelinek <jakub@redhat.com>
4771 * c-typeck.c (pointer_diff): Add new argument and instrument
4772 pointer subtraction.
4773 (build_binary_op): Similar for pointer comparison.
4775 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4778 * c-parser.c: Include tree-iterator.h.
4779 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4780 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4784 * c-tree.h (decl_constant_value_1): Declare.
4785 * c-typeck.c (decl_constant_value_1): New function.
4786 (decl_constant_value): Use it.
4787 * c-fold.c (c_fully_fold_internal): If in_init, use
4788 decl_constant_value_1 instead of decl_constant_value.
4790 2017-11-30 Jakub Jelinek <jakub@redhat.com>
4792 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4794 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4797 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4798 c_switch_covers_all_cases_p returns true.
4800 2017-11-28 Julia Koval <julia.koval@intel.com>
4801 Sebastian Peryt <sebastian.peryt@intel.com>
4803 * Make-lang.in (c/c-array-notation.o): Remove.
4804 * c-array-notation.c: Delete.
4805 * c-decl.c: Remove cilkplus condition.
4806 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4807 c_parser_cilk_verify_simd, c_parser_array_notation,
4808 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4809 c_parser_cilk_simd_fn_vector_attrs,
4810 c_finish_cilk_simd_fn_tokens): Delete.
4811 (c_parser_declaration_or_fndef): Remove cilkplus condition.
4812 (c_parser_direct_declarator_inner): Ditto.
4813 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4814 (c_parser_attributes, c_parser_compound_statement,
4815 c_parser_statement_after_labels, c_parser_if_statement,
4816 c_parser_switch_statement, c_parser_while_statement,
4817 c_parser_do_statement, c_parser_for_statement,
4818 c_parser_unary_expression, c_parser_postfix_expression,
4819 c_parser_postfix_expression_after_primary,
4820 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4821 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4823 * c-typeck.c (build_array_ref, build_function_call_vec,
4825 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4826 c_finish_loop, build_binary_op): Remove cilkplus support.
4828 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4830 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4833 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
4835 * Make-lang.in (c.install-plugin): Install backend import library.
4837 2017-11-23 Jakub Jelinek <jakub@redhat.com>
4839 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4840 pragma_stmt context.
4842 2017-11-23 Mike Stump <mikestump@comcast.net>
4843 Eric Botcazou <ebotcazou@adacore.com>
4845 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4847 (c_parser_do_statement): Likewise.
4848 (c_parser_for_statement): Likewise.
4850 2017-11-22 David Malcolm <dmalcolm@redhat.com>
4853 * c-objc-common.c (c_tree_printer): Convert penultimate param from
4854 bool to bool *. Within '%T' handling, if showing an "aka", use
4855 "quoted" param to add appropriate quoting.
4857 2017-11-22 Marek Polacek <polacek@redhat.com>
4862 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4864 2017-11-21 David Malcolm <dmalcolm@redhat.com>
4867 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4868 earlier failed lookups.
4870 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
4872 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4873 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4875 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4878 * c-decl.c: Include "c-family/known-headers.h".
4879 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4880 to known-headers.cc.
4881 (class suggest_missing_header): Move to known-header.h.
4882 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4883 than get_c_name_hint.
4885 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4887 * c-decl.c (get_c_name_hint): New function.
4888 (class suggest_missing_header): New class.
4889 (lookup_name_fuzzy): Call get_c_name_hint and use it to
4890 suggest missing headers to the user.
4892 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4894 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4895 Include "c-family/name-hint.h"
4896 (implicit_decl_warning): Convert "hint" from
4897 const char * to name_hint. Pass location to
4898 lookup_name_fuzzy. Suppress any deferred diagnostic if the
4899 warning was not printed.
4900 (undeclared_variable): Likewise for "guessed_id".
4901 (lookup_name_fuzzy): Convert return type from const char *
4902 to name_hint. Add location_t param.
4903 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4904 Include "c-family/name-hint.h"
4905 (c_parser_declaration_or_fndef): Convert "hint" from
4906 const char * to name_hint. Pass location to lookup_name_fuzzy.
4907 (c_parser_parameter_declaration): Likewise.
4909 2017-11-19 Jakub Jelinek <jakub@redhat.com>
4913 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
4915 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
4916 handle_omp_array_sections): Likewise.
4917 (digest_init): Don't call decl_constant_value_for_optimization.
4918 * c-tree.h (decl_constant_value_for_optimization): Removed.
4919 * c-fold.c (c_fold_array_ref): New function.
4920 (c_fully_fold_internal): Add LVAL argument, propagate it through
4921 recursive calls. For VAR_P call decl_constant_value and
4922 unshare if not LVAL and either optimizing or IN_INIT. Remove
4923 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
4924 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4925 (c_fully_fold): Add LVAL argument, pass it through to
4926 c_fully_fold_internal.
4927 (decl_constant_value_for_optimization): Removed.
4929 2017-11-15 Joseph Myers <joseph@codesourcery.com>
4932 * c-parser.c (check_tgmath_function): New function.
4933 (enum tgmath_parm_kind): New enum.
4934 (c_parser_postfix_expression): Handle __builtin_tgmath.
4936 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4938 * c-decl.c (implicit_decl_warning): Update for renaming of
4939 pedwarn_at_rich_loc and warning_at_rich_loc.
4940 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4941 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4942 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4943 (c_parser_struct_or_union_specifier): Likewise for renaming of
4944 pedwarn_at_rich_loc.
4945 (c_parser_parameter_declaration): Likewise for renaming of
4947 * c-typeck.c (build_component_ref): Likewise.
4948 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4949 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4950 (set_init_label): Likewise for renaming of error_at_rich_loc.
4952 2017-10-30 Richard Biener <rguenther@suse.de>
4954 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
4957 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4959 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
4960 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
4962 2017-10-25 David Malcolm <dmalcolm@redhat.com>
4965 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
4968 2017-10-25 Jakub Jelinek <jakub@redhat.com>
4971 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
4972 newdecl to corresponding __builtin_ if any.
4974 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
4977 * c-decl.c (diagnose_mismatched_decls): Use
4978 OPT_Wbuiltin_declaration_mismatch.
4980 2017-10-12 David Malcolm <dmalcolm@redhat.com>
4982 * c-parser.c (c_parser_require): Add "type_is_unique" param and
4983 use it to guard calls to maybe_suggest_missing_token_insertion.
4984 (c_parser_parms_list_declarator): Override default value of new
4985 "type_is_unique" param to c_parser_require.
4986 (c_parser_asm_statement): Likewise.
4987 * c-parser.h (c_parser_require): Add "type_is_unique" param,
4990 2017-10-11 Nathan Sidwell <nathan@acm.org>
4992 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4994 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4996 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4997 operating on trees as wide_ints.
4998 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4999 (c_tree_equal): Likewise.
5001 2017-10-04 David Malcolm <dmalcolm@redhat.com>
5003 * c-decl.c (push_parm_decl): Store c_parm's location into the
5005 (build_c_parm): Add "loc" param and store it within the c_parm.
5006 * c-parser.c (struct c_parser): Add "last_token_location" field.
5007 (c_parser_consume_token): Store location of the token into the
5009 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
5010 when handling a FUNCTION_DECL, if it doesn't already have them.
5011 (c_parser_parameter_declaration): Generate a location for the
5012 parameter, and pass it to the call to build_c_parm.
5013 * c-tree.h (struct c_parm): Add field "loc".
5014 (build_c_parm): Add location_t param.
5015 * c-typeck.c (get_fndecl_argument_location): New function.
5016 (inform_for_arg): New function.
5017 (convert_for_assignment): Use inform_for_arg when dealing with
5020 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5022 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
5024 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
5025 don't SET_DECL_C_BIT_FIELD here.
5028 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
5029 instead of trying to set just TREE_READONLY manually.
5031 2017-09-16 Tom de Vries <tom@codesourcery.com>
5034 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
5037 2017-09-15 Joseph Myers <joseph@codesourcery.com>
5040 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
5042 (build_conditional_expr): For C11, generate result with excess
5043 precision when one argument is an integer and the other is of a
5044 type using excess precision.
5046 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5048 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
5050 2017-09-13 Marek Polacek <polacek@redhat.com>
5053 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
5054 than expr.original_type.
5056 2017-09-12 Nathan Sidwell <nathan@acm.org>
5058 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5059 resort_sorted_fields): Moved from c-family/c-common.c.
5060 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
5062 2017-09-01 Joseph Myers <joseph@codesourcery.com>
5065 * c-typeck.c (build_atomic_assign): Handle argument with excess
5066 precision. Ensure any EXCESS_PRECISION_EXPR is present in
5067 argument passed to build_binary_op and convert_for_assignment but
5068 not for call to c_fully_fold.
5069 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
5070 Ensure build_binary_op is called with argument with original
5071 semantic type. Avoid calling c_fully_fold with an
5072 EXCESS_PRECISION_EXPR from build_binary_op.
5074 2017-09-01 Jakub Jelinek <jakub@redhat.com>
5077 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
5079 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5080 Alan Hayward <alan.hayward@arm.com>
5081 David Sherwood <david.sherwood@arm.com>
5083 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
5084 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
5085 m1 and m2 to the signed equivalent of a fixed-point
5088 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5090 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
5091 than CAN_HAVE_LOCATION_P when determining whether to use the
5092 location_t value within "value".
5094 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5096 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
5097 rather than peeking the location of the first token.
5098 * c-tree.h (c_expr::get_location): New method.
5100 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5102 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
5103 to check_function_arguments.
5105 2017-08-18 Marek Polacek <polacek@redhat.com>
5107 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
5110 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5113 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
5114 (check_bitfield_type_and_width): Don't allow bit-field with
5115 warn_if_not_aligned type.
5117 2017-08-14 Martin Sebor <msebor@redhat.com>
5120 * c-objc-common.c (c_objc_common_init): Handle 'G'.
5122 2017-08-11 Marek Polacek <polacek@redhat.com>
5125 * c-decl.c (pushtag): Only print inform if the warning was printed.
5126 (grokdeclarator): Likewise.
5128 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5130 * c-parser.c (c_parser_error): Rename to...
5131 (c_parser_error_richloc): ...this, making static, and adding
5132 "richloc" parameter, passing it to the c_parse_error call,
5133 rather than calling c_parser_set_source_position_from_token.
5134 (c_parser_error): Reintroduce, reimplementing in terms of the
5135 above, converting return type from void to bool.
5136 (class token_pair): New class.
5137 (struct matching_paren_traits): New struct.
5138 (matching_parens): New typedef.
5139 (struct matching_brace_traits): New struct.
5140 (matching_braces): New typedef.
5141 (get_matching_symbol): New function.
5142 (c_parser_require): Add param MATCHING_LOCATION, using it to
5143 highlight matching "opening" tokens for missing "closing" tokens.
5144 (c_parser_skip_until_found): Likewise.
5145 (c_parser_static_assert_declaration_no_semi): Convert explicit
5146 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
5147 class matching_parens, so that the pertinent open parenthesis is
5148 highlighted when there are problems locating the close
5150 (c_parser_struct_or_union_specifier): Likewise.
5151 (c_parser_typeof_specifier): Likewise.
5152 (c_parser_alignas_specifier): Likewise.
5153 (c_parser_simple_asm_expr): Likewise.
5154 (c_parser_braced_init): Likewise, for matching_braces.
5155 (c_parser_paren_condition): Likewise, for matching_parens.
5156 (c_parser_switch_statement): Likewise.
5157 (c_parser_for_statement): Likewise.
5158 (c_parser_asm_statement): Likewise.
5159 (c_parser_asm_operands): Likewise.
5160 (c_parser_cast_expression): Likewise.
5161 (c_parser_sizeof_expression): Likewise.
5162 (c_parser_alignof_expression): Likewise.
5163 (c_parser_generic_selection): Likewise.
5164 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
5165 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
5166 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
5167 In case CPP_OPEN_PAREN, pass loc_open_paren to the
5168 c_parser_skip_until_found call.
5169 (c_parser_objc_class_definition): Use class matching_parens as
5171 (c_parser_objc_method_decl): Likewise.
5172 (c_parser_objc_try_catch_finally_statement): Likewise.
5173 (c_parser_objc_synchronized_statement): Likewise.
5174 (c_parser_objc_at_property_declaration): Likewise.
5175 (c_parser_oacc_wait_list): Likewise.
5176 (c_parser_omp_var_list_parens): Likewise.
5177 (c_parser_omp_clause_collapse): Likewise.
5178 (c_parser_omp_clause_default): Likewise.
5179 (c_parser_omp_clause_if): Likewise.
5180 (c_parser_omp_clause_num_threads): Likewise.
5181 (c_parser_omp_clause_num_tasks): Likewise.
5182 (c_parser_omp_clause_grainsize): Likewise.
5183 (c_parser_omp_clause_priority): Likewise.
5184 (c_parser_omp_clause_hint): Likewise.
5185 (c_parser_omp_clause_defaultmap): Likewise.
5186 (c_parser_oacc_single_int_clause): Likewise.
5187 (c_parser_omp_clause_ordered): Likewise.
5188 (c_parser_omp_clause_reduction): Likewise.
5189 (c_parser_omp_clause_schedule): Likewise.
5190 (c_parser_omp_clause_num_teams): Likewise.
5191 (c_parser_omp_clause_thread_limit): Likewise.
5192 (c_parser_omp_clause_aligned): Likewise.
5193 (c_parser_omp_clause_linear): Likewise.
5194 (c_parser_omp_clause_safelen): Likewise.
5195 (c_parser_omp_clause_simdlen): Likewise.
5196 (c_parser_omp_clause_depend): Likewise.
5197 (c_parser_omp_clause_map): Likewise.
5198 (c_parser_omp_clause_device): Likewise.
5199 (c_parser_omp_clause_dist_schedule): Likewise.
5200 (c_parser_omp_clause_proc_bind): Likewise.
5201 (c_parser_omp_clause_uniform): Likewise.
5202 (c_parser_omp_for_loop): Likewise.
5203 (c_parser_cilk_clause_vectorlength): Likewise.
5204 (c_parser_cilk_clause_linear): Likewise.
5205 (c_parser_transaction_expression): Likewise.
5206 * c-parser.h (c_parser_require): Add param matching_location with
5207 default UNKNOWN_LOCATION.
5208 (c_parser_error): Convert return type from void to bool.
5209 (c_parser_skip_until_found): Add param matching_location with
5210 default UNKNOWN_LOCATION.
5212 2017-08-09 Marek Polacek <polacek@redhat.com>
5214 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
5215 * c-tree.h (build_external_ref): Update declaration.
5216 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
5217 (build_external_ref): Change the type of a parameter to bool.
5218 (parser_build_binary_op): Use true/false instead of 1/0.
5219 (pointer_diff): Likewise.
5220 (build_modify_expr): Likewise.
5221 (set_designator): Change the type of a parameter to bool.
5222 (set_init_index): Use true/false instead of 1/0.
5223 (set_init_label): Likewise.
5224 (output_init_element): Change the type of a parameter to bool.
5225 (output_pending_init_elements): Use true/false instead of 1/0.
5226 (process_init_element): Likewise.
5227 (build_binary_op): Change the type of a parameter to bool.
5229 2017-08-09 Marek Polacek <polacek@redhat.com>
5232 * c-typeck.c (pedwarn_init): Make the function take a variable list.
5233 Call emit_diagnostic_valist instead of pedwarn.
5234 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
5235 Print the relevant types in diagnostics.
5237 2017-08-09 Marek Polacek <polacek@redhat.com>
5240 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
5241 build_conditional_expr.
5242 * c-parser.c (c_parser_conditional_expression): Create locations for
5243 EXP1 and EXP2 from their source ranges. Pass the locations down to
5244 build_conditional_expr.
5245 * c-tree.h (build_conditional_expr): Update declaration.
5246 * c-typeck.c (build_conditional_expr): Add location_t parameters.
5247 For -Wsign-compare, also print the types.
5249 2017-08-08 Martin Liska <mliska@suse.cz>
5251 * c-convert.c: Include header files.
5252 * c-typeck.c: Likewise.
5254 2017-08-07 Martin Liska <mliska@suse.cz>
5256 * c-parser.c (c_parser_attributes): Canonicalize name of an
5259 2017-08-02 Marek Polacek <polacek@redhat.com>
5262 * c-parser.c (c_parser_unary_expression): Use set_error.
5266 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
5267 warnings. Avoid walking MACRO_MAP_LOCATIONS.
5269 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
5270 Martin Liska <mliska@suse.cz>
5272 * c-typeck.c (c_finish_goto_label): Build gimple predict
5275 2017-07-31 Martin Liska <mliska@suse.cz>
5278 * c-convert.c (convert): Guard condition with flag_sanitize_p
5279 also with current_function_decl non-null equality.
5280 * c-decl.c (grokdeclarator): Likewise.
5281 * c-typeck.c (build_binary_op): Likewise.
5283 2017-07-25 Marek Polacek <polacek@redhat.com>
5285 * c-decl.c (grokfield): Remove local variable.
5287 2017-07-25 Marek Polacek <polacek@redhat.com>
5290 * c-parser.c (c_parser_else_body): Don't warn about multistatement
5291 macro expansion if the body is in { }.
5292 (c_parser_while_statement): Likewise.
5293 (c_parser_for_statement): Likewise.
5295 2017-07-18 Nathan Sidwell <nathan@acm.org>
5297 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
5299 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5301 * c-decl.c (implicitly_declare): When suggesting a missing
5302 #include, provide a fix-it hint.
5304 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5306 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
5307 and call that instead.
5308 * c-tree.h (selftest::run_c_tests): New decl.
5310 2017-06-26 Marek Polacek <polacek@redhat.com>
5313 * c-parser.c (c_parser_if_body): Set the location of the
5314 body of the conditional after parsing all the labels. Call
5315 warn_for_multistatement_macros.
5316 (c_parser_else_body): Likewise.
5317 (c_parser_switch_statement): Likewise.
5318 (c_parser_while_statement): Likewise.
5319 (c_parser_for_statement): Likewise.
5320 (c_parser_statement): Add a default argument. Save the location
5321 after labels have been parsed.
5322 (c_parser_c99_block_statement): Likewise.
5324 2017-06-19 Richard Biener <rguenther@suse.de>
5326 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5327 negated _Literals to parse _Literal (int) -1.
5329 2017-06-13 Martin Liska <mliska@suse.cz>
5332 * c-convert.c (convert): Use sanitize_flags_p.
5333 * c-decl.c (grokdeclarator): Likewise.
5334 * c-typeck.c (convert_for_assignment): Likewise.
5335 (c_finish_return): Likewise.
5336 (build_binary_op): Likewise.
5338 2017-06-08 Jakub Jelinek <jakub@redhat.com>
5341 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
5342 to sizetype before size_binop.
5344 2017-06-07 Jakub Jelinek <jakub@redhat.com>
5346 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
5349 2017-06-06 Marek Polacek <polacek@redhat.com>
5352 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
5354 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
5356 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5358 * c-parser.c (c_parser_binary_expression): Implement the
5359 -Wsizeof_pointer_div warning.
5360 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
5361 from a parenthesized expression.
5362 (c_parser_expr_list): Use c_last_sizeof_loc.
5363 * c-tree.h (c_last_sizeof_loc): New external.
5364 * c-typeck.c (c_last_sizeof_loc): New variable.
5365 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
5367 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
5370 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
5372 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5374 * c-objc-common.c (c_tree_printer): Gain bool and const char **
5377 2017-05-24 Martin Sebor <msebor@redhat.com>
5380 * c-fold.c (c_fully_fold_internal): Adjust.
5381 * c-typeck.c (parser_build_unary_op): Adjust.
5383 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
5385 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
5386 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
5389 2017-05-23 Marek Polacek <polacek@redhat.com>
5391 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
5394 2017-05-22 Jakub Jelinek <jakub@redhat.com>
5396 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
5397 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
5398 it returned invariant. Call tree_invariant_p unconditionally
5399 afterwards to decide whether to return expr or op0.
5401 2017-05-22 Nathan Sidwell <nathan@acm.org>
5403 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
5405 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
5407 * c-parser.c (c_parser_omp_clause_default): Handle
5408 "OMP_CLAUSE_DEFAULT_PRESENT".
5410 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5412 * config-lang.in (gtfiles): Add c-family/c-format.c.
5414 2017-05-18 Nathan Sidwell <nathan@acm.org>
5416 * c-decl.c (pushdecl_top_level): Delete unused function.
5418 2017-05-18 Marek Polacek <polacek@redhat.com>
5420 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
5421 (check_earlier_gotos): Likewise.
5422 (define_label): Likewise.
5423 (pending_xref_error): Likewise.
5424 (smallest_type_quals_location): Likewise.
5425 (grokdeclarator): Likewise.
5426 (grokparms): Likewise.
5427 (identifier_global_value): Likewise.
5428 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
5429 (find_init_member): Likewise.
5431 2017-05-18 Marek Polacek <polacek@redhat.com>
5433 * c-decl.c (start_decl): Use false/true instead of 0/1.
5434 (grokdeclarator): Likewise.
5435 (finish_struct): Likewise.
5436 (start_function): Change the return type to bool. Use false/true
5438 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
5439 * c-tree.h (start_function): Update.
5440 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
5441 (set_designator): Change the return type to bool. Use false/true
5444 2017-05-17 Marek Polacek <polacek@redhat.com>
5446 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
5447 * c-typeck.c: Likewise.
5449 2017-05-17 Marek Polacek <polacek@redhat.com>
5452 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
5453 DECL_IGNORED_P even for non-static compound literals.
5455 2017-05-17 Martin Liska <mliska@suse.cz>
5457 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
5458 use it instead of int type.
5460 2017-05-17 Marek Polacek <polacek@redhat.com>
5462 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
5464 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
5465 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
5466 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
5467 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
5469 (c_parser_conditional_expression): Likewise.
5470 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
5471 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
5472 (process_init_element): Likewise.
5473 (build_binary_op): Likewise.
5474 (handle_omp_array_sections_1): Likewise.
5476 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
5478 * c-parser.c (c_parser_omp_clause_num_gangs)
5479 (c_parser_omp_clause_num_workers)
5480 (c_parser_omp_clause_vector_length): Merge functions into...
5481 (c_parser_oacc_single_int_clause): ... this new function. Adjust
5484 2017-05-11 Nathan Sidwell <nathan@acm.org>
5486 * gimple-parser.c: Don't #include tree-dump.h.
5488 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5491 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
5493 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5496 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5497 incorrect __MEM syntax.
5499 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5502 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
5505 2017-05-09 Nathan Sidwell <nathan@acm.org>
5507 * c-tree.h (pushdecl): Declare.
5509 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5511 * c-decl.c (warn_defaults_to): Replace report_diagnostic
5512 with diagnostic_report_diagnostic.
5513 * c-errors.c (pedwarn_c99): Likewise.
5514 (pedwarn_c90): Likewise.
5516 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5519 * c-gimplify.c (c_gimplify_expr): Remove calls to
5520 cilk_gimplifY_call_params_in_spawned_fn.
5522 2017-04-25 David Malcolm <dmalcolm@redhat.com>
5524 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
5525 hint for removing extra semicolon.
5527 2017-04-21 Jakub Jelinek <jakub@redhat.com>
5530 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
5531 enabled, set specs->type to integer_type_node.
5533 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5535 * c-array-notation.c: Fix typo in comment.
5537 2017-03-29 Marek Polacek <polacek@redhat.com>
5540 * c-decl.c (finish_decl): Check VAR_P.
5542 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5545 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
5546 * c-typeck.c (c_mark_addressable): Likewise. Look through
5547 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
5549 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
5551 2017-03-23 Marek Polacek <polacek@redhat.com>
5553 * c-tree.h: Remove a C_RID_YYCODE reference.
5555 2017-03-21 Jakub Jelinek <jakub@redhat.com>
5558 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
5559 optional COMPOUND_EXPR with ubsan instrumentation.
5561 2017-03-17 Marek Polacek <polacek@redhat.com>
5563 * c-parser.c: Add C11 references.
5565 2017-03-15 Marek Polacek <polacek@redhat.com>
5567 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
5569 2017-03-11 Marek Polacek <polacek@redhat.com>
5571 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
5573 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5575 PR translation/79848
5576 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5578 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
5580 2017-03-09 Marek Polacek <polacek@redhat.com>
5583 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5584 parameter declarations with initializers.
5586 2017-03-09 Jakub Jelinek <jakub@redhat.com>
5589 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
5592 2017-03-07 Jakub Jelinek <jakub@redhat.com>
5595 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
5596 for "may only be used in compound statements" diagnostics, change it
5597 such that the same translatable string is used for all pragmas. For
5598 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
5600 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
5601 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
5602 "may only be used in compound statements" diagnostics, such that the
5603 same translatable string is used for all pragmas.
5605 2017-03-04 Marek Polacek <polacek@redhat.com>
5608 * c-decl.c (implicit_decl_warning): Add missing space.
5610 2017-03-03 Marek Polacek <polacek@redhat.com>
5613 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
5614 current_function_prototype_arg_types is error_mark_node. Fix
5615 formatting. Use TREE_VALUE instead of TREE_TYPE.
5617 2017-03-03 Jakub Jelinek <jakub@redhat.com>
5620 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
5621 %<min%> or %<max%> in the diagnostics, instead mention identifier.
5622 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
5626 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
5627 instead of %<_Generic>.
5628 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
5629 (c_parser_omp_target_exit_data): Use %<release%> instead of
5632 2017-02-28 Jakub Jelinek <jakub@redhat.com>
5634 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
5635 instead of just cond ? "..." : "...".
5636 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
5637 for "enter"/"exit" keyword.
5638 (c_finish_oacc_routine): Don't use %s to supply portions of the
5641 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5644 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
5645 handle -Wrestrict here.
5646 * c-typeck.c (build_function_call_vec): Adjust
5647 check_function_arguments caller.
5649 2017-02-23 Richard Biener <rguenther@suse.de>
5652 * gimple-parser.c (c_parser_gimple_statement): Use set_error
5653 to initialize c_exprs to return.
5654 (c_parser_gimple_binary_expression): Likewise.
5655 (c_parser_gimple_unary_expression): Likewise.
5656 (c_parser_gimple_postfix_expression): Likewise.
5658 2017-02-22 Marek Polacek <polacek@redhat.com>
5661 * c-typeck.c (convert_arguments): Handle error_mark_node.
5663 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5665 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
5666 value of c_parser_parse_ssa_name against error_mark_node and emit
5667 error if ssa name is anonymous and written as default definition.
5669 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5671 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5674 2017-02-16 Jakub Jelinek <jakub@redhat.com>
5677 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5678 ignore #pragma omp target even when not followed by identifier.
5680 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5682 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5683 (c_parser_gimple_unary_expression): Likewise.
5685 2017-02-13 Jakub Jelinek <jakub@redhat.com>
5687 * c-parser.c (c_parser_oacc_declare): Add missing space in
5690 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5693 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5694 set_c_expr_source_range when parsing ssa-name.
5696 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
5697 Richard Biener <rguenther@suse.de>
5699 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5700 building IL when arguments are error_mark_node.
5701 (c_parser_gimple_unary_expression): Likewise.
5702 (c_parser_gimple_if_stmt): Likewise.
5703 (c_parser_gimple_switch_stmt): Likewise.
5704 (c_parser_gimple_return_stmt): Likewise.
5705 (c_parser_parse_ssa_name): When name lookup fails do not build
5706 an SSA name. Use undeclared rather than not declared in error
5709 2017-02-09 Marek Polacek <polacek@redhat.com>
5712 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5713 instead of c_parser_skip_until_found.
5715 2017-02-09 Jakub Jelinek <jakub@redhat.com>
5718 * c-parser.c (c_parser_omp_declare_target): Don't invoke
5719 symtab_node::get on automatic variables.
5721 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
5722 Chung-Lin Tang <cltang@codesourcery.com>
5724 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5725 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5727 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5729 2017-02-07 Richard Biener <rguenther@suse.de>
5731 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5732 (c_parser_gimple_postfix_expression_after_primary):
5733 Do not use c_build_function_call_vec to avoid folding and promotion.
5736 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5739 * c-decl.c (pop_scope): Pass main_input_filename to
5740 build_translation_unit_decl.
5742 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5744 * c-parser.c: Include "read-rtl-function.h" and
5746 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5747 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
5748 production. Update for renaming of field "gimple_pass" to
5749 "gimple_or_rtl_pass". If __RTL was seen, call
5750 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
5751 to an auto_timevar, to cope with early exit.
5752 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5753 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5754 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5756 (c_parser_parse_rtl_body): New function.
5757 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5758 (struct c_declspecs): Rename field "gimple_pass" to
5759 "gimple_or_rtl_pass". Add field "rtl_p".
5760 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5761 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5762 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5763 (c_parser_gimple_or_rtl_pass_list): ...this.
5765 2017-01-20 Marek Polacek <polacek@redhat.com>
5768 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5770 2017-01-13 Richard Biener <rguenther@suse.de>
5772 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5775 2017-01-13 Richard Biener <rguenther@suse.de>
5777 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5778 _Literal ( type-name ) number.
5780 2017-01-12 Richard Biener <rguenther@suse.de>
5782 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5785 2017-01-11 Jakub Jelinek <jakub@redhat.com>
5788 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5791 2017-01-11 Richard Biener <rguenther@suse.de>
5794 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5795 returns on parse errors.
5797 2017-01-04 Marek Polacek <polacek@redhat.com>
5800 * c-parser.c (c_parser_postfix_expression): Mark zero character
5801 constants by setting original_type in c_expr.
5802 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5803 with a zero character constant.
5804 (char_type_p): New function.
5806 2017-01-04 David Malcolm <dmalcolm@redhat.com>
5808 * c-parser.c (c_parser_declaration_or_fndef): Create a
5809 rich_location at init_loc and parse it to start_init.
5810 (last_init_list_comma): New global.
5811 (c_parser_braced_init): Update last_init_list_comma when parsing
5812 commas. Pass it to pop_init_level. Pass location of closing
5813 brace to pop_init_level.
5814 (c_parser_postfix_expression_after_paren_type): Create a
5815 rich_location at type_loc and parse it to start_init.
5816 (c_parser_omp_declare_reduction): Likewise for loc.
5817 * c-tree.h (start_init): Add rich_location * param.
5818 (pop_init_level): Add location_t param.
5819 * c-typeck.c (struct initializer_stack): Add field
5820 "missing_brace_richloc".
5821 (start_init): Add richloc param, use it to initialize
5822 the stack node's missing_brace_richloc.
5823 (last_init_list_comma): New decl.
5824 (finish_implicit_inits): Pass last_init_list_comma to
5826 (push_init_level): When finding missing open braces, add fix-it
5827 hints to the richloc.
5828 (pop_init_level): Add "insert_before" param and pass it
5829 when calling pop_init_level. Add fixits about missing
5830 close braces to any richloc. Use the richloc for the
5831 -Wmissing-braces warning.
5832 (set_designator): Pass last_init_list_comma to pop_init_level.
5833 (process_init_element): Likewise.
5835 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5837 Update copyright years.
5839 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5842 * c-typeck.c (build_function_call_vec): If check_function_arguments
5843 returns true, set TREE_NO_WARNING on CALL_EXPR.
5846 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5847 to *expr instead of overwriting it.
5849 2016-12-20 Richard Biener <rguenther@suse.de>
5851 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5853 (c_parser_gimple_statement): Only build assigns for non-error
5855 (c_parser_gimple_postfix_expression_after): Improve error recovery.
5857 2016-12-14 Martin Jambor <mjambor@suse.cz>
5859 * c-parser.c: Include omp-general.h and omp-offload.h instead of
5861 (c_finish_oacc_routine): Adjusted call to
5862 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5863 to use their new names.
5864 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5866 (c_parser_oacc_update): Likewise.
5867 (c_parser_omp_simd): Likewise.
5868 (c_parser_omp_target_update): Likewise.
5869 * c-typeck.c: Include omp-general.h instead of omp-low.h.
5870 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5872 (c_finish_omp_cancellation_point): Likewise.
5873 * gimple-parser.c: Do not include omp-low.h
5875 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
5876 James Norris <jnorris@codesourcery.com>
5878 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5879 EXIT_DATA,WAIT} are not used in compound statements.
5880 (c_parser_oacc_enter_exit_data): Update diagnostics.
5882 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5885 * c-decl.c (diagnose_mismatched_decls): Use
5886 OPT_Wbuiltin_declaration_mismatch here too.
5888 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
5889 Alan Hayward <alan.hayward@arm.com>
5890 David Sherwood <david.sherwood@arm.com>
5892 * c-decl.c (merge_decls): Use SET_DECL_MODE.
5893 (make_label, finish_struct): Likewise.
5895 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
5896 Richard Biener <rguenther@suse.de>
5898 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5899 * config-lang.in (gtfiles): Add c/c-parser.h.
5900 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
5901 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
5902 * c-parser.c (enum c_id_kind, struct c_token,
5903 c_parser_next_token_is, c_parser_next_token_is_not,
5904 c_parser_next_token_is_keyword,
5905 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
5907 * c-parser.h: ... new header.
5908 * c-parser.c: Include c-parser.h and gimple-parser.h.
5909 (c_parser_peek_token, c_parser_peek_2nd_token,
5910 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5911 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5912 c_parser_error, c_parser_require, c_parser_skip_until_found,
5913 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5914 c_parser_type_name): Export.
5915 (c_parser_tokens_buf): New function.
5916 (c_parser_error): Likewise.
5917 (c_parser_set_error): Likewise.
5918 (c_parser_declspecs): Handle RID_GIMPLE.
5919 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5920 via c_parser_parse_gimple_body.
5921 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5922 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5923 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5924 c_parser_error, c_parser_require, c_parser_skip_until_found,
5925 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5926 c_parser_type_name): Declare.
5927 (struct c_parser): Declare forward.
5928 (c_parser_tokens_buf): Declare.
5929 (c_parser_error): Likewise.
5930 (c_parser_set_error): Likewise.
5931 * gimple-parser.c: New file.
5932 * gimple-parser.h: Likewise.
5934 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5937 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5940 2016-09-11 Le-Chun Wu <lcwu@google.com>
5941 Mark Wielaard <mjw@redhat.com>
5943 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5944 to the given -Wshadow= variant.
5946 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5948 * c-typeck.c: Include memmodel.h.
5950 2016-10-13 Jakub Jelinek <jakub@redhat.com>
5953 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5954 instead of lhd_return_null_tree_v.
5956 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
5959 * c-decl.c (smallest_type_quals_location): New static function.
5960 (grokdeclarator): Try to find the correct location for an ignored
5963 2016-09-26 Marek Polacek <polacek@redhat.com>
5966 * c-decl.c (pop_scope): Add gcc_fallthrough.
5968 2016-09-26 Marek Polacek <polacek@redhat.com>
5971 * c-parser.c (struct c_token): Add flags field.
5972 (c_lex_one_token): Pass it to c_lex_with_flags.
5973 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
5974 into IFN_FALLTHROUGH.
5975 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
5976 attribute fallthrough after a case label or default label.
5977 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
5979 2016-09-24 Marek Polacek <polacek@redhat.com>
5982 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5983 have boolean value. Warn about ++/-- on booleans.
5985 2016-09-23 Jakub Jelinek <jakub@redhat.com>
5987 * c-parser.c (incomplete_record_decls): Remove unnecessary
5988 = vNULL initialization of file scope vec.
5990 2016-09-16 Marek Polacek <polacek@redhat.com>
5992 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5994 2016-09-14 Marek Polacek <polacek@redhat.com>
5996 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5997 (fix_array_notation_expr): Likewise.
5998 * c-decl.c (finish_decl): Likewise.
5999 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6000 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
6001 (function_to_pointer_conversion): Use false instead of 0.
6002 (convert_lvalue_to_rvalue): Likewise.
6003 (parser_build_unary_op): Likewise.
6004 (build_atomic_assign): Likewise.
6005 (build_unary_op): Change nonconvert parameter type to bool, use
6006 true/false instead of 1/0.
6007 (build_binary_op): Use true instead of 1.
6009 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6011 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
6012 of add_fixit_insert to add_fixit_insert_before.
6014 2016-09-13 Marek Polacek <polacek@redhat.com>
6016 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
6019 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6022 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
6023 COMPOUND_EXPR to warn_for_omitted_condop.
6025 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6027 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
6028 c_get_substring_location for this new langhook.
6030 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6033 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
6035 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
6036 instead of mark_exp_read on low_bound/length expression.
6037 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
6038 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6039 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6040 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
6041 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
6042 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
6043 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
6044 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
6045 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
6046 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
6047 instead of mark_expr_read.
6048 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
6049 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
6050 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
6051 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
6052 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
6053 array section bases outside of depend clause, for depend clause
6054 use convert_lvalue_to_rvalue on the base.
6055 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
6056 linear, aligned, map, to and from clauses.
6057 (c_omp_clause_copy_ctor): New function.
6059 2016-09-01 Marek Polacek <polacek@redhat.com>
6062 * c-typeck.c (composite_type): Add FALLTHRU comment.
6064 2016-08-31 David Malcolm <dmalcolm@redhat.com>
6066 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
6067 to the insertion fixits for "struct", "union", and "enum".
6069 2016-08-30 David Malcolm <dmalcolm@redhat.com>
6071 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
6072 rather than add_fixit_misspelled_id.
6073 (undeclared_variable): Likewise.
6074 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
6075 now-redundant "here" params from add_fixit_insert method calls.
6076 (c_parser_parameter_declaration): Likewise.
6077 * c-typeck.c (build_component_ref): Remove now-redundant range
6078 param from add_fixit_replace method calls.
6080 2016-08-25 Marek Polacek <polacek@redhat.com>
6082 * c-typeck.c (parser_build_binary_op): Pass LHS to
6083 warn_logical_not_parentheses.
6085 2016-08-25 Marek Polacek <polacek@redhat.com>
6088 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
6089 or _FloatN or _FloatNx is not supported.
6090 (finish_declspecs): Set type to integer_type_node when _FloatN or
6091 _FloatNx is not supported.
6093 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6096 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
6097 (struct c_declspecs): Add field floatn_nx_idx.
6098 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
6099 and _FloatNx type specifiers.
6100 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
6101 (c_parser_declspecs, c_parser_attribute_any_word)
6102 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
6103 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
6104 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
6105 narrower than double.
6107 2016-08-12 Jakub Jelinek <jakub@redhat.com>
6108 Martin Liska <mliska@suse.cz>
6111 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
6112 % to determine val element to change. Assert that
6113 wchar_bytes * charwidth fits into val array.
6115 2016-08-12 Marek Polacek <polacek@redhat.com>
6118 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
6119 (c_parser_postfix_expression): Likewise.
6120 * c-typeck.c (build_unary_op): Adjust fall through comment.
6121 (c_mark_addressable): Likewise.
6123 2016-08-11 Jakub Jelinek <jakub@redhat.com>
6126 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
6127 array member through typedef, for orig_qual_indirect == 0 clear
6130 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6133 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
6134 this up to selftest::run_c_tests.
6135 (selftest::run_c_tests): New function.
6137 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
6139 * c-parser.c (struct oacc_routine_data): Add error_seen and
6140 fndecl_seen members.
6141 (c_finish_oacc_routine): Use these.
6142 (c_parser_declaration_or_fndef): Adjust.
6143 (c_parser_oacc_routine): Likewise. Support more C language
6144 constructs, and improve diagnostics. Move pragma context
6146 (c_parser_pragma): ... here.
6148 * c-parser.c (struct oacc_routine_data): New.
6149 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
6151 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
6152 declare target" attribute.
6154 2016-08-01 Jan Beulich <jbeulich@suse.com>
6156 * c-fold.c (c_fully_fold_internal): Also emit shift count
6157 warnings for vector types.
6158 * c-typeck.c (build_binary_op): Likewise.
6160 2016-07-29 Marek Polacek <polacek@redhat.com>
6163 * c-decl.c (finish_struct): Rephrase an error message.
6166 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
6167 to error node for invalid code.
6170 * c-decl.c (implicitly_declare): Return decl early not only for
6171 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
6173 2016-07-29 Jakub Jelinek <jakub@redhat.com>
6176 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
6177 on GNU extern inline functions.
6179 2016-07-29 Marek Polacek <polacek@redhat.com>
6182 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
6185 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
6187 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
6189 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6191 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
6193 (best_macro_match): Likewise, converting from a typedef to a
6195 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
6196 (lookup_name_fuzzy): Update for change of best_macro_match to a
6197 subclass with a ctor that calls cpp_forall_identifiers.
6199 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6201 * c-decl.c (implicit_decl_warning): Update for conversion of
6202 return type of lookup_name_fuzzy to const char *.
6203 (undeclared_variable): Likewise.
6204 (lookup_name_fuzzy): Convert return type from tree to
6206 * c-parser.c (c_parser_declaration_or_fndef): Update for
6207 conversion of return type of lookup_name_fuzzy to const char *.
6208 (c_parser_parameter_declaration): Likewise.
6210 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
6212 * c-parser.c (c_parser_oacc_declare): Don't scan for
6214 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
6215 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
6216 zero-length subarrays.
6218 2016-07-15 Jakub Jelinek <jakub@redhat.com>
6221 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
6222 instead of FUZZY_LOOKUP_NAME.
6223 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
6224 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
6226 2016-07-14 Jakub Jelinek <jakub@redhat.com>
6229 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
6231 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6233 * c-parser.c (c_parser_generic_selection): Make type of variable
6235 (c_parser_omp_declare_simd): Likewise.
6237 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6239 * c-decl.c (struct c_struct_parse_info): Change member types
6240 from vec to auto_vec.
6241 (start_struct): Adjust.
6242 (finish_struct): Likewise.
6244 2016-07-02 Jakub Jelinek <jakub@redhat.com>
6247 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
6249 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6251 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
6252 Move pragma context checking into...
6253 (c_parser_omp_cancellation_point): ... here, and improve
6254 diagnostic messages.
6255 * c-typeck.c (c_finish_omp_cancel)
6256 (c_finish_omp_cancellation_point): Improve diagnostic messages.
6258 2016-06-29 Jakub Jelinek <jakub@redhat.com>
6261 * c-typeck.c (c_build_qualified_type): Don't clear
6262 C_TYPE_INCOMPLETE_VARS for the main variant.
6264 2016-06-28 Martin Sebor <msebor@redhat.com>
6267 * c-typeck.c (output_init_element): Diagnose incompatible types
6268 before non-constant initializers.
6270 2016-06-28 Jakub Jelinek <jakub@redhat.com>
6272 * Make-lang.in: Don't cat ../stage_current if it does not exist.
6274 2016-06-23 Andi Kleen <ak@linux.intel.com>
6276 * Make-lang.in: Add support for autofdo.
6278 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6281 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
6282 (implicit_decl_warning): When issuing warnings for implicit
6283 declarations, attempt to provide a suggestion via
6285 (undeclared_variable): Likewise when issuing errors.
6286 (lookup_name_in_scope): Likewise.
6287 (struct edit_distance_traits<cpp_hashnode *>): New struct.
6288 (best_macro_match): New typedef.
6289 (find_closest_macro_cpp_cb): New function.
6290 (lookup_name_fuzzy): New function.
6291 * c-parser.c: Include gcc-rich-location.h.
6292 (c_token_starts_typename): Split out case CPP_KEYWORD into...
6293 (c_keyword_starts_typename): ...this new function.
6294 (c_parser_declaration_or_fndef): When issuing errors about
6295 missing "struct" etc, add a fixit. For other kinds of errors,
6296 attempt to provide a suggestion via lookup_name_fuzzy.
6297 (c_parser_parms_declarator): When looking ahead to detect typos in
6298 type names, also reject CPP_KEYWORD.
6299 (c_parser_parameter_declaration): When issuing errors about
6300 unknown type names, attempt to provide a suggestion via
6302 * c-tree.h (c_keyword_starts_typename): New prototype.
6304 2016-06-20 Joseph Myers <joseph@codesourcery.com>
6307 * c-typeck.c (build_conditional_expr): Return error_mark_node if
6308 c_common_type returns error_mark_node.
6310 2016-06-19 Martin Sebor <msebor@redhat.com>
6313 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
6314 __alignof__ (expression).
6316 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6318 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
6320 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6322 * c-typeck.c (build_component_ref): Simplify fixit code by
6323 using gcc_rich_location::add_fixit_misspelled_id.
6324 (set_init_label): Likewise.
6326 2016-06-13 David Malcolm <dmalcolm@redhat.com>
6328 * c-parser.c (c_parser_initelt): Provide location of name for new
6329 location_t param of set_init_label.
6330 * c-tree.h (set_init_label): Add location_t param.
6331 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
6332 param and use it when issuing error messages about unrecognized
6333 field names. Attempt to provide a fixit hint if appropriate,
6334 otherwise update the error message to provide the type name.
6336 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
6339 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
6342 2016-06-08 Martin Sebor <msebor@redhat.com>
6343 Jakub Jelinek <jakub@redhat.com>
6347 * c-typeck.c (convert_arguments): Don't promote last argument
6348 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6350 2016-06-08 Marek Polacek <polacek@redhat.com>
6353 * c-decl.c (grokdeclarator): Check TYPE_P.
6356 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
6359 2016-06-07 David Malcolm <dmalcolm@redhat.com>
6361 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
6362 and structure element reference, capture the location of the
6363 element name token and pass it to build_component_ref.
6364 (c_parser_postfix_expression_after_primary): Likewise for
6365 structure element dereference.
6366 (c_parser_omp_variable_list): Likewise for
6367 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
6368 * c-tree.h (build_component_ref): Add location_t param.
6369 * c-typeck.c (build_component_ref): Add location_t param
6370 COMPONENT_LOC. Use it, if available, when issuing hints about
6371 mispelled member names to provide a fixit replacement hint.
6373 2016-06-06 Marek Polacek <polacek@redhat.com>
6376 * c-parser.c (c_parser_direct_declarator): Set location.
6378 2016-06-06 Marek Polacek <polacek@redhat.com>
6380 * c-typeck.c (comptypes_internal): Handle comparisons of
6381 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
6382 TYPE_REF_CAN_ALIAS_ALL.
6384 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
6386 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
6387 arguments as addressable when async clause exists.
6389 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6392 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
6393 when combined with target construct.
6395 2016-05-26 Jakub Jelinek <jakub@redhat.com>
6397 * c-parser.c (c_parser_omp_clause_schedule): Warn if
6398 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
6400 2016-05-25 Marek Polacek <polacek@redhat.com>
6403 * c-decl.c (c_make_fname_decl): Don't check seen_error.
6406 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
6408 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
6410 * c-parser.c (c_parser_oacc_declare): Add support for
6411 GOMP_MAP_FIRSTPRIVATE_POINTER.
6412 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
6413 argument with enum c_omp_region_type ort.
6414 (handle_omp_array_sections): Likewise. Update call to
6415 handle_omp_array_sections_1.
6416 (c_finish_omp_clauses): Add specific errors and warning messages for
6417 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
6418 call to handle_omp_array_sections.
6420 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
6422 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
6424 2016-05-24 Richard Biener <rguenther@suse.de>
6428 * c-typeck.c (build_array_ref): Do not complain about indexing
6429 non-lvalue vectors. Adjust for function name change.
6431 2016-05-20 Martin Sebor <msebor@redhat.com>
6434 * c-typeck.c (error_init): Use
6435 expansion_point_location_if_in_system_header.
6436 (warning_init): Same.
6438 2016-05-19 David Malcolm <dmalcolm@redhat.com>
6441 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
6443 (c_parser_postfix_expression): Likewise.
6444 * c-tree.h (c_expr::set_error): New method.
6445 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
6446 that result's range is initialized.
6448 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6450 * c-typeck.c (parser_build_unary_op): Fix formatting.
6452 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
6454 * c-decl.c (grokdeclarator): Remove errmsg and use of
6455 targetm.invalid_return_type.
6456 (grokparms): Remove errmsg and use of
6457 targetm.invalid_parameter_type.
6459 2016-05-13 Joseph Myers <joseph@codesourcery.com>
6461 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
6462 function return type.
6464 2016-05-12 Marek Polacek <polacek@redhat.com>
6467 * c-decl.c (build_compound_literal): Pass LOC down to
6468 c_incomplete_type_error.
6469 * c-tree.h (require_complete_type): Adjust declaration.
6470 (c_incomplete_type_error): Likewise.
6471 * c-typeck.c (require_complete_type): Add location parameter, pass it
6472 down to c_incomplete_type_error.
6473 (c_incomplete_type_error): Add location parameter, pass it down to
6475 (build_component_ref): Pass location down to c_incomplete_type_error.
6476 (default_conversion): Pass location down to require_complete_type.
6477 (build_array_ref): Likewise.
6478 (build_function_call_vec): Likewise.
6479 (convert_arguments): Likewise.
6480 (build_unary_op): Likewise.
6481 (build_c_cast): Likewise.
6482 (build_modify_expr): Likewise.
6483 (convert_for_assignment): Likewise.
6484 (c_finish_omp_clauses): Likewise.
6486 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6489 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
6491 * c-errors.c (pedwarn_c90): Return true if warned.
6492 * c-tree.h (pedwarn_c90): Change return type to bool.
6493 (enum c_declspec_word): Add new enumerator cdw_atomic.
6495 2016-05-11 Marek Polacek <polacek@redhat.com>
6498 * c-decl.c (diagnose_mismatched_decls): Factor out code to
6499 diagnose_mismatched_attributes and call it.
6501 2016-05-10 Marek Polacek <polacek@redhat.com>
6504 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
6505 on a declaration following the definition.
6507 2016-05-05 Jakub Jelinek <jakub@redhat.com>
6509 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
6510 parse it through to c_parser_c99_block_statement.
6511 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
6514 2016-05-04 Marek Polacek <polacek@redhat.com>
6516 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
6519 2016-05-04 Marek Polacek <polacek@redhat.com>
6522 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
6523 for macro expansions.
6525 2016-05-03 Marek Polacek <polacek@redhat.com>
6528 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
6529 check_builtin_function_arguments.
6531 2016-05-03 Richard Biener <rguenther@suse.de>
6533 * Make-lang.in (cc1-checksum.c): For stage-final re-use
6534 the checksum from the previous stage.
6536 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6538 * c-parser.c (c_parser_oacc_all_clauses): Update call to
6539 c_finish_omp_clauses.
6540 (c_parser_omp_all_clauses): Likewise.
6541 (c_parser_oacc_cache): Likewise.
6542 (c_parser_oacc_loop): Likewise.
6543 (omp_split_clauses): Likewise.
6544 (c_parser_omp_declare_target): Likewise.
6545 (c_parser_cilk_all_clauses): Likewise.
6546 (c_parser_cilk_for): Likewise.
6547 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
6548 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
6550 2016-05-02 Marek Polacek <polacek@redhat.com>
6553 * c-decl.c (grokdeclarator): Diagnose when array's size has an
6556 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6559 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
6560 OACC_LOOP_CLAUSE_MASK.
6561 (c_parser_oacc_kernels_parallel): Update call to
6562 c_oacc_split_loop_clauses.
6564 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
6566 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
6567 argument to build_modify_expr in two cases.
6569 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6571 * c-parser.c (c_parser_postfix_expression_after_primary): Call
6572 warn_for_memset instead of warning directly here.
6574 2016-04-26 Marek Polacek <polacek@redhat.com>
6577 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
6579 (c_parser_for_statement): ... here.
6580 (c_parser_if_statement): Use it.
6581 (c_parser_switch_statement): Use it.
6582 (c_parser_while_statement): Use it.
6585 * c-decl.c (pushdecl): Pass LOCUS down to warning.
6587 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6590 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
6591 instead of c_finish_cilk_clauses.
6592 * c-tree.h (c_finish_omp_clauses): Add new default argument.
6593 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
6594 floating-point variables in the linear clause for Cilk Plus.
6596 2016-04-18 Michael Matz <matz@suse.de>
6598 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
6599 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
6601 2016-04-15 Marek Polacek <polacek@redhat.com>
6604 * c-typeck.c (build_unary_op): Pass location down to error and
6607 2016-04-15 Jakub Jelinek <jakub@redhat.com>
6610 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
6612 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
6613 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
6614 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
6615 Adjust c_parser_pragma callers.
6616 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
6618 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
6620 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
6621 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
6622 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
6623 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
6624 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
6625 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
6626 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
6627 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
6629 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
6630 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
6633 2016-04-13 Marek Polacek <polacek@redhat.com>
6636 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
6638 (c_parser_statement): Likewise.
6639 (c_parser_c99_block_statement): Likewise.
6640 (c_parser_while_statement): Likewise.
6641 (c_parser_for_statement): Likewise.
6642 (c_parser_if_body): Don't set IF_P here.
6643 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
6644 about dangling else here.
6645 * c-tree.h (c_finish_if_stmt): Adjust declaration.
6646 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
6647 warn about dangling else here.
6649 2016-04-04 Marek Polacek <polacek@redhat.com>
6652 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
6654 2016-03-31 Marek Polacek <polacek@redhat.com>
6657 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
6659 2016-03-18 David Malcolm <dmalcolm@redhat.com>
6662 * c-parser.c (c_parser_postfix_expression): Set the source range
6663 for uses of "__builtin_types_compatible_p".
6665 2016-03-17 Jakub Jelinek <jakub@redhat.com>
6668 * c-typeck.c (composite_type): Don't count void_list_node
6669 into len, if the list is terminated by void_list_node, start
6670 with void_list_node instead of NULL for newargs. Stop
6673 2016-03-16 Marek Polacek <polacek@redhat.com>
6676 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
6677 nested functions returning VM types.
6679 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
6681 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6682 when calling c_finish_omp_clauses.
6684 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
6687 * c-decl.c (get_parm_info): Don't queue implicit function declarations
6690 2016-03-04 Marek Polacek <polacek@redhat.com>
6693 * c-parser.c (c_parser_postfix_expression): Call
6694 c_parser_cast_expression rather than c_parser_postfix_expression.
6696 2016-03-01 Jakub Jelinek <jakub@redhat.com>
6700 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6701 of incomplete decls to error_mark_node.
6703 2016-02-24 Marek Polacek <polacek@redhat.com>
6706 * c-decl.c (finish_decl): Don't update the copy of the type of a
6707 different decl type.
6709 2016-02-23 Jakub Jelinek <jakub@redhat.com>
6712 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6713 in id_kind reclassification.
6715 2016-02-16 Jakub Jelinek <jakub@redhat.com>
6718 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6720 2016-02-16 James Norris <jnorris@codesourcery.com>
6723 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6725 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
6727 * c-decl.c (build_null_declspecs): Zero the entire struct.
6730 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
6731 callers changed. If nested_p is true, use it to call
6732 finish_implicit_inits.
6733 * c-tree.h (finish_implicit_inits): Declare.
6734 * c-typeck.c (finish_implicit_inits): New function. Move code
6736 (push_init_level): ... here.
6737 (set_designator, process_init_element): Call finish_implicit_inits.
6739 2016-02-11 Jakub Jelinek <jakub@redhat.com>
6742 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6743 arguments for -Waddress warning.
6745 2016-02-04 Jakub Jelinek <jakub@redhat.com>
6748 * c-decl.c (finish_enum): When honoring mode attribute,
6749 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6751 2016-01-29 Jakub Jelinek <jakub@redhat.com>
6754 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6755 all type variants, not just TYPE_MAIN_VARIANT.
6757 2016-01-27 Jakub Jelinek <jakub@redhat.com>
6760 * c-decl.c (c_write_global_declarations_1): Warn with
6761 warn_unused_function if static prototype without definition
6764 2016-01-27 Marek Polacek <polacek@redhat.com>
6767 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6768 to unsigned, if needed. Add -Wsign-compare warning.
6770 2016-01-26 Jakub Jelinek <jakub@redhat.com>
6772 PR tree-optimization/69483
6773 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6775 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6778 * c-tree.h (incomplete_record_decls): Declare.
6779 * c-parser.c (incomplete_record_decls): Define.
6780 (c_parser_translation_unit): Iterate through incomplete_record_decls and
6781 report error if any decl has zero size.
6782 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6783 or enum type to incomplete_record_decls.
6785 2016-01-14 Tom de Vries <tom@codesourcery.com>
6787 PR tree-optimization/68773
6788 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6791 2016-01-14 Marek Polacek <polacek@redhat.com>
6794 * c-decl.c (grokdeclarator): Provide more information for invalid
6797 2016-01-06 David Malcolm <dmalcolm@redhat.com>
6799 * c-parser.c (c_parser_unary_expression): For dereferences, build
6800 a combined location before calling build_indirect_ref, so that
6801 error reports cover the full range, manually updating the c_expr
6804 2016-01-06 Marek Polacek <polacek@redhat.com>
6807 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
6808 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
6811 2016-01-04 Jakub Jelinek <jakub@redhat.com>
6813 Update copyright years.
6815 2016-01-04 Marek Polacek <polacek@redhat.com>
6818 * c-typeck.c (build_atomic_assign): Improve commentary. Add
6819 optimization to use __atomic_fetch_* built-in if possible.
6821 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
6823 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6825 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
6828 2015-12-22 Marek Polacek <polacek@redhat.com>
6831 * c-typeck.c (build_component_ref): Warn when acessing elements of
6832 atomic structures or unions.
6834 2015-12-21 David Malcolm <dmalcolm@redhat.com>
6836 * c-typeck.c: Include "gcc-rich-location.h".
6837 (build_binary_op): In the two places that call binary_op_error,
6838 create a gcc_rich_location and populate it with the location of
6839 the binary op and its two operands.
6841 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6843 * c-parser.c (c_parser_statement_after_labels): When calling
6844 c_finish_return, Use the return expression's location if it has
6845 one, falling back to the location of the first token within it.
6846 * c-typeck.c (c_finish_return): When issuing warnings about
6847 the incorrect presence/absence of a return value, issue a note
6848 showing the declaration of the function.
6850 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6852 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6854 (c_parser_peek_nth_token): New function.
6855 (c_parser_peek_conflict_marker): New function.
6856 (c_parser_error): Detect conflict markers and report them as such.
6858 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6860 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6861 to preserve range information for the primary expression
6862 in the call to c_parser_postfix_expression_after_primary.
6864 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6866 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6867 expression location, falling back on the first token location,
6868 rather than always using the latter.
6870 2015-12-16 Marek Polacek <polacek@redhat.com>
6873 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6876 2015-12-15 Marek Polacek <polacek@redhat.com>
6879 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6882 2015-12-08 David Malcolm <dmalcolm@redhat.com>
6884 * c-parser.c (c_parser_alignof_expression): Capture location of
6885 closing parenthesis (if any), or of end of unary expression, and
6886 use it to build a src_range for the expression.
6888 2015-12-08 David Malcolm <dmalcolm@redhat.com>
6891 * c-parser.c (c_parser_get_builtin_args): Add
6892 "out_close_paren_loc" param, and write back to it.
6893 (c_parser_postfix_expression): Capture the closing
6894 parenthesis location for RID_CHOOSE_EXPR,
6895 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
6896 RID_BUILTIN_SHUFFLE and use it to set the source range
6897 for such expressions; within RID_BUILTIN_COMPLEX set
6898 the underlying location.
6900 2015-12-07 Marek Polacek <polacek@redhat.com>
6903 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
6904 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
6906 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
6908 * c-tree.h (c_build_va_arg): Adjust prototype.
6909 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
6910 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6911 parameter, adjust throughout and issue an error if EXPR is a component
6912 with reverse storage order.
6914 2015-12-02 Jason Merrill <jason@redhat.com>
6916 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6917 (c_fully_fold_internal, decl_constant_value_for_optimization):
6918 Move from c-common.c.
6919 * c-tree.h: Declare decl_constant_value_for_optimization.
6920 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6922 2015-12-02 Joseph Myers <joseph@codesourcery.com>
6925 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6926 following link from declarator to next declarator. Track original
6927 qualified type and pass it to c_build_qualified_type.
6928 * c-typeck.c (c_build_qualified_type): Add arguments
6929 orig_qual_type and orig_qual_indirect.
6931 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
6933 * c-parser.c (c_parser_omp_clause_name)
6934 (c_parser_oacc_all_clauses): Alphabetical sorting.
6936 2015-12-02 Jakub Jelinek <jakub@redhat.com>
6939 * c-decl.c (get_parm_info): Use b->locus instead of input_location
6942 2015-12-01 Julian Brown <julian@codesourcery.com>
6943 Cesar Philippidis <cesar@codesourcery.com>
6944 James Norris <James_Norris@mentor.com>
6946 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6947 (c_parser_oacc_clause_use_device): New function.
6948 (c_parser_oacc_all_clauses): Add use_device support.
6949 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6950 (c_parser_oacc_host_data): New function.
6951 (c_parser_omp_construct): Add host_data support.
6952 * c-tree.h (c_finish_oacc_host_data): Add prototype.
6953 * c-typeck.c (c_finish_oacc_host_data): New function.
6954 (c_finish_omp_clauses): Add use_device support.
6956 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
6959 * c-decl.c: Set TYPE_PACKED in variants.
6961 2015-11-27 Martin Liska <mliska@suse.cz>
6964 * c-array-notation.c (fix_builtin_array_notation_fn):
6965 Use release_vec_vec instead of vec::release.
6966 (build_array_notation_expr): Likewise.
6967 (fix_conditional_array_notations_1): Likewise.
6968 (fix_array_notation_expr): Likewise.
6969 (fix_array_notation_call_expr): Likewise.
6971 2015-11-27 Jakub Jelinek <jakub@redhat.com>
6974 * c-parser.c (c_parser_compound_statement_nostart): If
6975 last_label is true, use pragma_stmt instead of pragma_compound
6976 as second c_parser_pragma argument.
6977 (c_parser_omp_ordered, c_parser_omp_target_update,
6978 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
6979 false as second argument to c_parser_skip_to_pragma_eol after
6980 diagnosing standalone directives used in pragma_stmt context.
6982 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
6984 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
6985 with "if (ENABLE_OFFLOADING)".
6987 2015-11-23 David Malcolm <dmalcolm@redhat.com>
6990 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6991 for various Objective-C constructs: Class.name syntax,
6992 @selector(), @protocol(), @encode(), and [] message syntax.
6994 2015-11-20 David Malcolm <dmalcolm@redhat.com>
6997 * c-typeck.c (should_suggest_deref_p): New function.
6998 (build_component_ref): Special-case POINTER_TYPE when
6999 generating a "not a structure of union" error message, and
7000 suggest a "->" rather than a ".", providing a fix-it hint.
7002 2015-11-19 David Malcolm <dmalcolm@redhat.com>
7004 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
7005 candidate into a new function, find_closest_identifier.
7007 2015-11-19 Marek Polacek <polacek@redhat.com>
7010 * c-typeck.c (parser_build_binary_op): Properly handle
7011 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
7013 2015-11-17 David Malcolm <dmalcolm@redhat.com>
7015 * c-parser.c (set_c_expr_source_range): Bulletproof both
7016 overloaded implementations against NULL expr->value.
7017 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
7019 (c_parser_unary_expression): Likewise when handling addresses of
7021 (c_parser_postfix_expression): Likewise for statement expressions,
7022 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
7023 __builtin_va_arg, and for __builtin_offset_of.
7024 (c_parser_postfix_expression_after_paren_type): Initialize expr's
7025 src_range using the range of the braced initializer.
7026 (c_parser_transaction_expression): Set src_range for "ret" to a
7027 sane pair of values.
7029 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7031 * c-parser.c (c_finish_omp_declare_simd): Look for
7032 "simd" attribute as well. Update error message.
7034 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7036 * c-parser.c (c_parser_omp_declare_target): Adjust.
7038 2015-11-14 Jakub Jelinek <jakub@redhat.com>
7040 * c-typeck.c (c_finish_omp_clauses): Don't mark
7041 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
7043 2015-11-14 Marek Polacek <polacek@redhat.com>
7045 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
7046 * c-typeck.c: Likewise.
7048 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7050 * c-decl.c (warn_defaults_to): Pass line_table to
7052 * c-errors.c (pedwarn_c99): Likewise.
7053 (pedwarn_c90): Likewise.
7054 * c-parser.c (set_c_expr_source_range): New functions.
7055 (c_token::get_range): New method.
7056 (c_token::get_finish): New method.
7057 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
7058 based on the range from the start of the LHS to the end of the
7060 (c_parser_conditional_expression): Likewise, based on the range
7061 from the start of the cond.value to the end of exp2.value.
7062 (c_parser_binary_expression): Call set_c_expr_source_range on
7063 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
7064 (c_parser_cast_expression): Call set_c_expr_source_range on ret
7065 based on the cast_loc through to the end of the expr.
7066 (c_parser_unary_expression): Likewise, based on the
7067 op_loc through to the end of op.
7068 (c_parser_sizeof_expression) Likewise, based on the start of the
7069 sizeof token through to either the closing paren or the end of
7071 (c_parser_postfix_expression): Likewise, using the token range,
7072 or from the open paren through to the close paren for
7073 parenthesized expressions.
7074 (c_parser_postfix_expression_after_primary): Likewise, for
7075 various kinds of expression.
7076 * c-tree.h (struct c_expr): Add field "src_range".
7077 (c_expr::get_start): New method.
7078 (c_expr::get_finish): New method.
7079 (set_c_expr_source_range): New decls.
7080 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
7081 on ret for prefix unary ops.
7082 (parser_build_binary_op): Likewise, running from the start of
7083 arg1.value through to the end of arg2.value.
7085 2015-11-13 Marek Polacek <polacek@redhat.com>
7088 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
7090 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7092 * c-typeck.c: Include spellcheck.h.
7093 (lookup_field_fuzzy_find_candidates): New function.
7094 (lookup_field_fuzzy): New function.
7095 (build_component_ref): If the field was not found, try using
7096 lookup_field_fuzzy and potentially offer a suggestion.
7098 2015-11-12 James Norris <jnorris@codesourcery.com>
7099 Joseph Myers <joseph@codesourcery.com>
7101 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
7102 (c_parser_omp_clause_name): Handle 'device_resident' clause.
7103 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7104 and PRAGMA_OMP_CLAUSE_LINK.
7105 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7106 and PRAGMA_OACC_CLAUSE_LINK.
7107 (OACC_DECLARE_CLAUSE_MASK): New definition.
7108 (c_parser_oacc_declare): New function.
7110 2015-11-12 Marek Polacek <polacek@redhat.com>
7113 * c-parser.c (c_parser_for_statement): Reclassify the token in
7116 2015-11-11 Marek Polacek <polacek@redhat.com>
7120 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
7121 checking the size of an array.
7123 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7125 * c-array-notation.c: Remove unused header files.
7126 * c-aux-info.c: Likewise.
7127 * c-convert.c: Likewise.
7128 * c-decl.c: Likewise.
7129 * c-errors.c: Likewise.
7130 * c-lang.c: Likewise.
7131 * c-objc-common.c: Likewise.
7132 * c-parser.c: Likewise.
7133 * c-typeck.c: Likewise.
7134 * gccspec.c: Likewise.
7136 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7137 Cesar Philippidis <cesar@codesourcery.com>
7138 James Norris <jnorris@codesourcery.com>
7139 Julian Brown <julian@codesourcery.com>
7140 Nathan Sidwell <nathan@codesourcery.com>
7142 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
7144 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
7145 (c_parser_pragma): Parse 'acc routine'.
7146 (OACC_ROUTINE_CLAUSE_MARK): Define.
7147 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
7149 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
7152 * c-typeck.c (c_finish_loop): For unconditional loops, set the
7153 location of the backward-goto to the start of the loop body.
7155 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
7158 * c-parser.c (c_parser_while_statement): Finish the loop before
7159 parsing ahead for misleading indentation.
7160 (c_parser_for_statement): Likewise.
7162 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7164 * c-decl.c (finish_struct): If the structure has reverse storage
7165 order, rewrite the type of array fields with scalar component. Call
7166 maybe_apply_pragma_scalar_storage_order on entry.
7167 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
7168 errors on bit-fields and reverse SSO here and not...
7169 (c_mark_addressable): ...here.
7170 (output_init_element): Adjust call to initializer_constant_valid_p.
7171 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
7173 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7175 * c-decl.c (warn_defaults_to): Update for change in signature
7176 of diagnostic_set_info.
7177 * c-errors.c (pedwarn_c99): Likewise.
7178 (pedwarn_c90): Likewise.
7179 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
7180 for textinfo::set_location.
7182 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7183 Thomas Schwinge <thomas@codesourcery.com>
7184 James Norris <jnorris@codesourcery.com>
7186 * c-parser.c (c_parser_omp_clause_name): Add support for
7187 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
7188 (c_parser_omp_clause_default): Add is_oacc argument. Handle
7189 default(none) in OpenACC.
7190 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
7192 (c_parser_oacc_clause_tile): New function.
7193 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
7194 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
7195 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
7197 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
7198 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
7200 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
7201 (c_parser_oacc_update): Update the error message for missing clauses.
7202 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
7203 and OMP_CLAUSE_INDEPENDENT.
7205 2015-11-05 Marek Polacek <polacek@redhat.com>
7208 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
7209 deal with pre-evaluation on invalid types.
7211 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7212 Ilya Verbin <ilya.verbin@intel.com>
7214 * c-parser.c: Include context.h and gimple-expr.h.
7215 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
7216 monotonic together with nonmonotonic.
7217 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
7218 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
7219 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
7220 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
7221 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
7222 expressions on combined target teams before the target.
7223 (c_parser_omp_declare_target): If decl has "omp declare target" or
7224 "omp declare target link" attribute, and cgraph or varpool node already
7225 exists, then set corresponding flags. Call c_finish_omp_clauses
7226 in the parenthesized extended-list syntax case.
7227 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
7229 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
7230 on OMP_CLAUSE_REDUCTION array sections.
7231 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
7232 into the constant offset, or for variable low-bound using
7233 POINTER_PLUS_EXPR. For structure element based array sections use
7234 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
7235 (c_finish_omp_clauses): Drop generic_field_head, structure
7236 elements are now always mapped even as array section bases,
7237 diagnose same var in data sharing and mapping clauses. Diagnose if
7238 linear step on declare simd is neither a constant nor a uniform
7239 parameter. Look through POINTER_PLUS_EXPR for array section
7240 reductions. Diagnose the same var or function appearing multiple
7241 times on the same directive. Fix up wording for the to clause if t
7242 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
7243 modifier on kinds other than dynamic or guided or nonmonotonic
7244 modifier together with ordered clause.
7246 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7247 Chung-Lin Tang <cltang@codesourcery.com>
7249 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
7251 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7253 * c-array-notation.c: Reorder #include's and remove duplicates.
7254 * c-aux-info.c: Likewise.
7255 * c-convert.c: Likewise.
7256 * c-decl.c: Likewise.
7257 * c-errors.c: Likewise.
7258 * c-lang.c: Likewise.
7259 * c-objc-common.c: Likewise.
7260 * c-parser.c: Likewise.
7261 * c-typeck.c: Likewise.
7263 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
7266 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
7267 after calling build_qualified_type.
7269 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
7270 Thomas Schwinge <thomas@codesourcery.com>
7271 James Norris <jnorris@codesourcery.com>
7272 Joseph Myers <joseph@codesourcery.com>
7273 Julian Brown <julian@codesourcery.com>
7274 Bernd Schmidt <bschmidt@redhat.com>
7276 * c-parser.c (c_parser_oacc_shape_clause): New.
7277 (c_parser_oacc_simple_clause): New.
7278 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
7279 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
7281 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7282 James Norris <jnorris@codesourcery.com>
7283 Cesar Philippidis <cesar@codesourcery.com>
7287 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
7288 parameters, and handle these. Adjust all users.
7289 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
7291 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
7293 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
7295 (c_finish_omp_construct): Declare function.
7296 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
7297 Merge functions into...
7298 (c_finish_omp_construct): ... this new function.
7300 2015-10-22 Richard Biener <rguenther@suse.de>
7302 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
7303 before folding a MINUS_EXPR.
7305 2015-10-21 Marek Polacek <polacek@redhat.com>
7308 * c-decl.c (start_function): Warn about vararg functions without
7311 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
7313 * c-typeck.c (build_conditional_expr): Use boolean vector
7314 type for vector comparison.
7315 (build_vec_cmp): New.
7316 (build_binary_op): Use build_vec_cmp for comparison.
7318 2015-10-20 Marek Polacek <polacek@redhat.com>
7320 * c-parser.c (is_cilkplus_vector_p): Don't define here.
7322 2015-10-20 Marek Polacek <polacek@redhat.com>
7325 * c-parser.c (c_parser_attributes): Break out of the loop if the
7326 token after an attribute isn't a comma.
7328 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7329 Aldy Hernandez <aldyh@redhat.com>
7331 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
7332 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
7333 (c_parser_omp_variable_list): Handle structure elements for
7334 map, to and from clauses. Handle array sections in reduction
7335 clause. Formatting fixes.
7336 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
7337 if clause modifiers.
7338 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
7339 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
7340 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
7341 c_parser_omp_clause_is_device_ptr): New functions.
7342 (c_parser_omp_clause_ordered): Parse optional parameter.
7343 (c_parser_omp_clause_reduction): Handle array reductions.
7344 (c_parser_omp_clause_schedule): Parse optional simd modifier.
7345 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
7347 (c_parser_omp_clause_linear): Parse linear clause modifiers.
7348 (c_parser_omp_clause_depend_sink): New function.
7349 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
7350 (c_parser_omp_clause_map): Parse release/delete map kinds and
7351 optional always modifier.
7352 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
7353 and c_finish_omp_clauses callers.
7354 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
7355 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
7356 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
7357 (OMP_CRITICAL_CLAUSE_MASK): Define.
7358 (c_parser_omp_critical): Parse critical clauses.
7359 (c_parser_omp_for_loop): Handle doacross loops, adjust
7360 c_finish_omp_for and c_finish_omp_clauses callers.
7361 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
7362 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
7363 (OMP_FOR_CLAUSE_MASK): Add linear clause.
7364 (c_parser_omp_for): Disallow ordered clause when combined with
7365 distribute. Disallow linear clause when combined with distribute
7366 and not combined with simd.
7367 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
7368 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
7369 parse clauses and if depend clause is found, don't parse a body.
7370 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
7371 Allow target parallel without for after it.
7372 (OMP_TASK_CLAUSE_MASK): Add priority clause.
7373 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
7374 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
7376 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
7377 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
7378 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
7379 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
7381 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
7382 defaultmap and is_device_ptr clauses.
7383 (c_parser_omp_target): Parse target parallel and target simd. Set
7384 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
7385 and target exit data. Diagnose invalid map kinds.
7386 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
7387 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
7389 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
7391 (OMP_TASKLOOP_CLAUSE_MASK): Define.
7392 (c_parser_omp_taskloop): New function.
7393 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
7394 handle PRAGMA_OMP_TASKLOOP.
7395 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
7396 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
7397 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
7398 Add IS_OMP argument, handle structure element bases, diagnose
7399 bitfields, pass IS_OMP recursively, diagnose known zero length
7400 array sections in depend clauses, handle array sections in reduction
7401 clause, diagnose negative length even for pointers.
7402 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
7403 types, pass IS_OMP down to handle_omp_array_sections_1, handle
7404 array sections in reduction clause, set
7405 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
7406 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
7407 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
7408 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
7410 2015-10-06 Marek Polacek <polacek@redhat.com>
7412 * c-parser.c (c_parser_statement_after_labels): Use
7413 protected_set_expr_location.
7414 (c_parser_omp_clause_num_gangs): Likewise.
7415 (c_parser_omp_clause_num_threads): Likewise.
7416 (c_parser_omp_clause_num_workers): Likewise.
7417 (c_parser_omp_clause_vector_length): Likewise.
7418 (c_parser_omp_clause_num_teams): Likewise.
7419 (c_parser_omp_clause_thread_limit): Likewise.
7420 * c-typeck.c (build_c_cast): Likewise.
7421 (c_cast_expr): Likewise.
7423 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7425 * c-typeck.c (c_tree_equal): Use real_equal instead of
7428 2015-10-04 Jason Merrill <jason@redhat.com>
7430 * c-parser.c (c_lex_one_token): Handle @synchronized.
7431 * c-decl.c (match_builtin_function_types): A declaration of a built-in
7432 can change whether the function is transaction_safe.
7434 2015-10-02 Marek Polacek <polacek@redhat.com>
7437 * c-typeck.c (convert_for_assignment): Use the expansion point
7438 location throughout.
7440 2015-10-02 Marek Polacek <polacek@redhat.com>
7443 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
7444 and pass it down to c_parser_if_statement.
7445 (c_parser_else_body): Add CHAIN parameter and pass it down to
7446 c_parser_statement_after_labels.
7447 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
7448 duplicated if-else-if conditions.
7450 2015-10-01 Marek Polacek <polacek@redhat.com>
7452 * c-typeck.c (convert_for_assignment): Improve commentary.
7454 2015-09-30 Marek Polacek <polacek@redhat.com>
7457 * c-typeck.c (c_finish_return): Use the expansion point location for
7458 certain "return with value" warnings.
7460 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7462 * c-parser.c (pragma_lex): Add loc argument.
7464 2015-09-15 Marek Polacek <polacek@redhat.com>
7467 * c-decl.c (tag_exists_p): New function.
7468 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
7469 struct/union/enum keywords are missing.
7470 * c-tree.h (tag_exists_p): Declare.
7472 2015-09-15 Marek Polacek <polacek@redhat.com>
7474 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
7475 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
7476 Return NULL_TREE instead of 0.
7477 (lookup_name): Return NULL_TREE instead of 0.
7478 (lookup_name_in_scope): Likewise.
7479 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
7480 (parser_xref_tag): Use false instead of 0.
7481 (start_struct): Use true instead of 1.
7482 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
7484 2015-09-14 Marek Polacek <polacek@redhat.com>
7486 * c-typeck.c (set_nonincremental_init_from_string): Use
7487 HOST_WIDE_INT_M1U when shifting a negative value.
7489 2015-09-09 Mark Wielaard <mjw@redhat.com>
7491 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
7494 2015-09-10 Jakub Jelinek <jakub@redhat.com>
7497 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
7498 into OMP_FOR_PRE_BODY rather than before the loop.
7500 2015-09-09 Jakub Jelinek <jakub@redhat.com>
7503 * c-parser.c (c_parser_oacc_all_clauses,
7504 c_parser_omp_all_clauses): Remove invalid clause from
7505 list of clauses even if parser->error is set.
7508 * c-parser.c (c_parser_omp_clause_aligned,
7509 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
7511 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
7515 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
7516 instead of c_parser_unary_expression. If the result is !lvalue_p,
7517 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
7519 2015-09-04 Marek Polacek <polacek@redhat.com>
7522 * c-typeck.c (build_binary_op): Don't instrument static initializers.
7524 2015-09-03 Martin Sebor <msebor@redhat.com>
7527 * c-typeck.c (convert_arguments, parser_build_unary_op,
7528 build_conditional_expr, c_cast_expr, convert_for_assignment,
7529 build_binary_op, _objc_common_truthvalue_conversion): Call
7531 (c_decl_implicit): Define.
7533 2015-09-02 Marek Polacek <polacek@redhat.com>
7536 * c-parser.c (c_parser_enum_specifier): Give a better error for
7539 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7541 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
7543 2015-08-12 Marek Polacek <polacek@redhat.com>
7545 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
7548 2015-08-03 Marek Polacek <polacek@redhat.com>
7551 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
7553 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
7555 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7557 * c-parser.c (c_parser_if_body): Take token_indent_info
7558 argument. Call warn_for_misleading_indentation even when the
7559 body is a semicolon. Extract token_indent_infos corresponding
7560 to the guard, body and next tokens. Adjust call to
7561 warn_for_misleading_indentation accordingly.
7562 (c_parser_else_body): Likewise.
7563 (c_parser_if_statement): Likewise.
7564 (c_parser_while_statement): Likewise.
7565 (c_parser_for_statement): Likewise.
7567 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
7568 Manuel López-Ibáñez <manu@gcc.gnu.org>
7570 * c-decl.c (get_parm_info): Remove static var. Update warning
7573 2015-07-27 Marek Polacek <polacek@redhat.com>
7577 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
7579 2015-07-20 Marek Polacek <polacek@redhat.com>
7582 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
7583 (build_binary_op): Warn about left shift overflows.
7585 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7587 * c-array-notation.c: Adjust includes for flags.h changes.
7588 * c-objc-common.c: Likewise.
7590 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7592 * c-array-notation.c: Adjust includes.
7593 * c-aux-info.c: Likewise.
7594 * c-convert.c: Likewise.
7595 * c-decl.c: Likewise.
7596 * c-errors.c: Likewise.
7597 * c-lang.c: Likewise.
7598 * c-objc-common.c: Likewise.
7599 * c-parser.c: Likewise.
7600 * c-typeck.c: Likewise.
7602 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7605 * c-decl.c (finish_function): Call do_warn_unused_parameter.
7607 2015-06-29 Marek Polacek <polacek@redhat.com>
7610 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
7611 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
7612 about -Wswitch-bool here.
7613 (do_case): Update c_add_case_label call.
7614 (c_finish_case): Update c_do_switch_warnings call.
7616 2015-06-27 Marek Polacek <polacek@redhat.com>
7618 * c-typeck.c: Use VECTOR_TYPE_P throughout.
7620 2015-06-26 Marek Polacek <polacek@redhat.com>
7622 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7624 * c-typeck.c (array_to_pointer_conversion): Likewise.
7625 (build_unary_op): Likewise.
7626 (c_finish_return): Likewise.
7628 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7630 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
7631 * c-parser.c: Likewise.
7633 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7635 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
7636 instead of pointer_hash.
7637 (detect_field_duplicates): Likewise.
7639 2015-06-25 Marek Polacek <polacek@redhat.com>
7641 * c-array-notation.c: Use VAR_P throughout.
7642 * c-decl.c: Likewise.
7643 * c-objc-common.c: Likewise.
7644 * c-parser.c: Likewise.
7645 * c-typeck.c: Likewise.
7647 2015-06-25 Marek Polacek <polacek@redhat.com>
7649 * c-decl.c: Use is_global_var throughout.
7650 * c-parser.c: Likewise.
7651 * c-typeck.c: Likewise.
7653 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
7655 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
7656 * c-aux-info.c: Likewise.
7657 * c-convert.c: Likewise.
7658 * c-decl.c: Likewise.
7659 * c-errors.c: Likewise.
7660 * c-lang.c: Likewise.
7661 * c-objc-common.c: Likewise.
7662 * c-parser.c: Likewise.
7663 * c-typeck.c: Likewise.
7665 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
7668 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
7671 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
7673 * c-decl.c (pop_scope): Register the main translation unit
7674 through the new debug hook.
7676 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
7678 * c-array-notation.c : Adjust include files.
7679 * c-aux-info.c : Likewise.
7680 * c-convert.c : Likewise.
7681 * c-decl.c : Likewise.
7682 * c-errors.c : Likewise.
7683 * c-lang.c : Likewise.
7684 * c-lang.h : Likewise.
7685 * c-objc-common.c : Likewise.
7686 * c-parser.c : Likewise.
7687 * c-typeck.c : Likewise.
7689 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
7691 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7692 immediately clobber it.
7693 (c_write_global_declarations_1): Remove call to
7694 check_global_declaration_1.
7695 (c_write_global_declarations_2): Remove.
7696 (c_write_final_cleanups): Rename from c_write_global_declarations.
7697 Remove call to finalize_compilation_unit.
7698 Remove calls to debugging hooks.
7699 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7700 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7701 * c-tree.h: Remove c_write_global_declarations.
7703 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
7705 * c-array-notation.c: Adjust includes for restructured coretypes.h.
7706 * c-aux-info.c: Likewise.
7707 * c-convert.c: Likewise.
7708 * c-decl.c: Likewise.
7709 * c-errors.c: Likewise.
7710 * c-lang.c: Likewise.
7711 * c-objc-common.c: Likewise.
7712 * c-parser.c: Likewise.
7713 * c-typeck.c: Likewise.
7715 2015-06-04 Marek Polacek <polacek@redhat.com>
7718 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7721 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7723 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7724 Warn for empty struct.
7725 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7727 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
7729 * c-decl.c (start_function): Call plugin before parsing.
7730 (finish_function): Call plugin after parsing.
7732 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7735 * c-decl.c (merge_decls): Merge DECL_COMMON.
7737 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
7739 * Make-lang.in (check_gcc_pallelize): Define.
7741 2015-05-22 Marek Polacek <polacek@redhat.com>
7744 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7747 2015-05-21 Marek Polacek <polacek@redhat.com>
7749 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7752 2015-05-20 Marek Polacek <polacek@redhat.com>
7754 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7755 * c-typeck.c: Likewise.
7757 2015-05-19 Marek Polacek <polacek@redhat.com>
7759 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7761 2015-05-19 Jakub Jelinek <jakub@redhat.com>
7764 * c-parser.c (c_parser_omp_for_loop): Don't add
7765 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7766 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7767 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7770 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7772 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
7775 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7778 * c-objc-common.c (c_tree_printer): Replace locus pointer with
7781 2015-05-14 Marek Polacek <polacek@redhat.com>
7785 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7788 2015-05-12 David Malcolm <dmalcolm@redhat.com>
7790 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7791 to add a call to warn_for_misleading_indentation.
7792 (c_parser_else_body): Likewise, adding param "else_loc".
7793 (c_parser_if_statement): Check for misleading indentation.
7794 (c_parser_while_statement): Likewise.
7795 (c_parser_for_statement): Likewise.
7797 2015-05-08 Marek Polacek <polacek@redhat.com>
7800 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7801 (output_init_element): Likewise.
7803 2015-05-07 Marek Polacek <polacek@redhat.com>
7806 * c-typeck.c (build_binary_op): Warn when left shifting a negative
7809 2015-04-30 Marek Polacek <polacek@redhat.com>
7811 * c-typeck.c (set_init_label): Call error_at instead of error and
7814 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
7817 * c-typeck.c (c_build_va_arg): Clarify the error message.
7819 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
7821 * c-parser.c (c_parser_oacc_enter_exit_data): Use
7822 OMP_STANDALONE_CLAUSES.
7824 2015-04-28 Marek Polacek <polacek@redhat.com>
7826 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7828 2015-04-28 Marek Polacek <polacek@redhat.com>
7831 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7833 2015-04-25 Marek Polacek <polacek@redhat.com>
7836 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
7839 2015-04-23 Marek Polacek <polacek@redhat.com>
7842 * c-decl.c (set_labels_context_r): New function.
7843 (store_parm_decls): Call it via walk_tree_without_duplicates.
7844 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7845 instead of create_tmp_var. Build TARGET_EXPR instead of
7847 (build_atomic_assign): Use create_tmp_var_raw instead of
7848 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
7850 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
7852 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7853 (c_parser_omp_target_update): Add missed %> to error_at ().
7855 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7858 * c-decl.c (c_default_pointer_mode): Remove definition.
7859 * c-tree.h (c_default_pointer_mode): Remove declaration.
7861 2015-03-27 Tobias Burnus <burnus@net-b.de>
7864 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7866 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7867 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7868 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7870 2015-03-19 Jakub Jelinek <jakub@redhat.com>
7872 * c-decl.c (c_decl_attributes): Also add "omp declare target"
7873 attribute for DECL_EXTERNAL VAR_DECLs.
7875 2015-03-11 Jakub Jelinek <jakub@redhat.com>
7877 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7880 2015-03-10 Jakub Jelinek <jakub@redhat.com>
7883 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7884 before preparing arguments to warn_logical_not_parentheses.
7886 2015-03-09 Jakub Jelinek <jakub@redhat.com>
7889 * c-typeck.c (parser_build_binary_op): Don't warn for
7890 !!x == y or !b == y where b is _Bool.
7892 2015-03-09 Marek Polacek <polacek@redhat.com>
7894 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
7895 * c-decl.c (grokdeclarator): Likewise.
7896 * c-typeck.c (build_binary_op): Likewise.
7898 2015-02-27 Marek Polacek <polacek@redhat.com>
7901 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
7903 2015-02-14 Marek Polacek <polacek@redhat.com>
7906 * c-decl.c (grokdeclarator): Set the range of a flexible array member
7907 declared through a typedef name.
7909 2015-02-13 Marek Polacek <polacek@redhat.com>
7912 * c-decl.c (grokdeclarator): Print also the type when giving
7913 the error message about array's incomplete element type.
7915 2015-02-11 Jakub Jelinek <jakub@redhat.com>
7918 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7919 check in the POP macro.
7921 2015-02-09 Marek Polacek <polacek@redhat.com>
7924 * c-typeck.c (process_init_element): Don't always wrap
7925 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7926 initializing a range of elements.
7928 2015-02-04 Jakub Jelinek <jakub@redhat.com>
7932 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7934 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
7936 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7937 processing enum declaration.
7939 2015-01-29 Marek Polacek <polacek@redhat.com>
7942 * c-typeck.c (pop_init_level): If constructor_elements has
7943 exactly one element with integer_zerop value, set constructor_zeroinit
7944 to 1. Remove braces around warning_init call.
7946 2015-01-27 Jakub Jelinek <jakub@redhat.com>
7949 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7950 of FUNCTION_DECLs with error_mark_node.
7952 2015-01-26 Jakub Jelinek <jakub@redhat.com>
7955 * c-typeck.c (convert_arguments): Return -1 if there are
7956 error_args, even if we've diagnosed too many arguments.
7958 2015-01-21 Richard Biener <rguenther@suse.de>
7961 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
7962 for builtins the user declared correctly.
7964 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7965 Bernd Schmidt <bernds@codesourcery.com>
7966 Cesar Philippidis <cesar@codesourcery.com>
7967 James Norris <jnorris@codesourcery.com>
7968 Jakub Jelinek <jakub@redhat.com>
7969 Ilmir Usmanov <i.usmanov@samsung.com>
7971 * c-parser.c: Include "gomp-constants.h".
7972 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
7973 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
7974 Use OMP_CLAUSE_SET_MAP_KIND.
7975 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
7976 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
7977 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
7978 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
7979 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
7980 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
7981 "copyout", "create", "delete", "deviceptr", "gang", "host",
7982 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
7983 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
7984 "present_or_create", "pcreate", "seq", "self", "vector",
7985 "vector_length", "wait", "worker".
7986 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
7987 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
7988 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
7989 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
7990 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7991 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7992 (c_parser_oacc_data_clause_deviceptr)
7993 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7994 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7995 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7996 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7997 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7998 (c_parser_oacc_parallel, c_parser_oacc_update)
7999 (c_parser_oacc_wait): New functions.
8000 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
8001 (c_finish_oacc_data): New prototypes.
8002 * c-typeck.c: Include "gomp-constants.h".
8003 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
8004 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
8005 OMP_CLAUSE_SET_MAP_KIND.
8006 (c_finish_oacc_parallel, c_finish_oacc_kernels)
8007 (c_finish_oacc_data): New functions.
8008 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
8009 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
8010 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
8011 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
8012 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
8013 GOMP_MAP_FORCE_DEVICEPTR.
8015 2015-01-09 Michael Collison <michael.collison@linaro.org>
8017 * c-array-notation.c: Include hash-set.h, machmode.h,
8018 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8019 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8020 * c-aux-info.c: Ditto.
8021 * c-convert.c: Ditto.
8023 * c-errors.c: Ditto.
8024 * c-lang.c: Dittoxs.
8025 * c-objc-common.c: Ditto.
8026 * c-parser.c: Ditto.
8027 * c-typeck.c: Include hash-set.h, machmode.h,
8028 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8029 fold-const.h, wide-int.h, inchash.h, real.h and
8030 fixed-value.h due to flattening of tree.h.
8032 2015-01-07 Marek Polacek <polacek@redhat.com>
8035 * c-typeck.c (process_init_element): Disallow initialization of
8036 a flexible array member with a string constant if the structure
8039 2015-01-05 Jakub Jelinek <jakub@redhat.com>
8042 * c-typeck.c (convert_for_assignment, c_finish_return): For
8043 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
8044 types also set in_late_binary_op around convert call.
8045 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
8046 to integral type casts, if not in_late_binary_op, pass c_fully_fold
8047 result on expr as last argument to ubsan_instrument_float_cast,
8048 if in_late_binary_op, don't use c_save_expr but save_expr.
8050 Update copyright years.
8052 2015-01-05 Marek Polacek <polacek@redhat.com>
8055 * c-typeck.c (build_array_ref): Pass loc down to
8056 warn_array_subscript_with_type_char.
8058 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8060 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8061 (common-pointer-type): For pointers to arrays take qualifiers from
8063 (build_conditional_expr): Add warnings for lost qualifiers.
8064 (comp-target-types): Allow pointers to arrays with different qualifiers.
8065 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
8066 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8067 to PEDWARN_FOR_QUALIFIERS.
8069 2014-12-17 Jakub Jelinek <jakub@redhat.com>
8072 * c-convert.c: Include ubsan.h.
8073 (convert): For real -> integral casts and
8074 -fsanitize=float-cast-overflow don't call convert_to_integer, but
8075 instead instrument the float cast directly.
8077 2014-11-29 Jakub Jelinek <jakub@redhat.com>
8079 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
8080 c_finish_stmt_expr): Remove NULL last argument from
8081 create_tmp_var_raw and create_tmp_var calls.
8082 * c-array-notation.c (fix_builtin_array_notation_fn,
8083 build_array_notation_expr, fix_conditional_array_notations_1,
8084 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
8086 2014-11-28 Marek Polacek <polacek@redhat.com>
8089 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
8090 convert the right operand to integer type.
8092 2014-11-25 Marek Polacek <polacek@redhat.com>
8095 * c-decl.c (start_function): Disable -Wmissing-declarations warning
8096 for inline functions.
8098 2014-11-21 Jakub Jelinek <jakub@redhat.com>
8101 * c-typeck.c (build_array_ref): Adjust
8102 convert_vector_to_pointer_for_subscript caller. If it returns true,
8103 call non_lvalue_loc on the result.
8105 2014-11-11 Richard Biener <rguenther@suse.de>
8107 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
8110 2014-11-10 Andi Kleen <ak@linux.intel.com>
8113 * c-parser.c (c_parser_statement_after_labels): Call
8115 (c_parser_if_statement): Dito.
8116 (c_parser_switch_statement): Dito.
8117 (c_parser_while_statement): Dito.
8118 (c_parser_do_statement): Dito.
8119 (c_parser_for_statement): Dito.
8120 * c-typeck.c (c_finish_loop): Dito.
8122 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8124 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
8125 OPT_Wshift_count_overflow in the warnings.
8127 2014-10-30 Marek Polacek <polacek@redhat.com>
8129 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
8130 print the stripped version as well, if they're not the same.
8132 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8134 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
8137 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
8139 * c-decl.c: Adjust include files.
8140 * c-parser.c: Ditto.
8142 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
8143 Tom Tromey <tromey@redhat.com>
8145 * c-tree.h (enum c_oracle_request): New.
8146 (c_binding_oracle_function): New typedef.
8147 (c_binding_oracle, c_pushtag, c_bind): Declare.
8148 * c-decl.c (c_binding_oracle): New global.
8149 (I_SYMBOL_CHECKED): New macro.
8150 (i_symbol_binding): New function.
8151 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
8152 (I_TAG_CHECKED): New macro.
8153 (i_tag_binding): New function.
8154 (I_TAG_BINDING, I_TAG_DECL): Redefine.
8155 (I_LABEL_CHECKED): New macro.
8156 (i_label_binding): New function.
8157 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
8158 (c_print_identifier): Save and restore c_binding_oracle.
8159 (c_pushtag, c_bind): New functions.
8161 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
8163 * c-typeck.c: Adjust include files.
8165 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8168 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
8169 initialization here...
8170 (c_initialize_diagnostics): ... but here. Set defaults after
8171 building pretty-printer.
8173 2014-10-23 Marek Polacek <polacek@redhat.com>
8176 * c-decl.c (pop_scope): Don't print warning in external_scope.
8178 2014-10-19 Marek Polacek <polacek@redhat.com>
8181 * c-typeck.c (output_init_element): Allow initializing objects with
8182 static storage duration with compound literals even in C99 and add
8185 2014-10-17 Marek Polacek <polacek@redhat.com>
8188 * c-typeck.c (digest_init): Allow initializing objects with static
8189 storage duration with compound literals even in C99 and add pedwarn
8192 2014-10-17 Marek Polacek <polacek@redhat.com>
8195 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
8196 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
8197 error multiple times. Print the type.
8199 2014-10-17 Marek Polacek <polacek@redhat.com>
8202 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
8205 2014-10-17 Marek Polacek <polacek@redhat.com>
8207 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
8208 (start_function): Use OPT_Wimplicit_int instead of 0.
8209 (store_parm_decls_oldstyle): Likewise.
8211 2014-10-17 Alan Modra <amodra@gmail.com>
8214 * c-decl.c (merge_decls): Don't merge section name or tls model
8215 to newdecl symtab node, instead merge to olddecl. Override
8216 existing olddecl section name. Set tls_model for all thread-local
8217 vars, not just OMP thread-private ones. Remove incorrect comment.
8219 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
8221 * c-decl.c: Adjust include files.
8223 2014-10-14 DJ Delorie <dj@redhat.com>
8225 * c-parser.c (c_parse_init): Add RID entries for each __intN.
8226 (c_token_starts_typename): Check all __intN, not just __int128.
8227 (c_token_starts_declspecs): Likewise.
8228 (c_parser_declspecs): Likewise.
8229 (c_parser_attribute_any_word): Likewise.
8230 (c_parser_objc_selector): Likewise.
8231 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
8232 (struct c_declspecs): Add int_n_idx field to record *which* __intN
8234 * c-decl.c (declspecs_add_type): Check for all __intN, not just
8236 (finish_declspecs): Likewise.
8238 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
8240 * c-parser.c (c_parser_all_labels): New function to replace
8242 (c_parser_statement): Call the new function.
8244 2014-10-09 Marek Polacek <polacek@redhat.com>
8247 * c-typeck.c (pop_init_level): Don't warn about initializing
8250 2014-10-07 Marek Polacek <polacek@redhat.com>
8253 * c-decl.c (header_for_builtin_fn): New function.
8254 (implicitly_declare): Suggest which header to include.
8256 2014-10-07 Marek Polacek <polacek@redhat.com>
8258 * c-convert.c (convert): Use error_operand_p.
8259 * c-typeck.c (require_complete_type): Likewise.
8260 (really_atomic_lvalue): Likewise.
8261 (digest_init): Likewise.
8262 (handle_omp_array_sections_1): Likewise.
8264 2014-10-03 Marek Polacek <polacek@redhat.com>
8267 * c-decl.c (pop_scope): Don't warn about "inline function declared
8268 but never defined" for functions marked with gnu_inline attribute.
8270 2014-09-25 Jakub Jelinek <jakub@redhat.com>
8273 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
8274 on low_bound and length.
8276 2014-09-24 Marek Polacek <polacek@redhat.com>
8280 * c-parser.c: Don't define CPP_KEYWORD.
8281 (c_parser_switch_statement): Pass original type to c_finish_case.
8282 * c-tree.h (c_finish_case): Update declaration.
8283 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
8284 conditionally to c_do_switch_warnings.
8286 2014-09-03 Marek Polacek <polacek@redhat.com>
8289 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
8292 2014-09-02 Jakub Jelinek <jakub@redhat.com>
8293 Balaji V. Iyer <balaji.v.iyer@intel.com>
8294 Igor Zamyatin <igor.zamyatin@intel.com>
8296 * c-parser.c (c_parser_cilk_for): New function.
8297 (c_parser_cilk_grainsize): Likewise.
8298 (c_get_temp_regvar): Likewise.
8299 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
8300 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
8301 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
8302 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
8305 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
8307 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
8308 with using HOST_WIDE_INT without truncation to 'int'
8310 2014-08-22 Marek Polacek <polacek@redhat.com>
8313 * c-typeck.c (parser_build_binary_op): Adjust call to
8314 warn_logical_not_parentheses.
8316 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
8319 * c-parser.c (c_parser_array_notation): Check for correct
8320 type of an array added.
8322 2014-08-19 Marek Polacek <polacek@redhat.com>
8325 * c-typeck.c (build_binary_op): If either operand of a comparison
8326 is a boolean expression, call maybe_warn_bool_compare.
8328 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
8331 * c-typeck.c (build_c_cast): Do a conversion even when the
8332 TYPE_MAIN_VARIANTs are the same.
8334 2014-08-19 Marek Polacek <polacek@redhat.com>
8336 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
8337 pedwarn_c99 instead of pedwarn.
8338 (grokfield): Likewise.
8339 (warn_defaults_to): New function.
8340 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
8341 Unconditionally call pedwarn_c99 instead of pedwarn.
8342 (start_function): Call warn_defaults_to instead of pedwarn_c99.
8343 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
8344 check flag_isoc11 before.
8345 * c-errors.c (pedwarn_c99): Change the return type to bool.
8346 Handle -Wc99-c11-compat.
8347 * c-parser.c (disable_extension_diagnostics): Handle
8348 warn_c99_c11_compat.
8349 (restore_extension_diagnostics): Likewise.
8350 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
8351 instead of pedwarn, don't check flag_isoc11 before.
8352 (c_parser_declspecs): Likewise.
8353 (c_parser_alignas_specifier): Likewise.
8354 (c_parser_alignof_expression): Likewise.
8355 (c_parser_generic_selection): Likewise.
8356 * c-tree.h (pedwarn_c99): Update declaration.
8357 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
8360 2014-08-19 Marek Polacek <polacek@redhat.com>
8362 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
8364 * c-errors.c: Include "opts.h".
8365 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
8366 * c-parser.c (disable_extension_diagnostics): Handle negative value
8367 of warn_c90_c99_compat, too.
8368 (restore_extension_diagnostics): Likewise.
8369 (c_parser_compound_statement_nostart): Pass
8370 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
8372 2014-08-12 Marek Polacek <polacek@redhat.com>
8374 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
8376 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
8378 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
8380 2014-08-10 Marek Polacek <polacek@redhat.com>
8383 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
8384 Call pedwarn_c90 instead of pedwarn.
8385 (check_bitfield_type_and_width): Likewise.
8386 (declspecs_add_qual): Likewise.
8387 (declspecs_add_type): Likewise.
8388 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
8389 Adjust to only call pedwarn_c90.
8390 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
8391 pedwarn_c90 instead of pedwarn.
8392 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
8393 * c-parser.c (disable_extension_diagnostics): Handle
8394 warn_c90_c99_compat.
8395 (restore_extension_diagnostics): Likewise.
8396 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
8397 pedwarn_c90 instead of pedwarn.
8398 (c_parser_initelt): Likewise.
8399 (c_parser_postfix_expression): Likewise.
8400 (c_parser_postfix_expression_after_paren_type): Likewise.
8401 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
8402 * c-tree.h: Fix formatting.
8403 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
8404 pedwarn_c90 instead of pedwarn.
8406 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8408 * c-typeck.c: Remove include of pointer-set.h.
8410 2014-08-07 Marek Polacek <polacek@redhat.com>
8412 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
8414 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8416 * c-typeck.c: Use hash_map instead of pointer_map.
8418 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8420 * c-decl.c: Use hash_set instead of pointer_set.
8422 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8425 * c-array-notation.c (expand_array_notations): Handling
8428 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
8431 * c-typeck.c (c_finish_return): Return 0 instead of the address of
8434 2014-07-30 Tom Tromey <tromey@redhat.com>
8436 * c-typeck.c (struct constructor_stack) <designator_depth>: New
8438 (really_start_incremental_init, push_init_level): Initialize
8440 (pop_init_level): Set global designator_depth.
8441 (process_init_element): Check for designated_init attribute.
8443 2014-07-20 Marek Polacek <polacek@redhat.com>
8446 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
8447 (implicitly_declare): Pass location to implicit_decl_warning.
8449 2014-07-14 Jakub Jelinek <jakub@redhat.com>
8452 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
8453 If non-NULL, call c_parser_check_literal_zero.
8454 (c_parser_check_literal_zero): New function.
8455 (c_parser_postfix_expression_after_primary): Adjust
8456 c_parser_expr_list caller, handle -Wmemset-transposed-args.
8458 2014-07-06 Marek Polacek <polacek@redhat.com>
8461 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
8462 * c-tree.h (C_ARRAY_PARAMETER): Define.
8463 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
8466 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
8467 Chen Gang <gang.chen.5i5j@gmail.com>
8469 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
8472 2014-07-01 Marek Polacek <polacek@redhat.com>
8474 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
8475 instead of 0 to WARN_FOR_ASSIGNMENT.
8477 2014-07-01 Marek Polacek <polacek@redhat.com>
8480 * c-typeck.c (convert_for_assignment): Pass
8481 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
8483 2014-06-30 Marek Polacek <polacek@redhat.com>
8485 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
8486 has no_sanitize_undefined attribute.
8488 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
8491 * c-array-notation.c (fix_builtin_array_notation_fn):
8492 Check for 0 arguments in builtin call. Check that bultin argument is
8494 * c-parser.c (c_parser_array_notation): Check for incorrect initial
8497 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
8499 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
8500 qualifiers in __auto_type for atomic types.
8501 (c_parser_typeof_specifier): Discard all type qualifiers in
8502 __typeof__ for atomic types.
8504 2014-06-25 Marek Polacek <polacek@redhat.com>
8507 * c-parser.c (c_parser_statement_after_labels): Pass the location of
8508 the return expression to c_finish_return.
8510 2014-06-25 Jakub Jelinek <jakub@redhat.com>
8512 * c-typeck.c (c_finish_omp_clauses): Make sure
8513 OMP_CLAUSE_LINEAR_STEP has correct type.
8515 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
8519 2014-06-24 Jakub Jelinek <jakub@redhat.com>
8521 * c-parser.c (c_parser_omp_for_loop): For
8522 #pragma omp parallel for simd move lastprivate clause from parallel
8523 to for rather than simd.
8525 2014-06-23 Marek Polacek <polacek@redhat.com>
8527 * c-typeck.c (parser_build_binary_op): Don't call
8528 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
8530 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
8532 * c-parser.c (c_parser_omp_threadprivate): Likewise.
8533 * c-decl.c (merge_decls): Likewise.
8535 2014-06-09 Marek Polacek <polacek@redhat.com>
8538 * c-typeck.c (error_init): Call inform instead of error_at.
8539 (pedwarn_init): Call inform instead of pedwarn.
8540 (warning_init): Call inform instead of warning_at.
8542 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
8544 * c-decl.c (merge_decls): Use set_decl_section_name.
8545 (duplicate_decls): Remove node if it exists.
8547 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
8550 * c-typeck.c (push_init_level, process_init_element,
8551 pop_init_level): Correct check for zero initialization, move
8552 missing brace warning to respect zero initialization.
8554 2014-06-05 Marek Polacek <polacek@redhat.com>
8557 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
8559 2014-06-05 Marek Polacek <polacek@redhat.com>
8562 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
8563 on the left hand side operand of a comparison.
8565 2014-06-05 Marek Polacek <polacek@redhat.com>
8568 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
8569 Print note only if the warning was printed.
8571 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
8574 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
8577 2014-06-03 Marek Polacek <polacek@redhat.com>
8580 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
8582 * c-tree.h (c_start_case): Update.
8583 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
8584 switch condition has boolean value.
8586 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
8588 * c-decl.c: Include builtins.h.
8589 * c-parser.c: Likewise.
8591 2014-05-27 Marek Polacek <polacek@redhat.com>
8594 * c-typeck.c (convert_arguments): Get location of a parameter. Change
8595 error and warning calls to error_at and warning_at. Pass location of
8596 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
8597 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
8598 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
8600 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
8603 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
8604 function parameters.
8606 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
8608 * c-decl.c (merge_decls): Preserve symtab node pointers.
8609 (duplicate_decls): Free new decl.
8611 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
8613 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
8616 * c-parser.c (c_parser_omp_target): Return bool values.
8618 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8620 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
8621 num_teams_loc variable to num_thread_limit_loc.
8623 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8625 * c-array-notation.c (expand_array_notations): Use void_node
8626 instead of void_zero_node.
8628 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8630 * c-decl.c (finish_struct): Adjust.
8631 (finish_enum): Likewise.
8633 (record_inline_static): Likewise.
8634 (push_scope): Likewise.
8635 (make_label): Likewise.
8636 (lookup_label_for_goto): Likewise.
8637 (finish_struct): Likewise.
8638 (finish_enum): Likewise.
8639 (store_parm_decls): Likewise.
8640 (c_push_function_context): Likewise.
8641 * c-lang.h: Remove usage of variable_size gty attribute.
8642 * c-parser.c (c_parse_init): Adjust.
8643 (c_parse_file): Likewise.
8645 2014-05-13 Marek Polacek <polacek@redhat.com>
8648 * c-typeck.c (convert_for_assignment): Pass location to
8649 WARN_FOR_ASSIGNMENT instead of input_location.
8651 2014-05-10 Marek Polacek <polacek@redhat.com>
8653 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
8654 maybe_warn_string_init.
8655 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
8656 maybe_warn_string_init.
8657 * c-tree.h (maybe_warn_string_init): Update declaration.
8658 * c-typeck.c (maybe_warn_string_init): Add location parameter.
8659 Call pedwarn_init with loc instead of with input_location.
8660 (digest_init): Pass init_loc to maybe_warn_string_init.
8661 (pop_init_level): Call pedwarn_init with loc instead of with
8663 (set_init_index): Likewise.
8664 (process_init_element): Likewise.
8666 2014-05-09 Marek Polacek <polacek@redhat.com>
8669 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
8670 (c_parser_initelt): Pass location to set_init_label. Pass array index
8671 location to set_init_index.
8672 * c-tree.h (push_init_level): Update declaration.
8673 (pop_init_level): Likewise.
8674 (set_init_index): Likewise.
8675 (set_init_label): Likewise.
8676 * c-typeck.c (error_init): Add location parameter. Call error_at
8678 (digest_init): Pass init_loc to error_init.
8679 (really_start_incremental_init):
8680 (push_init_level): Add location parameter. Pass loc to pop_init_level
8682 (pop_init_level): Likewise.
8683 (set_designator): Add location parameter. Pass loc to pop_init_level,
8684 push_init_level, and error_init.
8685 (set_init_index): Add location parameter. Pass loc to error_init and
8687 (set_init_label): Likewise.
8688 (output_init_element): Pass loc to error_init.
8689 (process_init_element): Pass loc to error_init, pop_init_level,
8690 pedwarn_init, and push_init_level.
8692 2014-05-09 Marek Polacek <polacek@redhat.com>
8695 * c-parser.c (c_parser_attributes): Parse the arguments as an
8696 expression-list if the attribute takes identifier.
8698 2014-05-08 Marek Polacek <polacek@redhat.com>
8701 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8704 2014-05-08 Marek Polacek <polacek@redhat.com>
8707 * c-decl.c (start_function): Warn for _Atomic-qualified return type
8710 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8711 Mike Stump <mikestump@comcast.net>
8712 Richard Sandiford <rdsandiford@googlemail.com>
8714 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8715 (finish_enum): Use wide-int interfaces.
8716 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8717 * c-typeck.c (build_c_cast): Likewise.
8718 (set_nonincremental_init_from_string): Likewise.
8719 (c_tree_equal): Likewise.
8721 2014-05-02 Marek Polacek <polacek@redhat.com>
8724 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
8725 Return size_one_node when the type is not complete.
8726 (pointer_diff): Remove comment.
8727 (build_unary_op): Improve error messages.
8729 2014-05-02 Marek Polacek <polacek@redhat.com>
8731 * c-typeck.c (c_finish_return): Separate warning_at calls.
8733 2014-05-02 Marek Polacek <polacek@redhat.com>
8735 * c-tree.h (error_init): Remove declaration.
8736 (pedwarn_init): Likewise.
8737 * c-typeck.c (error_init): Make static and move above.
8738 (pedwarn_init): Likewise.
8739 (warning_init): Move above.
8740 (maybe_warn_string_init): Likewise.
8742 2014-05-01 Jeff Law <law@redhat.com>
8746 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8747 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8750 2014-05-02 Marek Polacek <polacek@redhat.com>
8753 * c-typeck.c (push_init_level): Set constructor_designated to
8754 p->designated for structures.
8756 2014-05-01 Marek Polacek <polacek@redhat.com>
8759 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8760 function-definition has an attribute after the declarator.
8762 2014-05-01 Marek Polacek <polacek@redhat.com>
8765 * c-typeck.c (warning_init): Add location_t parameter. Call
8766 warning_at instead of warning.
8767 (push_init_level): Pass input_location to warning_init.
8768 (add_pending_init): Add location_t parameter. Pass loc to
8770 (set_nonincremental_init): Pass input_location to add_pending_init.
8771 (set_nonincremental_init_from_string): Likewise.
8772 (output_init_element): Pass loc to warning_init and to
8775 2014-05-01 Marek Polacek <polacek@redhat.com>
8778 * c-typeck.c (c_finish_return): Distinguish between label and variable
8779 when warning about returning local address.
8781 2014-05-01 Marek Polacek <polacek@redhat.com>
8784 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8787 2014-05-01 Marek Polacek <polacek@redhat.com>
8790 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8791 instead of 0 to WARN_FOR_QUALIFIERS.
8793 2014-05-01 Marek Polacek <polacek@redhat.com>
8796 * c-typeck.c (default_conversion): Use better location for
8799 2014-04-30 Marek Polacek <polacek@redhat.com>
8801 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8802 also when SANITIZE_FLOAT_DIVIDE is on.
8804 2014-04-30 Marek Polacek <polacek@redhat.com>
8807 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8808 and pedwarn_init. Use loc insted of input_location.
8810 2014-04-30 Marek Polacek <polacek@redhat.com>
8813 * c-typeck.c (build_binary_op): Use location when warning about
8816 2014-04-25 Marek Polacek <polacek@redhat.com>
8819 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8820 always_inline/noinline and hot/cold attributes.
8822 2014-04-25 Marek Polacek <polacek@redhat.com>
8825 * c-parser.c (c_parser_initelt): Pass input_location to
8826 process_init_element.
8827 (c_parser_initval): Pass loc to process_init_element.
8828 * c-tree.h (process_init_element): Adjust declaration.
8829 * c-typeck.c (push_init_level): Pass input_location to
8830 process_init_element.
8831 (pop_init_level): Likewise.
8832 (set_designator): Likewise.
8833 (output_init_element): Add location_t parameter. Pass loc to
8835 (output_pending_init_elements): Pass input_location to
8836 output_init_element.
8837 (process_init_element): Add location_t parameter. Pass loc to
8838 output_init_element.
8840 2014-04-24 Jakub Jelinek <jakub@redhat.com>
8842 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8843 atomic-clause, allow comma in between atomic-clause and
8846 2014-04-22 Jakub Jelinek <jakub@redhat.com>
8849 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8850 fails, don't set OM_PARALLEL_COMBINED and return NULL.
8852 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8855 * c-array-notation.c (fix_builtin_array_notation_fn): Use
8856 create_tmp_var instead build_decl for creating temps.
8857 (build_array_notation_expr): Likewise.
8858 (fix_conditional_array_notations_1): Likewise.
8859 (fix_array_notation_expr): Likewise.
8860 (fix_array_notation_call_expr): Likewise.
8862 2014-03-28 Jakub Jelinek <jakub@redhat.com>
8865 * c-tree.h (c_build_function_call_vec): New prototype.
8866 * c-typeck.c (build_function_call_vec): Don't call
8867 resolve_overloaded_builtin here.
8868 (c_build_function_call_vec): New wrapper function around
8869 build_function_call_vec. Call resolve_overloaded_builtin here.
8870 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8871 Call c_build_function_call_vec instead of build_function_call_vec.
8872 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8873 * c-decl.c (finish_decl): Likewise.
8875 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8878 * c-typeck.c: Use correct format string in cast-qual warning
8880 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
8882 * c-decl.c (c_decl_attributes): Use
8883 lang_hooks.types.omp_mappable_type.
8884 * c-typeck.c (c_finish_omp_clauses): Likewise.
8886 2014-03-06 Marek Polacek <polacek@redhat.com>
8889 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
8890 of checking tree code.
8892 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8894 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
8895 (c_parser_parameter_declaration): Likewise.
8897 2014-02-19 Marek Polacek <polacek@redhat.com>
8900 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
8901 Call mark_exp_read on exp.value.
8902 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
8903 TREE_ADDRESSABLE on old instead of val.
8904 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
8906 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8908 * c-parser.c (c_parser_get_builtin_args): Replace calls to
8909 C_EXPR_APPEND by vec_safe_push.
8910 * c-tree.h (C_EXPR_APPEND): Remove.
8912 2014-01-31 Marek Polacek <polacek@redhat.com>
8915 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
8916 build_function_call_vec.
8917 (build_function_call): Likewise.
8918 (build_atomic_assign): Likewise.
8919 (build_function_call_vec): Add arg_loc parameter. Use it.
8920 (convert_arguments): Likewise.
8921 (convert_for_assignment): Rename rhs_loc to expr_loc.
8922 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8923 (c_parser_objc_keywordexpr): Likewise.
8924 (c_parser_postfix_expression_after_primary): Call
8925 build_function_call_vec with expr_loc rather than op_loc.
8926 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
8927 build_function_call_vec.
8928 (c_parser_expr_list): Add locations parameter. Fill it with locations
8929 of function arguments.
8930 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8932 2014-01-30 Marek Polacek <polacek@redhat.com>
8935 * c-typeck.c (build_function_call_vec): Use loc parameter.
8936 (convert_arguments): Add location parameter. Use it.
8937 (ep_convert_and_check): Likewise.
8938 (build_atomic_assign): Adjust convert_for_assignment call.
8939 (build_modify_expr): Likewise.
8940 (digest_init): Likewise.
8941 (c_finish_return): Likewise.
8942 (build_conditional_expr): Adjust ep_convert_and_check calls.
8943 (convert_for_assignment): Add rhs_loc parameter. Use it.
8944 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8947 2014-01-30 Richard Biener <rguenther@suse.de>
8950 * c-typeck.c (build_function_call_vec): Do not replace calls
8951 to a function via an incompatible type with a runtime abort.
8953 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8955 * c-parser.c (c_parser_declaration_or_fndef): Replaced
8956 flag_enable_cilkplus with flag_cilkplus.
8957 (c_parser_direct_declarator_inner): Likewise.
8958 (c_parser_attribute_any_word): Likewise.
8959 (c_parser_attributes): Likewise.
8960 (c_parser_compound_statement): Likewise.
8961 (c_parser_statement_after_labels): Likewise.
8962 (c_parser_if_statement): Likewise.
8963 (c_parser_switch_statement): Likewise.
8964 (c_parser_do_statement): Likewise.
8965 (c_parser_for_statement): Likewise.
8966 (c_parser_unary_expression): Likewise.
8967 (c_parser_postfix_expression): Likewise.
8968 (c_parser_postfix_expression_after_primary): Likewise.
8969 (c_parser_postfix_expression_after_primary): Likewise.
8970 (c_parser_omp_clause_name): Likewise.
8971 (c_finish_omp_declare_simd): Likewise.
8972 (c_parser_cilk_verify_simd): Likewise.
8973 * c-typeck.c (build_array_ref): Likewise.
8974 (build_function_call_vec): Likewise.
8975 (convert_arguments): Likewise.
8976 (build_compound_expr): Likewise.
8977 (c_finish_return): Likewise.
8978 (c_finish_if_stmt): Likewise.
8979 (c_finish_loop): Likewise.
8980 (build_binary_op): Likewise.
8982 2014-01-23 Marek Polacek <polacek@redhat.com>
8985 * c-typeck.c (parser_build_binary_op): Use location instead of
8987 (build_binary_op): Pass location to shorten_compare.
8989 2014-01-23 Marek Polacek <polacek@redhat.com>
8992 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8995 2014-01-23 Marek Polacek <polacek@redhat.com>
8998 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8999 of a comma expression.
9000 (emit_side_effect_warnings): Likewise.
9002 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
9005 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
9006 function to use walk_tree and moved a lot of its functionality to
9007 expand_array_notations.
9008 (expand_array_notations): New function.
9010 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
9012 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
9013 attribute an attribute without value.
9015 2014-01-23 Jakub Jelinek <jakub@redhat.com>
9018 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
9019 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
9021 2014-01-22 Marek Polacek <polacek@redhat.com>
9024 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
9025 of remove_c_maybe_const_expr on op1 and op2.
9027 2014-01-15 Jakub Jelinek <jakub@redhat.com>
9030 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
9031 effects, preevaluate rhs using SAVE_EXPR first.
9033 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
9036 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
9037 statements with if-elseif statements.
9039 2014-01-06 Marek Polacek <polacek@redhat.com>
9042 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
9043 defined bit-field types only in ISO C.
9045 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9047 Update copyright years
9049 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9051 * c-array-notation.c: Use the standard form for the copyright notice.
9053 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9055 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
9056 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
9057 field in parser is not empty. If not-empty, call the function
9058 c_parser_finish_omp_declare_simd.
9059 (c_parser_cilk_clause_vectorlength): Modified function to be shared
9060 between SIMD-enabled functions and #pragma simd. Added new parameter.
9061 (c_parser_cilk_all_clauses): Modified the usage of the function
9062 c_parser_cilk_clause_vectorlength as mentioned above.
9063 (c_parser_cilk_simd_fn_vector_attrs): New function.
9064 (c_finish_cilk_simd_fn_tokens): Likewise.
9065 (is_cilkplus_vector_p): Likewise.
9066 (c_parser_omp_clause_name): Added checking for "vectorlength,"
9067 "nomask," and "mask" strings in clause name.
9068 (c_parser_omp_all_clauses): Added 3 new case statements:
9069 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
9070 PRAGMA_CILK_CLAUSE_NOMASK.
9071 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
9072 check for vector attribute and if so call the function
9073 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
9074 called the function c_finish_cilk_simd_fn_tokens.
9075 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
9076 parser field is non-empty. If so, parse them as you would parse
9077 the omp declare simd pragma.
9078 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
9079 Added a check when step is a parameter and flag it as error.
9080 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
9081 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
9084 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
9086 * c-parser.c (c_parser_omp_parallel): Fix description.
9088 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9090 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
9091 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9092 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
9093 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
9095 2013-12-04 Joseph Myers <joseph@codesourcery.com>
9098 * c-parser.c (c_parser_alignas_specifier): Use
9099 c_sizeof_or_alignof_type instead of c_alignof.
9100 (c_parser_alignof_expression): Likewise, with min_alignof
9101 parameter depending on alignof spelling used.
9103 2013-12-04 Marek Polacek <polacek@redhat.com>
9106 * c-decl.c (start_function): Don't warn for missing prototype for
9109 2013-12-03 Marek Polacek <polacek@redhat.com>
9112 * c-decl.c (build_compound_literal): Allow compound literals with
9113 empty initial value.
9115 2013-12-02 Joseph Myers <joseph@codesourcery.com>
9118 * c-typeck.c (build_modify_expr): Diagnose assignment to
9119 expression with array type.
9121 2013-11-29 Joseph Myers <joseph@codesourcery.com>
9124 * c-typeck.c (process_init_element): Do not treat a string as
9125 initializing a whole array when used with a designator for an
9128 2013-11-29 Joseph Myers <joseph@codesourcery.com>
9131 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
9132 an inline function following a static declaration.
9134 2013-11-28 Jakub Jelinek <jakub@redhat.com>
9137 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
9138 to p_name before calling c_parser_omp_teams instead of after.
9139 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
9140 argument. Remove unused p_name variable.
9142 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
9143 Jakub Jelinek <jakub@redhat.com>
9145 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
9146 external_scope is NULL.
9148 2013-11-27 Tom de Vries <tom@codesourcery.com>
9149 Marc Glisse <marc.glisse@inria.fr>
9152 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
9154 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
9156 * c-typeck.c: Add required include files from gimple.h.
9158 2013-11-22 David Malcolm <dmalcolm@redhat.com>
9160 * c-decl.c (define_label, shadow_tag_warned)
9161 (check_bitfield_type_and_width, grokdeclarator, grokparms,
9162 store_parm_decls_newstyle, store_parm_decls_oldstyle)
9163 (declspecs_add_type): Remove use of in_system_header macro.
9164 * c-parser.c (c_parser_unary_expression): Likewise.
9165 * c-typeck.c (store_init_value, process_init_element)
9166 (c_start_case): Likewise.
9168 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
9171 * c-parser.c (c_parser_set_source_position_from_token): Remove
9172 reference to in_system_header from comment.
9174 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9176 * c-decl.c (grokdeclarator): Update comment to refer to
9177 tree_to_[su]hwi rather than tree_low_cst.
9179 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9181 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
9182 tree_to_uhwi throughout.
9184 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9186 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
9189 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9191 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
9194 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
9196 * c-parser.c (c_parser_cilk_simd): New.
9197 (c_parser_cilk_verify_simd): New.
9198 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
9199 (c_parser_omp_for_loop): Add case for NE_EXPR.
9200 Set c_break_label for CILK_SIMD.
9201 (c_parser_cilk_clause_vectorlength): New.
9202 (c_parser_cilk_clause_linear): New.
9203 (c_parser_cilk_clause_name): New.
9204 (c_parser_cilk_all_clauses): New.
9205 * c-typeck.c (build_unary_op): Pass location argument to
9207 (build_modify_expr): Same.
9208 (build_asm_expr): Same.
9209 (c_finish_bc_stmt): Error on break/continue in loops.
9211 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
9213 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
9215 2013-11-14 Diego Novillo <dnovillo@google.com>
9217 * c-decl.c: Include print-tree.h.
9218 Include stor-layout.h.
9221 Include stringpool.h.
9222 * c-lang.c: Include fold-const.h.
9223 * c-parser.c: Include stringpool.h.
9225 Include stor-layout.h.
9227 Include trans-mem.h.
9228 * c-typeck.c: Include stor-layout.h.
9229 Include trans-mem.h.
9233 2013-11-13 Joseph Myers <joseph@codesourcery.com>
9235 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
9236 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
9238 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
9239 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
9241 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
9242 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
9243 (c_parser_declarator, c_parser_direct_declarator_inner)
9244 (c_parser_parameter_declaration, c_parser_type_name): All callers
9246 (c_parser_declaration_or_fndef): Handle declarations with type
9247 determined from the initializer.
9249 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
9251 * c-typeck.c: Include gimplify.h.
9253 2013-11-12 Joseph Myers <joseph@codesourcery.com>
9255 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
9256 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
9258 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
9259 or _Thread_local as appropriate in diagnostics.
9260 (build_null_declspecs): Initialize ret->thread_gnu_p.
9261 (declspecs_add_scspec): Handle either __thread or _Thread_local
9262 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
9263 pedantic. Do not disallow _Thread_local extern and _Thread_local
9266 2013-11-07 Joseph Myers <joseph@codesourcery.com>
9267 Andrew MacLeod <amacleod@redhat.com>
9269 * c-aux-info.c (gen_type): Handle atomic qualifier.
9270 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
9271 qualifiers when compating types.
9272 (shadow_tag_warned): Handle atomic_p in declspecs.
9273 (quals_from_declspecs): Likewise.
9274 (start_decl): Use c_type_promotes_to when promoting argument
9276 (grokdeclarator): Handle _Atomic.
9277 (get_parm_info): Diagnose any qualifier on "void" as only
9279 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
9280 comparing types. Use c_type_promotes_to when promoting argument
9282 (finish_function): Use c_type_promotes_to when promoting argument
9284 (build_null_declspecs): Handle atomic_p in declspecs.
9285 (declspecs_add_qual): Handle RID_ATOMIC.
9286 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
9287 (c_token_starts_declspecs): Handle RID_ATOMIC.
9288 (c_parser_declspecs): Handle atomic type specifiers and
9290 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
9291 from types of expressions with atomic type.
9292 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
9293 (c_parser_attribute_any_word): Handle RID_ATOMIC.
9294 (c_parser_initializer, c_parser_initelt, c_parser_initval)
9295 (c_parser_statement_after_labels, c_parser_switch_statement)
9296 (c_parser_for_statement, c_parser_expr_no_commas)
9297 (c_parser_conditional_expression, c_parser_binary_expression)
9298 (c_parser_cast_expression, c_parser_unary_expression)
9299 (c_parser_postfix_expression)
9300 (c_parser_postfix_expression_after_primary, c_parser_expression):
9301 Use convert_lvalue_to_rvalue.
9302 (c_parser_expression_conv, c_parser_expr_list): Document
9303 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
9304 (c_parser_objc_synchronized_statement): Use
9305 convert_lvalue_to_rvalue.
9306 (c_parser_objc_selector): Handle RID_ATOMIC.
9307 (c_parser_objc_receiver, c_parser_array_notation): Use
9308 convert_lvalue_to_rvalue.
9309 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
9310 _Atomic (type-name).
9311 (struct c_declspecs): Add atomic_p field.
9312 (convert_lvalue_to_rvalue): Declare.
9313 * c-typeck.c (c_type_promotes_to): Promote atomic types to
9314 corresponding atomic types.
9315 (qualify_type): Don't add _Atomic qualifiers from second argument.
9316 (comp_target_types): Do not allow _Atomic mismatches.
9317 (type_lists_compatible_p): Do not remove atomic qualifiers when
9319 (really_atomic_lvalue, convert_lvalue_to_rvalue)
9320 (build_atomic_assign): New functions.
9321 (build_unary_op): Use build_atomic_assign for atomic increment and
9323 (build_conditional_expr): Do not treat _Atomic void as a qualified
9325 (build_modify_expr): Use build_atomic_assign for atomic LHS.
9326 (find_anonymous_field_with_type, convert_to_anonymous_field)
9327 (convert_for_assignment): Do not remove atomic qualifiers when
9329 (digest_init): Do not accept initialization of arrays of atomic
9330 elements by string constants.
9331 (build_asm_expr): Use convert_lvalue_to_rvalue.
9332 (build_binary_op): Do not treat _Atomic void as a qualified
9335 2013-11-06 DJ Delorie <dj@redhat.com>
9337 * c-decl.c (locate_old_decl): If a previous conflicting decl is
9338 both explicit and builtin, print the location of the explicit one.
9340 2013-11-05 Tobias Burnus <burnus@net-b.de>
9342 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
9343 c_parser_omp_distribute, c_parser_omp_teams,
9344 c_parser_omp_target, c_parser_omp_declare): Handle
9347 2013-11-03 Marek Polacek <polacek@redhat.com>
9349 * c-decl.c (grokdeclarator): Add VLA instrumentation.
9351 2013-11-01 Jakub Jelinek <jakub@redhat.com>
9353 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
9354 check_dup_generic at the end, unless remove is true.
9355 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
9357 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
9359 2013-10-31 Jakub Jelinek <jakub@redhat.com>
9361 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
9362 with decl that is not pointer nor array.
9364 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9366 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
9367 a spawning function is found.
9368 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
9369 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
9370 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9371 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
9373 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
9374 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
9376 (c_finish_return): Added a check to reject _Cilk_spawn in return
9378 (build_cilk_spawn): New function.
9379 (build_cilk_sync): Likewise.
9380 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
9382 2013-10-27 Tobias Burnus <burnus@net-b.de>
9385 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
9386 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
9387 (c_parser_statement_after_labels): Update calls.
9389 2013-10-24 Tobias Burnus <burnus@net-b.de>
9392 * c-parser.c (c_parser_pragma, c_parser_for_statement):
9393 Handle PRAGMA_IVDEP.
9394 (c_parser_statement_after_labels): Update call.
9396 2013-10-24 Marek Polacek <polacek@redhat.com>
9398 * c-parser.c (c_parser_struct_declaration): Add a comment.
9399 (c_parser_declarator): Don't allow _Alignas here.
9401 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
9403 * c-parser.c: Include omp-low.h.
9404 * c-typeck.c: Likewise.
9406 2013-10-17 Marek Polacek <polacek@redhat.com>
9409 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
9410 Document syntax of the array-declarator.
9411 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
9413 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
9414 (c_parser_struct_declaration): Likewise.
9415 (c_parser_declarator): Likewise.
9416 (c_parser_direct_declarator_inner): Likewise.
9417 (c_parser_parameter_declaration): Likewise.
9418 (c_parser_type_name): Likewise.
9420 2013-10-11 Jakub Jelinek <jakub@redhat.com>
9422 * c-lang.h (current_omp_declare_target_attribute): New extern
9424 * c-parser.c: Include c-lang.h.
9425 (struct c_parser): Change tokens to c_token *.
9426 Add tokens_buf field. Change tokens_avail type to unsigned int.
9427 (c_parser_consume_token): If parser->tokens isn't
9428 &parser->tokens_buf[0], increment parser->tokens.
9429 (c_parser_consume_pragma): Likewise.
9430 (enum pragma_context): Add pragma_struct and pragma_param.
9431 (c_parser_external_declaration): Adjust
9432 c_parser_declaration_or_fndef caller.
9433 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
9434 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
9435 Adjust recursive call.
9436 (c_parser_struct_or_union_specifier): Use pragma_struct instead
9438 (c_parser_parameter_declaration): Use pragma_param instead of
9440 (c_parser_compound_statement_nostart, c_parser_label,
9441 c_parser_for_statement): Adjust
9442 c_parser_declaration_or_fndef callers.
9443 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
9444 it through to c_parser_conditional_expression.
9445 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
9446 pass it through to c_parser_binary_expression. Adjust recursive
9448 (c_parser_binary_expression): Remove prec argument, add
9449 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
9450 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
9451 binop matches it, use build2 instead of parser_build_binary_op.
9452 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
9453 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
9454 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
9455 Handle pragma_struct and pragma_param the same as pragma_external.
9456 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
9457 (c_parser_omp_variable_list): Parse array sections for
9458 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
9459 (c_parser_omp_clause_collapse): Fully fold collapse expression.
9460 (c_parser_omp_clause_reduction): Handle user defined reductions.
9461 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
9462 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
9463 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
9464 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
9465 c_parser_omp_clause_depend, c_parser_omp_clause_map,
9466 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
9467 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
9468 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
9469 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
9470 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
9471 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
9472 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
9473 (c_parser_omp_for_loop): Add CODE argument, pass it through
9474 to c_finish_omp_for. Change last argument to cclauses,
9475 and adjust uses to grab parallel clauses from the array of all
9476 the split clauses. Adjust c_parser_binary_expression,
9477 c_parser_declaration_or_fndef and c_finish_omp_for callers.
9478 (omp_split_clauses): New function.
9479 (c_parser_omp_simd): New function.
9480 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
9481 Allow the function to be called also when parsing combined constructs,
9482 and call c_parser_omp_simd when parsing for simd.
9483 (c_parser_omp_sections_scope): If section-sequence doesn't start with
9484 #pragma omp section, require exactly one structured-block instead of
9485 sequence of statements.
9486 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
9487 Allow the function to be called also when parsing combined constructs.
9488 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
9489 Allow the function to be called also when parsing combined
9491 (c_parser_omp_taskgroup, c_parser_omp_cancel,
9492 c_parser_omp_cancellation_point, c_parser_omp_distribute,
9493 c_parser_omp_teams, c_parser_omp_target_data,
9494 c_parser_omp_target_update, c_parser_omp_target,
9495 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
9496 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
9497 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
9498 (c_parser_omp_construct): Add p_name and mask vars. Handle
9499 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
9500 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
9501 and c_parser_omp_sections callers.
9502 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
9503 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
9504 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
9505 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
9506 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
9508 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
9509 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
9510 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
9511 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
9512 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
9513 * c-typeck.c: Include tree-inline.h.
9514 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
9515 handle_omp_array_sections_1, handle_omp_array_sections,
9516 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
9517 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
9518 user defined reductions.
9519 (c_tree_equal): New function.
9520 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
9521 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
9522 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
9523 c_check_omp_declare_reduction_r): New prototypes.
9524 * c-decl.c (current_omp_declare_target_attribute): New variable.
9525 (c_decl_attributes): New function.
9526 (start_decl, start_function): Use it instead of decl_attributes.
9527 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
9528 c_omp_reduction_decl, c_omp_reduction_lookup,
9529 c_check_omp_declare_reduction_r): New functions.
9531 2013-09-25 Tom Tromey <tromey@redhat.com>
9533 * Make-lang.in (c/gccspec.o): Remove.
9534 (CFLAGS-c/gccspec.o): New variable.
9535 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
9536 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
9537 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
9539 2013-09-25 Tom Tromey <tromey@redhat.com>
9541 * Make-lang.in (c/gccspec.o): Don't use subshell.
9543 2013-09-18 Marek Polacek <polacek@redhat.com>
9546 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
9547 Remove unnecessary check.
9549 2013-09-18 Marek Polacek <polacek@redhat.com>
9552 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
9553 no_sanitize_undefined attribute.
9555 2013-09-13 Kai Tietz <ktietz@redhat.com>
9558 * c-decl.c (c_builtin_function_ext_scope): Remove
9559 wrong assumption that it is never called on prexisting
9562 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9564 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
9566 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9568 * c-objc-common.c (c_tree_printer): Tidy.
9570 2013-08-30 Marek Polacek <polacek@redhat.com>
9572 * c-typeck.c (build_binary_op): Add division by zero and shift
9575 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
9576 Joseph Myers <joseph@codesourcery.com>
9579 * c-typeck.c (c_common_type): Prefer double_type_node over
9580 other REAL_TYPE types with the same precision.
9581 (convert_arguments): Likewise.
9583 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
9585 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
9586 (c_initialize_diagnostics): Call a destructor for the early printer.
9588 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9590 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
9591 printer initialization.
9593 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
9596 * c-array-notation.c (fix_conditional_array_notations_1): Added a
9597 check for truth values.
9598 (expand_array_notation_exprs): Added truth values case. Removed an
9599 unwanted else. Added for-loop to walk through subtrees in default
9602 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9604 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
9606 2013-07-23 Joseph Myers <joseph@codesourcery.com>
9608 * c-parser.c (struct c_generic_association): Fix typo.
9610 2013-07-23 Tom Tromey <tromey@redhat.com>
9611 Joseph Myers <joseph@codesourcery.com>
9613 * c-parser.c (struct c_generic_association): New.
9614 (c_generic_association_d): New typedef.
9615 (c_parser_generic_selection): New function.
9616 (c_parser_postfix_expression): Handle RID_GENERIC.
9618 2013-07-13 Jason Merrill <jason@redhat.com>
9621 * c-decl.c (finish_struct): Check for too-large class.
9623 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
9626 * c-typeck.c (set_init_index): When folding, check for index overflow.
9628 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9630 * c-parser.c (c_parser_array_notation): Removed rejection of array
9631 notations in an array of function pointers.
9633 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9635 * c-array-notation.c (make_triplet_val_inv): New function.
9636 (create_cmp_incr): Likewise.
9637 (create_array_refs): Likewise.
9638 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
9639 Also modularized common parts between functions and called the function.
9640 (build_array_notation_expr): Likewise.
9641 (fix_conditional_array_notations_1): Likewise.
9642 (fix_array_notation_expr): Likewise.
9643 (fix_array_notation_call_expr): Likewise.
9645 2013-06-18 Marek Polacek <polacek@redhat.com>
9648 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
9650 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
9652 * c-array-notation.c (build_array_notation_expr): Reject array notation
9653 mismatch between LHS and RHS even inside a call_expr. Also, removed
9654 a couple while statements that were dead code.
9656 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
9658 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
9659 excessive precision expressions in function parameters. Also removed
9660 couple unwanted while statements.
9662 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9664 * c-array-notation.c (expand_array_notation_exprs): Added
9665 ARRAY_NOTATION_REF case.
9667 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9669 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
9670 function to c-family/array-notation-common.c.
9671 (is_cilkplus_reduce_builtin): Likewise.
9672 (find_rank): Likewise.
9673 (extract_array_notation_exprs): Likewise.
9674 (replace_array_notations): Likewise.
9675 (find_inv_trees): Likewise.
9676 (replace_inv_trees): Likewise.
9677 (contains_array_notation_expr): Likewise.
9678 (find_correct_array_notation_type): Likewise.
9679 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9680 (struct inv_list): Moved this to c-family/array-notation-common.c.
9681 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
9683 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
9685 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9686 reduction functions outside the for-loop. Added a check if the fundecl
9687 is non-NULL. Finally, removed an unwanted if-statement, and made the
9690 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9692 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9693 condition of the if-statement matches the rank of else-block and then-
9694 block when array notations are used.
9695 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9696 expression after the entire function body is parsed.
9697 (c_parser_expr_no_commas): Delayed creating array notation expressions
9698 to the end of function parsing.
9699 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9700 whole if-statement instead of just the condition.
9701 (expand_array_notation_exprs): Added MODIFY_EXPR case.
9703 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9706 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9707 array to NULL_TREE if they are unused. Also added a check for the
9708 field to be NULL before its fields are used in future.
9710 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9713 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9714 (build_array_notation_expr): Likewise.
9716 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9718 * c-typeck.c (build_array_ref): Added a check to see if array's
9719 index is greater than one. If true, then emit an error.
9720 (build_function_call_vec): Exclude error reporting and checking
9721 for builtin array-notation functions.
9722 (convert_arguments): Likewise.
9723 (c_finish_return): Added a check for array notations as a return
9724 expression. If true, then emit an error.
9725 (c_finish_loop): Added a check for array notations in a loop
9726 condition. If true then emit an error.
9727 (lvalue_p): Added a ARRAY_NOTATION_REF case.
9728 (build_binary_op): Added a check for array notation expr inside
9729 op1 and op0. If present, we call another function to find correct
9731 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9732 * c-parser.c (c_parser_compound_statement): Check if array
9733 notation code is used in tree, if so, then transform them into
9735 (c_parser_expr_no_commas): Check if array notation is used in LHS
9736 or RHS, if so, then build array notation expression instead of
9738 (c_parser_postfix_expression_after_primary): Added a check for
9739 colon(s) after square braces, if so then handle it like an array
9740 notation. Also, break up array notations in unary op if found.
9741 (c_parser_direct_declarator_inner): Added a check for array
9743 (c_parser_compound_statement): Added a check for array notation in
9744 a stmt. If one is present, then expand array notation expr.
9745 (c_parser_if_statement): Likewise.
9746 (c_parser_switch_statement): Added a check for array notations in
9747 a switch statement's condition. If true, then output an error.
9748 (c_parser_while_statement): Similarly, but for a while.
9749 (c_parser_do_statement): Similarly, but for a do-while.
9750 (c_parser_for_statement): Similarly, but for a for-loop.
9751 (c_parser_unary_expression): Check if array notation is used in a
9752 pre-increment or pre-decrement expression. If true, then expand
9754 (c_parser_array_notation): New function.
9755 * c-array-notation.c: New file.
9756 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
9758 2013-05-23 Mike Stump <mikestump@comcast.net>
9760 * c-typeck.c (convert_for_assignment): Handle references to memory
9763 2013-05-16 Jason Merrill <jason@redhat.com>
9765 * Make-lang.in (cc1$(exeext)): Use link mutex.
9767 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9769 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9770 to simply use OPT_Wpointer_arith.
9771 (build_unary_op): Likewise.
9773 2013-04-03 Jakub Jelinek <jakub@redhat.com>
9776 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9777 argument. If set, or it temporarily for parsing of the first
9778 argument into force_folding_builtin_constant_p.
9779 (c_parser_postfix_expression): Adjust callers.
9781 2013-03-21 Richard Biener <rguenther@suse.de>
9783 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9784 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
9786 2013-02-12 Marek Polacek <polacek@redhat.com>
9789 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9792 2013-01-24 Jakub Jelinek <jakub@redhat.com>
9795 * c-typeck.c (set_nonincremental_init_from_string): If
9796 constructor_max_index is NULL, treat it as if tree_int_cst_lt
9798 (process_init_element): Likewise.
9800 2012-12-20 Jakub Jelinek <jakub@redhat.com>
9803 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9804 argument, don't call default_function_array_conversion
9805 nor c_fully_fold here.
9806 (c_parser_asm_statement): Adjust callers.
9807 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9808 and outputs here, and call default_function_array_conversion
9809 on inputs that don't need to be addressable.
9811 2012-12-18 Jakub Jelinek <jakub@redhat.com>
9814 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9815 warning require that both c_common_unsigned_type as well as
9816 c_common_signed_type is the same for both mvl and mvr types.
9818 2012-11-16 Diego Novillo <dnovillo@google.com>
9820 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9822 * c-common.c: Use new vec API in vec.h.
9823 * c-common.h: Likewise.
9824 * c-gimplify.c: Likewise.
9825 * c-pragma.c: Likewise.
9826 * c-pretty-print.c: Likewise.
9827 * c-pretty-print.h: Likewise.
9828 * c-semantics.c: Likewise.
9829 * c-decl.c: Likewise.
9830 * c-parser.c: Likewise.
9831 * c-tree.h: Likewise.
9832 * c-typeck.c: Likewise.
9834 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9837 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9839 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9842 * c-decl.c (warn_if_shadowing): Do not warn if a variable
9843 shadows a function, unless the variable is a function or a
9844 pointer-to-function.
9846 2012-10-12 Jakub Jelinek <jakub@redhat.com>
9849 * c-parser.c (struct c_tree_loc_pair): Removed.
9850 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9851 add location_t * and tree * arguments, fill in array of 3
9852 sizeof_arg trees and corresponding locs.
9853 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9854 c_parser_expr_list callers.
9855 (c_parser_postfix_expression_after_primary): Likewise. Pass
9856 array of 3 sizeof_arg trees and locs (corresponding to first
9857 3 arguments) to sizeof_pointer_memaccess_warning.
9859 2012-10-09 Lawrence Crowl <crowl@google.com>
9861 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9862 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9865 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9868 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9871 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
9874 * c-typeck.c: Include c-common.h.
9875 (enum stv_conv): Moved to c-common.h.
9876 (scalar_to_vector): Moved to c-common.c.
9877 (build_binary_op): Adapt to scalar_to_vector's new prototype.
9878 * Make-lang.in: c-typeck.c depends on c-common.h.
9880 2012-10-04 Arnaud Charlet <charlet@adacore.com>
9882 * c-decl.c (c_write_global_declarations): Fix handling of
9885 2012-09-30 Sharad Singhai <singhai@google.com>
9887 * c-decl.c (c_write_global_declarations): Use a different method
9888 to determine if the dump has ben initialized.
9890 2012-09-14 Joseph Myers <joseph@codesourcery.com>
9893 * c-typeck.c (c_cast_expr): When casting to a type requiring
9894 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
9897 2012-09-14 Joseph Myers <joseph@codesourcery.com>
9900 * c-typeck.c (build_unary_op): Pass original argument of
9901 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
9902 any C_MAYBE_CONST_EXPR, if it has integer operands.
9903 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
9904 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
9905 to c_objc_common_truthvalue_conversion, then remove any
9906 C_MAYBE_CONST_EXPR, if they have integer operands. Use
9907 c_objc_common_truthvalue_conversion not
9908 c_common_truthvalue_conversion.
9909 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
9910 call note_integer_operands for arguments with integer operands
9911 that are not integer constants.
9913 2012-09-13 Jakub Jelinek <jakub@redhat.com>
9916 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
9917 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9919 2012-08-31 Jakub Jelinek <jakub@redhat.com>
9922 * c-convert.c (convert): Don't call fold_convert_loc if
9923 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9924 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
9925 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9927 2012-08-24 Jakub Jelinek <jakub@redhat.com>
9930 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9931 for nested and empty_ok arguments in the call to
9932 c_parser_declaration_or_fndef.
9934 2012-08-17 Jakub Jelinek <jakub@redhat.com>
9936 * c-tree.h (c_last_sizeof_arg): Declare.
9937 * c-parser.c (struct c_tree_loc_pair): New type.
9938 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
9940 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9941 (c_parser_postfix_expression_after_primary): Likewise. Call
9942 sizeof_pointer_memaccess_warning if needed.
9943 (sizeof_ptr_memacc_comptypes): New function.
9944 * c-typeck.c (c_last_sizeof_arg): New global variable.
9945 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9947 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
9949 * c-lang.h (lang_decl): Add variable_size GTY option.
9951 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9953 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9954 * Make-lang.in: Fix dependencies.
9956 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9958 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
9959 and add language Makefile hooks.
9960 * config-lang.in: New file.
9961 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
9962 add the required "normal" config-lang.in rules.
9963 * c-lang.h: Moved from gcc/ to here.
9964 * c-tree.h: Likewise.
9965 * c-objc-common.c: Likewise.
9966 * c-objc-common.h: Likewise.
9967 * c-typeck.c: Likewise.
9968 * c-convert.c: Likewise.
9969 * c-lang.c: Likewise.
9970 * c-aux-info.c: Likewise.
9971 * c-errors.c: Likewise.
9972 * gccspec.c: Likewise.
9973 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
9974 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
9976 Copyright (C) 2012-2024 Free Software Foundation, Inc.
9978 Copying and distribution of this file, with or without modification,
9979 are permitted in any medium without royalty provided the copyright
9980 notice and this notice are preserved.