1 2024-03-08 Jakub Jelinek <jakub@redhat.com>
4 * c-tree.h (c_type_dwarf_attribute): Declare.
5 * c-objc-common.h (LANG_HOOKS_TYPE_DWARF_ATTRIBUTE): Redefine.
6 * c-objc-common.cc: Include dwarf2.h.
7 (c_type_dwarf_attribute): New function.
9 2024-02-26 Jakub Jelinek <jakub@redhat.com>
12 * c-parser.cc (c_parser_postfix_expression): Diagnose
13 __builtin_stdc_bit_* argument with ENUMERAL_TYPE or BOOLEAN_TYPE
14 type or if signed here rather than on the replacement builtins
15 in check_builtin_function_arguments.
17 2024-02-22 Jakub Jelinek <jakub@redhat.com>
20 * c-parser.cc (c_parser_std_attribute): Remove loose_scope_p argument.
21 Instead of checking it, parse 2 CPP_COLONs with the first one with
22 COLON_SCOPE flag the same as CPP_SCOPE.
23 (c_parser_std_attribute_list): Remove loose_scope_p argument, don't
24 pass it to c_parser_std_attribute.
25 (c_parser_std_attribute_specifier): Adjust c_parser_std_attribute_list
28 2024-02-13 Tobias Burnus <tburnus@baylibre.com>
31 * c-parser.cc (c_parser_omp_context_selector): Handle splitting of
32 OMP_TRAIT_PROPERTY_EXPR into OMP_TRAIT_PROPERTY_{DEV_NUM,BOOL}_EXPR.
34 2024-02-10 Jakub Jelinek <jakub@redhat.com>
36 * c-decl.cc (get_parm_array_spec): Use HOST_WIDE_INT_PRINT_UNSIGNED
37 instead of "%lu" and casts to unsigned long or unsigned long long.
39 2024-02-08 Joseph Myers <josmyers@redhat.com>
42 * c-typeck.cc (c_objc_common_truthvalue_conversion): Return an
43 integer constant expression for boolean conversion of floating
46 2024-02-05 Jakub Jelinek <jakub@redhat.com>
49 * c-decl.cc (finish_struct): Only use build_bitint_type if
50 bit-field has width larger or equal to minimum _BitInt
53 2024-01-31 Joseph Myers <josmyers@redhat.com>
56 * c-decl.cc (start_enum): Clear ENUM_FIXED_UNDERLYING_TYPE_P when
57 defining without a fixed underlying type an enumeration previously
58 declared with a fixed underlying type.
60 2024-01-31 Martin Uecker <uecker@tugraz.at>
63 * c-typeck.cc (composite_type_internal): Set TYPE_STUB_DECL.
65 2024-01-31 Joseph Myers <josmyers@redhat.com>
69 * c-tree.h (c_objc_common_truthvalue_conversion): Add third
71 * c-convert.cc (c_convert): For conversions to boolean, pass third
72 argument to c_objc_common_truthvalue_conversion rather than
74 * c-typeck.cc (build_c_cast): Ensure arguments with integer
75 operands are marked as such for conversion to boolean.
76 (c_objc_common_truthvalue_conversion): Add third argument TYPE.
78 2024-01-21 Martin Uecker <uecker@tugraz.at>
81 * c-decl.cc (grokdeclarator): Use c_common_unsigned_type instead of
82 unsigned_type_for to create the unsigned type for bitfields declared
83 with int when using -funsigned-bitfields.
85 2024-01-12 Jakub Jelinek <jakub@redhat.com>
88 * c-typeck.cc (build_array_ref): If index has BITINT_TYPE type with
89 precision larger than sizetype precision, convert it to sizetype.
91 2024-01-11 Julian Brown <julian@codesourcery.com>
93 * c-parser.cc (c_parser_braced_init, c_parser_conditional_expression):
94 Don't allow OpenMP array section.
95 (c_parser_postfix_expression): Don't allow array section in statement
97 (c_parser_postfix_expression_after_primary): Add support for OpenMP
98 array section parsing.
99 (c_parser_expr_list): Don't allow OpenMP array section here.
100 (c_parser_omp_variable_list): Change ALLOW_DEREF parameter to
101 MAP_LVALUE. Support parsing of general lvalues in "map", "to" and
103 (c_parser_omp_var_list_parens): Change ALLOW_DEREF parameter to
104 MAP_LVALUE. Update call to c_parser_omp_variable_list.
105 (c_parser_oacc_data_clause): Update calls to
106 c_parser_omp_var_list_parens.
107 (c_parser_omp_clause_reduction): Use OMP_ARRAY_SECTION tree node
108 instead of TREE_LIST for array sections.
109 (c_parser_omp_target): Allow GOMP_MAP_ATTACH.
110 * c-tree.h (c_omp_array_section_p): Add extern declaration.
111 (build_omp_array_section): Add prototype.
112 * c-typeck.cc (c_omp_array_section_p): Add flag.
113 (mark_exp_read): Support OMP_ARRAY_SECTION.
114 (build_omp_array_section): Add function.
115 (build_external_ref): Tweak error path for OpenMP array sections.
116 (handle_omp_array_sections_1): Use OMP_ARRAY_SECTION tree code instead
117 of TREE_LIST. Handle more kinds of expressions.
118 (c_oacc_check_attachments): Use OMP_ARRAY_SECTION instead of TREE_LIST
120 (c_finish_omp_clauses): Use OMP_ARRAY_SECTION instead of TREE_LIST.
121 Check for supported expression types.
123 2024-01-09 Tamar Christina <tamar.christina@arm.com>
126 * c-parser.cc (c_parser_for_statement): Skip the pragma is no cond.
128 2024-01-03 Kwok Cheung Yeung <kcy@codesourcery.com>
130 * c-parser.cc (c_parser_omp_clause_name): Move handling of indirect
131 clause to correspond to alphabetical order.
133 2023-12-30 Martin Uecker <uecker@tugraz.at>
135 * c-typeck.cc (tagged_types_tu_compatible_p): Revise.
137 2023-12-22 Martin Uecker <uecker@tugraz.at>
139 * c-typeck.cc (composite_type_internal): Adapted from
140 composite_type to support structs and unions.
141 (composite_type): New wrapper function.
142 (build_conditional_operator): Return composite type.
143 * c-decl.cc (finish_struct): Allow NULL for
144 enclosing_struct_parse_info.
146 2023-12-21 Martin Uecker <uecker@tugraz.at>
148 * c-decl.cc (c_struct_hasher): Hash stable for struct
150 (c_struct_hasher::hash, c_struct_hasher::equal): New
152 (finish_struct): Set TYPE_CANONICAL to first struct in
154 * c-objc-common.cc (c_get_alias_set): Let structs or
155 unions with variable size alias anything.
156 * c-tree.h (comptypes_equiv): New prototype.
157 * c-typeck.cc (comptypes_equiv): New function.
158 (comptypes_internal): Implement equivalence mode.
159 (tagged_types_tu_compatible): Implement equivalence mode.
161 2023-12-21 Martin Uecker <uecker@tugraz.at>
163 * c-tree.h (c_parser_enum_specifier): Add parameter.
164 * c-decl.cc (start_enum): Allow redefinition.
165 (finish_enum): Diagnose conflicts.
166 (build_enumerator): Set context.
167 (diagnose_mismatched_decls): Diagnose conflicting enumerators.
168 (push_decl): Preserve context for enumerators.
169 * c-typeck.cc (tagged_types_tu_compatible_p): Adapt.
170 * c-parser.cc (c_parser_enum_specifier): Remember when
171 seen is from an enum type which is not yet defined.
173 2023-12-21 Martin Uecker <uecker@tugraz.at>
175 * c-decl.cc (previous_tag): New function.
176 (parser_xref_tag): Find earlier definition.
177 (get_parm_info): Turn off warning for C23.
178 (start_struct): Allow redefinitons.
179 (finish_struct): Diagnose conflicts.
180 * c-tree.h (comptypes_same_p): Add prototype.
181 * c-typeck.cc (comptypes_same_p): New function.
182 (comptypes_internal): Activate comparison of tagged types.
183 (convert_for_assignment): Ignore qualifiers.
184 (digest_init): Add error.
185 (initialized_elementwise_p): Allow compatible types.
187 2023-12-20 Jakub Jelinek <jakub@redhat.com>
189 * c-parser.cc (c_parser_postfix_expression_after_primary): Grow
190 sizeof_arg and sizeof_arg_loc arrays to 6 elements. Call
191 warn_for_calloc if warn_calloc_transposed_args for functions with
192 alloc_size type attribute with 2 arguments.
193 (c_parser_expr_list): Use 6 instead of 3.
194 * c-typeck.cc (build_c_cast): Call warn_for_alloc_size for casts
195 of calls to functions with alloc_size type attribute.
196 (convert_for_assignment): Likewise.
198 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
200 * c-parser.cc (omp_construct_selectors): Delete.
201 (omp_device_selectors): Delete.
202 (omp_implementation_selectors): Delete.
203 (omp_user_selectors): Delete.
204 (c_parser_omp_context_selector): Adjust for new representations
205 and simplify dispatch logic. Uniformly warn instead of sometimes
206 error when an unknown selector is found. Adjust error messages
207 for extraneous/incorrect score.
208 (c_parser_omp_context_selector_specification): Likewise.
209 (c_finish_omp_declare_variant): Adjust for new representations.
211 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
213 * c-parser.cc (c_parser_omp_context_selector): Adjust for new
214 namelist property representation.
216 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
218 * c-parser.cc (c_parser_omp_context_selector): Use new constructors.
220 2023-12-18 Richard Biener <rguenther@suse.de>
223 * gimple-parser.cc (c_parser_gimple_postfix_expression):
224 Parse TARGET_MEM_REF extended operands for __MEM.
226 2023-12-13 Jason Merrill <jason@redhat.com>
228 * c-typeck.cc (convert_for_assignment): Adjust call to
229 warn_for_address_of_packed_member.
231 2023-12-13 Julian Brown <julian@codesourcery.com>
233 * c-parser.cc (c_parser_oacc_all_clauses): Add TARGET_P parameter. Use
234 to select region type for c_finish_omp_clauses call.
235 (c_parser_oacc_loop): Update calls to c_parser_oacc_all_clauses.
236 (c_parser_oacc_compute): Likewise.
237 (c_parser_omp_target_data, c_parser_omp_target_enter_data): Support
239 (c_parser_omp_target_exit_data): Support DETACH kind.
240 (check_clauses): Handle GOMP_MAP_POINTER and GOMP_MAP_ATTACH here.
241 * c-typeck.cc (handle_omp_array_sections_1,
242 handle_omp_array_sections, c_finish_omp_clauses): Use
243 c_omp_address_inspector class and OMP address tokenizer to analyze and
244 expand map clause expressions. Fix some diagnostics. Fix "is OpenACC"
245 condition for C_ORT_ACC_TARGET addition.
247 2023-12-13 Julian Brown <julian@codesourcery.com>
249 * c-typeck.cc (c_finish_omp_clauses): Add braces and reindent
250 OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza.
252 2023-12-11 Martin Uecker <uecker@tugraz.at>
255 * c-decl.cc (add_decl_expr): Revise.
256 (finish_struct): Create DECL_EXPR.
257 * c-parser.cc (c_parser_struct_or_union_specifier): Call
258 finish_struct with expression for VLA sizes.
259 * c-tree.h (finish_struct): Add argument.
261 2023-12-11 Tobias Burnus <tobias@codesourcery.com>
263 * c-parser.cc (c_parser_omp_requires): Handle acquires/release
264 in atomic_default_mem_order clause.
265 (c_parser_omp_atomic): Update.
267 2023-12-05 Richard Sandiford <richard.sandiford@arm.com>
269 * c-decl.cc (std_attribute_table): Add extra braces to work
270 around PR 16333 in older compilers.
272 2023-12-05 Richard Biener <rguenther@suse.de>
275 * c-typeck.cc (c_build_qualified_type): Preserve address-space
278 2023-12-02 Richard Sandiford <richard.sandiford@arm.com>
280 * c-tree.h (std_attribute_table): Declare.
281 * c-decl.cc (std_attribute_table): Change type to
282 scoped_attribute_specs, using...
283 (std_attributes): ...this as the underlying array.
284 (c_init_decl_processing): Remove call to register_scoped_attributes.
285 * c-objc-common.h (c_objc_attribute_table): New global.
286 (LANG_HOOKS_ATTRIBUTE_TABLE): Use it.
287 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
288 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
290 2023-12-01 Florian Weimer <fweimer@redhat.com>
293 * c-decl.cc (grokparms): Issue permerror for
294 OPT_Wdeclaration_missing_parameter_type instead of a pedwarn.
296 2023-12-01 Florian Weimer <fweimer@redhat.com>
299 * c-typeck.cc (build_conditional_expr): Upgrade most pointer
300 type mismatches to a permerror.
301 (convert_for_assignment): Use permerror_opt and
302 permerror_init for OPT_Wincompatible_pointer_types warnings.
304 2023-12-01 Florian Weimer <fweimer@redhat.com>
307 * c-typeck.cc (c_finish_return): Use permerrors
308 for OPT_Wreturn_mismatch diagnostics.
310 2023-12-01 Florian Weimer <fweimer@redhat.com>
312 * c-decl.cc (grokdeclarator): Do not skip -Wimplicit-int
313 warnings or errors in system headers.
315 2023-12-01 Florian Weimer <fweimer@redhat.com>
317 * c-decl.cc (warn_defaults_to): Remove.
318 (grok_declarator, start_function): Call permerror_opt
319 instead of warn_defaults_to.
320 (store_parm_decls_oldstyle): Call permerror_opt for
323 2023-12-01 Florian Weimer <fweimer@redhat.com>
327 * c-decl.cc (implicit_decl_permerror): Rename from
328 implicit_decl_warning. Call permerror_opt instead of
329 pedwarn and warning_at.
330 (implicitly_declare): Adjust callers.
332 2023-12-01 Florian Weimer <fweimer@redhat.com>
336 * c-typeck.cc (build_conditional_expr): Use permerror_opt for
337 pointer/integer type mismatches, based on -Wint-conversion.
338 (pedwarn_permerror_init, permerror_init): New function.
339 (pedwarn_init): Call pedwarn_permerror_init.
340 (convert_for_assignment): Use permerror_opt and
341 permerror_init for -Wint-conversion warnings.
343 2023-11-29 Alexandre Oliva <oliva@adacore.com>
345 * c-typeck.cc (convert_lvalue_to_rvalue): Decay hardbools.
346 * c-convert.cc (convert): Convert to hardbool through
348 * c-decl.cc (check_bitfield_type_and_width): Skip enumeral
349 truncation warnings for hardbool.
350 (finish_struct): Propagate hardbool attribute to bitfield
352 (digest_init): Convert to hardbool.
354 2023-11-28 Jason Merrill <jason@redhat.com>
358 * c-typeck.cc (array_to_pointer_conversion): Adjust -Wc++-compat
361 2023-11-28 Richard Biener <rguenther@suse.de>
364 * gimple-parser.cc (c_parser_parse_gimple_body): Also
365 set DECL_SEEN_IN_BIND_EXPR_Pfor locals.
367 2023-11-27 Alex Coplan <alex.coplan@arm.com>
368 Iain Sandoe <iain@sandoe.co.uk>
371 * c-lang.cc (c_family_register_lang_features): New.
372 * c-objc-common.cc (struct c_feature_info): New.
373 (c_register_features): New.
374 * c-objc-common.h (c_register_features): New.
376 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
378 * c-parser.cc (c_parser_omp_clause_num_threads,
379 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
380 c_parser_omp_clause_priority, c_parser_omp_clause_schedule,
381 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
382 c_parser_omp_clause_dist_schedule, c_parser_omp_depobj,
383 c_parser_omp_scan_loop_body, c_parser_omp_assumption_clauses):
384 Add OPT_Wopenmp to warning_at.
386 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
388 * c-parser.cc (c_parser_omp_depobj): Accept optionally an argument
389 to the destroy clause.
391 2023-11-23 Jakub Jelinek <jakub@redhat.com>
393 * c-parser.cc (c_parser_postfix_expression): Handle RID_BUILTIN_STDC.
394 * c-decl.cc (names_builtin_p): Likewise.
396 2023-11-14 Jakub Jelinek <jakub@redhat.com>
399 * c-typeck.cc (convert_arguments): Don't promote first argument
400 of BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
402 2023-11-10 Martin Uecker <uecker@tugraz.at>
404 * c-typeck.cc (struct comptypes_data): Add anon_field flag.
405 (comptypes, comptypes_check_unum_int,
406 comptypes_check_different_types): Remove old cache.
407 (tagged_tu_types_compatible_p): Rewrite.
409 2023-11-09 Florian Weimer <fweimer@redhat.com>
411 * c-typeck.cc (c_finish_return): Use pedwarn with
412 OPT_Wreturn_mismatch for missing/extra return expressions.
414 2023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
416 * c-decl.cc (c_decl_attributes): Add attribute for indirect
418 * c-lang.h (c_omp_declare_target_attr): Add indirect field.
419 * c-parser.cc (c_parser_omp_clause_name): Handle indirect clause.
420 (c_parser_omp_clause_indirect): New.
421 (c_parser_omp_all_clauses): Handle indirect clause.
422 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
423 (c_parser_omp_declare_target): Handle indirect clause. Emit error
424 message if device_type or indirect clauses used alone. Emit error
425 if indirect clause used with device_type that is not 'any'.
426 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
427 (c_parser_omp_begin): Handle indirect clause.
428 * c-typeck.cc (c_finish_omp_clauses): Handle indirect clause.
430 2023-11-07 Joseph Myers <joseph@codesourcery.com>
432 * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p
433 instead of c2x_auto_p. Refer to C23 instead of C2X in diagnostics
435 * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and
436 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
437 instead of C2X in comments.
438 * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x,
439 warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p
440 instead of c2x_auto_p and D_C23 instead of D_C2X. Refer to C23
441 instead of C2X in diagnostics and comments.
442 * c-tree.h: Refer to C23 instead of C2X in comments.
443 (struct c_declspecs): Rename c2x_auto_p to c23_auto_p.
444 * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and
445 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
446 instead of C2X in diagnostics and comments.
448 2023-11-06 Joseph Myers <joseph@codesourcery.com>
451 * c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
453 * c-typeck.cc (build_conditional_expr, convert_for_assignment):
454 Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.
456 2023-11-04 Jakub Jelinek <jakub@redhat.com>
458 * c-parser.h (c_maybe_parse_omp_decl): Declare.
459 * c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
460 (c_parser_std_attribute): Uncoment omp::decl handling.
461 (c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
462 don't expect any arguments, instead create clause or TREE_LIST for
464 (c_maybe_parse_omp_decl): New function.
465 (c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
466 first token isn't name or comma invoke c_parser_omp_var_list_parens.
467 * c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
468 use *node rather than non-existing *decl.
470 2023-11-04 Jakub Jelinek <jakub@redhat.com>
472 * c-tree.def: New file.
473 * c-tree.h (struct c_tree_token_vec): Forward declare.
474 (c_tree_size): Declare.
475 * c-lang.h (struct c_omp_declare_target_attr): Add attr_syntax member.
476 (struct c_omp_begin_assumes_data): New type.
477 (current_omp_begin_assumes): Change type from int to
478 vec<c_omp_begin_assumes_data, va_gc> *.
479 * c-lang.cc: Include c-family/c-pragma.h and c-parser.h.
480 * c-parser.h (struct c_tree_token_vec_struct): New type.
481 (C_TOKEN_VEC_TOKENS): New macro.
482 * c-parser.cc (struct c_parser): Add omp_attrs_forbidden_p and
483 in_omp_attribute_pragma members.
484 (c_parser_skip_until_found): Handle CPP_PRAGMA_EOL when
485 parser->in_omp_attribute_pragma.
486 (c_parser_skip_to_pragma_eol): Likewise.
487 (c_parser_translation_unit): Adjust for current_omp_begin_assumes
488 being a vector rather than counter.
489 (c_parser_declaration_or_fndef): Handle omp::directive and
490 omp::sequence attributes on attribute declaration and declare simd
491 or declare variant directives in those on function declarations.
492 (c_parser_check_balanced_raw_token_sequence): Forward declare.
493 (c_parser_omp_directive_args, c_parser_omp_sequence_args): New
495 (c_parser_std_attribute): Handle omp::directive and omp::sequence
497 (struct c_omp_attribute_data): New type.
498 (c_parser_handle_statement_omp_attributes,
499 c_parser_handle_directive_omp_attributes): New functions.
500 (c_parser_compound_statement_nostart): Handle omp::directive and
501 omp::sequence attributes on statements. Formatting fix.
502 (c_parser_all_labels): Handle omp::directive and omp::sequence
503 attributes on statements.
504 (c_parser_statement): Clear parser->omp_attrs_forbidden_p.
505 (c_parser_omp_variable_list): Handle parser->tokens
506 != &parser->tokens_buf[0] by saving/restoring it.
507 (c_parser_omp_structured_block): Set parser->omp_attrs_forbidden_p.
508 (c_parser_omp_section_scan): New function.
509 (c_parser_omp_structured_block_sequence, c_parser_omp_sections_scope):
511 (c_parser_omp_parallel): Set parser->omp_attrs_forbidden_p.
512 (c_parser_omp_task): Likewise.
513 (c_parser_omp_declare_simd): Handle function declaration after
515 (c_finish_omp_declare_simd): Don't assert all kinds are the same.
516 (c_parser_omp_declare_target): Also push attr_syntax flag.
517 (c_parser_omp_begin): Likewise. Adjust for current_omp_begin_assumes
519 (c_parser_omp_end): Adjust for current_omp_begin_assumes type
520 change. Diagnose mixing of attribute vs. pragma syntax on end assumes
521 or end declare target.
522 (c_parser_omp_declare_reduction): Handle parser->tokens
523 != &parser->tokens_buf[0] by saving/restoring it.
524 * c-decl.cc: Include c-parser.h.
525 (current_omp_begin_assumes): Change type from int to
526 vec<c_omp_begin_assumes_data, va_gc> *.
527 (struct c_tree_token_vec): New type. Add static assertions
528 for sizeof and offsetof.
529 (union lang_tree_node): Add c_token_vec member and adjust GTY
531 (c_tree_size): New function.
532 (c_decl_attributes): Diagnose invalid omp::directive attribute
534 * c-objc-common.h (LANG_HOOKS_TREE_SIZE): Redefine.
536 2023-11-02 Martin Uecker <uecker@tugraz.at>
539 * c-typeck.cc (convert_for_assignment): Add missing check.
541 2023-11-01 Martin Uecker <uecker@tugraz.at>
544 * c-typeck.cc (convert_for_assignment): Add warning.
546 2023-10-26 liuhongt <hongtao.liu@intel.com>
548 * c-typeck.cc (build_vec_cmp): Pass type of arg0 to
551 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
553 * c-parser.cc (c_parser_omp_clause_name): Return
554 'PRAGMA_OACC_CLAUSE_SELF' for "self".
555 (c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
556 (c_parser_oacc_all_clauses): Remove 'bool compute_p' formal
557 parameter, and instead locally determine whether we're called for
558 an OpenACC compute construct or OpenACC 'update' directive.
559 (c_parser_oacc_compute): Adjust.
561 2023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
563 * c-parser.cc (c_parser_oacc_compute_clause_self): New function.
564 (c_parser_oacc_all_clauses): Add new 'bool compute_p = false'
565 parameter, add parsing of self clause when compute_p is true.
566 (OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
567 (OACC_PARALLEL_CLAUSE_MASK): Likewise,
568 (OACC_SERIAL_CLAUSE_MASK): Likewise.
569 (c_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
570 set compute_p argument to true.
571 * c-typeck.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case.
573 2023-10-20 Florian Weimer <fweimer@redhat.com>
577 * c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
578 for pointer/integer mismatch warnings.
580 2023-10-20 Florian Weimer <fweimer@redhat.com>
584 * c-typeck.cc (build_conditional_expr): Use
585 OPT_Wincompatible_pointer_types for pointer mismatches.
586 Emit location information for the operand.
588 2023-10-19 Andrew Pinski <pinskia@gmail.com>
591 * c-typeck.cc (convert_argument): After erroring out
592 about an incomplete type return error_mark_node.
594 2023-10-19 Andrew Pinski <pinskia@gmail.com>
597 * c-typeck.cc (convert_for_assignment): Check for null pointer
598 before warning about an incompatible scalar storage order.
600 2023-10-18 Andrew Pinski <pinskia@gmail.com>
603 * c-decl.cc (diagnose_arglist_conflict): Test for
604 error mark before calling of c_type_promotes_to.
606 2023-10-18 Andrew Pinski <pinskia@gmail.com>
609 * c-typeck.cc (c_safe_arg_type_equiv_p): Return true for error
612 2023-10-17 Martin Uecker <uecker@tugraz.at>
615 * c-decl.cc (grokdeclarator): Add error.
617 2023-10-03 David Malcolm <dmalcolm@redhat.com>
619 * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
622 2023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
624 * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
626 2023-09-20 Jakub Jelinek <jakub@redhat.com>
628 * c-parser.cc (c_parser_postfix_expression_after_primary): Parse
629 __builtin_classify_type call with typename as argument.
631 2023-09-19 Richard Biener <rguenther@suse.de>
634 * gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
636 2023-09-19 Richard Biener <rguenther@suse.de>
639 * gimple-parser.cc (c_parser_gimple_binary_expression): Add
640 return type argument.
641 (c_parser_gimple_statement): Adjust.
642 (c_parser_gimple_paren_condition): Likewise.
643 (c_parser_gimple_binary_expression): Use passed in return type,
644 add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
645 __UNORDERED and __ORDERED.
647 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
649 * c-parser.cc (struct c_omp_loc_tree): New.
650 (c_check_omp_allocate_allocator_r): New; checking moved from ...
651 (c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
652 ICE with tree_to_shwi for invalid too-large value.
654 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
656 * c-parser.cc (c_parser_omp_construct): Move call to
657 c_parser_omp_allocate to ...
658 (c_parser_pragma): ... here.
659 (c_parser_omp_allocate): Avoid ICE is allocator could not be
660 parsed; set 'omp allocate' attribute for stack/automatic variables
661 and only reject static variables; add several additional
663 * c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
664 * c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
665 (c_mark_decl_jump_unsafe_in_current_scope): New.
666 (warn_about_goto, c_check_switch_jump_warnings): Add error for
669 2023-09-12 Martin Uecker <uecker@tugraz.at>
671 * c-typeck.cc (struct comptypes_data): Add structure.
672 (tagged_types_tu_compatible_p,
673 function_types_compatible_p, type_lists_compatible_p,
674 comptypes_internal): Add structure to interface, change
675 return type to bool, and adapt calls.
676 (comptarget_types): Change return type too bool.
677 (comptypes, comptypes_check_enum_int,
678 comptypes_check_different_types): Adapt calls.
680 2023-09-06 Jakub Jelinek <jakub@redhat.com>
683 * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
684 * c-typeck.cc (c_common_type): Emit sorry for common type between
685 _Complex integer and larger _BitInt and return the _Complex integer.
687 2023-09-06 Jakub Jelinek <jakub@redhat.com>
690 * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
691 * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
693 (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
695 (declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust
696 for added union in *specs. Handle RID_BITINT.
697 (finish_declspecs): Handle cts_bitint. Adjust for added union
699 * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
700 c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
702 (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
703 * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
704 Add cts_bitint enumerator.
705 (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
706 and add bitint_prec there as well.
707 * c-typeck.cc (c_common_type, comptypes_internal):
709 (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
711 (build_array_ref, build_unary_op, build_conditional_expr,
712 build_c_cast, convert_for_assignment, digest_init, build_binary_op):
714 * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
716 * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
718 2023-09-06 Jakub Jelinek <jakub@redhat.com>
720 * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
721 for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
724 2023-09-05 Tobias Burnus <tobias@codesourcery.com>
726 * c-parser.cc (c_parser_omp_clause_allocate): Handle
729 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
731 * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
732 (struct omp_for_parse_data): New.
733 (check_omp_intervening_code): New.
734 (add_structured_block_stmt): New.
735 (c_parser_compound_statement_nostart): Recognize intervening code,
736 nested loops, and other things that need special handling in
737 OpenMP loop constructs.
738 (c_parser_while_statement): Error on loop in intervening code.
739 (c_parser_do_statement): Likewise.
740 (c_parser_for_statement): Likewise.
741 (c_parser_postfix_expression_after_primary): Error on calls to
742 the OpenMP runtime in intervening code.
743 (c_parser_pragma): Error on OpenMP pragmas in intervening code.
744 (c_parser_omp_loop_nest): New.
745 (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
746 c_parser_omp_loop_nest to do the heavy lifting.
748 2023-08-24 Richard Sandiford <richard.sandiford@arm.com>
750 * c-parser.cc (c_parser_std_attribute): Conditionally allow
751 two colons to be used in place of ::.
752 (c_parser_std_attribute_list): New function, split out from...
753 (c_parser_std_attribute_specifier): ...here. Allow the attribute-list
754 to start with __extension__. When it does, also allow two colons
755 to be used in place of ::.
757 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
759 * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
762 2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
765 * c-typeck.cc (build_binary_op): Warning on comparing distinct
766 pointer types only when -Wcompare-distinct-pointer-types.
768 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
769 Thomas Schwinge <thomas@codesourcery.com>
771 * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
773 2023-08-11 Jakub Jelinek <jakub@redhat.com>
775 * c-parser.cc (c_parser_typeof_specifier): Handle
776 __typeof_unqual and __typeof_unqual__ as !is_std.
778 2023-08-11 Martin Uecker <uecker@tugraz.at>
781 * c-typeck.cc (build_c_cast): Add warning.
783 2023-08-05 Martin Uecker <uecker@tugraz.at>
785 * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
786 warnings branches that are known not be taken during parsing.
788 2023-08-04 Tamar Christina <tamar.christina@arm.com>
790 * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
791 c_parser_for_statement, c_parser_statement_after_labels,
792 c_parse_pragma_novector, c_parser_pragma): Wire through novector and
795 2023-08-02 Eric Feng <ef2648@columbia.edu>
798 * c-parser.cc: New functions on stashing values for the
801 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
803 * c-parser.cc (pragma_lex_discard_to_eol): New function.
804 (c_init_preprocess): New function.
806 2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
809 * c-decl.cc (start_decl): Handle
810 -Wmissing-variable-declarations.
812 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
814 * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
815 host_data construct to have an use_device clause.
817 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
820 * c-decl.cc (finish_struct): Issue warnings for new option.
822 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
824 * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
827 2023-06-29 Richard Biener <rguenther@suse.de>
830 * c-typeck.cc (convert_argument): Sink formal_prec compute
831 to where TYPE_PRECISION is valid to use.
833 2023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
835 * Make-lang.in: Pass correct stage cc1 when processing
836 profile data collected while building target libraries
838 2023-06-16 David Malcolm <dmalcolm@redhat.com>
841 * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
844 2023-06-12 Tobias Burnus <tobias@codesourcery.com>
846 * c-parser.cc (c_parser_omp_clause_map): Reword error message for
847 clearness especially with 'omp target (enter/exit) data.'
849 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
850 Tobias Burnus <tobias@codesourcery.com>
852 * c-parser.cc (c_parser_omp_clause_defaultmap,
853 c_parser_omp_clause_map): Parse 'present'.
854 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
855 (c_parser_omp_clause_from_to): New; parse to/from clauses with
856 optional present modifer.
857 (c_parser_omp_all_clauses): Update call.
858 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
859 c_parser_omp_target_exit_data): Handle new map enum values
860 for 'present' mapping.
862 2023-05-30 Tobias Burnus <tobias@codesourcery.com>
865 * c-parser.cc (c_parser_oacc_all_clauses,
866 c_parser_omp_all_clauses): Improve error wording.
868 2023-05-23 Martin Uecker <uecker@tugraz.at>
871 * c-decl.cc (add_decl_expr): New function.
872 (grokdeclarator): Add decl expr for size expression in
873 types pointed to by parameters declared as arrays.
875 2023-05-23 Martin Uecker <uecker@tugraz.at>
881 * c-decl.cc (start_decl): Make sure size expression are
882 evaluated only in correct context.
883 (grokdeclarator): Size expression in fields may need a bind
884 expression, make sure DECL_EXPR is always created.
885 (grokfield, declspecs_add_type): Pass along size expressions.
886 (finish_struct): Remove unneeded DECL_EXPR.
887 (start_function): Evaluate size expressions for nested functions.
888 * c-parser.cc (c_parser_struct_declarations,
889 c_parser_struct_or_union_specifier): Pass along size expressions.
890 (c_parser_declaration_or_fndef): Evaluate size expression.
891 (c_parser_objc_at_property_declaration,
892 c_parser_objc_class_instance_variables): Adapt.
893 * c-tree.h (grokfield): Adapt declaration.
895 2023-05-19 Martin Uecker <uecker@tugraz.at>
897 * c-decl.cc (set_type_context): Remove.
898 (pop_scope, diagnose_mismatched_decls, pushdecl):
900 * c-typeck.cc (comptypes_internal): Remove dead code.
901 (same_translation_unit_p): Remove.
902 (tagged_types_tu_compatible_p): Some fixes.
904 2023-05-19 Joseph Myers <joseph@codesourcery.com>
906 * c-decl.cc (diagnose_mismatched_decls): Do not handle
907 thread-local declarations as tentative definitions for C2x.
908 (finish_decl): Do not allow thread-local definition with
909 incomplete type for C2x.
911 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
913 * c-convert.cc (c_convert): Ditto.
914 * c-decl.cc (merge_decls): Ditto.
915 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
916 (c_parser_omp_declare_reduction): Ditto.
917 * c-typeck.cc (build_component_ref): Ditto.
918 (convert_argument): Ditto.
919 (pointer_diff): Ditto.
920 (build_unary_op): Ditto.
921 (build_c_cast): Ditto.
922 (build_modify_expr): Ditto.
923 (store_init_value): Ditto.
924 (constexpr_init_fits_real_type): Ditto.
925 (check_constexpr_init): Ditto.
926 (c_finish_return): Ditto.
927 (handle_omp_array_sections_1): Ditto.
928 (c_finish_omp_clauses): Ditto.
929 * gimple-parser.cc (c_finish_gimple_return): Ditto.
931 2023-05-16 Joseph Myers <joseph@codesourcery.com>
933 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
936 2023-05-15 Joseph Myers <joseph@codesourcery.com>
938 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
941 2023-04-30 Andrew Pinski <apinski@marvell.com>
943 * c-typeck.cc (process_init_element): Print out array type
944 for excessive elements.
946 2023-04-30 Andrew Pinski <apinski@marvell.com>
949 * c-typeck.cc (process_init_element): Move the check
950 for string cst until after the error message.
952 2023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
954 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
956 2023-04-27 Jakub Jelinek <jakub@redhat.com>
959 * c-parser.cc (c_parser_initializer): Move diagnostics about
960 initialization of variable sized object with non-empty initializer
961 after c_parser_expr_no_commas call and ret.set_error (); after it.
963 2023-04-27 Jakub Jelinek <jakub@redhat.com>
967 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
968 reject empty initializer as invalid.
970 2023-04-26 Richard Biener <rguenther@suse.de>
972 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
975 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
977 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
978 zero exec statements before/after 'omp scan'.
980 2023-04-20 Jakub Jelinek <jakub@redhat.com>
983 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
984 warning on acc_on_device declaration.
986 2023-03-28 David Malcolm <dmalcolm@redhat.com>
989 * c-typeck.cc (parser_build_binary_op): Update for new param of
990 check_for_xor_used_as_pow.
992 2023-03-10 Jakub Jelinek <jakub@redhat.com>
995 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
998 2023-02-28 Jakub Jelinek <jakub@redhat.com>
1001 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
1002 and rename to c_strict_flex_array_level_of.
1003 (is_flexible_array_member_p): Adjust caller.
1005 2023-02-18 Martin Uecker <uecker@tugraz.at>
1008 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
1009 (diagnose_mismatched_decl): Dito.
1010 (warn_about_goto): Dito:
1011 (c_check_switch_jump_warnings): Dito.
1012 (finish_decl): Dito.
1013 (finish_struct): Dito.
1014 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
1015 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
1016 * c-objc-common.cc (c_var_mod_p): New function.
1017 (c_var_unspec_p): Remove.
1018 * c-objc-common.h: Set lang hook.
1019 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
1020 (c_parser_typeof_specifier): Dito.
1021 (c_parser_has_attribute_expression): Dito.
1022 (c_parser_generic_selection): Dito.
1023 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
1024 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
1026 2023-02-16 Patrick Palka <ppalka@redhat.com>
1028 * c-parser.h: Mechanically drop static from static inline
1029 functions via s/^static inline/inline/g.
1031 2023-02-10 Joseph Myers <joseph@codesourcery.com>
1033 * c-convert.cc (c_convert): Allow conversion of a null pointer
1034 constant to nullptr_t.
1035 * c-typeck.cc (null_pointer_constant_p): Remove static.
1036 (convert_for_assignment): Allow conversion of a null pointer
1037 constant to nullptr_t.
1038 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
1039 * c-tree.h (null_pointer_constant_p): Declare.
1041 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
1043 * c-parser.cc (c_parser_omp_allocate): Parse align
1044 clause and check for restrictions.
1046 2023-02-08 Joseph Myers <joseph@codesourcery.com>
1048 * c-typeck.cc (check_constexpr_init): Remove argument
1049 null_pointer_constant. Only check pointer initializers for being
1051 (digest_init): Update calls to check_constexpr_init.
1053 2023-02-02 Joseph Myers <joseph@codesourcery.com>
1055 * c-typeck.cc (build_binary_op): Allow comparisons between
1056 pointers and nullptr_t values that are not null pointer constants.
1058 2023-02-02 Joseph Myers <joseph@codesourcery.com>
1060 * c-typeck.cc: Include "realmpfr.h".
1061 (constexpr_init_fits_real_type): Do not allow signaling NaN
1062 conversions to different types with the same mode. Handle
1063 conversions from binary to decimal types.
1064 (check_constexpr_init): Do not disallow real initializers for
1065 complex types. Do not disallow binary initializers for decimal
1068 2023-01-31 Marek Polacek <polacek@redhat.com>
1072 * c-objc-common.cc (instantiation_dependent_expression_p): New.
1074 2023-01-27 Joseph Myers <joseph@codesourcery.com>
1076 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
1077 around auto initializer.
1079 2023-01-16 Jakub Jelinek <jakub@redhat.com>
1082 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
1083 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
1086 2023-01-14 Jakub Jelinek <jakub@redhat.com>
1089 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
1092 2023-01-13 Qing Zhao <qing.zhao@oracle.com>
1094 * c-decl.cc (strict_flex_array_level_of): ... here.
1096 2023-01-11 Jakub Jelinek <jakub@redhat.com>
1099 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
1100 markers for K&R function parameter declarations of nested functions.
1102 2023-01-09 Joseph Myers <joseph@codesourcery.com>
1104 * c-decl.cc (build_compound_literal): Call record_inline_static.
1106 2023-01-06 Joseph Myers <joseph@codesourcery.com>
1108 * c-parser.cc (c_parser_postfix_expression): Handle integer
1109 generic arguments to functions passed to __builtin_tgmath as
1110 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
1111 Do not handle integer arguments to some narrowing functions as
1114 2022-12-19 Jakub Jelinek <jakub@redhat.com>
1117 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
1118 compound literals with function type.
1120 2022-12-07 Joseph Myers <joseph@codesourcery.com>
1122 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
1123 auto, constexpr and a type used together.
1125 2022-12-06 Qing Zhao <qing.zhao@oracle.com>
1127 * c-decl.cc (is_flexible_array_member_p): Call new function
1128 strict_flex_array_level_of.
1130 2022-11-24 Florian Weimer <fweimer@redhat.com>
1133 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
1136 2022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1138 * c-decl.cc (start_function): Set the result decl source
1139 location to the location of the typespec.
1141 2022-11-17 David Malcolm <dmalcolm@redhat.com>
1144 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
1145 to cpp_create_reader, rather than ident_hash, so that the new
1146 reader gets its own hash table.
1148 2022-11-15 David Malcolm <dmalcolm@redhat.com>
1151 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
1152 (class ana::c_translation_unit): New.
1153 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
1155 2022-11-12 Joseph Myers <joseph@codesourcery.com>
1157 * c-decl.cc (start_underspecified_init)
1158 (finish_underspecified_init): Handle name == NULL_TREE for
1160 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
1161 (shadow_tag_warned): Check for constexpr.
1162 (start_decl): Add parameter do_push.
1163 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
1164 (grokdeclarator): Handle constexpr.
1165 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
1166 (declspecs_add_scspec): Handle constexpr.
1167 * c-parser.cc (c_token_starts_compound_literal)
1168 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
1169 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
1170 (c_parser_compound_literal_scspecs)
1171 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
1172 Update calls to start_init.
1173 (c_parser_declaration_or_fndef, c_parser_initializer)
1174 (c_parser_initval): Pass true for new argument of
1175 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
1176 constexpr compound literals.
1177 (c_parser_static_assert_declaration_no_semi)
1178 (c_parser_enum_specifier, c_parser_struct_declaration)
1179 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
1180 Call convert_lvalue_to_rvalue on expressions required to be
1181 integer constant expressions.
1182 (c_parser_omp_declare_reduction): Update call to start_init.
1183 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
1184 (C_DECL_DECLARED_CONSTEXPR): New macros.
1185 (struct c_declspecs): Add constexpr_p.
1186 (start_decl, convert_lvalue_to_rvalue, start_init): Update
1188 * c-typeck.cc (require_constant_value, require_constant_elements):
1190 (require_constexpr_value, maybe_get_constexpr_init)
1191 (constexpr_init_fits_real_type, check_constexpr_init): New.
1192 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
1193 maybe_get_constexpr_init.
1194 (store_init_value): Update call to digest_init.
1195 (digest_init): Add parameters int_const_expr, arith_const_expr and
1196 require_constexpr. Check constexpr initializers.
1197 (constructor_top_level): Remove.
1198 (struct initializer_stack): Remove top_level. Add
1199 require_constexpr_value.
1200 (start_init): Remove parameter top_level. Add parameters
1201 init_require_constant and init_require_constexpr. Save
1202 require_constexpr_value on stack.
1203 (pop_init_level): Use a null pointer constant for zero initializer
1204 of pointer initialized with {}.
1205 (output_init_element): Update call to digest_init. Avoid passing
1206 null pointer constants of pointer type through digest_init a
1207 second time when initializing a constexpr object.
1209 2022-11-03 Joseph Myers <joseph@codesourcery.com>
1211 * c-decl.cc (in_underspecified_init, start_underspecified_init)
1212 (finish_underspecified_init): New.
1213 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
1214 Give errors inside initializers of underspecified declarations.
1215 (grokdeclarator): Handle (erroneous) case of C2X auto on a
1217 (declspecs_add_type): Handle c2x_auto_p case.
1218 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
1220 (finish_declspecs): Handle c2x_auto_p.
1221 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
1222 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
1223 (struct c_declspecs): Add c2x_auto_p.
1224 (start_underspecified_init, finish_underspecified_init): New
1226 * c-typeck.cc (build_external_ref): Give error for underspecified
1227 declaration referenced in its initializer.
1229 2022-10-28 Joseph Myers <joseph@codesourcery.com>
1231 * c-decl.cc (grokdeclarator): Pass
1232 arg_info->no_named_args_stdarg_p to build_function_type.
1233 (grokparms): Check arg_info->no_named_args_stdarg_p before
1234 converting () to (void).
1235 (build_arg_info): Initialize no_named_args_stdarg_p.
1236 (get_parm_info): Set no_named_args_stdarg_p.
1237 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
1238 build_function_type.
1239 (store_parm_decls): Count (...) functions as prototyped.
1240 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
1241 parenthesis to start parameter list.
1242 (c_parser_parms_list_declarator): Always allow '...' with no
1243 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
1244 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
1245 * c-typeck.cc (composite_type): Handle
1246 TYPE_NO_NAMED_ARGS_STDARG_P.
1247 (function_types_compatible_p): Compare
1248 TYPE_NO_NAMED_ARGS_STDARG_P.
1250 2022-10-28 Jakub Jelinek <jakub@redhat.com>
1252 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
1253 comma before the first clause.
1254 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
1255 c_parser_omp_flush, c_parser_omp_scan_loop_body,
1256 c_parser_omp_ordered, c_finish_omp_declare_variant,
1257 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
1258 c_parser_omp_requires, c_parser_omp_error,
1259 c_parser_omp_assumption_clauses): Likewise.
1261 2022-10-28 Joseph Myers <joseph@codesourcery.com>
1264 * c-convert.cc (c_convert): Handle enums with underlying boolean
1266 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
1267 enums with enum type specifier, but give errors for storage class
1268 specifiers, qualifiers or alignment specifiers in non-definition
1269 declarations of such enums.
1270 (grokdeclarator): Give error for non-definition use of type
1271 specifier with an enum type specifier.
1272 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
1273 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
1274 (xref_tag): Update call to parser_xref_tag.
1275 (start_enum): Add argument fixed_underlying_type. Complete enum
1276 type with a fixed underlying type given in the definition. Give
1277 error for defining without a fixed underlying type in the
1278 definition if one was given in a prior declaration. Do not mark
1279 enums with fixed underlying type as packed for -fshort-enums.
1280 Store the enum type in the_enum.
1281 (finish_enum): Do not adjust types of values or check their range
1282 for an enum with a fixed underlying type. Set underlying type of
1284 (build_enumerator): Check enumeration constants for enum with
1285 fixed underlying type against that type and convert to that type.
1286 Increment in the underlying integer type, with handling for bool.
1287 (c_simulate_enum_decl): Update call to start_enum.
1288 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
1289 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
1290 rather than recomputing an underlying type based on size.
1291 * c-parser.cc (c_parser_declspecs)
1292 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
1293 Set has_enum_type_specifier for type specifiers.
1294 (c_parser_enum_specifier): Handle enum type specifiers.
1295 (c_parser_struct_or_union_specifier): Update call to
1297 (c_parser_omp_atomic): Check for boolean increment or decrement
1298 using C_BOOLEAN_TYPE_P.
1299 * c-tree.h (C_BOOLEAN_TYPE_P): New.
1300 (struct c_typespec): Add has_enum_type_specifier.
1301 (struct c_declspecs): Add enum_type_specifier_ref_p.
1302 (struct c_enum_contents): Add enum_type.
1303 (start_enum, parser_xref_tag): Update prototypes.
1304 * c-typeck.cc (composite_type): Allow for enumerated types
1305 compatible with bool.
1306 (common_type, comptypes_internal, perform_integral_promotions):
1307 Use ENUM_UNDERLYING_TYPE.
1308 (parser_build_binary_op, build_unary_op, convert_for_assignment)
1309 (c_finish_return, c_start_switch, build_binary_op): Check for
1310 boolean types using C_BOOLEAN_TYPE_P.
1312 2022-10-24 Jakub Jelinek <jakub@redhat.com>
1315 * c-typeck.cc (build_binary_op): Pass operands before excess precision
1316 promotions to scalar_to_vector call.
1318 2022-10-24 Arsen Arsenović <arsen@aarsen.me>
1320 * c-decl.cc (finish_function): Ignore hosted when deciding
1321 whether to implicitly return zero, but check noreturn.
1322 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
1323 requirements to just MAIN_NAME_P when hosted, or `int main'
1326 2022-10-20 Richard Biener <rguenther@suse.de>
1330 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
1331 the parsed IL and zap the body on error.
1333 2022-10-18 Joseph Myers <joseph@codesourcery.com>
1336 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
1337 with previous declaration visible.
1339 2022-10-18 Joseph Myers <joseph@codesourcery.com>
1342 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
1343 convert all to the type of the enumeration. pedwarn if no integer
1344 type fits all enumerators and default to
1345 widest_integer_literal_type_node in that case. Otherwise pedwarn
1346 for type wider than intmax_t.
1347 (build_enumerator): pedwarn for enumerators outside the range of
1348 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
1349 enumerators outside the range of int. On overflow, attempt to
1350 find a wider type that can hold the value of the next enumerator.
1351 Do not convert value to type determined with
1352 c_common_type_for_size.
1354 2022-10-14 Jakub Jelinek <jakub@redhat.com>
1356 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
1359 2022-10-14 Joseph Myers <joseph@codesourcery.com>
1361 * c-decl.cc (build_compound_literal): Add parameter scspecs.
1362 Handle storage class specifiers.
1363 * c-parser.cc (c_token_starts_compound_literal)
1364 (c_parser_compound_literal_scspecs): New.
1365 (c_parser_postfix_expression_after_paren_type): Add parameter
1366 scspecs. Call pedwarn_c11 for use of storage class specifiers.
1367 Update call to build_compound_literal.
1368 (c_parser_cast_expression, c_parser_sizeof_expression)
1369 (c_parser_alignof_expression): Handle storage class specifiers for
1370 compound literals. Update calls to
1371 c_parser_postfix_expression_after_paren_type.
1372 (c_parser_postfix_expression): Update syntax comment.
1373 * c-tree.h (build_compound_literal): Update prototype.
1374 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
1375 register compound literal.
1377 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
1379 * c-decl.cc (flexible_array_member_type_p): New function.
1380 (one_element_array_type_p): Likewise.
1381 (zero_length_array_type_p): Likewise.
1382 (add_flexible_array_elts_to_size): Call new utility
1383 routine flexible_array_member_type_p.
1384 (is_flexible_array_member_p): New function.
1385 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
1387 2022-10-06 Joseph Myers <joseph@codesourcery.com>
1389 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
1391 (c_keyword_starts_typename, c_token_starts_declspecs)
1392 (c_parser_declspecs, c_parser_objc_selector): Handle
1394 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
1395 Distinguish typeof for C2x from __typeof__ for all standard
1396 versions and typeof before C2x.
1397 * c-typeck.cc (build_function_call_vec): Use unqualified version
1398 of non-void return type.
1399 (build_unary_op): Use unqualified type for increment and
1402 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1404 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
1405 call for holds clause on assume construct.
1407 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1410 * c-parser.cc (handle_assume_attribute): New function.
1411 (c_parser_declaration_or_fndef): Handle assume attribute.
1412 (c_parser_attribute_arguments): Add assume_attr argument,
1413 if true, parse first argument as conditional expression.
1414 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
1415 c_parser_attribute_arguments callers.
1416 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
1419 2022-10-04 Jakub Jelinek <jakub@redhat.com>
1421 * c-lang.h (struct c_omp_declare_target_attr): New type.
1422 (current_omp_declare_target_attribute): Change type from
1423 int to vec<c_omp_declare_target_attr, va_gc> *.
1424 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
1425 If last pushed directive was begin declare target, use different
1426 wording and simplify format strings for easier translations.
1427 (c_parser_omp_clause_device_type): Uncomment
1428 check_no_duplicate_clause call.
1429 (c_parser_omp_declare_target): Adjust for the
1430 current_omp_declare_target_attribute type change, push { -1 }.
1431 Use error_at rather than warning_at for declare target with
1432 only device_type clauses.
1433 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
1434 (c_parser_omp_begin): Add begin declare target support.
1435 (c_parser_omp_end): Adjust for the
1436 current_omp_declare_target_attribute type change, adjust
1437 diagnostics wording and simplify format strings for easier
1439 * c-decl.cc (current_omp_declare_target_attribute): Change type from
1440 int to vec<c_omp_declare_target_attr, va_gc> *.
1441 (c_decl_attributes): Adjust for the
1442 current_omp_declare_target_attribute type change. If device_type
1443 was present on begin declare target, add "omp declare target host"
1444 and/or "omp declare target nohost" attributes.
1446 2022-09-29 Joseph Myers <joseph@codesourcery.com>
1448 * c-decl.cc (handle_std_noreturn_attribute): New function.
1449 (std_attribute_table): Add _Noreturn and noreturn.
1451 2022-09-27 Jakub Jelinek <jakub@redhat.com>
1453 * c-lang.h (current_omp_begin_assumes): Declare.
1454 * c-parser.cc: Include bitmap.h.
1455 (c_parser_omp_end_declare_target): Rename to ...
1456 (c_parser_omp_end): ... this. Handle also end assumes.
1457 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
1458 c_parser_omp_assumes, c_parser_omp_assume): New functions.
1459 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
1460 without corresponding #pragma omp end assumes.
1461 (c_parser_pragma): Use %s in may only be used at file scope
1462 diagnostics to decrease number of translatable messages. Handle
1463 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
1464 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
1465 for it rather than c_parser_omp_end_declare_target.
1466 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
1467 * c-decl.cc (current_omp_begin_assumes): Define.
1469 2022-09-24 Jakub Jelinek <jakub@redhat.com>
1472 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
1473 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
1474 t2 have different types.
1476 2022-09-22 David Malcolm <dmalcolm@redhat.com>
1479 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
1480 (c_parser_cast_expression): Likewise.
1481 (c_parser_alignof_expression): Likewise.
1482 (c_parser_postfix_expression_after_paren_type): Likewise.
1483 (c_parser_postfix_expression_after_primary): Likewise.
1484 (c_parser_expression): Likewise.
1485 (c_parser_omp_variable_list): Likewise.
1486 (c_parser_transaction_expression): Likewise.
1487 * c-tree.h (c_expr::set_error): Likewise.
1488 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
1489 (parser_build_unary_op): Likewise.
1490 (parser_build_binary_op): Likewise.
1491 (digest_init): Likewise.
1492 (pop_init_level): Likewise.
1493 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
1495 2022-09-19 Marek Polacek <polacek@redhat.com>
1498 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
1501 2022-09-15 Richard Biener <rguenther@suse.de>
1503 * c-decl.cc (build_void_list_node): Remove.
1505 2022-09-14 Julian Brown <julian@codesourcery.com>
1507 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
1510 2022-09-07 Joseph Myers <joseph@codesourcery.com>
1512 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
1513 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
1514 for C2x spellings of keywords.
1515 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
1517 2022-09-06 Jakub Jelinek <jakub@redhat.com>
1519 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
1520 in omp_cur_iteration - 1 has integer_type_node type.
1522 2022-09-03 Jakub Jelinek <jakub@redhat.com>
1524 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
1525 (c_parser_omp_clause_depend_sink): Renamed to ...
1526 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
1527 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
1528 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
1529 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
1530 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
1531 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
1532 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
1533 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
1534 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
1535 (c_parser_omp_clause_doacross): New function.
1536 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
1537 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
1538 OMP_CLAUSE_DEPEND_SOURCE.
1539 (c_parser_omp_for_loop): Don't diagnose here linear clause together
1540 with ordered with argument.
1541 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
1543 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1544 (c_parser_omp_ordered): Handle also doacross and adjust for it
1546 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
1547 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
1549 2022-09-02 David Malcolm <dmalcolm@redhat.com>
1552 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
1553 (c_parser_expr_no_commas): Likewise.
1554 (c_parser_conditional_expression): Likewise.
1555 (c_parser_binary_expression): Clear m_decimal when popping the
1557 (c_parser_unary_expression): Clear ret.m_decimal.
1558 (c_parser_has_attribute_expression): Likewise for result.
1559 (c_parser_predefined_identifier): Likewise for expr.
1560 (c_parser_postfix_expression): Likewise for expr.
1561 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
1563 * c-tree.h (c_expr::m_decimal): New bitfield.
1564 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
1565 (parser_build_binary_op): Call check_for_xor_used_as_pow.
1567 2022-09-01 Joseph Myers <joseph@codesourcery.com>
1569 * c-decl.cc (grokparms): Handle () in a function declaration the
1570 same as (void) for C2X.
1572 2022-08-31 Joseph Myers <joseph@codesourcery.com>
1574 * c-parser.cc (c_parser_label): Pass attributes to do_case.
1575 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
1578 2022-08-26 Jakub Jelinek <jakub@redhat.com>
1580 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
1582 2022-08-25 Marek Polacek <polacek@redhat.com>
1584 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
1585 Give a better diagnostic when converting to nullptr_t.
1586 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
1588 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
1589 (c_parser_postfix_expression): Handle RID_NULLPTR.
1590 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
1592 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
1593 (build_conditional_expr): Handle the case when the second/third operand
1594 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
1595 (convert_for_assignment): Handle converting an expression of type
1596 nullptr_t to pointer/bool.
1597 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
1598 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
1600 2022-08-25 Joseph Myers <joseph@codesourcery.com>
1602 * c-decl.cc (start_decl): Do not diagnose initialization of
1603 variable-sized objects here.
1604 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
1606 (c_parser_initializer): Diagnose initialization of variable-sized
1607 objects other than with braced initializer.
1608 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
1609 braces and update diagnostic text. Diagnose initialization of
1610 variable-sized objects with nonempty braces.
1611 * c-typeck.cc (digest_init): Update diagnostic for initialization
1612 of variable-sized objects.
1613 (really_start_incremental_init, set_designator)
1614 (process_init_element): Update comments.
1615 (pop_init_level): Allow scalar empty initializers.
1617 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
1618 Chung-Lin Tang <cltang@codesourcery.com>
1621 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
1622 instead of removed langhook.
1623 * c-typeck.cc (c_finish_omp_clauses): Likewise.
1625 2022-08-11 Marek Polacek <polacek@redhat.com>
1627 PR middle-end/102633
1628 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
1629 Call suppress_warning.
1630 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
1631 (c_parser_omp_declare_reduction): Pass omp_priv down to
1632 c_parser_initializer.
1634 2022-08-08 Tom Honermann <tom@honermann.net>
1636 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
1637 of CPP_UTF8STRING when char8_t support is enabled.
1638 * c-typeck.cc (digest_init): Allow initialization of an array
1639 of character type by a string literal with type array of
1642 2022-08-01 David Malcolm <dmalcolm@redhat.com>
1644 * c-typeck.cc (build_c_cast): Quote names of address spaces in
1646 (convert_for_assignment): Add a note to address space mismatch
1647 diagnostics, specifying the expected and actual types.
1649 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
1651 PR preprocessor/97498
1652 * c-parser.cc (c_parser_pragma): Set input_location to the
1653 location of the pragma, rather than the start of the line.
1655 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
1656 Chung-Lin Tang <cltang@codesourcery.com>
1657 Thomas Schwinge <thomas@codesourcery.com>
1659 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
1660 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
1661 OMP_REQUIRES_TARGET_USED.
1662 (c_parser_omp_requires): Remove sorry.
1664 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
1666 * c-parser.cc (c_parser_omp_target_enter_data,
1667 c_parser_omp_target_exit_data): Accept tofrom
1668 map-type modifier but use 'to' / 'from' internally.
1670 2022-06-16 David Malcolm <dmalcolm@redhat.com>
1672 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
1673 group the warning with any note.
1674 (warn_about_goto): Likewise to group error or warning with note.
1675 Bail out if the warning wasn't emitted, to avoid emitting orphan
1677 (lookup_label_for_goto): Add auto_diagnostic_group to
1678 group the error with the note.
1679 (check_earlier_gotos): Likewise.
1680 (c_check_switch_jump_warnings): Likewise for any error/warning.
1681 Conditionalize emission of the notes.
1682 (diagnose_uninitialized_cst_member): Likewise for warning,
1683 conditionalizing emission of the note.
1684 (grokdeclarator): Add auto_diagnostic_group to group the "array
1685 type has incomplete element type" error with any note.
1686 (parser_xref_tag): Add auto_diagnostic_group to group warnings
1687 with their notes. Conditionalize emission of notes.
1688 (start_struct): Add auto_diagnostic_group to group the
1689 "redefinition of" errors with any note.
1690 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
1691 (check_for_loop_decls): Likewise for pre-C99 error.
1693 2022-06-07 Jakub Jelinek <jakub@redhat.com>
1695 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
1696 style linear clause modifiers. Set
1697 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
1698 old style modifiers are used.
1699 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
1700 with val modifier on simd or for if the old style modifiers are
1703 2022-06-02 David Malcolm <dmalcolm@redhat.com>
1705 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
1706 (c_get_sarif_source_language): New.
1707 * c-tree.h (c_get_sarif_source_language): New decl.
1709 2022-05-31 Jason Merrill <jason@redhat.com>
1711 * Make-lang.in (c.tags): Look at *.cc.
1713 2022-05-31 Jakub Jelinek <jakub@redhat.com>
1715 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
1718 2022-05-28 Jakub Jelinek <jakub@redhat.com>
1720 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
1721 seen first, use "%<to%>" or "%<enter%>" depending on
1722 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
1723 "%<to%> or %<enter%>" wording.
1725 2022-05-27 Jakub Jelinek <jakub@redhat.com>
1727 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
1728 (c_parser_omp_all_clauses): For to clause on declare target, use
1729 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
1730 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
1731 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
1732 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
1733 OMP_CLAUSE_TO_DECLARE.
1734 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
1735 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
1736 name in diagnostics instead of
1737 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
1739 2022-05-25 Jakub Jelinek <jakub@redhat.com>
1742 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
1743 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
1744 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
1745 diagnostic and fixit hint if DATUM has pointer type.
1746 * c-parser.cc (c_parser_postfix_expression,
1747 c_parser_omp_variable_list): Adjust build_component_ref callers.
1748 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
1751 2022-05-24 Jakub Jelinek <jakub@redhat.com>
1754 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
1756 2022-05-18 Marek Polacek <polacek@redhat.com>
1759 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
1761 * c-tree.h (comptypes_check_enum_int): Declare.
1762 * c-typeck.cc (comptypes): No longer static.
1764 2022-05-17 Marek Polacek <polacek@redhat.com>
1766 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
1769 2022-05-17 Jakub Jelinek <jakub@redhat.com>
1771 * c-parser.cc (c_parser_omp_clause_depend): Parse
1772 inoutset depend-kind.
1773 (c_parser_omp_depobj): Likewise.
1775 2022-05-16 Martin Liska <mliska@suse.cz>
1777 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
1779 2022-05-12 Jakub Jelinek <jakub@redhat.com>
1781 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
1783 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
1784 in postfix expressions.
1785 (c_parser_omp_variable_list): Handle omp_all_memory in depend
1787 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
1788 keyword in depend clause as null_pointer_node, diagnose invalid
1791 2022-05-09 Martin Liska <mliska@suse.cz>
1793 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
1795 (c_parser_binary_expression): Likewise.
1797 2022-05-07 Marek Polacek <polacek@redhat.com>
1801 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1803 2022-04-08 Jakub Jelinek <jakub@redhat.com>
1806 * c-typeck.cc (c_build_va_arg): Reject function types.
1808 2022-03-22 Marek Polacek <polacek@redhat.com>
1812 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1813 (start_init): Set it.
1814 (finish_init): Restore constructor_designated.
1815 (push_init_level): Set constructor_designated to the value of
1816 constructor_designated in the upper constructor_stack.
1818 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1821 * c-typeck.cc (handle_omp_array_sections_1)
1822 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1823 instead of 'c_omp_map_clause_name'.
1825 2022-03-09 Joseph Myers <joseph@codesourcery.com>
1827 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1828 differently from earlier standards for unprototyped function type
1831 2022-03-09 Jakub Jelinek <jakub@redhat.com>
1834 * c-fold.cc (c_fully_fold_internal): Don't emit
1835 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1836 * c-typeck.cc (build_binary_op): Likewise.
1838 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1840 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1843 2022-02-23 Richard Biener <rguenther@suse.de>
1845 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1846 SSA names without definition.
1847 (c_parser_gimple_declaration): Handle pointer typed SSA names.
1849 2022-02-17 Jakub Jelinek <jakub@redhat.com>
1852 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1853 convert_lvalue_to_rvalue and build_indirect_ref instead of
1854 build_simple_mem_ref.
1856 2022-02-11 Richard Biener <rguenther@suse.de>
1858 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1861 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1863 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1865 (c_parser_omp_variable_list): Handle array sections.
1866 (c_parser_omp_clause_has_device_addr): Added.
1867 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1869 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1871 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1872 (c_finish_omp_clauses): Handle array sections.
1874 2022-02-09 Jakub Jelinek <jakub@redhat.com>
1877 * c-parser.cc (c_parser_postfix_expression)
1878 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1879 instead of build1_loc to build PAREN_EXPR.
1880 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1881 * c-fold.cc (c_fully_fold_internal): Likewise.
1883 2022-01-17 Martin Liska <mliska@suse.cz>
1885 * Make-lang.in: Rename .c names to .cc.
1886 * c-convert.cc: Likewise.
1887 * c-decl.cc (struct lang_identifier): Likewise.
1888 (pop_scope): Likewise.
1889 (finish_decl): Likewise.
1890 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1891 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1892 * c-parser.h (GCC_C_PARSER_H): Likewise.
1893 * c-tree.h (c_keyword_starts_typename): Likewise.
1894 (finish_declspecs): Likewise.
1895 (c_get_alias_set): Likewise.
1896 (enum c_oracle_request): Likewise.
1897 (tag_exists_p): Likewise.
1898 (set_c_expr_source_range): Likewise.
1899 * c-typeck.cc (c_common_type): Likewise.
1900 (c_finish_omp_clauses): Likewise.
1901 * config-lang.in: Likewise.
1903 2022-01-17 Martin Liska <mliska@suse.cz>
1905 * c-aux-info.c: Moved to...
1906 * c-aux-info.cc: ...here.
1907 * c-convert.c: Moved to...
1908 * c-convert.cc: ...here.
1909 * c-decl.c: Moved to...
1910 * c-decl.cc: ...here.
1911 * c-errors.c: Moved to...
1912 * c-errors.cc: ...here.
1913 * c-fold.c: Moved to...
1914 * c-fold.cc: ...here.
1915 * c-lang.c: Moved to...
1916 * c-lang.cc: ...here.
1917 * c-objc-common.c: Moved to...
1918 * c-objc-common.cc: ...here.
1919 * c-parser.c: Moved to...
1920 * c-parser.cc: ...here.
1921 * c-typeck.c: Moved to...
1922 * c-typeck.cc: ...here.
1923 * gccspec.c: Moved to...
1924 * gccspec.cc: ...here.
1925 * gimple-parser.c: Moved to...
1926 * gimple-parser.cc: ...here.
1928 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
1930 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1932 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1935 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1936 outer node for ARRAY_REFs.
1938 2022-01-01 Jakub Jelinek <jakub@redhat.com>
1941 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1942 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1944 2021-12-17 Marek Polacek <polacek@redhat.com>
1947 * c-decl.c (c_warn_unused_attributes): Don't warn for
1948 attribute_ignored_p.
1949 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1950 arguments when the attribute is ignored.
1952 2021-12-14 Jakub Jelinek <jakub@redhat.com>
1955 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1956 consume the pragma and silently skip to the pragma eol.
1958 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
1960 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1961 * c-parser.c: Likewise.
1963 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1966 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1967 to resort_data.new_value.
1969 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1971 * c-parser.c (struct omp_dim): New struct type for use inside
1972 c_parser_omp_variable_list.
1973 (c_parser_omp_variable_list): Allow multiple levels of array and
1974 component accesses in array section base-pointer expression.
1975 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1976 c_parser_omp_var_list_parens.
1977 (c_parser_omp_clause_from): Likewise.
1978 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1979 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1981 (c_finish_omp_clauses): Extend allowed ranged of expressions
1982 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1984 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1987 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1988 call to c_parser_omp_variable_list to 'true'.
1989 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1990 array base handling.
1991 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1993 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
1995 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1996 orphan loop" checking.
1998 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
1999 Thomas Schwinge <thomas@codesourcery.com>
2001 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
2002 OpenACC gang reductions.
2004 2021-11-30 Richard Biener <rguenther@suse.de>
2006 * gimple-parser.c (c_parser_gimple_postfix_expression):
2007 avoid unreachable code after break.
2009 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
2012 * Make-lang.in: Use ETAGS variable in TAGS target.
2014 2021-11-29 Richard Biener <rguenther@suse.de>
2016 * c-typeck.c (c_tree_equal): Remove unreachable return.
2017 * c-parser.c (get_matching_symbol): Likewise.
2019 2021-11-23 Jakub Jelinek <jakub@redhat.com>
2021 * c-typeck.c (c_clone_omp_udr): Don't initialize
2022 id.transform_lang_insert_block.
2024 2021-11-19 Martin Sebor <msebor@redhat.com>
2028 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
2029 code resulting from macro expansion.
2031 2021-11-19 Martin Liska <mliska@suse.cz>
2034 2021-11-19 Martin Liska <mliska@suse.cz>
2036 * c-parser.c (add_debug_begin_stmt): Use option directly.
2038 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
2040 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
2041 * c-parser.c (c_parser_postfix_expression): Likewise.
2043 2021-11-18 Martin Liska <mliska@suse.cz>
2045 * c-parser.c (add_debug_begin_stmt): Use option directly.
2047 2021-11-17 Martin Sebor <msebor@redhat.com>
2050 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
2051 bounds before deciding if they're constant.
2053 2021-11-15 Jakub Jelinek <jakub@redhat.com>
2055 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
2056 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
2058 2021-11-11 Jakub Jelinek <jakub@redhat.com>
2060 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
2061 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
2062 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
2063 OMP_CLAUSE_NUM_TEAMS_EXPR.
2064 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
2065 combined target teams even lower-bound expression.
2067 2021-11-11 Richard Biener <rguenther@suse.de>
2069 * gimple-parser.c: Shuffle bitmap.h include.
2071 2021-11-03 Joseph Myers <joseph@codesourcery.com>
2074 * c-convert.c (c_convert): New function, based on convert.
2075 (convert): Make into wrapper of c_convert.
2076 (convert_init): New function.
2077 * c-typeck.c (enum impl_conv): Add ic_init_const.
2078 (convert_for_assignment): Handle ic_init_const like ic_init. Add
2079 new argument to convert_and_check call.
2080 (digest_init): Pass ic_init_const to convert_for_assignment for
2081 initializers required to be constant.
2083 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
2085 * c-tree.h (c_simulate_record_decl): Declare.
2086 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
2087 * c-decl.c (c_simulate_record_decl): New function.
2089 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
2092 * Make-lang.in: Add dummy c.install-dvi target.
2094 2021-10-15 Richard Biener <rguenther@suse.de>
2098 (c_parser_gimple_postfix_expression_after_primary): Check
2099 for a pointer do be dereferenced by ->.
2101 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
2103 * c-parser.c (c_finish_omp_declare_variant): Change call from
2104 c_omp_check_context_selector to omp_check_context_selector. Change
2105 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
2107 2021-10-09 Jakub Jelinek <jakub@redhat.com>
2109 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
2110 (c_parser_omp_scan_loop_body): Use it.
2111 (c_parser_omp_sections_scope): Likewise.
2113 2021-10-07 Richard Biener <rguenther@suse.de>
2115 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
2117 2021-10-05 Richard Biener <rguenther@suse.de>
2120 * gimple-parser.c (c_parser_gimple_postfix_expression):
2121 Accept more address _Literals.
2123 2021-10-04 Marek Polacek <polacek@redhat.com>
2126 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
2128 2021-10-01 Martin Sebor <msebor@redhat.com>
2131 * c-typeck.c (maybe_warn_for_null_address): New function.
2132 (build_binary_op): Call it.
2134 2021-10-01 Jakub Jelinek <jakub@redhat.com>
2135 Richard Biener <rguenther@suse.de>
2138 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2139 for division even for SANITIZE_SI_OVERFLOW.
2141 2021-10-01 Jakub Jelinek <jakub@redhat.com>
2143 * c-parser.c (c_parser_omp_clause_order): Set
2144 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
2146 2021-09-28 Andrew Pinski <apinski@marvell.com>
2149 * c-parser.c (c_parser_statement_after_labels): Pass
2150 the c_expr instead of the tree to c_finish_goto_ptr.
2151 * c-typeck.c (c_finish_goto_ptr): Change the second
2152 argument type to c_expr.
2153 * c-tree.h (c_finish_goto_ptr): Likewise.
2154 Error out if the expression was not of a pointer type.
2156 2021-09-22 Jakub Jelinek <jakub@redhat.com>
2158 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
2161 2021-09-18 Jakub Jelinek <jakub@redhat.com>
2163 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
2164 and reproducible modifiers.
2165 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
2167 2021-09-18 Jakub Jelinek <jakub@redhat.com>
2169 * c-parser.c (c_parser_omp_clause_default): Handle private and
2170 firstprivate arguments, adjust diagnostics on unknown argument.
2172 2021-09-17 Jakub Jelinek <jakub@redhat.com>
2174 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
2177 2021-09-10 Jakub Jelinek <jakub@redhat.com>
2179 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
2180 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
2181 don't call build_conditional_expr, instead build a COND_EXPR directly.
2182 (c_parser_binary_expression): Avoid calling parser_build_binary_op
2183 if omp_atomic_lhs even in more cases for >, < or ==.
2184 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
2185 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
2186 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
2187 * c-typeck.c (build_binary_op): For flag_openmp only handle
2190 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
2192 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
2195 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
2197 * c-decl.c (enum deprecated_states): Add unavailable state.
2198 (merge_decls): Copy unavailability.
2199 (quals_from_declspecs): Handle unavailable case.
2200 (start_decl): Amend the logic handling suppression of nested
2201 deprecation states to include unavailability.
2202 (smallest_type_quals_location): Amend comment.
2203 (grokdeclarator): Handle the unavailable deprecation state.
2204 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
2205 * c-tree.h (struct c_declspecs): Add unavailable_p.
2206 * c-typeck.c (build_component_ref): Handle unavailability.
2207 (build_external_ref): Likewise.
2209 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
2210 Joseph Myers <joseph@codesourcery.com>
2213 * c-decl.c (duplicate_decls): On significant mismatches, mark the
2214 types of both (non-function) decls as error_mark_node, so that the
2215 middle-end can see the code is malformed.
2216 (free_attr_access_data): Don't process if the type has been set to
2219 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
2221 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
2222 and 'ancestor' in 'target device' clauses.
2224 2021-08-23 Jakub Jelinek <jakub@redhat.com>
2226 * c-parser.c (c_parser_omp_clause_num_tasks,
2227 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
2229 2021-08-22 Martin Uecker <muecker@gwdg.de>
2232 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
2233 for pointers to arrays with qualifiers.
2234 (build_conditional_expr): For C23 don't lose qualifiers for pointers
2235 to arrays when the other pointer is a void pointer. Update warnings.
2236 (convert_for_assignment): Update warnings for C2X when converting from
2237 void* with qualifiers to a pointer to array with the same qualifiers.
2239 2021-08-20 Jakub Jelinek <jakub@redhat.com>
2241 * c-parser.c (c_parser_omp_error): New function.
2242 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
2244 2021-08-20 Jakub Jelinek <jakub@redhat.com>
2246 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
2247 comma at the end of list.
2248 (c_parser_omp_requires): Likewise.
2250 2021-08-19 Jakub Jelinek <jakub@redhat.com>
2252 * c-parser.c (c_parser_omp_requires): Don't call
2253 c_parser_peek_2nd_token and optionally consume token if current
2254 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
2256 2021-08-18 Jakub Jelinek <jakub@redhat.com>
2258 * c-parser.c (c_parser_omp_nothing): New function.
2259 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
2261 2021-08-18 Jakub Jelinek <jakub@redhat.com>
2263 * c-parser.c (c_parser_statement_after_labels): Add restart label
2264 near the start of the function. If c_parser_pragma returns false,
2266 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
2267 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
2268 return what c_parser_omp_declare returned. Return true instead of
2269 false after emitting errors that the directive is not allowed in
2270 pragma_stmt context.
2271 (c_parser_omp_ordered): Return true instead of
2272 false after emitting errors that the directive is not allowed in
2273 pragma_stmt context.
2274 (c_parser_omp_target_update): Likewise.
2275 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
2276 Change return type from tree to bool, return false if the
2277 directive should be ignored in pragma_stmt contexts.
2278 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
2279 return their result directly.
2280 (c_parser_omp_cancellation_point): Change return type from void to
2281 bool, return false if the directive should be ignored in pragma_stmt
2283 (c_parser_omp_declare): Likewise.
2285 2021-08-17 Jakub Jelinek <jakub@redhat.com>
2287 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
2288 (c_parser_omp_scope): New function.
2289 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
2291 2021-08-12 Jakub Jelinek <jakub@redhat.com>
2293 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
2294 (c_parser_omp_clause_filter): New function.
2295 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
2296 (OMP_MASKED_CLAUSE_MASK): Define.
2297 (c_parser_omp_masked): New function.
2298 (c_parser_omp_parallel): Handle parallel masked.
2299 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
2300 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
2302 2021-08-12 Martin Uecker <muecker@gwdg.de>
2306 * c-typeck.c (c_expr_sizeof_type): Evaluate
2307 size expressions for structs of variable size.
2309 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
2311 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
2312 'primary' as alias for 'master'.
2314 2021-08-10 Martin Uecker <muecker@gwdg.de>
2317 * c-typeck.c (c_expr_sizeof_expr): Evaluate
2318 size expressions for structs of variable size.
2320 2021-08-06 Tamar Christina <tamar.christina@arm.com>
2322 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
2323 * c-tree.h (c_simulate_enum_decl): Likewise.
2325 2021-08-06 Martin Sebor <msebor@redhat.com>
2327 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
2328 vec arguments to by-reference.
2329 (c_finish_omp_declare_simd): Same.
2330 (c_parser_compound_statement_nostart): Same.
2331 (c_parser_for_statement): Same.
2332 (c_parser_objc_methodprotolist): Same.
2333 (c_parser_oacc_routine): Same.
2334 (c_parser_omp_for_loop): Same.
2335 (c_parser_omp_declare_simd): Same.
2337 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
2338 Joseph Myers <joseph@codesourcery.com>
2339 Cesar Philippidis <cesar@codesourcery.com>
2341 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
2342 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
2343 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
2344 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
2346 2021-07-20 Martin Sebor <msebor@redhat.com>
2348 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
2350 * c-typeck.c (c_build_function_call_vec): Same.
2352 2021-07-15 Martin Sebor <msebor@redhat.com>
2356 * c-decl.c (get_parm_array_spec): Strip nops.
2358 2021-07-06 Martin Sebor <msebor@redhat.com>
2360 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
2362 2021-07-02 Jakub Jelinek <jakub@redhat.com>
2365 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
2366 appears before a CPP_NAME.
2368 2021-06-25 Martin Sebor <msebor@redhat.com>
2370 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
2371 warning_suppressed_p, suppress_warning, and copy_no_warning.
2372 (diagnose_mismatched_decls): Same.
2373 (duplicate_decls): Same.
2374 (grokdeclarator): Same.
2375 (finish_function): Same.
2376 (c_write_global_declarations_1): Same.
2377 * c-fold.c (c_fully_fold_internal): Same.
2378 * c-parser.c (c_parser_expr_no_commas): Same.
2379 (c_parser_postfix_expression): Same.
2380 * c-typeck.c (array_to_pointer_conversion): Same.
2381 (function_to_pointer_conversion): Same.
2382 (default_function_array_conversion): Same.
2383 (convert_lvalue_to_rvalue): Same.
2384 (default_conversion): Same.
2385 (build_indirect_ref): Same.
2386 (build_function_call_vec): Same.
2387 (build_atomic_assign): Same.
2388 (build_unary_op): Same.
2389 (c_finish_return): Same.
2390 (emit_side_effect_warnings): Same.
2391 (c_finish_stmt_expr): Same.
2392 (c_omp_clause_copy_ctor): Same.
2394 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2397 * c-parser.c (c_parser_has_attribute_expression): Set source range for
2400 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2403 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
2406 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2408 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
2409 C_ORT_OMP for clauses on target construct.
2410 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
2411 (c_parser_omp_target): For non-combined target add
2412 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
2413 C_ORT_OMP_TARGET to c_finish_omp_clauses.
2414 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
2415 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
2416 never present on C_ORT_*DECLARE_SIMD.
2417 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
2418 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
2419 corresponding map clauses.
2421 2021-06-21 Jakub Jelinek <jakub@redhat.com>
2423 PR inline-asm/100785
2424 * c-typeck.c (c_mark_addressable): Diagnose trying to make
2425 bit-fields addressable.
2427 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
2429 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
2432 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
2435 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
2436 var in the error case.
2438 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
2441 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
2442 spot built-in functions.
2444 2021-06-06 Jakub Jelinek <jakub@redhat.com>
2447 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
2448 even when target is combined with other constructs.
2450 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
2453 * c-decl.c (finish_struct): Fix thinko in previous change.
2454 * c-typeck.c (convert_for_assignment): Do not warn on pointer
2455 assignment and initialization for storage order purposes if the
2456 RHS is a call to a DECL_IS_MALLOC function.
2458 2021-06-04 Martin Sebor <msebor@redhat.com>
2461 * c-objc-common.c (print_type): Handle erroneous types.
2463 2021-06-03 Jakub Jelinek <jakub@redhat.com>
2466 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
2467 after depend only cases.
2469 2021-05-31 Richard Biener <rguenther@suse.de>
2472 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
2473 * c-parser.c (c_parser_postfix_expression): Likewise.
2475 2021-05-28 Richard Biener <rguenther@suse.de>
2478 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
2479 invalid if conditions.
2481 2021-05-28 Jakub Jelinek <jakub@redhat.com>
2484 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
2485 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2486 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
2487 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
2488 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
2489 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
2490 if present in map_head, map_field_head or map_firstprivate_head
2493 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
2495 * c-parser.c (c_parser_omp_clause_affinity): New.
2496 (c_parser_omp_clause_name, c_parser_omp_variable_list,
2497 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
2498 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
2499 c_finish_omp_clauses): Likewise.
2501 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
2504 * c-decl.c (finish_struct): Warn for a union containing an aggregate
2505 field with a differing scalar storage order.
2507 2021-05-21 Jakub Jelinek <jakub@redhat.com>
2510 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
2511 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
2512 if a decl is mentioned both in map clause and in such firstprivate
2513 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
2515 2021-05-19 Jakub Jelinek <jakub@redhat.com>
2518 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
2519 master when combined with taskloop.
2520 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
2521 parallel master when not combined with taskloop.
2523 2021-05-18 Richard Biener <rguenther@suse.de>
2526 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
2527 Diagnose calls to non-functions.
2528 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
2530 2021-05-17 Richard Biener <rguenther@suse.de>
2533 * gimple-parser.c (c_parser_gimple_label): Avoid building
2534 a GIMPLE label with NULL label decl.
2536 2021-05-13 Martin Sebor <msebor@redhat.com>
2539 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
2541 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
2543 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
2546 2021-05-10 Martin Liska <mliska@suse.cz>
2548 * c-aux-info.c (affix_data_type): Use startswith
2549 function instead of strncmp.
2550 * c-typeck.c (build_function_call_vec): Likewise.
2551 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
2553 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
2555 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
2556 on the address of a pointer field in a record with reverse SSO.
2558 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
2560 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
2561 for || and && reductions.
2563 2021-04-29 Joseph Myers <joseph@codesourcery.com>
2565 * c-typeck.c (function_types_compatible_p): For C2X, treat
2566 unprototyped function as compatible with non-variadic prototyped
2567 function even if some argument types are changed by the default
2568 argument promotions.
2570 2021-04-15 Martin Sebor <msebor@redhat.com>
2574 * c-decl.c (pushdecl): Always propagate type attribute.
2576 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
2579 * c-typeck.c (c_common_type): Do not drop attributes that
2580 affect type identity.
2582 2021-04-10 Jakub Jelinek <jakub@redhat.com>
2585 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
2588 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2591 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
2594 2021-03-19 Jakub Jelinek <jakub@redhat.com>
2597 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
2598 with modifycode NOP_EXPR produces and mark the _Atomic var as read
2600 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
2601 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
2602 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
2604 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
2607 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
2608 ensure that the varpool node is marked as offloadable.
2610 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
2613 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
2615 2021-02-24 Martin Sebor <msebor@redhat.com>
2618 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
2620 2021-02-18 Jakub Jelinek <jakub@redhat.com>
2623 * c-typeck.c (c_finish_return): Don't wrap retval into
2624 EXCESS_PRECISION_EXPR in functions that return void.
2626 2021-02-11 Marek Polacek <polacek@redhat.com>
2628 * c-parser.c (c_parser_if_statement): Use vec_free.
2630 2021-02-04 Martin Sebor <msebor@redhat.com>
2633 * c-decl.c (locate_old_decl): Add type to diagnostic output.
2634 (diagnose_mismatched_decls): Same.
2635 (start_function): Introduce temporaries for better readability.
2636 * c-typeck.c (comptypes_internal): Only consider complete enum
2637 types in comparisons with integers.
2639 2021-02-01 Martin Sebor <msebor@redhat.com>
2642 * c-decl.c (free_attr_access_data): New function.
2643 (c_parse_final_cleanups): Call free_attr_access_data.
2645 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2647 * c-parser.c (c_parser_omp_clause_detach): New.
2648 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
2649 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2650 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
2651 clause. Prevent use of detach with mergeable and overriding the
2652 data sharing mode of the event handle.
2654 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2656 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
2657 unqualified element type and then call c_build_qualified_type on the
2660 2021-01-07 Richard Biener <rguenther@suse.de>
2662 * gimple-parser.c (c_parser_gimple_compound_statement): Only
2663 reallocate loop array if it is too small.
2665 2020-12-16 Martin Uecker <muecker@gwdg.de>
2668 * c-typeck.c (build_modify_expr): Drop qualifiers.
2670 2020-12-16 Martin Uecker <muecker@gwdg.de>
2673 * c-parser.c (c_parser_expression): Look into
2674 nop expression when marking expressions as read.
2676 2020-12-14 Martin Liska <mliska@suse.cz>
2679 * c-typeck.c (pointer_diff): Do not emit a top-level
2681 (build_binary_op): Likewise.
2683 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2685 * c-parser.c (c_parser_omp_allocate): New.
2686 (c_parser_omp_construct): Call it.
2688 2020-12-09 Richard Biener <rguenther@suse.de>
2691 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
2694 2020-12-07 Martin Uecker <muecker@gwdg.de>
2697 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
2698 that drops qualifiers to the end of the function.
2700 2020-11-26 Martin Uecker <muecker@gwdg.de>
2704 * c-parser.c (c_parser_declaration_or_fndef): Remove
2705 redundant code to drop qualifiers of _Atomic types for __auto_type.
2706 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
2707 types for __typeof__.
2709 2020-11-24 Jakub Jelinek <jakub@redhat.com>
2712 * c-parser.c (c_parser_binary_expression): For omp atomic binary
2713 expressions, use make_node instead of build2 to avoid checking build2
2716 2020-11-23 Joseph Myers <joseph@codesourcery.com>
2719 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
2720 for comparisons of complete and incomplete pointers.
2722 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2724 * c-aux-info.c (gen_type): Support opaque types.
2726 2020-11-20 Martin Sebor <msebor@redhat.com>
2729 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2731 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2734 * Make-lang.in (c.serial): Change from goal to a variable.
2735 (.PHONY): Drop c.serial.
2737 2020-11-20 Martin Uecker <muecker@gwdg.de>
2739 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2741 2020-11-19 Jakub Jelinek <jakub@redhat.com>
2744 * c-decl.c (get_parm_array_spec): Bail out of nelts is
2747 2020-11-18 Jakub Jelinek <jakub@redhat.com>
2749 * Make-lang.in (c.serial): New goal.
2750 (.PHONY): Add c.serial c.prev.
2751 (cc1$(exeext)): Call LINK_PROGRESS.
2753 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
2755 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
2757 * c-typeck.c (build_asm_expr): Remove an assert checking output
2758 absence for asm goto.
2760 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2762 * c-typeck.c (c_finish_omp_clauses): Don't clear
2763 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2765 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2768 * c-parser.c (c_parser_objc_class_definition): Pass the
2769 location of the class name to the interface declaration.
2771 2020-11-10 Strager Neds <strager.nds@gmail.com>
2773 * c-decl.c (merge_decls): Use new overload of
2774 set_decl_section_name.
2776 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2778 * c-parser.c (c_parser_omp_target_data): Add use of
2779 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
2780 handled map clause kind.
2781 (c_parser_omp_target_enter_data): Likewise.
2782 (c_parser_omp_target_exit_data): Likewise.
2783 (c_parser_omp_target): Likewise.
2784 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
2785 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
2786 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
2787 same struct field access to co-exist on OpenMP construct.
2789 2020-11-07 Martin Uecker <muecker@gwdg.de>
2791 * c-parser.c (c_parser_label): Implement mixing of labels and code.
2792 (c_parser_all_labels): Likewise.
2794 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2796 * c-parser.c (c_parser_objc_at_property_declaration):
2797 Improve parsing fidelity. Associate better location info
2798 with @property attributes. Clean up the interface to
2799 objc_add_property_declaration ().
2801 2020-11-06 Nathan Sidwell <nathan@acm.org>
2803 * c-decl.c (diagnose_mismatched_decls): Rename
2804 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2805 (warn_if_shadowing, implicitly_declare, names_builtin_p)
2806 (collect_source_refs): Likewise.
2807 * c-typeck.c (inform_declaration, inform_for_arg)
2808 (convert_for_assignment): Likewise.
2810 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
2812 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2814 (c_parser_omp_construct): Update call.
2816 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2819 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2820 find underlying decl to clear in the aligned_head bitmap.
2822 2020-11-04 Joseph Myers <joseph@codesourcery.com>
2824 * c-decl.c (handle_nodiscard_attribute): New.
2825 (std_attribute_table): Add nodiscard.
2826 * c-parser.c (c_parser_std_attribute): Expect argument to
2827 nodiscard attribute to be a string. Do not special-case ignoring
2829 * c-typeck.c (maybe_warn_nodiscard): New.
2830 (build_compound_expr, emit_side_effect_warnings): Call
2831 maybe_warn_nodiscard.
2832 (c_process_expr_stmt, c_finish_stmt_expr): Also call
2833 emit_side_effect_warnings if warn_unused_result.
2835 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
2837 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2839 (finish_init): Likewise.
2840 (pop_init_level): Likewise.
2842 2020-10-28 Joseph Myers <joseph@codesourcery.com>
2844 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2845 error_at for omitted parameter name.
2847 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2849 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2850 (c_parser_omp_clause_allocate): New function.
2851 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2852 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2853 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2854 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2855 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2856 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2857 PRAGMA_OMP_CLAUSE_ALLOCATE.
2858 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2860 2020-10-27 Joseph Myers <joseph@codesourcery.com>
2862 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2863 standard attributes.
2865 2020-10-23 Marek Polacek <polacek@redhat.com>
2868 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2869 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2870 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2871 * c-tree.h (char_type_p): Declare.
2872 * c-typeck.c (char_type_p): No longer static.
2874 2020-10-23 Martin Sebor <msebor@redhat.com>
2877 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2879 2020-09-19 Martin Sebor <msebor@redhat.com>
2882 * c-decl.c (lookup_last_decl): Define new function.
2883 (c_decl_attributes): Call it.
2884 (start_decl): Add argument and use it.
2885 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2886 (get_parm_array_spec): Define new function.
2887 (push_parm_decl): Call get_parm_array_spec.
2888 (start_function): Call warn_parm_array_mismatch. Build attribute
2889 access and add it to current function.
2890 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2891 in forms of array parameters.
2892 * c-tree.h (start_decl): Add argument.
2894 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2896 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2898 (in_statement): New.
2899 (start_function): Adjust for above change.
2900 (c_push_function_context, c_pop_function_context): Likewise.
2901 * c-lang.h (struct language_function): Likewise.
2902 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2903 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2905 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2906 (c_parser_switch_statement): Adjust break/switch context handling
2907 and calls to renamed functions.
2908 (c_parser_while_statement): Adjust break/switch context handling and
2910 (c_parser_do_statement): Ditto, with DO_STMT respectively.
2911 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2912 (c_parser_omp_for_loop): Adjust break/switch context handling.
2913 * c-tree.h (c_break_label, c_cont_label): Delete.
2914 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2915 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2916 (in_statement, switch_statement_break_seen_p): Declare.
2917 (c_start_case, c_finish_case): Renamed to...
2918 (c_start_switch, c_finish_switch).
2919 (c_finish_bc_stmt): Adjust arguments.
2920 * c-typeck.c (build_function_call_vec): Don't try to print
2921 statements with %qE format.
2922 (struct c_switch): Rename switch_expr field to switch_stmt.
2923 Add break_stmt_seen_p field.
2924 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
2925 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
2926 (do_case): Update for changes to struct c_switch.
2927 (c_finish_case): Rename to c_finish_switch. Update for changes to
2928 struct c_switch and change of representation from SWITCH_EXPR to
2930 (c_finish_loop): Delete.
2931 (c_finish_bc_stmt): Update to reflect changes to break/continue
2932 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
2933 of a GOTO_EXPR except for objc foreach loops.
2935 2020-09-01 Jakub Jelinek <jakub@redhat.com>
2938 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2941 2020-08-28 Martin Sebor <msebor@redhat.com>
2944 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2947 2020-08-27 Martin Liska <mliska@suse.cz>
2949 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2950 growth function to true.
2952 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
2955 * c-typeck.c (handle_omp_array_sections_1): Talk about
2956 array function parameter in the error message.
2958 2020-08-18 Jakub Jelinek <jakub@redhat.com>
2961 * c-parser.c (c_parser_generic_selection): Change match_found from bool
2962 to int, holding index of the match. Call mark_exp_read on the selector
2963 expression and on expressions other than the selected one.
2965 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
2968 * c-typeck.c (process_init_element): Split test for whether to
2969 recurse into a record, union or array into...
2970 (initialize_elementwise_p): ...this new function. Don't recurse
2971 into a vector type if the initialization value is also a vector.
2973 2020-07-31 Richard Biener <rguenther@suse.de>
2976 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2977 Define to c_common_finalize_early_debug.
2979 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2981 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2982 (c_parser_omp_critical): Permit hint(0) clause without named critical.
2983 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2985 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
2988 * c-decl.c (finish_decl): Call target hook
2989 lower_local_decl_alignment to lower local decl alignment.
2991 2020-07-09 Julian Brown <julian@codesourcery.com>
2992 Thomas Schwinge <thomas@codesourcery.com>
2995 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2996 for standalone attach/detach clauses.
2998 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
3000 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
3001 set, warn for conversion between pointers that point to incompatible
3002 scalar storage orders.
3004 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
3006 * c-parser.c (c_parser_statement_after_labels): Pass correct
3007 parameters to c_parser_do_statement.
3009 2020-06-16 Jakub Jelinek <jakub@redhat.com>
3011 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
3013 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
3014 premature c_fully_fold. Defer explicit c_fully_fold calls to after
3016 * c-tree.h (c_in_omp_for): Declare.
3017 * c-typeck.c (c_in_omp_for): Define.
3018 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
3019 (digest_init): Likewise.
3020 (build_binary_op): Likewise.
3022 2020-06-16 Jakub Jelinek <jakub@redhat.com>
3024 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
3025 from kind by comma rather than colon.
3027 2020-06-05 Mark Wielaard <mark@klomp.org>
3029 * c-decl.c (implicit_decl_warning): When warned and olddecl is
3030 an undeclared builtin, then add a fixit header hint, if found.
3031 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
3032 warning_at about implicit builtin declaration type mismatch.
3034 2020-06-03 Mark Wielaard <mark@klomp.org>
3036 * c-parser.c (struct c_parser): Add seen_string_literal
3038 (c_parser_consume_token): Reset seen_string_literal.
3039 (c_parser_error_richloc): Add name_hint if seen_string_literal
3040 and next token is a CPP_NAME and we have a missing header
3041 suggestion for the name.
3042 (c_parser_string_literal): Set seen_string_literal.
3044 2020-06-03 Mark Wielaard <mark@klomp.org>
3046 * c-parser.c (c_parser_postfix_expression_after_primary): Add
3047 scope with matching_parens after CPP_OPEN_PAREN.
3049 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
3051 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
3053 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
3055 * Make-lang.in: Remove extra slash.
3057 2020-05-19 Martin Liska <mliska@suse.cz>
3059 * c-parser.c: Fix typo.
3061 2020-05-14 Jakub Jelinek <jakub@redhat.com>
3063 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
3065 2020-05-07 Richard Biener <rguenther@suse.de>
3068 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
3071 2020-04-30 Jakub Jelinek <jakub@redhat.com>
3074 * c-decl.c (set_labels_context_r): In addition to context-less
3075 LABEL_DECLs adjust also LABEL_DECLs with context equal to
3076 parent function if any.
3077 (store_parm_decls): Adjust comment.
3079 2020-04-19 Jakub Jelinek <jakub@redhat.com>
3082 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
3083 two CPP_COLON tokens.
3085 2020-04-17 Jakub Jelinek <jakub@redhat.com>
3088 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
3091 2020-04-15 Jakub Jelinek <jakub@redhat.com>
3094 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
3095 requires directive when not at file scope.
3097 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
3100 * c-decl.c (c_check_in_current_scope): New function.
3101 * c-tree.h (c_check_in_current_scope): Declare it.
3102 * c-parser.c (c_parser_oacc_declare): Add check that variables
3103 are declared in the same scope as the directive. Fix handling
3106 2020-04-07 Jakub Jelinek <jakub@redhat.com>
3109 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
3110 if c_parser_omp_master succeeded.
3112 2020-03-23 Jakub Jelinek <jakub@redhat.com>
3114 PR gcov-profile/94029
3116 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
3117 the function_start_locus location. Don't do that afterwards for the
3118 __GIMPLE body parsing.
3120 2020-03-19 Jakub Jelinek <jakub@redhat.com>
3122 PR gcov-profile/94029
3123 * c-tree.h (finish_function): Add location_t argument defaulted to
3125 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
3126 set it to the locus of closing } if non-NULL.
3127 (c_parser_compound_statement_nostart): Return locus of closing }.
3128 (c_parser_parse_rtl_body): Likewise.
3129 (c_parser_declaration_or_fndef): Propagate locus of closing } to
3131 * c-decl.c (finish_function): Add end_loc argument, use it instead of
3132 input_location to set function_end_locus.
3134 2020-03-17 Jakub Jelinek <jakub@redhat.com>
3137 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
3138 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
3139 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
3140 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
3142 (finish_incomplete_vars): New function, moved from finish_struct. Use
3143 relayout_decl instead of layout_decl.
3144 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
3145 being TYPE_VFIELD. Use finish_incomplete_vars.
3146 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
3147 finish_incomplete_vars.
3148 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3149 also on ENUMERAL_TYPEs.
3151 2020-03-16 Jakub Jelinek <jakub@redhat.com>
3154 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
3156 2020-03-13 Martin Sebor <msebor@redhat.com>
3159 * c-decl.c (builtin_structptr_type_count): New constant.
3160 (match_builtin_function_types): Reject decls that are incompatible
3161 in types pointed to by pointers.
3162 (diagnose_mismatched_decls): Adjust comments.
3164 2020-03-05 Joseph Myers <joseph@codesourcery.com>
3167 * c-typeck.c (pop_init_level): Do not diagnose initializers as
3168 empty when initialized type is error_mark_node.
3169 (set_designator, process_init_element): Ignore initializers for
3170 elements of a variable-size type or of error_mark_node.
3172 2020-03-01 Martin Sebor <msebor@redhat.com>
3175 * c-decl.c (types_close_enough_to_match): New function.
3176 (match_builtin_function_types):
3177 (diagnose_mismatched_decls): Add missing inform call to a warning.
3179 2020-03-01 Martin Sebor <msebor@redhat.com>
3182 * c-typeck.c (build_functype_attribute_variant): New function.
3183 (composite_type): Call it.
3185 2020-02-25 Jakub Jelinek <jakub@redhat.com>
3188 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
3189 Rename last argument from probablity to probability.
3191 2020-02-13 Jakub Jelinek <jakub@redhat.com>
3194 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
3195 *expr if it has side effects.
3197 2020-01-30 Jeff Law <law@redhat.com>
3200 * c-parser.c (c_parser_switch_statement): Make sure to request
3201 marking the switch expr as used.
3203 2020-01-22 Joseph Myers <joseph@codesourcery.com>
3206 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
3207 argument with integer operands.
3209 2020-01-16 Kerem Kat <keremkat@gmail.com>
3212 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
3213 to support 4 available tokens.
3215 2020-01-15 Joseph Myers <joseph@codesourcery.com>
3218 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
3219 determine whether to set DECL_CONTEXT.
3221 2020-01-13 Joseph Myers <joseph@codesourcery.com>
3224 * c-typeck.c (build_c_cast): Check for expressions with integer
3225 operands that can occur in an unevaluated part of an integer
3226 constant expression and call note_integer_operands as needed.
3228 2019-01-08 Richard Biener <rguenther@suse.de>
3231 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
3234 2020-01-01 Jakub Jelinek <jakub@redhat.com>
3236 Update copyright years.
3238 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3240 * c-decl.c (collect_source_ref_cb): Delete.
3241 (for_each_global_decl): Rename into...
3242 (collect_source_refs): ...this. Call collect_source_ref directly.
3243 (c_parse_final_cleanups): Always call collect_source_ref on the main
3246 2019-12-19 Julian Brown <julian@codesourcery.com>
3247 Cesar Philippidis <cesar@codesourcery.com>
3249 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
3251 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
3252 Allow deref (->) in variable lists if true.
3253 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
3254 Pass to c_parser_omp_variable_list.
3255 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
3256 call to c_parser_omp_variable_list.
3257 (c_parser_oacc_all_clauses): Support attach and detach clauses.
3258 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
3259 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
3260 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
3261 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
3262 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
3263 and detach. Support deref.
3264 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
3265 GOMP_MAP_ALWAYS_POINTER for OpenACC.
3266 (c_oacc_check_attachments): New function.
3267 (c_finish_omp_clauses): Check attach/detach arguments for being
3268 pointers using above. Support deref.
3270 2019-12-19 Julian Brown <julian@codesourcery.com>
3271 Maciej W. Rozycki <macro@codesourcery.com>
3272 Tobias Burnus <tobias@codesourcery.com>
3273 Thomas Schwinge <thomas@codesourcery.com>
3275 * c-parser.c (c_parser_omp_clause_name): Support no_create.
3276 (c_parser_oacc_data_clause): Likewise.
3277 (c_parser_oacc_all_clauses): Likewise.
3278 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3279 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
3280 PRAGMA_OACC_CLAUSE_NO_CREATE.
3281 * c-typeck.c (handle_omp_array_sections): Support
3284 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3286 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3287 Replace label_text ctor calls.
3289 2019-12-04 Joseph Myers <joseph@codesourcery.com>
3293 * c-typeck.c (convert_lvalue_to_rvalue): Call
3294 require_complete_type for arguments not of void types.
3295 (build_indirect_ref): Do not diagnose dereferencing pointers to
3297 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
3299 2019-12-03 Joseph Myers <joseph@codesourcery.com>
3302 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
3303 old-style parameter definitions.
3305 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
3309 * c-decl.c (flexible_array_type_p): Move to common code.
3311 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3313 * c-decl.c (start_decl): Allow initialization of variables whose
3314 size is a POLY_INT_CST.
3315 (finish_decl): Use verify_type_context to check whether the target
3316 allows variables with a particular type to have static or thread-local
3317 storage duration. Don't raise a second error if such variables do
3318 not have a constant size.
3319 (grokdeclarator): Use verify_type_context to check whether the
3320 target allows fields or array elements to have a particular type.
3321 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
3322 the target allows pointer difference for the types involved.
3323 (build_unary_op): Likewise for pointer increment and decrement.
3325 2019-11-29 Joseph Myers <joseph@codesourcery.com>
3327 * c-parser.c (struct c_parser): Add members raw_tokens and
3329 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
3330 using previously-lexed raw tokens.
3331 (c_parser_peek_nth_token_raw)
3332 (c_parser_check_balanced_raw_token_sequence): New functions.
3333 (c_parser_nth_token_starts_std_attributes): Use
3334 c_parser_check_balanced_raw_token_sequence for Objective-C.
3336 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3339 * c-decl.c (finish_declspecs): Use int instead of decimal
3340 floating-point types if decimal floating-point not supported.
3342 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3344 * c-tree.h (struct c_declarator): Use a structure for id member.
3345 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
3346 declarators at the start, not when handling individual declarators
3347 later. Use u.id.id instead of u.id.
3348 (grokfield): Use u.id.id instead of u.id.
3349 (build_id_declarator): Set u.id.id and u.id.attrs.
3350 (finish_declspecs): Handle postfix attributes in case of typedef
3351 name or typeof used.
3352 * c-parser.c (c_parser_direct_declarator)
3353 (c_parser_direct_declarator_inner): Place declarator for
3354 attributes inside that for function or array, not outside. Set
3355 u.id.attrs for identifiers.
3356 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
3357 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
3360 2019-11-22 Jakub Jelinek <jakub@redhat.com>
3363 * c-decl.c (identifier_global_tag): Define.
3365 2019-11-20 Richard Biener <rguenther@suse.de>
3368 * c-decl.c (grokdeclarator): Prevent inlining of nested
3369 function with VLA arguments.
3371 2019-11-20 Joseph Myers <joseph@codesourcery.com>
3373 * c-decl.c (c_warn_type_attributes): New function.
3374 (groktypename, grokdeclarator, finish_declspecs): Call
3375 c_warn_type_attributes before applying attributes to types.
3376 * c-tree.h (c_warn_type_attributes): Declare.
3378 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3380 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
3381 standard attributes.
3382 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
3383 pedwarn for unknown standard attributes and return error_mark_node
3386 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
3388 * c-parser.c (c_parser_parse_rtl_body): Always call
3389 run_rtl_passes, even if startwith pass is not provided.
3391 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3393 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
3394 duplicate standard attributes.
3396 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3398 * c-decl.c (std_attribute_table): Add maybe_unused.
3400 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3402 * c-decl.c (std_attribute_table): Add fallthrough.
3403 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
3404 attribute at top level.
3406 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3408 * c-decl.c (std_attribute_table): New.
3409 (c_init_decl_processing): Register attributes from
3410 std_attribute_table.
3411 * c-parser.c (c_parser_attribute_arguments): Add arguments
3412 require_string and allow_empty_args. All callers changed.
3413 (c_parser_std_attribute): Set require_string argument for
3414 "deprecated" attribute.
3416 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3418 * c-parser.c (c_parser_postfix_expression)
3419 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
3420 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
3422 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
3424 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
3425 of build_same_sized_truth_vector_type.
3426 (build_vec_cmp): Likewise.
3428 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3430 * c-parser.c (c_parser_omp_context_selector): Don't require score
3431 argument to fit into shwi, just to be INTEGER_CST. Diagnose
3434 * c-parser.c (c_parser_omp_context_selector): Rename
3435 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
3436 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
3437 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
3438 and string literals.
3440 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3442 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
3443 ctsk_tagfirstref_attrs.
3444 (struct c_declspecs): Update description of attrs. Add
3445 postfix_attrs and non_std_attrs_seen_p. Increase size of
3446 typespec_kind bit-field.
3447 (c_warn_unused_attributes): New declaration.
3448 (parser_xref_tag): Update prototype.
3449 * c-decl.c (c_warn_unused_attributes): New function.
3450 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
3451 ctsk_tagref_attrs. Handle attribute declarations.
3452 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
3453 (grokdeclarator): Handle standard attributes.
3454 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
3455 attributes to incomplete type reference.
3456 (xref_tag): Update call to parser_xref_tag.
3457 (declspecs_add_addrspace, declspecs_add_type)
3458 (declspecs_add_scspec, declspecs_add_attrs): Set
3459 non_std_attrs_seen_p.
3460 (finish_declspecs): Apply postfix standard attributes to type.
3461 * c-parser.c (c_token_starts_declspecs)
3462 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
3463 (c_parser_next_tokens_start_declaration): Update comments.
3464 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
3465 parser->tokens[2] to parser->tokens[1].
3466 (c_parser_nth_token_starts_std_attributes)
3467 (c_parser_std_attribute_specifier_sequence): New functions.
3468 (c_parser_declaration_or_fndef): Add arguments have_attrs and
3469 attrs. All callers changed. Handle standard attributes.
3470 (c_parser_parms_declarator, c_parser_parms_list_declarator)
3471 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
3472 All callers changed.
3473 (c_parser_declspecs): Add arguments start_std_attr_ok and
3474 end_std_attr_ok. All callers changed. Handle standard
3476 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3477 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
3478 (c_parser_compound_statement_nostart, c_parser_all_labels)
3479 (c_parser_label, c_parser_statement, c_parser_for_statement):
3480 Handle standard attributes.
3481 * c-parser.h (c_parser_declspecs): Update prototype.
3482 * gimple-parser.c (c_parser_gimple_declaration): Update call to
3485 2019-11-12 Martin Liska <mliska@suse.cz>
3487 * gimple-parser.c: Do not include params.h.
3489 2019-11-12 Martin Liska <mliska@suse.cz>
3491 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
3492 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
3495 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3496 Frederik Harwath <frederik@codesourcery.com>
3499 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
3500 (c_parser_oacc_kernels_parallel): Rename function to...
3501 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
3502 (c_parser_omp_construct): Update accordingly.
3505 2019-11-11 Jakub Jelinek <jakub@redhat.com>
3507 * c-parser.c (c_parser_translation_unit): Diagnose declare target
3508 without corresponding end declare target.
3510 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3512 * c-convert.c (convert): Only handle vector conversions if one of
3513 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
3515 * c-typeck.c (build_array_ref): Only allow vector indexing if the
3516 vectors satisfy gnu_vector_type_p.
3517 (build_unary_op): Only allow unary operators to be applied to
3518 vectors if they satisfy gnu_vector_type_p.
3519 (digest_init): Only allow by-element initialization of vectors
3520 if they satisfy gnu_vector_type_p.
3521 (really_start_incremental_init): Likewise.
3522 (push_init_level): Likewise.
3523 (pop_init_level): Likewise.
3524 (process_init_element): Likewise.
3525 (build_binary_op): Only allow binary operators to be applied to
3526 vectors if they satisfy gnu_vector_type_p.
3528 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3530 * c-decl.c (grokparms): Convert () in a function definition to
3532 (store_parm_decls_oldstyle): Pedwarn for C2x.
3533 (store_parm_decls): Update comment about () not generating a
3536 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3538 * c-parser.c (c_parser_attribute_arguments): New function.
3539 Factored out of c_parser_gnu_attribute.
3540 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
3541 (c_parser_balanced_token_sequence, c_parser_std_attribute)
3542 (c_parser_std_attribute_specifier): New functions.
3543 (c_parser_transaction_attributes): Use
3544 c_parser_std_attribute_specifier.
3546 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3548 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
3549 lex_joined_string and translate_strings_p.
3550 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
3552 (c_parser_string_literal): New function.
3553 (c_parser_static_assert_declaration_no_semi): Use
3554 c_parser_string_literal. Do not set lex_untranslated_string.
3555 (c_parser_asm_string_literal): Use c_parser_string_literal.
3556 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
3557 (c_parser_gnu_attributes): Set and restore translate_strings_p
3558 instead of lex_untranslated_string.
3559 (c_parser_asm_statement): Do not set lex_untranslated_string.
3560 (c_parser_asm_operands): Likewise.
3561 (c_parser_has_attribute_expression): Set and restore
3562 translate_strings_p instead of lex_untranslated_string.
3563 (c_parser_postfix_expression): Use c_parser_string_literal.
3564 (pragma_lex): Likewise.
3565 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
3566 (c_parse_file): Set translate_strings_p.
3567 * gimple-parser.c (c_parser_gimple_postfix_expression)
3568 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
3569 * c-parser.c (c_parser_string_literal): Declare function.
3571 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3573 * c-parser.c (c_finish_omp_declare_variant): Use
3574 omp_get_context_selector instead of c_omp_get_context_selector.
3576 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3578 * c-tree.h (c_simulate_enum_decl): Declare.
3579 * c-decl.c (c_simulate_enum_decl): New function.
3580 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
3582 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3584 * c-tree.h (c_simulate_builtin_function_decl): Declare.
3585 * c-decl.c (c_simulate_builtin_function_decl): New function.
3586 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
3589 2019-10-28 Martin Sebor <msebor@redhat.com>
3592 * c-decl.c (names_builtin_p): Define a new function.
3594 2019-10-28 Richard Biener <rguenther@suse.de>
3597 * gimple-parser.c (c_parser_parse_gimple_body): Make
3598 current_bb the entry block initially to easier recover
3600 (c_parser_gimple_compound_statement): Adjust.
3602 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3604 * c-parser.c (c_finish_omp_declare_variant): Use
3605 omp_context_selector_matches instead of
3606 c_omp_context_selector_matches.
3607 * c-decl.c (c_decl_attributes): Add "omp declare target block"
3608 attribute in between declare target and end declare target
3611 2019-10-15 Joseph Myers <joseph@codesourcery.com>
3613 * c-parser.c (c_parser_attribute_any_word): Rename to
3614 c_parser_gnu_attribute_any_word. All callers changed.
3615 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
3617 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
3619 (c_parser_declaration_or_fndef, c_parser_declspecs)
3620 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3621 (c_parser_struct_declaration, c_parser_declarator)
3622 (c_parser_gnu_attribute, c_parser_compound_statement)
3623 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
3624 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
3625 attribute-related syntax productions.
3627 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3629 * c-objc-common.c (useful_aka_type_p): Replace with...
3630 (get_aka_type): ...this new function. Given the original type,
3631 decide which aka type to print (if any). Only look through typedefs
3632 if user_facing_original_type_p.
3633 (print_type): Update accordingly.
3635 2019-10-14 Jakub Jelinek <jakub@redhat.com>
3637 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
3638 into int NESTED, if it is 2, diagnose missing commas in between
3640 (c_parser_omp_context_selector): Pass 2 as last argument to
3641 c_parser_omp_all_clauses.
3643 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3645 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
3646 For simd properties, put them directly into TREE_VALUE.
3647 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
3648 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
3649 add "omp declare variant base" attribute rather than
3650 "omp declare variant".
3652 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3654 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
3656 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3658 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
3659 true, terminate processing on closing paren and don't skip to end of
3661 (c_parser_omp_declare_simd): Handle also declare variant.
3662 (omp_construct_selectors, omp_device_selectors,
3663 omp_implementation_selectors, omp_user_selectors): New variables.
3664 (c_parser_omp_context_selector,
3665 c_parser_omp_context_selector_specification,
3666 c_finish_omp_declare_variant): New functions.
3667 (c_finish_omp_declare_simd): Handle both declare simd and
3669 (c_parser_omp_declare): Handle declare variant.
3671 2019-10-02 Joseph Myers <joseph@codesourcery.com>
3673 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
3676 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3678 * c-objc-common.c (useful_aka_type_p): New function.
3679 (print_type): Use it to decide whether an aka type is worth printing.
3681 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3684 * c-parser.c (c_parser_predefined_identifier): New function.
3685 (c_parser_postfix_expression): Use it.
3686 (c_parser_omp_variable_list): Parse predefined identifiers.
3687 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
3688 in shared and firstprivate clauses, even when they are predetermined
3691 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3693 * c-typeck.c (build_function_call_vec): Take the original function
3694 decl as an optional final parameter. Pass all built-in calls to
3695 check_builtin_function_arguments.
3697 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
3700 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
3701 of identifiers in the external scope only for variables and functions.
3703 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3706 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
3708 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3711 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
3712 after determining that the first token is not
3713 PRAGMA_GCC_PCH_PREPROCESS.
3715 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
3717 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
3718 FUNCTION_DECL to the right value in the presence of nested declarators.
3720 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3723 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
3725 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3728 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
3729 of a built_in_function.
3730 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
3732 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3734 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
3735 (c_parser_omp_clause_device_type): New function.
3736 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3737 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3738 (c_parser_omp_declare_target): Handle device_type clauses. Remove
3739 diagnostics for declare target with clauses nested in clause-less
3740 declare target declaration-definition-seq.
3741 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
3743 2019-08-09 Jakub Jelinek <jakub@redhat.com>
3745 * c-parser.c (check_no_duplicate_clause): Simplify using
3747 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
3748 directive name modifiers.
3749 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
3752 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
3753 check_no_duplicate_clause call. Comment it out, instead emit a
3754 warning for duplicate dist_schedule clauses.
3756 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
3758 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
3760 2019-08-08 Jakub Jelinek <jakub@redhat.com>
3762 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
3763 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
3764 instead of generic_head to track duplicates.
3766 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3768 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
3769 (c_parser_omp_clause_use_device_addr): New function.
3770 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3771 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3772 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
3773 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
3774 map or use_device_* clauses.
3775 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
3776 in OpenMP, require pointer type rather than pointer or array type.
3777 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
3779 2019-07-31 Jakub Jelinek <jakub@redhat.com>
3782 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
3783 even if finish is UNKNOWN_LOCATION, just use start as finish in that
3786 2019-07-25 Martin Liska <mliska@suse.cz>
3787 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
3790 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
3792 2019-07-25 Martin Liska <mliska@suse.cz>
3794 * c-decl.c (merge_decls): Use new macros
3795 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
3797 2019-07-23 Richard Biener <rguenther@suse.de>
3799 PR tree-optimization/83518
3800 * gimple-parser.c (c_parser_parse_gimple_body): When we have
3801 a CFG also rebuild cgraph edges.
3803 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3805 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3806 (c_parser_omp_clause_bind): New function.
3807 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3808 (OMP_LOOP_CLAUSE_MASK): Define.
3809 (c_parser_omp_loop): New function.
3810 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3811 loop combined with parallel or teams.
3812 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3813 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3815 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
3818 * c-decl.c (finish_function): Check targetm.warn_func_return
3819 before issuing a -Wreturn-type warning.
3821 2019-07-12 Alexandre Oliva <oliva@adacore.com>
3823 * gimple-parser.c (c_parser_gimple_try_stmt): New.
3824 (c_parser_compound_statement): Call it.
3826 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3828 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3829 (c_parser_omp_clause_order): New function.
3830 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3831 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3832 PRAGMA_OMP_CLAUSE_ORDER.
3833 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3835 2019-07-10 Richard Biener <rguenther@suse.de>
3837 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3838 _Literal (int *) &x for address literals.
3840 2019-07-09 Martin Sebor <msebor@redhat.com>
3843 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3845 (field_decl_cmp): Same.
3846 * c-parser.c (c_parser_struct_or_union_specifier): Same.
3848 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3850 2019-07-09 Martin Sebor <msebor@redhat.com>
3853 * c-decl.c: Change class-key from class to struct and vice versa
3854 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3855 * gimple-parser.c: Same.
3857 2019-07-01 Richard Biener <rguenther@suse.de>
3859 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3860 _Literal (char *) &"foo" for address literals pointing to
3863 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3865 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3866 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3867 C incompatibility if alternate "__intN__" form is used.
3869 2019-06-24 Martin Sebor <msebor@redhat.com>
3871 * c-typeck.c (build_binary_op): Hyphenate floating-point.
3873 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3875 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3876 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3877 (c_parser_omp_scan_loop_body): New function.
3878 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3879 inscan reduction clauses.
3880 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3881 non-inscan reductions on the same construct, or inscan reductions with
3882 ordered or schedule clauses, or inscan array reductions.
3884 2019-06-05 Martin Sebor <msebor@redhat.com>
3887 * c-typeck.c (c_finish_return): Only consider functions returning
3888 pointers as candidates for -Wreturn-local-addr.
3890 2019-06-05 Martin Sebor <msebor@redhat.com>
3892 * c-decl.c (start_decl): Adjust quoting and hyphenation
3894 (finish_decl): Same.
3895 (finish_enum): Same.
3896 (start_function): Same.
3897 (declspecs_add_type): Same.
3898 * c-parser.c (warn_for_abs): Same.
3899 * c-typeck.c (build_binary_op): Same.
3901 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3904 * c-parser.c (c_finish_oacc_routine): Rework checking if already
3905 marked with an OpenACC 'routine' directive.
3908 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3909 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3912 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3913 clauses from "omp declare target" attribute.
3915 2019-05-16 Martin Sebor <msebor@redhat.com>
3917 * c-decl.c (start_decl): Quote keywords, operators, and
3918 types in diagnostics.
3919 (finish_decl): Same.
3920 * c-parser.c (c_parser_asm_statement): Same.
3921 (c_parser_conditional_expression): Same.
3922 (c_parser_transaction_cancel): Same.
3923 * c-typeck.c (c_common_type): Same.
3924 (build_conditional_expr): Same.
3925 (digest_init): Same.
3926 (process_init_element): Same.
3927 (build_binary_op): Same.
3929 2019-05-17 Richard Biener <rguenther@suse.de>
3931 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3932 (c_parser_gimple_unary_expression): Likewise.
3933 (c_parser_gimple_parentized_ternary_expression): New function.
3935 2019-05-16 Richard Biener <rguenther@suse.de>
3937 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3938 (c_parser_gimple_unary_expression): Likewise.
3940 2019-05-15 Richard Biener <rguenther@suse.de>
3942 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3945 2019-05-14 Richard Biener <rguenther@suse.de>
3947 * gimple-parser.c (c_parser_gimple_statement): Remove
3948 questionable auto-promotion to VIEW_CONVERT_EXPR.
3949 (c_parser_gimple_typespec): Split out from __MEM parsing.
3950 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3951 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3952 as __VIEW_CONVERT with -gimple.
3954 2019-05-09 Martin Liska <mliska@suse.cz>
3956 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3958 (c_parser_gimple_unary_expression): Parse also binary expression
3960 (c_parser_gimple_parentized_binary_expression): New function.
3962 2019-05-09 Martin Liska <mliska@suse.cz>
3964 * gimple-parser.c (struct gimple_parser): Add probability.
3965 for gimple_parser_edge.
3966 (gimple_parser::push_edge): Add new argument probability.
3967 (c_parser_gimple_parse_bb_spec): Parse also probability
3969 (c_parser_parse_gimple_body): Set edge probability.
3970 (c_parser_gimple_compound_statement): Consume token
3971 before calling c_parser_gimple_goto_stmt.
3973 (c_parser_gimple_statement): Pass new argument.
3974 (c_parser_gimple_goto_stmt): Likewise.
3975 (c_parser_gimple_if_stmt): Likewise.
3976 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3977 * c-parser.c (c_parser_declaration_or_fndef): Pass
3978 hot_bb_threshold argument.
3979 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3981 (c_parser_gimple_parse_bb_spec_edge_probability): New.
3983 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3986 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3987 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3988 (c_parser_do_statement): Likewise.
3989 (c_parser_for_statement): Likewise. Formatting fixes.
3990 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3991 emit DEBUG_BEGIN_STMTs if needed.
3993 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3996 * c-typeck.c (struct c_switch): Remove outside_range_p member.
3997 (c_start_case): Don't clear it.
3998 (do_case): Adjust c_add_case_label caller.
3999 (c_finish_case): Adjust c_do_switch_warnings caller.
4002 * c-decl.c (merge_decls): If remove is main variant and
4003 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
4004 variant that has newdecl as TYPE_NAME if any.
4006 2019-04-12 Jakub Jelinek <jakub@redhat.com>
4009 * c-decl.c (merge_decls): When newdecl's type is its main variant,
4010 don't try to remove it from the variant list, but instead assert
4013 2019-04-01 Richard Biener <rguenther@suse.de>
4016 * c-tree.h (c_get_alias_set): Declare.
4017 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
4018 * c-objc-common.c (c_get_alias_set): Treat enumeral types
4019 as the underlying integer type.
4021 2019-03-19 Martin Sebor <msebor@redhat.com>
4023 PR tree-optimization/89688
4024 * c-decl.c (finish_decl): Call braced_lists_to_string for more
4025 kinds of initializers.
4027 2019-03-19 Jakub Jelinek <jakub@redhat.com>
4030 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
4031 return type even if quals_used is 0. Formatting fixes.
4033 2019-03-14 Richard Biener <rguenther@suse.de>
4035 * c-tree.h (enum c_declspec_il): New.
4036 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
4038 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
4039 Pass start pass and declspec_il to c_parser_parse_gimple_body.
4040 (c_parser_declspecs): Adjust.
4041 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
4042 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
4044 (struct gimple_parser): New.
4045 (gimple_parser::push_edge): New method.
4046 (c_parser_gimple_parse_bb_spec): New helper.
4047 (c_parser_parse_gimple_body): Get start pass and IL specification.
4048 Initialize SSA and CFG.
4049 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
4050 Build a gimple_parser parsing state and pass it along.
4051 (c_parser_gimple_statement): Change intermittend __PHI internal
4052 function argument for the edge.
4053 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
4054 (c_parser_gimple_goto_stmt): Record edges to build.
4055 (c_parser_gimple_if_stmt): Likewise.
4056 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
4057 (c_parser_gimple_or_rtl_pass_list): Likewise.
4059 2019-03-11 Martin Liska <mliska@suse.cz>
4061 * c-decl.c (check_for_loop_decls): Wrap an option name
4062 in a string format message and fix GNU coding style.
4063 * c-parser.c (c_parser_declspecs): Likewise.
4065 2019-03-08 Jakub Jelinek <jakub@redhat.com>
4067 PR tree-optimization/89550
4068 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
4070 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
4071 or warning returned true.
4073 2019-02-28 Jakub Jelinek <jakub@redhat.com>
4076 * c-typeck.c (convert_arguments): Call inform_declaration only if
4077 the previous warning_at call returned true.
4079 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
4081 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
4082 parameter. Adjust all users.
4083 (c_parser_oacc_simple_clause): Replace parser with loc formal
4084 parameter. Adjust all users.
4086 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
4089 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
4090 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
4092 2019-02-15 Jakub Jelinek <jakub@redhat.com>
4095 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
4096 before c_decl_attributes rather than after it.
4098 2019-02-06 Jakub Jelinek <jakub@redhat.com>
4101 * c-parser.c (c_parser_declaration_or_fndef): Don't update
4102 DECL_ARGUMENTS of d if it has been defined already. Use a single if
4103 instead of 3 nested ifs.
4105 2019-02-06 Joseph Myers <joseph@codesourcery.com>
4108 * c-decl.c (finish_decl): Do not complete array types for arrays
4109 with external linkage not at file scope.
4111 2019-02-05 Richard Biener <rguenther@suse.de>
4114 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
4115 all type variants when not supported.
4117 2019-01-30 Jakub Jelinek <jakub@redhat.com>
4120 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
4121 * c-decl.c (decl_jump_unsafe): Return false for
4122 C_DECL_COMPOUND_LITERAL_P decls.
4123 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
4125 2019-01-29 Jakub Jelinek <jakub@redhat.com>
4128 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
4132 * c-decl.c (last_fileptr_type): Remove.
4133 (last_structptr_types): New variable.
4134 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
4135 {old,new}rettype instead of the types themselves. Assert
4136 last_structptr_types array has the same number of elements
4137 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
4138 argument oldtype and newtype. Instead of handling
4139 just fileptr_type_node specially, handle all builtin_structptr_types
4140 pointer nodes. Formatting fix.
4142 2019-01-24 Martin Sebor <msebor@redhat.com>
4147 * c-decl.c (match_builtin_function_types): Add arguments.
4148 (diagnose_mismatched_decls): Diagnose mismatched declarations
4149 of built-ins more strictly.
4151 2019-01-24 Jakub Jelinek <jakub@redhat.com>
4154 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
4155 on #pragma omp cancel with different modifiers.
4157 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4161 * c-typeck.c (convert_for_assignment): Upate the
4162 warn_for_address_or_pointer_of_packed_member call.
4164 2019-01-16 Tom Honermann <tom@honermann.net>
4165 Jason Merrill <jason@redhat.com>
4167 * c-typeck.c (digest_init): Revised the error message produced for
4168 ill-formed cases of array initialization with a string literal.
4169 (error_init): Make variadic.
4171 2019-01-12 Jakub Jelinek <jakub@redhat.com>
4173 * c-typeck.c (convert_for_assignment): Fix a comment typo.
4175 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4178 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
4179 if current_function_decl is non-NULL.
4181 2019-01-07 Joseph Myers <joseph@codesourcery.com>
4185 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
4186 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
4187 functions declared but never defined only for external scope, not
4190 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4193 * c-parser.c (c_parser_postfix_expression): Parse
4194 __builtin_convertvector.
4196 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4198 Update copyright years.
4200 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4203 * c-typeck.c (convert_for_assignment): Call
4204 warn_for_address_or_pointer_of_packed_member.
4206 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4208 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
4209 a more specific error message (instead of just falling through).
4211 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4213 * c-parser.c (c_parser_asm_statement): Keep track of the location each
4214 asm qualifier is first seen; use that to give nicer "duplicate asm
4215 qualifier" messages. Delete 'quals" variable, instead pass the
4216 "is_volatile_ flag to build_asm_stmt directly.
4217 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
4218 * c-typeck.c (build_asm_stmt): Ditto; adjust.
4220 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4222 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
4223 "done" boolean variable.
4225 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4228 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
4229 Move from here to gcc-rich-location.h and gcc-rich-location.c.
4230 (build_binary_op): Use struct op_location_t and
4231 class binary_op_rich_location.
4233 2018-12-11 Jakub Jelinek <jakub@redhat.com>
4236 * c-convert.c (convert): Call c_fully_fold before calling
4237 ubsan_instrument_float_cast.
4239 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
4241 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
4244 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
4246 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
4247 after asm. Pass a flag for it to build_asm_expr.
4248 * c-tree.h (build_asm_expr): Update declaration.
4249 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
4252 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
4255 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
4256 combination of volatile and goto, in any order, without repetitions.
4258 2018-12-04 James Norris <jnorris@codesourcery.com>
4259 Cesar Philippidis <cesar@codesourcery.com>
4260 Julian Brown <julian@codesourcery.com>
4262 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
4265 2018-11-30 Richard Biener <rguenther@suse.de>
4267 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4268 _Literal (type) { ... } as empty aggregate or vector constructor.
4270 2018-11-29 Martin Sebor <msebor@redhat.com>
4273 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
4274 (convert_arguments): Add comments. Pass additional argument to
4277 2018-11-29 Martin Sebor <msebor@redhat.com>
4281 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
4283 2018-11-23 Martin Sebor <msebor@redhat.com>
4286 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
4287 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
4289 2018-11-20 Martin Sebor <msebor@redhat.com>
4291 * c-parser.c (c_parser_has_attribute_expression): New function.
4292 (c_parser_attribute): New function.
4293 (c_parser_attributes): Move code into c_parser_attribute.
4294 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
4296 2018-11-15 Martin Sebor <msebor@redhat.com>
4299 * c-decl.c (header_for_builtin_fn): Declare.
4300 (diagnose_mismatched_decls): Diagnose declarations of built-in
4301 functions without a prototype.
4302 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
4303 (convert_argument): Same.
4304 (convert_arguments): Factor code out into convert_argument.
4305 Detect mismatches between built-in formal arguments in calls
4306 to built-in without prototype.
4307 (build_conditional_expr): Same.
4308 (type_or_builtin_type): New function.
4309 (convert_for_assignment): Add argument. Conditionally issue
4310 warnings instead of errors for mismatches.
4312 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4314 * c-decl.c: Replace "source_location" with "location_t".
4315 * c-tree.h: Likewise.
4316 * c-typeck.c: Likewise.
4317 * gimple-parser.c: Likewise.
4319 2018-11-09 Jakub Jelinek <jakub@redhat.com>
4321 * c-parser.c (c_parser_omp_clause_final): Use
4322 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
4323 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
4324 parsing instead of c_parser_paren_condition.
4325 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
4326 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
4327 c_fully_fold instead of c_parser_condition.
4328 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
4329 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
4330 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
4331 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
4332 c_parser_expr_no_commas instead of c_parser_expression.
4334 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
4335 reduction clause with inscan modifier.
4337 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
4338 clauses other than atomic_default_mem_order.
4340 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4342 * c-parser.c: Include memmode.h.
4343 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
4344 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
4345 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
4346 task_reduction clauses.
4347 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
4348 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
4349 section, or lvalue assignment expression.
4350 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
4351 (c_parser_omp_clause_lastprivate): Parse optional
4352 conditional: modifier.
4353 (c_parser_omp_clause_hint): Require constant integer expression rather
4354 than just integer expression.
4355 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
4357 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
4358 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
4359 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
4361 (c_parser_omp_clause_depend): Parse iterator modifier and handle
4362 iterators. Parse mutexinoutset and depobj kinds.
4363 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
4365 (c_parser_omp_all_clauses): Likewise. Handle
4366 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
4367 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4368 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
4369 default memory order from requires directive if any. Adjust
4370 c_finish_omp_atomic caller.
4371 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
4372 (c_parser_omp_flush): Parse flush with memory-order-clause.
4373 (c_parser_omp_for_loop): Allow NE_EXPR even in
4374 OpenMP loops, adjust c_finish_omp_for caller.
4375 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
4376 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
4377 Allow to be called while parsing combined parallel master.
4378 Parse combined master taskloop{, simd}.
4379 (c_parser_omp_parallel): Parse combined
4380 parallel master{, taskloop{, simd}} constructs.
4381 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
4382 (OMP_TASKGROUP_CLAUSE_MASK): Define.
4383 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
4384 (OMP_TASKWAIT_CLAUSE_MASK): Define.
4385 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
4386 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
4387 around teams body. Use SET_EXPR_LOCATION.
4388 (c_parser_omp_target_data): Allow target data
4389 with only use_device_ptr clauses.
4390 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
4391 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
4392 (c_parser_omp_requires): New function.
4393 (c_finish_taskloop_clauses): New function.
4394 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
4395 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
4396 declaration. Disallow in_reduction clause when combined with parallel
4398 (c_parser_omp_construct): Adjust c_parser_omp_master and
4399 c_parser_omp_taskgroup callers.
4400 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
4402 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
4403 like OMP_CLAUSE_REDUCTION.
4404 (handle_omp_array_sections): Likewise. Call save_expr on array
4405 reductions before calling build_index_type. Handle depend clauses
4407 (struct c_find_omp_var_s): New type.
4408 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
4409 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
4410 with static, runtime or auto schedule kinds. Call save_expr for whole
4411 array reduction sizes. Diagnose reductions with zero sized elements
4412 or variable length structures. Diagnose nogroup clause used with
4413 reduction clause(s). Handle depend clause with
4414 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
4415 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
4416 some different type for other kinds. Use build_unary_op with
4417 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
4418 Handle depend clauses with iterators. Remove no longer needed special
4419 case that predetermined const qualified vars may be specified in
4420 firstprivate clause. Complain if const qualified vars are mentioned
4421 in data-sharing clauses other than firstprivate or shared. Use
4422 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
4423 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
4424 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
4425 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
4427 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4429 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
4430 logic for change to name_hint::operator bool.
4431 (undeclared_variable): Likewise.
4432 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4433 (c_parser_parameter_declaration): Likewise.
4435 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4437 * c-errors.c (pedwarn_c11): New function.
4438 * c-parser.c (disable_extension_diagnostics): Save
4439 warn_c11_c2x_compat and set it to 0.
4440 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
4441 (c_parser_static_assert_declaration_no_semi): Handle
4442 _Static_assert without string constant.
4443 * c-tree.h (pedwarn_c11): New prototype.
4445 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4447 * Make-lang.in (selftest-c): New.
4448 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4449 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
4450 from gcc/Makefile.in.
4452 2018-10-02 Richard Biener <rguenther@suse.de>
4454 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
4456 2018-09-26 Joseph Myers <joseph@codesourcery.com>
4459 * c-typeck.c (build_binary_op): Use excess precision for
4460 comparisons of integers and floating-point for C11 and later.
4462 2018-09-26 Martin Jambor <mjambor@suse.cz>
4465 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
4468 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4470 * c-objc-common.c (range_label_for_type_mismatch::get_text):
4471 Update for new param.
4472 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
4475 2018-09-17 Martin Jambor <mjambor@suse.cz>
4478 * c-parser.c: (warn_for_abs): New function.
4479 (c_parser_postfix_expression_after_primary): Call it.
4481 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4483 * c-typeck.c (digest_init): Shorten overlength strings.
4485 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4487 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
4489 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4491 * c-decl.c (finish_decl): Call braced_list_to_string here ...
4492 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
4494 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
4496 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
4497 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
4499 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4502 * c-decl.c (implicitly_declare): Update call to
4503 maybe_add_include_fixit to suggest overriding the location, as it
4505 * c-objc-common.c (c_tree_printer): Update for conversion of
4506 show_caret_p to a tri-state.
4508 2018-08-27 Martin Liska <mliska@suse.cz>
4510 * c-decl.c (locate_old_decl): Use new function
4511 fndecl_built_in_p and remove check for FUNCTION_DECL if
4513 (diagnose_mismatched_decls): Likewise.
4514 (merge_decls): Likewise.
4515 (warn_if_shadowing): Likewise.
4516 (pushdecl): Likewise.
4517 (implicitly_declare): Likewise.
4518 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4519 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
4520 * c-typeck.c (build_function_call_vec): Likewise.
4521 (convert_arguments): Likewise.
4523 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4526 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
4527 (diagnose_mismatched_decls): Likewise, in various places.
4528 (warn_if_shadowing): Likewise.
4529 (implicit_decl_warning): Likewise.
4530 (implicitly_declare): Likewise.
4531 (undeclared_variable): Likewise.
4532 (declare_label): Likewise.
4533 (grokdeclarator): Likewise.
4534 (start_function): Likewise.
4535 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4536 (c_parser_parameter_declaration): Likewise.
4537 (c_parser_binary_expression): Likewise.
4538 * c-typeck.c (c_expr_sizeof_expr): Likewise.
4539 (parser_build_binary_op): Likewise.
4540 (build_unary_op): Likewise.
4541 (error_init): Likewise.
4542 (pedwarn_init): Likewise.
4543 (warning_init): Likewise.
4544 (convert_for_assignment): Likewise.
4546 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4548 * c-objc-common.c: Include "gcc-rich-location.h".
4549 (c_tree_printer): Move implemenation of '%T' to...
4550 (print_type): ...this new function.
4551 (range_label_for_type_mismatch::get_text): New function.
4552 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
4553 range for the various ic_argpass cases.
4554 (class maybe_range_label_for_tree_type_mismatch): New class.
4555 (build_binary_op): Use it when calling binary_op_error.
4557 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4559 * c-decl.c (start_decl): Do not warn if variables is named as main
4560 and is a local variable.
4562 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4565 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
4566 objects of unknown size.
4568 2018-08-13 Martin Sebor <msebor@redhat.com>
4570 PR tree-optimization/71625
4571 * c-parser.c (c_parser_declaration_or_fndef): Call
4572 braced_list_to_string.
4574 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
4577 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
4580 2018-08-01 Martin Sebor <msebor@redhat.com>
4582 PR tree-optimization/86650
4583 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
4584 and TREE_BLOCK (t) from within percent_K_format to this callsite.
4586 2018-08-01 Jakub Jelinek <jakub@redhat.com>
4589 * c-typeck.c (init_field_decl_cmp): New function.
4590 (output_pending_init_elements): Use it for field comparisons
4591 instead of pure bit_position comparisons.
4593 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4595 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
4596 type here, instead add "omp declare target implicit" attribute.
4597 (finish_decl): Diagnose vars without mappable type here.
4599 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4600 Thomas Schwinge <thomas@codesourcery.com>
4601 Cesar Philippidis <cesar@codesourcery.com>
4603 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
4604 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
4605 to their non-present_or_* counterparts. Make 'self' an alias to
4606 PRAGMA_OACC_CLAUSE_HOST.
4607 (c_parser_oacc_data_clause): Update GOMP mappings for
4608 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
4609 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
4610 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
4611 Remove support for present_or_* clauses.
4612 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4613 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
4614 (OACC_DECLARE_CLAUSE_MASK): Likewise.
4615 (OACC_DATA_CLAUSE_MASK): Likewise.
4616 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4617 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
4618 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
4619 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
4620 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
4622 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4624 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
4625 * gimple-parser.c (c_parser_gimple_statement): Likewise.
4626 (c_parser_gimple_unary_expression): Likewise.
4628 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4631 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
4632 before doing POINTER_DIFF_EXPR.
4634 2018-06-07 Marek Polacek <polacek@redhat.com>
4637 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
4638 for loop initial declarations.
4640 2018-05-30 David Pagan <dave.pagan@oracle.com>
4643 * c-decl.c (grokdeclarator): Update check for return type warnings.
4644 (start_function): Likewise.
4645 (finish_function): Likewise.
4646 * c-typeck.c (c_finish_return): Update check for return type warnings.
4647 Pass OPT_Wreturn_type to pedwarn when appropriate.
4649 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
4651 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
4654 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4656 * gimple-parser.c: Include internal-fn.h.
4657 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
4658 (c_parser_gimple_call_internal): New function.
4659 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
4660 Fix typos in comment.
4662 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4665 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
4666 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
4668 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
4669 fold_offsetof_1, pass argtype as TYPE to it and drop the
4672 2018-05-02 David Pagan <dave.pagan@oracle.com>
4675 * c-decl.c (old_style_parameter_scope): New function.
4676 * c-parser.c (c_parser_postfix_expression): Check for statement
4677 expressions in old-style function parameter list declarations.
4678 * c-parser.h (old_style_parameter_scope): New extern declaration.
4680 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4683 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
4684 it is not TREE_STATIC.
4685 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
4686 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
4687 its COMPOUND_LITERAL_EXPR_DECL.
4689 2018-03-21 Joseph Myers <joseph@codesourcery.com>
4691 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4692 where all functions return the same _FloatN or _FloatNx type,
4693 treat integer types as _Float64 instead of double.
4695 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4698 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
4699 building vector comparison, diagnose it and return error_mark_node.
4701 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4704 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
4705 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
4706 INTEGER_TYPE element type.
4708 2018-03-13 David Pagan <dave.pagan@oracle.com>
4711 * c-typeck.c (output_init_element): Ensure field initializer
4712 expression is always evaluated if there are side effects.
4714 2018-03-06 Jakub Jelinek <jakub@redhat.com>
4717 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
4718 !building_stmt_list_p ().
4720 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
4723 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
4724 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
4725 and include the BIND_EXPR in the list of things that need to be
4728 2018-02-09 Nathan Sidwell <nathan@acm.org>
4731 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
4732 to strict_aliasing_warning.
4734 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4736 * c-typeck.c (really_start_incremental_init, push_init_level,
4737 set_nonincremental_init, output_init_element, process_init_element):
4738 Use DECL_UNNAMED_BIT_FIELD.
4740 2018-01-31 Marek Polacek <polacek@redhat.com>
4743 * c-parser.c (c_parser_compound_statement_nostart): Call
4744 expansion_point_location_if_in_system_header.
4746 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4749 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
4752 2018-01-13 Jakub Jelinek <jakub@redhat.com>
4755 * c-tree.h (decl_constant_value_1): Add a bool argument.
4756 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
4757 returning a CONSTRUCTOR if it is true. Use error_operand_p.
4758 (decl_constant_value): Adjust caller.
4759 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
4760 decl_constant_value_1 as IN_INIT. Otherwise, punt if
4761 decl_constant_value returns initializer that has BLKmode or
4763 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
4765 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4766 Alan Hayward <alan.hayward@arm.com>
4767 David Sherwood <david.sherwood@arm.com>
4769 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
4770 TYPE_VECTOR_SUBPARTS.
4772 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4774 Update copyright years.
4776 2018-01-01 Jakub Jelinek <jakub@redhat.com>
4779 * c-parser.c (c_parser_braced_init, c_parser_initelt,
4780 c_parser_conditional_expression, c_parser_cast_expression,
4781 c_parser_sizeof_expression, c_parser_alignof_expression,
4782 c_parser_postfix_expression, c_parser_omp_declare_reduction,
4783 c_parser_transaction_expression): Use set_error () method instead
4784 of setting value member to error_mark_node.
4786 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
4788 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4789 and _Float<N>X built-in functions.
4791 2017-12-22 Jakub Jelinek <jakub@redhat.com>
4794 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
4795 TYPE_STUB_DECL and call rest_of_type_compilation before processing
4796 incomplete vars rather than after it.
4799 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4800 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4801 and consider empty ones if there are no other stmts. For
4802 -Wunused-value walk all statements before the one only followed by
4805 2017-12-22 Mike Stump <mikestump@comcast.net>
4806 Eric Botcazou <ebotcazou@adacore.com>
4808 * c-parser.c (c_parser_while_statement): Add unroll parameter and
4809 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
4810 (c_parser_do_statement): Likewise.
4811 (c_parser_for_statement): Likewise.
4812 (c_parser_statement_after_labels): Adjust calls to above.
4813 (c_parse_pragma_ivdep): New static function.
4814 (c_parser_pragma_unroll): Likewise.
4815 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4816 <PRAGMA_UNROLL>: New case.
4818 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4820 * c-typeck.c (comptypes_internal, function_types_compatible_p,
4821 perform_integral_promotions, digest_init): Replace Yoda conditions
4822 with typical order conditions.
4823 * c-decl.c (check_bitfield_type_and_width): Likewise.
4825 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4827 * c-typeck.c (c_safe_arg_type_equiv_p,
4828 c_safe_function_type_cast_p): New function.
4829 (build_c_cast): Implement -Wcast-function-type.
4831 2017-12-14 Richard Biener <rguenther@suse.de>
4834 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4835 like REALPART_EXPR for the behavior of whether its operand
4838 2017-12-12 Marek Polacek <polacek@redhat.com>
4841 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4843 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4845 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4846 * c-parser.c (add_debug_begin_stmt): New.
4847 (c_parser_declaration_or_fndef): Call it.
4848 (c_parser_compound_statement_nostart): Likewise.
4849 (c_parser_statement_after_labels): Likewise.
4850 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4852 2017-12-07 Joseph Myers <joseph@codesourcery.com>
4854 * c-decl.c (build_compound_literal): Add parameter alignas_align
4855 and set alignment of decl if nonzero.
4856 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4857 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4859 (c_parser_struct_declaration): Update syntax comment.
4860 (c_parser_type_name): Add alignas_ok argument and pass it to
4862 (c_parser_cast_expression): Pass true to c_parser_type_name and
4863 give error if a cast used an _Alignas specifier.
4864 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4865 give error if sizeof (type-name) used an _Alignas specifier.
4866 (c_parser_alignof_expression): Pass true to c_parser_type_name and
4867 give error if _Alignof (type-name) used an _Alignas specifier.
4868 (c_parser_postfix_expression_after_paren_type): Check specified
4869 alignment for a compound literal and pass it to
4870 build_compound_literal.
4871 * c-parser.h (c_parser_type_name): Update prototype.
4872 * c-tree.h (build_compound_literal): Update prototype.
4874 2017-12-07 Martin Sebor <msebor@redhat.com>
4877 * c-decl.c (c_decl_attributes): Look up existing declaration and
4878 pass it to decl_attributes.
4880 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4883 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4884 reserved for use by the implementation.
4886 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4888 * c-decl.c: Include "c-family/c-spellcheck.h".
4890 2017-12-05 Martin Liska <mliska@suse.cz>
4891 Jakub Jelinek <jakub@redhat.com>
4893 * c-typeck.c (pointer_diff): Add new argument and instrument
4894 pointer subtraction.
4895 (build_binary_op): Similar for pointer comparison.
4897 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4900 * c-parser.c: Include tree-iterator.h.
4901 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4902 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4906 * c-tree.h (decl_constant_value_1): Declare.
4907 * c-typeck.c (decl_constant_value_1): New function.
4908 (decl_constant_value): Use it.
4909 * c-fold.c (c_fully_fold_internal): If in_init, use
4910 decl_constant_value_1 instead of decl_constant_value.
4912 2017-11-30 Jakub Jelinek <jakub@redhat.com>
4914 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4916 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4919 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4920 c_switch_covers_all_cases_p returns true.
4922 2017-11-28 Julia Koval <julia.koval@intel.com>
4923 Sebastian Peryt <sebastian.peryt@intel.com>
4925 * Make-lang.in (c/c-array-notation.o): Remove.
4926 * c-array-notation.c: Delete.
4927 * c-decl.c: Remove cilkplus condition.
4928 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4929 c_parser_cilk_verify_simd, c_parser_array_notation,
4930 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4931 c_parser_cilk_simd_fn_vector_attrs,
4932 c_finish_cilk_simd_fn_tokens): Delete.
4933 (c_parser_declaration_or_fndef): Remove cilkplus condition.
4934 (c_parser_direct_declarator_inner): Ditto.
4935 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4936 (c_parser_attributes, c_parser_compound_statement,
4937 c_parser_statement_after_labels, c_parser_if_statement,
4938 c_parser_switch_statement, c_parser_while_statement,
4939 c_parser_do_statement, c_parser_for_statement,
4940 c_parser_unary_expression, c_parser_postfix_expression,
4941 c_parser_postfix_expression_after_primary,
4942 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4943 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4945 * c-typeck.c (build_array_ref, build_function_call_vec,
4947 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4948 c_finish_loop, build_binary_op): Remove cilkplus support.
4950 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4952 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4955 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
4957 * Make-lang.in (c.install-plugin): Install backend import library.
4959 2017-11-23 Jakub Jelinek <jakub@redhat.com>
4961 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4962 pragma_stmt context.
4964 2017-11-23 Mike Stump <mikestump@comcast.net>
4965 Eric Botcazou <ebotcazou@adacore.com>
4967 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4969 (c_parser_do_statement): Likewise.
4970 (c_parser_for_statement): Likewise.
4972 2017-11-22 David Malcolm <dmalcolm@redhat.com>
4975 * c-objc-common.c (c_tree_printer): Convert penultimate param from
4976 bool to bool *. Within '%T' handling, if showing an "aka", use
4977 "quoted" param to add appropriate quoting.
4979 2017-11-22 Marek Polacek <polacek@redhat.com>
4984 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4986 2017-11-21 David Malcolm <dmalcolm@redhat.com>
4989 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4990 earlier failed lookups.
4992 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
4994 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4995 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4997 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5000 * c-decl.c: Include "c-family/known-headers.h".
5001 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
5002 to known-headers.cc.
5003 (class suggest_missing_header): Move to known-header.h.
5004 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
5005 than get_c_name_hint.
5007 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5009 * c-decl.c (get_c_name_hint): New function.
5010 (class suggest_missing_header): New class.
5011 (lookup_name_fuzzy): Call get_c_name_hint and use it to
5012 suggest missing headers to the user.
5014 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5016 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
5017 Include "c-family/name-hint.h"
5018 (implicit_decl_warning): Convert "hint" from
5019 const char * to name_hint. Pass location to
5020 lookup_name_fuzzy. Suppress any deferred diagnostic if the
5021 warning was not printed.
5022 (undeclared_variable): Likewise for "guessed_id".
5023 (lookup_name_fuzzy): Convert return type from const char *
5024 to name_hint. Add location_t param.
5025 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
5026 Include "c-family/name-hint.h"
5027 (c_parser_declaration_or_fndef): Convert "hint" from
5028 const char * to name_hint. Pass location to lookup_name_fuzzy.
5029 (c_parser_parameter_declaration): Likewise.
5031 2017-11-19 Jakub Jelinek <jakub@redhat.com>
5035 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
5037 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
5038 handle_omp_array_sections): Likewise.
5039 (digest_init): Don't call decl_constant_value_for_optimization.
5040 * c-tree.h (decl_constant_value_for_optimization): Removed.
5041 * c-fold.c (c_fold_array_ref): New function.
5042 (c_fully_fold_internal): Add LVAL argument, propagate it through
5043 recursive calls. For VAR_P call decl_constant_value and
5044 unshare if not LVAL and either optimizing or IN_INIT. Remove
5045 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
5046 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
5047 (c_fully_fold): Add LVAL argument, pass it through to
5048 c_fully_fold_internal.
5049 (decl_constant_value_for_optimization): Removed.
5051 2017-11-15 Joseph Myers <joseph@codesourcery.com>
5054 * c-parser.c (check_tgmath_function): New function.
5055 (enum tgmath_parm_kind): New enum.
5056 (c_parser_postfix_expression): Handle __builtin_tgmath.
5058 2017-10-31 David Malcolm <dmalcolm@redhat.com>
5060 * c-decl.c (implicit_decl_warning): Update for renaming of
5061 pedwarn_at_rich_loc and warning_at_rich_loc.
5062 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
5063 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
5064 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
5065 (c_parser_struct_or_union_specifier): Likewise for renaming of
5066 pedwarn_at_rich_loc.
5067 (c_parser_parameter_declaration): Likewise for renaming of
5069 * c-typeck.c (build_component_ref): Likewise.
5070 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
5071 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
5072 (set_init_label): Likewise for renaming of error_at_rich_loc.
5074 2017-10-30 Richard Biener <rguenther@suse.de>
5076 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
5079 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5081 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
5082 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
5084 2017-10-25 David Malcolm <dmalcolm@redhat.com>
5087 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
5090 2017-10-25 Jakub Jelinek <jakub@redhat.com>
5093 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
5094 newdecl to corresponding __builtin_ if any.
5096 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
5099 * c-decl.c (diagnose_mismatched_decls): Use
5100 OPT_Wbuiltin_declaration_mismatch.
5102 2017-10-12 David Malcolm <dmalcolm@redhat.com>
5104 * c-parser.c (c_parser_require): Add "type_is_unique" param and
5105 use it to guard calls to maybe_suggest_missing_token_insertion.
5106 (c_parser_parms_list_declarator): Override default value of new
5107 "type_is_unique" param to c_parser_require.
5108 (c_parser_asm_statement): Likewise.
5109 * c-parser.h (c_parser_require): Add "type_is_unique" param,
5112 2017-10-11 Nathan Sidwell <nathan@acm.org>
5114 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
5116 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5118 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
5119 operating on trees as wide_ints.
5120 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
5121 (c_tree_equal): Likewise.
5123 2017-10-04 David Malcolm <dmalcolm@redhat.com>
5125 * c-decl.c (push_parm_decl): Store c_parm's location into the
5127 (build_c_parm): Add "loc" param and store it within the c_parm.
5128 * c-parser.c (struct c_parser): Add "last_token_location" field.
5129 (c_parser_consume_token): Store location of the token into the
5131 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
5132 when handling a FUNCTION_DECL, if it doesn't already have them.
5133 (c_parser_parameter_declaration): Generate a location for the
5134 parameter, and pass it to the call to build_c_parm.
5135 * c-tree.h (struct c_parm): Add field "loc".
5136 (build_c_parm): Add location_t param.
5137 * c-typeck.c (get_fndecl_argument_location): New function.
5138 (inform_for_arg): New function.
5139 (convert_for_assignment): Use inform_for_arg when dealing with
5142 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5144 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
5146 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
5147 don't SET_DECL_C_BIT_FIELD here.
5150 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
5151 instead of trying to set just TREE_READONLY manually.
5153 2017-09-16 Tom de Vries <tom@codesourcery.com>
5156 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
5159 2017-09-15 Joseph Myers <joseph@codesourcery.com>
5162 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
5164 (build_conditional_expr): For C11, generate result with excess
5165 precision when one argument is an integer and the other is of a
5166 type using excess precision.
5168 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5170 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
5172 2017-09-13 Marek Polacek <polacek@redhat.com>
5175 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
5176 than expr.original_type.
5178 2017-09-12 Nathan Sidwell <nathan@acm.org>
5180 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5181 resort_sorted_fields): Moved from c-family/c-common.c.
5182 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
5184 2017-09-01 Joseph Myers <joseph@codesourcery.com>
5187 * c-typeck.c (build_atomic_assign): Handle argument with excess
5188 precision. Ensure any EXCESS_PRECISION_EXPR is present in
5189 argument passed to build_binary_op and convert_for_assignment but
5190 not for call to c_fully_fold.
5191 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
5192 Ensure build_binary_op is called with argument with original
5193 semantic type. Avoid calling c_fully_fold with an
5194 EXCESS_PRECISION_EXPR from build_binary_op.
5196 2017-09-01 Jakub Jelinek <jakub@redhat.com>
5199 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
5201 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5202 Alan Hayward <alan.hayward@arm.com>
5203 David Sherwood <david.sherwood@arm.com>
5205 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
5206 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
5207 m1 and m2 to the signed equivalent of a fixed-point
5210 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5212 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
5213 than CAN_HAVE_LOCATION_P when determining whether to use the
5214 location_t value within "value".
5216 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5218 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
5219 rather than peeking the location of the first token.
5220 * c-tree.h (c_expr::get_location): New method.
5222 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5224 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
5225 to check_function_arguments.
5227 2017-08-18 Marek Polacek <polacek@redhat.com>
5229 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
5232 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5235 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
5236 (check_bitfield_type_and_width): Don't allow bit-field with
5237 warn_if_not_aligned type.
5239 2017-08-14 Martin Sebor <msebor@redhat.com>
5242 * c-objc-common.c (c_objc_common_init): Handle 'G'.
5244 2017-08-11 Marek Polacek <polacek@redhat.com>
5247 * c-decl.c (pushtag): Only print inform if the warning was printed.
5248 (grokdeclarator): Likewise.
5250 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5252 * c-parser.c (c_parser_error): Rename to...
5253 (c_parser_error_richloc): ...this, making static, and adding
5254 "richloc" parameter, passing it to the c_parse_error call,
5255 rather than calling c_parser_set_source_position_from_token.
5256 (c_parser_error): Reintroduce, reimplementing in terms of the
5257 above, converting return type from void to bool.
5258 (class token_pair): New class.
5259 (struct matching_paren_traits): New struct.
5260 (matching_parens): New typedef.
5261 (struct matching_brace_traits): New struct.
5262 (matching_braces): New typedef.
5263 (get_matching_symbol): New function.
5264 (c_parser_require): Add param MATCHING_LOCATION, using it to
5265 highlight matching "opening" tokens for missing "closing" tokens.
5266 (c_parser_skip_until_found): Likewise.
5267 (c_parser_static_assert_declaration_no_semi): Convert explicit
5268 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
5269 class matching_parens, so that the pertinent open parenthesis is
5270 highlighted when there are problems locating the close
5272 (c_parser_struct_or_union_specifier): Likewise.
5273 (c_parser_typeof_specifier): Likewise.
5274 (c_parser_alignas_specifier): Likewise.
5275 (c_parser_simple_asm_expr): Likewise.
5276 (c_parser_braced_init): Likewise, for matching_braces.
5277 (c_parser_paren_condition): Likewise, for matching_parens.
5278 (c_parser_switch_statement): Likewise.
5279 (c_parser_for_statement): Likewise.
5280 (c_parser_asm_statement): Likewise.
5281 (c_parser_asm_operands): Likewise.
5282 (c_parser_cast_expression): Likewise.
5283 (c_parser_sizeof_expression): Likewise.
5284 (c_parser_alignof_expression): Likewise.
5285 (c_parser_generic_selection): Likewise.
5286 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
5287 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
5288 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
5289 In case CPP_OPEN_PAREN, pass loc_open_paren to the
5290 c_parser_skip_until_found call.
5291 (c_parser_objc_class_definition): Use class matching_parens as
5293 (c_parser_objc_method_decl): Likewise.
5294 (c_parser_objc_try_catch_finally_statement): Likewise.
5295 (c_parser_objc_synchronized_statement): Likewise.
5296 (c_parser_objc_at_property_declaration): Likewise.
5297 (c_parser_oacc_wait_list): Likewise.
5298 (c_parser_omp_var_list_parens): Likewise.
5299 (c_parser_omp_clause_collapse): Likewise.
5300 (c_parser_omp_clause_default): Likewise.
5301 (c_parser_omp_clause_if): Likewise.
5302 (c_parser_omp_clause_num_threads): Likewise.
5303 (c_parser_omp_clause_num_tasks): Likewise.
5304 (c_parser_omp_clause_grainsize): Likewise.
5305 (c_parser_omp_clause_priority): Likewise.
5306 (c_parser_omp_clause_hint): Likewise.
5307 (c_parser_omp_clause_defaultmap): Likewise.
5308 (c_parser_oacc_single_int_clause): Likewise.
5309 (c_parser_omp_clause_ordered): Likewise.
5310 (c_parser_omp_clause_reduction): Likewise.
5311 (c_parser_omp_clause_schedule): Likewise.
5312 (c_parser_omp_clause_num_teams): Likewise.
5313 (c_parser_omp_clause_thread_limit): Likewise.
5314 (c_parser_omp_clause_aligned): Likewise.
5315 (c_parser_omp_clause_linear): Likewise.
5316 (c_parser_omp_clause_safelen): Likewise.
5317 (c_parser_omp_clause_simdlen): Likewise.
5318 (c_parser_omp_clause_depend): Likewise.
5319 (c_parser_omp_clause_map): Likewise.
5320 (c_parser_omp_clause_device): Likewise.
5321 (c_parser_omp_clause_dist_schedule): Likewise.
5322 (c_parser_omp_clause_proc_bind): Likewise.
5323 (c_parser_omp_clause_uniform): Likewise.
5324 (c_parser_omp_for_loop): Likewise.
5325 (c_parser_cilk_clause_vectorlength): Likewise.
5326 (c_parser_cilk_clause_linear): Likewise.
5327 (c_parser_transaction_expression): Likewise.
5328 * c-parser.h (c_parser_require): Add param matching_location with
5329 default UNKNOWN_LOCATION.
5330 (c_parser_error): Convert return type from void to bool.
5331 (c_parser_skip_until_found): Add param matching_location with
5332 default UNKNOWN_LOCATION.
5334 2017-08-09 Marek Polacek <polacek@redhat.com>
5336 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
5337 * c-tree.h (build_external_ref): Update declaration.
5338 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
5339 (build_external_ref): Change the type of a parameter to bool.
5340 (parser_build_binary_op): Use true/false instead of 1/0.
5341 (pointer_diff): Likewise.
5342 (build_modify_expr): Likewise.
5343 (set_designator): Change the type of a parameter to bool.
5344 (set_init_index): Use true/false instead of 1/0.
5345 (set_init_label): Likewise.
5346 (output_init_element): Change the type of a parameter to bool.
5347 (output_pending_init_elements): Use true/false instead of 1/0.
5348 (process_init_element): Likewise.
5349 (build_binary_op): Change the type of a parameter to bool.
5351 2017-08-09 Marek Polacek <polacek@redhat.com>
5354 * c-typeck.c (pedwarn_init): Make the function take a variable list.
5355 Call emit_diagnostic_valist instead of pedwarn.
5356 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
5357 Print the relevant types in diagnostics.
5359 2017-08-09 Marek Polacek <polacek@redhat.com>
5362 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
5363 build_conditional_expr.
5364 * c-parser.c (c_parser_conditional_expression): Create locations for
5365 EXP1 and EXP2 from their source ranges. Pass the locations down to
5366 build_conditional_expr.
5367 * c-tree.h (build_conditional_expr): Update declaration.
5368 * c-typeck.c (build_conditional_expr): Add location_t parameters.
5369 For -Wsign-compare, also print the types.
5371 2017-08-08 Martin Liska <mliska@suse.cz>
5373 * c-convert.c: Include header files.
5374 * c-typeck.c: Likewise.
5376 2017-08-07 Martin Liska <mliska@suse.cz>
5378 * c-parser.c (c_parser_attributes): Canonicalize name of an
5381 2017-08-02 Marek Polacek <polacek@redhat.com>
5384 * c-parser.c (c_parser_unary_expression): Use set_error.
5388 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
5389 warnings. Avoid walking MACRO_MAP_LOCATIONS.
5391 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
5392 Martin Liska <mliska@suse.cz>
5394 * c-typeck.c (c_finish_goto_label): Build gimple predict
5397 2017-07-31 Martin Liska <mliska@suse.cz>
5400 * c-convert.c (convert): Guard condition with flag_sanitize_p
5401 also with current_function_decl non-null equality.
5402 * c-decl.c (grokdeclarator): Likewise.
5403 * c-typeck.c (build_binary_op): Likewise.
5405 2017-07-25 Marek Polacek <polacek@redhat.com>
5407 * c-decl.c (grokfield): Remove local variable.
5409 2017-07-25 Marek Polacek <polacek@redhat.com>
5412 * c-parser.c (c_parser_else_body): Don't warn about multistatement
5413 macro expansion if the body is in { }.
5414 (c_parser_while_statement): Likewise.
5415 (c_parser_for_statement): Likewise.
5417 2017-07-18 Nathan Sidwell <nathan@acm.org>
5419 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
5421 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5423 * c-decl.c (implicitly_declare): When suggesting a missing
5424 #include, provide a fix-it hint.
5426 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5428 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
5429 and call that instead.
5430 * c-tree.h (selftest::run_c_tests): New decl.
5432 2017-06-26 Marek Polacek <polacek@redhat.com>
5435 * c-parser.c (c_parser_if_body): Set the location of the
5436 body of the conditional after parsing all the labels. Call
5437 warn_for_multistatement_macros.
5438 (c_parser_else_body): Likewise.
5439 (c_parser_switch_statement): Likewise.
5440 (c_parser_while_statement): Likewise.
5441 (c_parser_for_statement): Likewise.
5442 (c_parser_statement): Add a default argument. Save the location
5443 after labels have been parsed.
5444 (c_parser_c99_block_statement): Likewise.
5446 2017-06-19 Richard Biener <rguenther@suse.de>
5448 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5449 negated _Literals to parse _Literal (int) -1.
5451 2017-06-13 Martin Liska <mliska@suse.cz>
5454 * c-convert.c (convert): Use sanitize_flags_p.
5455 * c-decl.c (grokdeclarator): Likewise.
5456 * c-typeck.c (convert_for_assignment): Likewise.
5457 (c_finish_return): Likewise.
5458 (build_binary_op): Likewise.
5460 2017-06-08 Jakub Jelinek <jakub@redhat.com>
5463 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
5464 to sizetype before size_binop.
5466 2017-06-07 Jakub Jelinek <jakub@redhat.com>
5468 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
5471 2017-06-06 Marek Polacek <polacek@redhat.com>
5474 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
5476 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
5478 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5480 * c-parser.c (c_parser_binary_expression): Implement the
5481 -Wsizeof_pointer_div warning.
5482 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
5483 from a parenthesized expression.
5484 (c_parser_expr_list): Use c_last_sizeof_loc.
5485 * c-tree.h (c_last_sizeof_loc): New external.
5486 * c-typeck.c (c_last_sizeof_loc): New variable.
5487 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
5489 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
5492 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
5494 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5496 * c-objc-common.c (c_tree_printer): Gain bool and const char **
5499 2017-05-24 Martin Sebor <msebor@redhat.com>
5502 * c-fold.c (c_fully_fold_internal): Adjust.
5503 * c-typeck.c (parser_build_unary_op): Adjust.
5505 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
5507 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
5508 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
5511 2017-05-23 Marek Polacek <polacek@redhat.com>
5513 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
5516 2017-05-22 Jakub Jelinek <jakub@redhat.com>
5518 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
5519 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
5520 it returned invariant. Call tree_invariant_p unconditionally
5521 afterwards to decide whether to return expr or op0.
5523 2017-05-22 Nathan Sidwell <nathan@acm.org>
5525 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
5527 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
5529 * c-parser.c (c_parser_omp_clause_default): Handle
5530 "OMP_CLAUSE_DEFAULT_PRESENT".
5532 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5534 * config-lang.in (gtfiles): Add c-family/c-format.c.
5536 2017-05-18 Nathan Sidwell <nathan@acm.org>
5538 * c-decl.c (pushdecl_top_level): Delete unused function.
5540 2017-05-18 Marek Polacek <polacek@redhat.com>
5542 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
5543 (check_earlier_gotos): Likewise.
5544 (define_label): Likewise.
5545 (pending_xref_error): Likewise.
5546 (smallest_type_quals_location): Likewise.
5547 (grokdeclarator): Likewise.
5548 (grokparms): Likewise.
5549 (identifier_global_value): Likewise.
5550 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
5551 (find_init_member): Likewise.
5553 2017-05-18 Marek Polacek <polacek@redhat.com>
5555 * c-decl.c (start_decl): Use false/true instead of 0/1.
5556 (grokdeclarator): Likewise.
5557 (finish_struct): Likewise.
5558 (start_function): Change the return type to bool. Use false/true
5560 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
5561 * c-tree.h (start_function): Update.
5562 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
5563 (set_designator): Change the return type to bool. Use false/true
5566 2017-05-17 Marek Polacek <polacek@redhat.com>
5568 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
5569 * c-typeck.c: Likewise.
5571 2017-05-17 Marek Polacek <polacek@redhat.com>
5574 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
5575 DECL_IGNORED_P even for non-static compound literals.
5577 2017-05-17 Martin Liska <mliska@suse.cz>
5579 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
5580 use it instead of int type.
5582 2017-05-17 Marek Polacek <polacek@redhat.com>
5584 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
5586 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
5587 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
5588 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
5589 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
5591 (c_parser_conditional_expression): Likewise.
5592 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
5593 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
5594 (process_init_element): Likewise.
5595 (build_binary_op): Likewise.
5596 (handle_omp_array_sections_1): Likewise.
5598 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
5600 * c-parser.c (c_parser_omp_clause_num_gangs)
5601 (c_parser_omp_clause_num_workers)
5602 (c_parser_omp_clause_vector_length): Merge functions into...
5603 (c_parser_oacc_single_int_clause): ... this new function. Adjust
5606 2017-05-11 Nathan Sidwell <nathan@acm.org>
5608 * gimple-parser.c: Don't #include tree-dump.h.
5610 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5613 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
5615 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5618 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5619 incorrect __MEM syntax.
5621 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5624 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
5627 2017-05-09 Nathan Sidwell <nathan@acm.org>
5629 * c-tree.h (pushdecl): Declare.
5631 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5633 * c-decl.c (warn_defaults_to): Replace report_diagnostic
5634 with diagnostic_report_diagnostic.
5635 * c-errors.c (pedwarn_c99): Likewise.
5636 (pedwarn_c90): Likewise.
5638 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5641 * c-gimplify.c (c_gimplify_expr): Remove calls to
5642 cilk_gimplifY_call_params_in_spawned_fn.
5644 2017-04-25 David Malcolm <dmalcolm@redhat.com>
5646 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
5647 hint for removing extra semicolon.
5649 2017-04-21 Jakub Jelinek <jakub@redhat.com>
5652 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
5653 enabled, set specs->type to integer_type_node.
5655 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5657 * c-array-notation.c: Fix typo in comment.
5659 2017-03-29 Marek Polacek <polacek@redhat.com>
5662 * c-decl.c (finish_decl): Check VAR_P.
5664 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5667 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
5668 * c-typeck.c (c_mark_addressable): Likewise. Look through
5669 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
5671 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
5673 2017-03-23 Marek Polacek <polacek@redhat.com>
5675 * c-tree.h: Remove a C_RID_YYCODE reference.
5677 2017-03-21 Jakub Jelinek <jakub@redhat.com>
5680 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
5681 optional COMPOUND_EXPR with ubsan instrumentation.
5683 2017-03-17 Marek Polacek <polacek@redhat.com>
5685 * c-parser.c: Add C11 references.
5687 2017-03-15 Marek Polacek <polacek@redhat.com>
5689 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
5691 2017-03-11 Marek Polacek <polacek@redhat.com>
5693 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
5695 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5697 PR translation/79848
5698 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5700 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
5702 2017-03-09 Marek Polacek <polacek@redhat.com>
5705 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5706 parameter declarations with initializers.
5708 2017-03-09 Jakub Jelinek <jakub@redhat.com>
5711 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
5714 2017-03-07 Jakub Jelinek <jakub@redhat.com>
5717 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
5718 for "may only be used in compound statements" diagnostics, change it
5719 such that the same translatable string is used for all pragmas. For
5720 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
5722 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
5723 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
5724 "may only be used in compound statements" diagnostics, such that the
5725 same translatable string is used for all pragmas.
5727 2017-03-04 Marek Polacek <polacek@redhat.com>
5730 * c-decl.c (implicit_decl_warning): Add missing space.
5732 2017-03-03 Marek Polacek <polacek@redhat.com>
5735 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
5736 current_function_prototype_arg_types is error_mark_node. Fix
5737 formatting. Use TREE_VALUE instead of TREE_TYPE.
5739 2017-03-03 Jakub Jelinek <jakub@redhat.com>
5742 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
5743 %<min%> or %<max%> in the diagnostics, instead mention identifier.
5744 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
5748 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
5749 instead of %<_Generic>.
5750 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
5751 (c_parser_omp_target_exit_data): Use %<release%> instead of
5754 2017-02-28 Jakub Jelinek <jakub@redhat.com>
5756 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
5757 instead of just cond ? "..." : "...".
5758 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
5759 for "enter"/"exit" keyword.
5760 (c_finish_oacc_routine): Don't use %s to supply portions of the
5763 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5766 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
5767 handle -Wrestrict here.
5768 * c-typeck.c (build_function_call_vec): Adjust
5769 check_function_arguments caller.
5771 2017-02-23 Richard Biener <rguenther@suse.de>
5774 * gimple-parser.c (c_parser_gimple_statement): Use set_error
5775 to initialize c_exprs to return.
5776 (c_parser_gimple_binary_expression): Likewise.
5777 (c_parser_gimple_unary_expression): Likewise.
5778 (c_parser_gimple_postfix_expression): Likewise.
5780 2017-02-22 Marek Polacek <polacek@redhat.com>
5783 * c-typeck.c (convert_arguments): Handle error_mark_node.
5785 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5787 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
5788 value of c_parser_parse_ssa_name against error_mark_node and emit
5789 error if ssa name is anonymous and written as default definition.
5791 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5793 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5796 2017-02-16 Jakub Jelinek <jakub@redhat.com>
5799 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5800 ignore #pragma omp target even when not followed by identifier.
5802 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5804 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5805 (c_parser_gimple_unary_expression): Likewise.
5807 2017-02-13 Jakub Jelinek <jakub@redhat.com>
5809 * c-parser.c (c_parser_oacc_declare): Add missing space in
5812 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5815 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5816 set_c_expr_source_range when parsing ssa-name.
5818 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
5819 Richard Biener <rguenther@suse.de>
5821 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5822 building IL when arguments are error_mark_node.
5823 (c_parser_gimple_unary_expression): Likewise.
5824 (c_parser_gimple_if_stmt): Likewise.
5825 (c_parser_gimple_switch_stmt): Likewise.
5826 (c_parser_gimple_return_stmt): Likewise.
5827 (c_parser_parse_ssa_name): When name lookup fails do not build
5828 an SSA name. Use undeclared rather than not declared in error
5831 2017-02-09 Marek Polacek <polacek@redhat.com>
5834 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5835 instead of c_parser_skip_until_found.
5837 2017-02-09 Jakub Jelinek <jakub@redhat.com>
5840 * c-parser.c (c_parser_omp_declare_target): Don't invoke
5841 symtab_node::get on automatic variables.
5843 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
5844 Chung-Lin Tang <cltang@codesourcery.com>
5846 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5847 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5849 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5851 2017-02-07 Richard Biener <rguenther@suse.de>
5853 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5854 (c_parser_gimple_postfix_expression_after_primary):
5855 Do not use c_build_function_call_vec to avoid folding and promotion.
5858 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5861 * c-decl.c (pop_scope): Pass main_input_filename to
5862 build_translation_unit_decl.
5864 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5866 * c-parser.c: Include "read-rtl-function.h" and
5868 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5869 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
5870 production. Update for renaming of field "gimple_pass" to
5871 "gimple_or_rtl_pass". If __RTL was seen, call
5872 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
5873 to an auto_timevar, to cope with early exit.
5874 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5875 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5876 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5878 (c_parser_parse_rtl_body): New function.
5879 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5880 (struct c_declspecs): Rename field "gimple_pass" to
5881 "gimple_or_rtl_pass". Add field "rtl_p".
5882 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5883 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5884 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5885 (c_parser_gimple_or_rtl_pass_list): ...this.
5887 2017-01-20 Marek Polacek <polacek@redhat.com>
5890 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5892 2017-01-13 Richard Biener <rguenther@suse.de>
5894 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5897 2017-01-13 Richard Biener <rguenther@suse.de>
5899 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5900 _Literal ( type-name ) number.
5902 2017-01-12 Richard Biener <rguenther@suse.de>
5904 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5907 2017-01-11 Jakub Jelinek <jakub@redhat.com>
5910 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5913 2017-01-11 Richard Biener <rguenther@suse.de>
5916 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5917 returns on parse errors.
5919 2017-01-04 Marek Polacek <polacek@redhat.com>
5922 * c-parser.c (c_parser_postfix_expression): Mark zero character
5923 constants by setting original_type in c_expr.
5924 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5925 with a zero character constant.
5926 (char_type_p): New function.
5928 2017-01-04 David Malcolm <dmalcolm@redhat.com>
5930 * c-parser.c (c_parser_declaration_or_fndef): Create a
5931 rich_location at init_loc and parse it to start_init.
5932 (last_init_list_comma): New global.
5933 (c_parser_braced_init): Update last_init_list_comma when parsing
5934 commas. Pass it to pop_init_level. Pass location of closing
5935 brace to pop_init_level.
5936 (c_parser_postfix_expression_after_paren_type): Create a
5937 rich_location at type_loc and parse it to start_init.
5938 (c_parser_omp_declare_reduction): Likewise for loc.
5939 * c-tree.h (start_init): Add rich_location * param.
5940 (pop_init_level): Add location_t param.
5941 * c-typeck.c (struct initializer_stack): Add field
5942 "missing_brace_richloc".
5943 (start_init): Add richloc param, use it to initialize
5944 the stack node's missing_brace_richloc.
5945 (last_init_list_comma): New decl.
5946 (finish_implicit_inits): Pass last_init_list_comma to
5948 (push_init_level): When finding missing open braces, add fix-it
5949 hints to the richloc.
5950 (pop_init_level): Add "insert_before" param and pass it
5951 when calling pop_init_level. Add fixits about missing
5952 close braces to any richloc. Use the richloc for the
5953 -Wmissing-braces warning.
5954 (set_designator): Pass last_init_list_comma to pop_init_level.
5955 (process_init_element): Likewise.
5957 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5959 Update copyright years.
5961 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5964 * c-typeck.c (build_function_call_vec): If check_function_arguments
5965 returns true, set TREE_NO_WARNING on CALL_EXPR.
5968 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5969 to *expr instead of overwriting it.
5971 2016-12-20 Richard Biener <rguenther@suse.de>
5973 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5975 (c_parser_gimple_statement): Only build assigns for non-error
5977 (c_parser_gimple_postfix_expression_after): Improve error recovery.
5979 2016-12-14 Martin Jambor <mjambor@suse.cz>
5981 * c-parser.c: Include omp-general.h and omp-offload.h instead of
5983 (c_finish_oacc_routine): Adjusted call to
5984 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5985 to use their new names.
5986 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5988 (c_parser_oacc_update): Likewise.
5989 (c_parser_omp_simd): Likewise.
5990 (c_parser_omp_target_update): Likewise.
5991 * c-typeck.c: Include omp-general.h instead of omp-low.h.
5992 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5994 (c_finish_omp_cancellation_point): Likewise.
5995 * gimple-parser.c: Do not include omp-low.h
5997 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
5998 James Norris <jnorris@codesourcery.com>
6000 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
6001 EXIT_DATA,WAIT} are not used in compound statements.
6002 (c_parser_oacc_enter_exit_data): Update diagnostics.
6004 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6007 * c-decl.c (diagnose_mismatched_decls): Use
6008 OPT_Wbuiltin_declaration_mismatch here too.
6010 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
6011 Alan Hayward <alan.hayward@arm.com>
6012 David Sherwood <david.sherwood@arm.com>
6014 * c-decl.c (merge_decls): Use SET_DECL_MODE.
6015 (make_label, finish_struct): Likewise.
6017 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
6018 Richard Biener <rguenther@suse.de>
6020 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
6021 * config-lang.in (gtfiles): Add c/c-parser.h.
6022 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
6023 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
6024 * c-parser.c (enum c_id_kind, struct c_token,
6025 c_parser_next_token_is, c_parser_next_token_is_not,
6026 c_parser_next_token_is_keyword,
6027 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
6029 * c-parser.h: ... new header.
6030 * c-parser.c: Include c-parser.h and gimple-parser.h.
6031 (c_parser_peek_token, c_parser_peek_2nd_token,
6032 c_token_starts_typename, c_parser_next_token_starts_declspecs,
6033 c_parser_next_tokens_start_declaration, c_parser_consume_token,
6034 c_parser_error, c_parser_require, c_parser_skip_until_found,
6035 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
6036 c_parser_type_name): Export.
6037 (c_parser_tokens_buf): New function.
6038 (c_parser_error): Likewise.
6039 (c_parser_set_error): Likewise.
6040 (c_parser_declspecs): Handle RID_GIMPLE.
6041 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
6042 via c_parser_parse_gimple_body.
6043 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
6044 c_token_starts_typename, c_parser_next_token_starts_declspecs,
6045 c_parser_next_tokens_start_declaration, c_parser_consume_token,
6046 c_parser_error, c_parser_require, c_parser_skip_until_found,
6047 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
6048 c_parser_type_name): Declare.
6049 (struct c_parser): Declare forward.
6050 (c_parser_tokens_buf): Declare.
6051 (c_parser_error): Likewise.
6052 (c_parser_set_error): Likewise.
6053 * gimple-parser.c: New file.
6054 * gimple-parser.h: Likewise.
6056 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6059 * c-parser.c (c_parser_postfix_expression_after_primary): Call
6062 2016-09-11 Le-Chun Wu <lcwu@google.com>
6063 Mark Wielaard <mjw@redhat.com>
6065 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
6066 to the given -Wshadow= variant.
6068 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6070 * c-typeck.c: Include memmodel.h.
6072 2016-10-13 Jakub Jelinek <jakub@redhat.com>
6075 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
6076 instead of lhd_return_null_tree_v.
6078 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
6081 * c-decl.c (smallest_type_quals_location): New static function.
6082 (grokdeclarator): Try to find the correct location for an ignored
6085 2016-09-26 Marek Polacek <polacek@redhat.com>
6088 * c-decl.c (pop_scope): Add gcc_fallthrough.
6090 2016-09-26 Marek Polacek <polacek@redhat.com>
6093 * c-parser.c (struct c_token): Add flags field.
6094 (c_lex_one_token): Pass it to c_lex_with_flags.
6095 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
6096 into IFN_FALLTHROUGH.
6097 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
6098 attribute fallthrough after a case label or default label.
6099 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
6101 2016-09-24 Marek Polacek <polacek@redhat.com>
6104 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
6105 have boolean value. Warn about ++/-- on booleans.
6107 2016-09-23 Jakub Jelinek <jakub@redhat.com>
6109 * c-parser.c (incomplete_record_decls): Remove unnecessary
6110 = vNULL initialization of file scope vec.
6112 2016-09-16 Marek Polacek <polacek@redhat.com>
6114 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
6116 2016-09-14 Marek Polacek <polacek@redhat.com>
6118 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
6119 (fix_array_notation_expr): Likewise.
6120 * c-decl.c (finish_decl): Likewise.
6121 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6122 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
6123 (function_to_pointer_conversion): Use false instead of 0.
6124 (convert_lvalue_to_rvalue): Likewise.
6125 (parser_build_unary_op): Likewise.
6126 (build_atomic_assign): Likewise.
6127 (build_unary_op): Change nonconvert parameter type to bool, use
6128 true/false instead of 1/0.
6129 (build_binary_op): Use true instead of 1.
6131 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6133 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
6134 of add_fixit_insert to add_fixit_insert_before.
6136 2016-09-13 Marek Polacek <polacek@redhat.com>
6138 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
6141 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6144 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
6145 COMPOUND_EXPR to warn_for_omitted_condop.
6147 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6149 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
6150 c_get_substring_location for this new langhook.
6152 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6155 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
6157 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
6158 instead of mark_exp_read on low_bound/length expression.
6159 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
6160 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6161 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6162 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
6163 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
6164 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
6165 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
6166 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
6167 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
6168 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
6169 instead of mark_expr_read.
6170 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
6171 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
6172 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
6173 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
6174 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
6175 array section bases outside of depend clause, for depend clause
6176 use convert_lvalue_to_rvalue on the base.
6177 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
6178 linear, aligned, map, to and from clauses.
6179 (c_omp_clause_copy_ctor): New function.
6181 2016-09-01 Marek Polacek <polacek@redhat.com>
6184 * c-typeck.c (composite_type): Add FALLTHRU comment.
6186 2016-08-31 David Malcolm <dmalcolm@redhat.com>
6188 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
6189 to the insertion fixits for "struct", "union", and "enum".
6191 2016-08-30 David Malcolm <dmalcolm@redhat.com>
6193 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
6194 rather than add_fixit_misspelled_id.
6195 (undeclared_variable): Likewise.
6196 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
6197 now-redundant "here" params from add_fixit_insert method calls.
6198 (c_parser_parameter_declaration): Likewise.
6199 * c-typeck.c (build_component_ref): Remove now-redundant range
6200 param from add_fixit_replace method calls.
6202 2016-08-25 Marek Polacek <polacek@redhat.com>
6204 * c-typeck.c (parser_build_binary_op): Pass LHS to
6205 warn_logical_not_parentheses.
6207 2016-08-25 Marek Polacek <polacek@redhat.com>
6210 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
6211 or _FloatN or _FloatNx is not supported.
6212 (finish_declspecs): Set type to integer_type_node when _FloatN or
6213 _FloatNx is not supported.
6215 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6218 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
6219 (struct c_declspecs): Add field floatn_nx_idx.
6220 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
6221 and _FloatNx type specifiers.
6222 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
6223 (c_parser_declspecs, c_parser_attribute_any_word)
6224 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
6225 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
6226 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
6227 narrower than double.
6229 2016-08-12 Jakub Jelinek <jakub@redhat.com>
6230 Martin Liska <mliska@suse.cz>
6233 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
6234 % to determine val element to change. Assert that
6235 wchar_bytes * charwidth fits into val array.
6237 2016-08-12 Marek Polacek <polacek@redhat.com>
6240 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
6241 (c_parser_postfix_expression): Likewise.
6242 * c-typeck.c (build_unary_op): Adjust fall through comment.
6243 (c_mark_addressable): Likewise.
6245 2016-08-11 Jakub Jelinek <jakub@redhat.com>
6248 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
6249 array member through typedef, for orig_qual_indirect == 0 clear
6252 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6255 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
6256 this up to selftest::run_c_tests.
6257 (selftest::run_c_tests): New function.
6259 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
6261 * c-parser.c (struct oacc_routine_data): Add error_seen and
6262 fndecl_seen members.
6263 (c_finish_oacc_routine): Use these.
6264 (c_parser_declaration_or_fndef): Adjust.
6265 (c_parser_oacc_routine): Likewise. Support more C language
6266 constructs, and improve diagnostics. Move pragma context
6268 (c_parser_pragma): ... here.
6270 * c-parser.c (struct oacc_routine_data): New.
6271 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
6273 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
6274 declare target" attribute.
6276 2016-08-01 Jan Beulich <jbeulich@suse.com>
6278 * c-fold.c (c_fully_fold_internal): Also emit shift count
6279 warnings for vector types.
6280 * c-typeck.c (build_binary_op): Likewise.
6282 2016-07-29 Marek Polacek <polacek@redhat.com>
6285 * c-decl.c (finish_struct): Rephrase an error message.
6288 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
6289 to error node for invalid code.
6292 * c-decl.c (implicitly_declare): Return decl early not only for
6293 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
6295 2016-07-29 Jakub Jelinek <jakub@redhat.com>
6298 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
6299 on GNU extern inline functions.
6301 2016-07-29 Marek Polacek <polacek@redhat.com>
6304 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
6307 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
6309 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
6311 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6313 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
6315 (best_macro_match): Likewise, converting from a typedef to a
6317 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
6318 (lookup_name_fuzzy): Update for change of best_macro_match to a
6319 subclass with a ctor that calls cpp_forall_identifiers.
6321 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6323 * c-decl.c (implicit_decl_warning): Update for conversion of
6324 return type of lookup_name_fuzzy to const char *.
6325 (undeclared_variable): Likewise.
6326 (lookup_name_fuzzy): Convert return type from tree to
6328 * c-parser.c (c_parser_declaration_or_fndef): Update for
6329 conversion of return type of lookup_name_fuzzy to const char *.
6330 (c_parser_parameter_declaration): Likewise.
6332 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
6334 * c-parser.c (c_parser_oacc_declare): Don't scan for
6336 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
6337 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
6338 zero-length subarrays.
6340 2016-07-15 Jakub Jelinek <jakub@redhat.com>
6343 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
6344 instead of FUZZY_LOOKUP_NAME.
6345 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
6346 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
6348 2016-07-14 Jakub Jelinek <jakub@redhat.com>
6351 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
6353 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6355 * c-parser.c (c_parser_generic_selection): Make type of variable
6357 (c_parser_omp_declare_simd): Likewise.
6359 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6361 * c-decl.c (struct c_struct_parse_info): Change member types
6362 from vec to auto_vec.
6363 (start_struct): Adjust.
6364 (finish_struct): Likewise.
6366 2016-07-02 Jakub Jelinek <jakub@redhat.com>
6369 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
6371 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6373 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
6374 Move pragma context checking into...
6375 (c_parser_omp_cancellation_point): ... here, and improve
6376 diagnostic messages.
6377 * c-typeck.c (c_finish_omp_cancel)
6378 (c_finish_omp_cancellation_point): Improve diagnostic messages.
6380 2016-06-29 Jakub Jelinek <jakub@redhat.com>
6383 * c-typeck.c (c_build_qualified_type): Don't clear
6384 C_TYPE_INCOMPLETE_VARS for the main variant.
6386 2016-06-28 Martin Sebor <msebor@redhat.com>
6389 * c-typeck.c (output_init_element): Diagnose incompatible types
6390 before non-constant initializers.
6392 2016-06-28 Jakub Jelinek <jakub@redhat.com>
6394 * Make-lang.in: Don't cat ../stage_current if it does not exist.
6396 2016-06-23 Andi Kleen <ak@linux.intel.com>
6398 * Make-lang.in: Add support for autofdo.
6400 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6403 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
6404 (implicit_decl_warning): When issuing warnings for implicit
6405 declarations, attempt to provide a suggestion via
6407 (undeclared_variable): Likewise when issuing errors.
6408 (lookup_name_in_scope): Likewise.
6409 (struct edit_distance_traits<cpp_hashnode *>): New struct.
6410 (best_macro_match): New typedef.
6411 (find_closest_macro_cpp_cb): New function.
6412 (lookup_name_fuzzy): New function.
6413 * c-parser.c: Include gcc-rich-location.h.
6414 (c_token_starts_typename): Split out case CPP_KEYWORD into...
6415 (c_keyword_starts_typename): ...this new function.
6416 (c_parser_declaration_or_fndef): When issuing errors about
6417 missing "struct" etc, add a fixit. For other kinds of errors,
6418 attempt to provide a suggestion via lookup_name_fuzzy.
6419 (c_parser_parms_declarator): When looking ahead to detect typos in
6420 type names, also reject CPP_KEYWORD.
6421 (c_parser_parameter_declaration): When issuing errors about
6422 unknown type names, attempt to provide a suggestion via
6424 * c-tree.h (c_keyword_starts_typename): New prototype.
6426 2016-06-20 Joseph Myers <joseph@codesourcery.com>
6429 * c-typeck.c (build_conditional_expr): Return error_mark_node if
6430 c_common_type returns error_mark_node.
6432 2016-06-19 Martin Sebor <msebor@redhat.com>
6435 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
6436 __alignof__ (expression).
6438 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6440 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
6442 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6444 * c-typeck.c (build_component_ref): Simplify fixit code by
6445 using gcc_rich_location::add_fixit_misspelled_id.
6446 (set_init_label): Likewise.
6448 2016-06-13 David Malcolm <dmalcolm@redhat.com>
6450 * c-parser.c (c_parser_initelt): Provide location of name for new
6451 location_t param of set_init_label.
6452 * c-tree.h (set_init_label): Add location_t param.
6453 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
6454 param and use it when issuing error messages about unrecognized
6455 field names. Attempt to provide a fixit hint if appropriate,
6456 otherwise update the error message to provide the type name.
6458 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
6461 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
6464 2016-06-08 Martin Sebor <msebor@redhat.com>
6465 Jakub Jelinek <jakub@redhat.com>
6469 * c-typeck.c (convert_arguments): Don't promote last argument
6470 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6472 2016-06-08 Marek Polacek <polacek@redhat.com>
6475 * c-decl.c (grokdeclarator): Check TYPE_P.
6478 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
6481 2016-06-07 David Malcolm <dmalcolm@redhat.com>
6483 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
6484 and structure element reference, capture the location of the
6485 element name token and pass it to build_component_ref.
6486 (c_parser_postfix_expression_after_primary): Likewise for
6487 structure element dereference.
6488 (c_parser_omp_variable_list): Likewise for
6489 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
6490 * c-tree.h (build_component_ref): Add location_t param.
6491 * c-typeck.c (build_component_ref): Add location_t param
6492 COMPONENT_LOC. Use it, if available, when issuing hints about
6493 mispelled member names to provide a fixit replacement hint.
6495 2016-06-06 Marek Polacek <polacek@redhat.com>
6498 * c-parser.c (c_parser_direct_declarator): Set location.
6500 2016-06-06 Marek Polacek <polacek@redhat.com>
6502 * c-typeck.c (comptypes_internal): Handle comparisons of
6503 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
6504 TYPE_REF_CAN_ALIAS_ALL.
6506 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
6508 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
6509 arguments as addressable when async clause exists.
6511 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6514 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
6515 when combined with target construct.
6517 2016-05-26 Jakub Jelinek <jakub@redhat.com>
6519 * c-parser.c (c_parser_omp_clause_schedule): Warn if
6520 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
6522 2016-05-25 Marek Polacek <polacek@redhat.com>
6525 * c-decl.c (c_make_fname_decl): Don't check seen_error.
6528 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
6530 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
6532 * c-parser.c (c_parser_oacc_declare): Add support for
6533 GOMP_MAP_FIRSTPRIVATE_POINTER.
6534 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
6535 argument with enum c_omp_region_type ort.
6536 (handle_omp_array_sections): Likewise. Update call to
6537 handle_omp_array_sections_1.
6538 (c_finish_omp_clauses): Add specific errors and warning messages for
6539 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
6540 call to handle_omp_array_sections.
6542 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
6544 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
6546 2016-05-24 Richard Biener <rguenther@suse.de>
6550 * c-typeck.c (build_array_ref): Do not complain about indexing
6551 non-lvalue vectors. Adjust for function name change.
6553 2016-05-20 Martin Sebor <msebor@redhat.com>
6556 * c-typeck.c (error_init): Use
6557 expansion_point_location_if_in_system_header.
6558 (warning_init): Same.
6560 2016-05-19 David Malcolm <dmalcolm@redhat.com>
6563 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
6565 (c_parser_postfix_expression): Likewise.
6566 * c-tree.h (c_expr::set_error): New method.
6567 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
6568 that result's range is initialized.
6570 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6572 * c-typeck.c (parser_build_unary_op): Fix formatting.
6574 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
6576 * c-decl.c (grokdeclarator): Remove errmsg and use of
6577 targetm.invalid_return_type.
6578 (grokparms): Remove errmsg and use of
6579 targetm.invalid_parameter_type.
6581 2016-05-13 Joseph Myers <joseph@codesourcery.com>
6583 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
6584 function return type.
6586 2016-05-12 Marek Polacek <polacek@redhat.com>
6589 * c-decl.c (build_compound_literal): Pass LOC down to
6590 c_incomplete_type_error.
6591 * c-tree.h (require_complete_type): Adjust declaration.
6592 (c_incomplete_type_error): Likewise.
6593 * c-typeck.c (require_complete_type): Add location parameter, pass it
6594 down to c_incomplete_type_error.
6595 (c_incomplete_type_error): Add location parameter, pass it down to
6597 (build_component_ref): Pass location down to c_incomplete_type_error.
6598 (default_conversion): Pass location down to require_complete_type.
6599 (build_array_ref): Likewise.
6600 (build_function_call_vec): Likewise.
6601 (convert_arguments): Likewise.
6602 (build_unary_op): Likewise.
6603 (build_c_cast): Likewise.
6604 (build_modify_expr): Likewise.
6605 (convert_for_assignment): Likewise.
6606 (c_finish_omp_clauses): Likewise.
6608 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6611 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
6613 * c-errors.c (pedwarn_c90): Return true if warned.
6614 * c-tree.h (pedwarn_c90): Change return type to bool.
6615 (enum c_declspec_word): Add new enumerator cdw_atomic.
6617 2016-05-11 Marek Polacek <polacek@redhat.com>
6620 * c-decl.c (diagnose_mismatched_decls): Factor out code to
6621 diagnose_mismatched_attributes and call it.
6623 2016-05-10 Marek Polacek <polacek@redhat.com>
6626 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
6627 on a declaration following the definition.
6629 2016-05-05 Jakub Jelinek <jakub@redhat.com>
6631 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
6632 parse it through to c_parser_c99_block_statement.
6633 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
6636 2016-05-04 Marek Polacek <polacek@redhat.com>
6638 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
6641 2016-05-04 Marek Polacek <polacek@redhat.com>
6644 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
6645 for macro expansions.
6647 2016-05-03 Marek Polacek <polacek@redhat.com>
6650 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
6651 check_builtin_function_arguments.
6653 2016-05-03 Richard Biener <rguenther@suse.de>
6655 * Make-lang.in (cc1-checksum.c): For stage-final re-use
6656 the checksum from the previous stage.
6658 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6660 * c-parser.c (c_parser_oacc_all_clauses): Update call to
6661 c_finish_omp_clauses.
6662 (c_parser_omp_all_clauses): Likewise.
6663 (c_parser_oacc_cache): Likewise.
6664 (c_parser_oacc_loop): Likewise.
6665 (omp_split_clauses): Likewise.
6666 (c_parser_omp_declare_target): Likewise.
6667 (c_parser_cilk_all_clauses): Likewise.
6668 (c_parser_cilk_for): Likewise.
6669 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
6670 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
6672 2016-05-02 Marek Polacek <polacek@redhat.com>
6675 * c-decl.c (grokdeclarator): Diagnose when array's size has an
6678 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6681 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
6682 OACC_LOOP_CLAUSE_MASK.
6683 (c_parser_oacc_kernels_parallel): Update call to
6684 c_oacc_split_loop_clauses.
6686 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
6688 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
6689 argument to build_modify_expr in two cases.
6691 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6693 * c-parser.c (c_parser_postfix_expression_after_primary): Call
6694 warn_for_memset instead of warning directly here.
6696 2016-04-26 Marek Polacek <polacek@redhat.com>
6699 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
6701 (c_parser_for_statement): ... here.
6702 (c_parser_if_statement): Use it.
6703 (c_parser_switch_statement): Use it.
6704 (c_parser_while_statement): Use it.
6707 * c-decl.c (pushdecl): Pass LOCUS down to warning.
6709 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6712 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
6713 instead of c_finish_cilk_clauses.
6714 * c-tree.h (c_finish_omp_clauses): Add new default argument.
6715 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
6716 floating-point variables in the linear clause for Cilk Plus.
6718 2016-04-18 Michael Matz <matz@suse.de>
6720 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
6721 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
6723 2016-04-15 Marek Polacek <polacek@redhat.com>
6726 * c-typeck.c (build_unary_op): Pass location down to error and
6729 2016-04-15 Jakub Jelinek <jakub@redhat.com>
6732 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
6734 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
6735 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
6736 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
6737 Adjust c_parser_pragma callers.
6738 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
6740 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
6742 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
6743 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
6744 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
6745 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
6746 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
6747 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
6748 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
6749 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
6751 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
6752 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
6755 2016-04-13 Marek Polacek <polacek@redhat.com>
6758 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
6760 (c_parser_statement): Likewise.
6761 (c_parser_c99_block_statement): Likewise.
6762 (c_parser_while_statement): Likewise.
6763 (c_parser_for_statement): Likewise.
6764 (c_parser_if_body): Don't set IF_P here.
6765 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
6766 about dangling else here.
6767 * c-tree.h (c_finish_if_stmt): Adjust declaration.
6768 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
6769 warn about dangling else here.
6771 2016-04-04 Marek Polacek <polacek@redhat.com>
6774 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
6776 2016-03-31 Marek Polacek <polacek@redhat.com>
6779 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
6781 2016-03-18 David Malcolm <dmalcolm@redhat.com>
6784 * c-parser.c (c_parser_postfix_expression): Set the source range
6785 for uses of "__builtin_types_compatible_p".
6787 2016-03-17 Jakub Jelinek <jakub@redhat.com>
6790 * c-typeck.c (composite_type): Don't count void_list_node
6791 into len, if the list is terminated by void_list_node, start
6792 with void_list_node instead of NULL for newargs. Stop
6795 2016-03-16 Marek Polacek <polacek@redhat.com>
6798 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
6799 nested functions returning VM types.
6801 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
6803 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6804 when calling c_finish_omp_clauses.
6806 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
6809 * c-decl.c (get_parm_info): Don't queue implicit function declarations
6812 2016-03-04 Marek Polacek <polacek@redhat.com>
6815 * c-parser.c (c_parser_postfix_expression): Call
6816 c_parser_cast_expression rather than c_parser_postfix_expression.
6818 2016-03-01 Jakub Jelinek <jakub@redhat.com>
6822 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6823 of incomplete decls to error_mark_node.
6825 2016-02-24 Marek Polacek <polacek@redhat.com>
6828 * c-decl.c (finish_decl): Don't update the copy of the type of a
6829 different decl type.
6831 2016-02-23 Jakub Jelinek <jakub@redhat.com>
6834 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6835 in id_kind reclassification.
6837 2016-02-16 Jakub Jelinek <jakub@redhat.com>
6840 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6842 2016-02-16 James Norris <jnorris@codesourcery.com>
6845 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6847 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
6849 * c-decl.c (build_null_declspecs): Zero the entire struct.
6852 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
6853 callers changed. If nested_p is true, use it to call
6854 finish_implicit_inits.
6855 * c-tree.h (finish_implicit_inits): Declare.
6856 * c-typeck.c (finish_implicit_inits): New function. Move code
6858 (push_init_level): ... here.
6859 (set_designator, process_init_element): Call finish_implicit_inits.
6861 2016-02-11 Jakub Jelinek <jakub@redhat.com>
6864 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6865 arguments for -Waddress warning.
6867 2016-02-04 Jakub Jelinek <jakub@redhat.com>
6870 * c-decl.c (finish_enum): When honoring mode attribute,
6871 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6873 2016-01-29 Jakub Jelinek <jakub@redhat.com>
6876 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6877 all type variants, not just TYPE_MAIN_VARIANT.
6879 2016-01-27 Jakub Jelinek <jakub@redhat.com>
6882 * c-decl.c (c_write_global_declarations_1): Warn with
6883 warn_unused_function if static prototype without definition
6886 2016-01-27 Marek Polacek <polacek@redhat.com>
6889 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6890 to unsigned, if needed. Add -Wsign-compare warning.
6892 2016-01-26 Jakub Jelinek <jakub@redhat.com>
6894 PR tree-optimization/69483
6895 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6897 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6900 * c-tree.h (incomplete_record_decls): Declare.
6901 * c-parser.c (incomplete_record_decls): Define.
6902 (c_parser_translation_unit): Iterate through incomplete_record_decls and
6903 report error if any decl has zero size.
6904 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6905 or enum type to incomplete_record_decls.
6907 2016-01-14 Tom de Vries <tom@codesourcery.com>
6909 PR tree-optimization/68773
6910 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6913 2016-01-14 Marek Polacek <polacek@redhat.com>
6916 * c-decl.c (grokdeclarator): Provide more information for invalid
6919 2016-01-06 David Malcolm <dmalcolm@redhat.com>
6921 * c-parser.c (c_parser_unary_expression): For dereferences, build
6922 a combined location before calling build_indirect_ref, so that
6923 error reports cover the full range, manually updating the c_expr
6926 2016-01-06 Marek Polacek <polacek@redhat.com>
6929 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
6930 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
6933 2016-01-04 Jakub Jelinek <jakub@redhat.com>
6935 Update copyright years.
6937 2016-01-04 Marek Polacek <polacek@redhat.com>
6940 * c-typeck.c (build_atomic_assign): Improve commentary. Add
6941 optimization to use __atomic_fetch_* built-in if possible.
6943 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
6945 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6947 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
6950 2015-12-22 Marek Polacek <polacek@redhat.com>
6953 * c-typeck.c (build_component_ref): Warn when acessing elements of
6954 atomic structures or unions.
6956 2015-12-21 David Malcolm <dmalcolm@redhat.com>
6958 * c-typeck.c: Include "gcc-rich-location.h".
6959 (build_binary_op): In the two places that call binary_op_error,
6960 create a gcc_rich_location and populate it with the location of
6961 the binary op and its two operands.
6963 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6965 * c-parser.c (c_parser_statement_after_labels): When calling
6966 c_finish_return, Use the return expression's location if it has
6967 one, falling back to the location of the first token within it.
6968 * c-typeck.c (c_finish_return): When issuing warnings about
6969 the incorrect presence/absence of a return value, issue a note
6970 showing the declaration of the function.
6972 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6974 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6976 (c_parser_peek_nth_token): New function.
6977 (c_parser_peek_conflict_marker): New function.
6978 (c_parser_error): Detect conflict markers and report them as such.
6980 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6982 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6983 to preserve range information for the primary expression
6984 in the call to c_parser_postfix_expression_after_primary.
6986 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6988 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6989 expression location, falling back on the first token location,
6990 rather than always using the latter.
6992 2015-12-16 Marek Polacek <polacek@redhat.com>
6995 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6998 2015-12-15 Marek Polacek <polacek@redhat.com>
7001 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
7004 2015-12-08 David Malcolm <dmalcolm@redhat.com>
7006 * c-parser.c (c_parser_alignof_expression): Capture location of
7007 closing parenthesis (if any), or of end of unary expression, and
7008 use it to build a src_range for the expression.
7010 2015-12-08 David Malcolm <dmalcolm@redhat.com>
7013 * c-parser.c (c_parser_get_builtin_args): Add
7014 "out_close_paren_loc" param, and write back to it.
7015 (c_parser_postfix_expression): Capture the closing
7016 parenthesis location for RID_CHOOSE_EXPR,
7017 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
7018 RID_BUILTIN_SHUFFLE and use it to set the source range
7019 for such expressions; within RID_BUILTIN_COMPLEX set
7020 the underlying location.
7022 2015-12-07 Marek Polacek <polacek@redhat.com>
7025 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
7026 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
7028 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
7030 * c-tree.h (c_build_va_arg): Adjust prototype.
7031 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
7032 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
7033 parameter, adjust throughout and issue an error if EXPR is a component
7034 with reverse storage order.
7036 2015-12-02 Jason Merrill <jason@redhat.com>
7038 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7039 (c_fully_fold_internal, decl_constant_value_for_optimization):
7040 Move from c-common.c.
7041 * c-tree.h: Declare decl_constant_value_for_optimization.
7042 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
7044 2015-12-02 Joseph Myers <joseph@codesourcery.com>
7047 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
7048 following link from declarator to next declarator. Track original
7049 qualified type and pass it to c_build_qualified_type.
7050 * c-typeck.c (c_build_qualified_type): Add arguments
7051 orig_qual_type and orig_qual_indirect.
7053 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
7055 * c-parser.c (c_parser_omp_clause_name)
7056 (c_parser_oacc_all_clauses): Alphabetical sorting.
7058 2015-12-02 Jakub Jelinek <jakub@redhat.com>
7061 * c-decl.c (get_parm_info): Use b->locus instead of input_location
7064 2015-12-01 Julian Brown <julian@codesourcery.com>
7065 Cesar Philippidis <cesar@codesourcery.com>
7066 James Norris <James_Norris@mentor.com>
7068 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
7069 (c_parser_oacc_clause_use_device): New function.
7070 (c_parser_oacc_all_clauses): Add use_device support.
7071 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
7072 (c_parser_oacc_host_data): New function.
7073 (c_parser_omp_construct): Add host_data support.
7074 * c-tree.h (c_finish_oacc_host_data): Add prototype.
7075 * c-typeck.c (c_finish_oacc_host_data): New function.
7076 (c_finish_omp_clauses): Add use_device support.
7078 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
7081 * c-decl.c: Set TYPE_PACKED in variants.
7083 2015-11-27 Martin Liska <mliska@suse.cz>
7086 * c-array-notation.c (fix_builtin_array_notation_fn):
7087 Use release_vec_vec instead of vec::release.
7088 (build_array_notation_expr): Likewise.
7089 (fix_conditional_array_notations_1): Likewise.
7090 (fix_array_notation_expr): Likewise.
7091 (fix_array_notation_call_expr): Likewise.
7093 2015-11-27 Jakub Jelinek <jakub@redhat.com>
7096 * c-parser.c (c_parser_compound_statement_nostart): If
7097 last_label is true, use pragma_stmt instead of pragma_compound
7098 as second c_parser_pragma argument.
7099 (c_parser_omp_ordered, c_parser_omp_target_update,
7100 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
7101 false as second argument to c_parser_skip_to_pragma_eol after
7102 diagnosing standalone directives used in pragma_stmt context.
7104 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
7106 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
7107 with "if (ENABLE_OFFLOADING)".
7109 2015-11-23 David Malcolm <dmalcolm@redhat.com>
7112 * c-parser.c (c_parser_postfix_expression): Set up source ranges
7113 for various Objective-C constructs: Class.name syntax,
7114 @selector(), @protocol(), @encode(), and [] message syntax.
7116 2015-11-20 David Malcolm <dmalcolm@redhat.com>
7119 * c-typeck.c (should_suggest_deref_p): New function.
7120 (build_component_ref): Special-case POINTER_TYPE when
7121 generating a "not a structure of union" error message, and
7122 suggest a "->" rather than a ".", providing a fix-it hint.
7124 2015-11-19 David Malcolm <dmalcolm@redhat.com>
7126 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
7127 candidate into a new function, find_closest_identifier.
7129 2015-11-19 Marek Polacek <polacek@redhat.com>
7132 * c-typeck.c (parser_build_binary_op): Properly handle
7133 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
7135 2015-11-17 David Malcolm <dmalcolm@redhat.com>
7137 * c-parser.c (set_c_expr_source_range): Bulletproof both
7138 overloaded implementations against NULL expr->value.
7139 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
7141 (c_parser_unary_expression): Likewise when handling addresses of
7143 (c_parser_postfix_expression): Likewise for statement expressions,
7144 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
7145 __builtin_va_arg, and for __builtin_offset_of.
7146 (c_parser_postfix_expression_after_paren_type): Initialize expr's
7147 src_range using the range of the braced initializer.
7148 (c_parser_transaction_expression): Set src_range for "ret" to a
7149 sane pair of values.
7151 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7153 * c-parser.c (c_finish_omp_declare_simd): Look for
7154 "simd" attribute as well. Update error message.
7156 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7158 * c-parser.c (c_parser_omp_declare_target): Adjust.
7160 2015-11-14 Jakub Jelinek <jakub@redhat.com>
7162 * c-typeck.c (c_finish_omp_clauses): Don't mark
7163 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
7165 2015-11-14 Marek Polacek <polacek@redhat.com>
7167 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
7168 * c-typeck.c: Likewise.
7170 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7172 * c-decl.c (warn_defaults_to): Pass line_table to
7174 * c-errors.c (pedwarn_c99): Likewise.
7175 (pedwarn_c90): Likewise.
7176 * c-parser.c (set_c_expr_source_range): New functions.
7177 (c_token::get_range): New method.
7178 (c_token::get_finish): New method.
7179 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
7180 based on the range from the start of the LHS to the end of the
7182 (c_parser_conditional_expression): Likewise, based on the range
7183 from the start of the cond.value to the end of exp2.value.
7184 (c_parser_binary_expression): Call set_c_expr_source_range on
7185 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
7186 (c_parser_cast_expression): Call set_c_expr_source_range on ret
7187 based on the cast_loc through to the end of the expr.
7188 (c_parser_unary_expression): Likewise, based on the
7189 op_loc through to the end of op.
7190 (c_parser_sizeof_expression) Likewise, based on the start of the
7191 sizeof token through to either the closing paren or the end of
7193 (c_parser_postfix_expression): Likewise, using the token range,
7194 or from the open paren through to the close paren for
7195 parenthesized expressions.
7196 (c_parser_postfix_expression_after_primary): Likewise, for
7197 various kinds of expression.
7198 * c-tree.h (struct c_expr): Add field "src_range".
7199 (c_expr::get_start): New method.
7200 (c_expr::get_finish): New method.
7201 (set_c_expr_source_range): New decls.
7202 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
7203 on ret for prefix unary ops.
7204 (parser_build_binary_op): Likewise, running from the start of
7205 arg1.value through to the end of arg2.value.
7207 2015-11-13 Marek Polacek <polacek@redhat.com>
7210 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
7212 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7214 * c-typeck.c: Include spellcheck.h.
7215 (lookup_field_fuzzy_find_candidates): New function.
7216 (lookup_field_fuzzy): New function.
7217 (build_component_ref): If the field was not found, try using
7218 lookup_field_fuzzy and potentially offer a suggestion.
7220 2015-11-12 James Norris <jnorris@codesourcery.com>
7221 Joseph Myers <joseph@codesourcery.com>
7223 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
7224 (c_parser_omp_clause_name): Handle 'device_resident' clause.
7225 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7226 and PRAGMA_OMP_CLAUSE_LINK.
7227 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7228 and PRAGMA_OACC_CLAUSE_LINK.
7229 (OACC_DECLARE_CLAUSE_MASK): New definition.
7230 (c_parser_oacc_declare): New function.
7232 2015-11-12 Marek Polacek <polacek@redhat.com>
7235 * c-parser.c (c_parser_for_statement): Reclassify the token in
7238 2015-11-11 Marek Polacek <polacek@redhat.com>
7242 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
7243 checking the size of an array.
7245 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7247 * c-array-notation.c: Remove unused header files.
7248 * c-aux-info.c: Likewise.
7249 * c-convert.c: Likewise.
7250 * c-decl.c: Likewise.
7251 * c-errors.c: Likewise.
7252 * c-lang.c: Likewise.
7253 * c-objc-common.c: Likewise.
7254 * c-parser.c: Likewise.
7255 * c-typeck.c: Likewise.
7256 * gccspec.c: Likewise.
7258 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7259 Cesar Philippidis <cesar@codesourcery.com>
7260 James Norris <jnorris@codesourcery.com>
7261 Julian Brown <julian@codesourcery.com>
7262 Nathan Sidwell <nathan@codesourcery.com>
7264 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
7266 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
7267 (c_parser_pragma): Parse 'acc routine'.
7268 (OACC_ROUTINE_CLAUSE_MARK): Define.
7269 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
7271 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
7274 * c-typeck.c (c_finish_loop): For unconditional loops, set the
7275 location of the backward-goto to the start of the loop body.
7277 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
7280 * c-parser.c (c_parser_while_statement): Finish the loop before
7281 parsing ahead for misleading indentation.
7282 (c_parser_for_statement): Likewise.
7284 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7286 * c-decl.c (finish_struct): If the structure has reverse storage
7287 order, rewrite the type of array fields with scalar component. Call
7288 maybe_apply_pragma_scalar_storage_order on entry.
7289 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
7290 errors on bit-fields and reverse SSO here and not...
7291 (c_mark_addressable): ...here.
7292 (output_init_element): Adjust call to initializer_constant_valid_p.
7293 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
7295 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7297 * c-decl.c (warn_defaults_to): Update for change in signature
7298 of diagnostic_set_info.
7299 * c-errors.c (pedwarn_c99): Likewise.
7300 (pedwarn_c90): Likewise.
7301 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
7302 for textinfo::set_location.
7304 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7305 Thomas Schwinge <thomas@codesourcery.com>
7306 James Norris <jnorris@codesourcery.com>
7308 * c-parser.c (c_parser_omp_clause_name): Add support for
7309 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
7310 (c_parser_omp_clause_default): Add is_oacc argument. Handle
7311 default(none) in OpenACC.
7312 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
7314 (c_parser_oacc_clause_tile): New function.
7315 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
7316 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
7317 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
7319 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
7320 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
7322 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
7323 (c_parser_oacc_update): Update the error message for missing clauses.
7324 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
7325 and OMP_CLAUSE_INDEPENDENT.
7327 2015-11-05 Marek Polacek <polacek@redhat.com>
7330 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
7331 deal with pre-evaluation on invalid types.
7333 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7334 Ilya Verbin <ilya.verbin@intel.com>
7336 * c-parser.c: Include context.h and gimple-expr.h.
7337 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
7338 monotonic together with nonmonotonic.
7339 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
7340 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
7341 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
7342 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
7343 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
7344 expressions on combined target teams before the target.
7345 (c_parser_omp_declare_target): If decl has "omp declare target" or
7346 "omp declare target link" attribute, and cgraph or varpool node already
7347 exists, then set corresponding flags. Call c_finish_omp_clauses
7348 in the parenthesized extended-list syntax case.
7349 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
7351 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
7352 on OMP_CLAUSE_REDUCTION array sections.
7353 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
7354 into the constant offset, or for variable low-bound using
7355 POINTER_PLUS_EXPR. For structure element based array sections use
7356 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
7357 (c_finish_omp_clauses): Drop generic_field_head, structure
7358 elements are now always mapped even as array section bases,
7359 diagnose same var in data sharing and mapping clauses. Diagnose if
7360 linear step on declare simd is neither a constant nor a uniform
7361 parameter. Look through POINTER_PLUS_EXPR for array section
7362 reductions. Diagnose the same var or function appearing multiple
7363 times on the same directive. Fix up wording for the to clause if t
7364 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
7365 modifier on kinds other than dynamic or guided or nonmonotonic
7366 modifier together with ordered clause.
7368 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7369 Chung-Lin Tang <cltang@codesourcery.com>
7371 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
7373 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7375 * c-array-notation.c: Reorder #include's and remove duplicates.
7376 * c-aux-info.c: Likewise.
7377 * c-convert.c: Likewise.
7378 * c-decl.c: Likewise.
7379 * c-errors.c: Likewise.
7380 * c-lang.c: Likewise.
7381 * c-objc-common.c: Likewise.
7382 * c-parser.c: Likewise.
7383 * c-typeck.c: Likewise.
7385 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
7388 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
7389 after calling build_qualified_type.
7391 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
7392 Thomas Schwinge <thomas@codesourcery.com>
7393 James Norris <jnorris@codesourcery.com>
7394 Joseph Myers <joseph@codesourcery.com>
7395 Julian Brown <julian@codesourcery.com>
7396 Bernd Schmidt <bschmidt@redhat.com>
7398 * c-parser.c (c_parser_oacc_shape_clause): New.
7399 (c_parser_oacc_simple_clause): New.
7400 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
7401 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
7403 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7404 James Norris <jnorris@codesourcery.com>
7405 Cesar Philippidis <cesar@codesourcery.com>
7409 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
7410 parameters, and handle these. Adjust all users.
7411 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
7413 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
7415 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
7417 (c_finish_omp_construct): Declare function.
7418 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
7419 Merge functions into...
7420 (c_finish_omp_construct): ... this new function.
7422 2015-10-22 Richard Biener <rguenther@suse.de>
7424 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
7425 before folding a MINUS_EXPR.
7427 2015-10-21 Marek Polacek <polacek@redhat.com>
7430 * c-decl.c (start_function): Warn about vararg functions without
7433 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
7435 * c-typeck.c (build_conditional_expr): Use boolean vector
7436 type for vector comparison.
7437 (build_vec_cmp): New.
7438 (build_binary_op): Use build_vec_cmp for comparison.
7440 2015-10-20 Marek Polacek <polacek@redhat.com>
7442 * c-parser.c (is_cilkplus_vector_p): Don't define here.
7444 2015-10-20 Marek Polacek <polacek@redhat.com>
7447 * c-parser.c (c_parser_attributes): Break out of the loop if the
7448 token after an attribute isn't a comma.
7450 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7451 Aldy Hernandez <aldyh@redhat.com>
7453 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
7454 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
7455 (c_parser_omp_variable_list): Handle structure elements for
7456 map, to and from clauses. Handle array sections in reduction
7457 clause. Formatting fixes.
7458 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
7459 if clause modifiers.
7460 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
7461 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
7462 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
7463 c_parser_omp_clause_is_device_ptr): New functions.
7464 (c_parser_omp_clause_ordered): Parse optional parameter.
7465 (c_parser_omp_clause_reduction): Handle array reductions.
7466 (c_parser_omp_clause_schedule): Parse optional simd modifier.
7467 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
7469 (c_parser_omp_clause_linear): Parse linear clause modifiers.
7470 (c_parser_omp_clause_depend_sink): New function.
7471 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
7472 (c_parser_omp_clause_map): Parse release/delete map kinds and
7473 optional always modifier.
7474 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
7475 and c_finish_omp_clauses callers.
7476 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
7477 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
7478 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
7479 (OMP_CRITICAL_CLAUSE_MASK): Define.
7480 (c_parser_omp_critical): Parse critical clauses.
7481 (c_parser_omp_for_loop): Handle doacross loops, adjust
7482 c_finish_omp_for and c_finish_omp_clauses callers.
7483 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
7484 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
7485 (OMP_FOR_CLAUSE_MASK): Add linear clause.
7486 (c_parser_omp_for): Disallow ordered clause when combined with
7487 distribute. Disallow linear clause when combined with distribute
7488 and not combined with simd.
7489 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
7490 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
7491 parse clauses and if depend clause is found, don't parse a body.
7492 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
7493 Allow target parallel without for after it.
7494 (OMP_TASK_CLAUSE_MASK): Add priority clause.
7495 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
7496 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
7498 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
7499 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
7500 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
7501 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
7503 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
7504 defaultmap and is_device_ptr clauses.
7505 (c_parser_omp_target): Parse target parallel and target simd. Set
7506 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
7507 and target exit data. Diagnose invalid map kinds.
7508 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
7509 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
7511 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
7513 (OMP_TASKLOOP_CLAUSE_MASK): Define.
7514 (c_parser_omp_taskloop): New function.
7515 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
7516 handle PRAGMA_OMP_TASKLOOP.
7517 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
7518 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
7519 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
7520 Add IS_OMP argument, handle structure element bases, diagnose
7521 bitfields, pass IS_OMP recursively, diagnose known zero length
7522 array sections in depend clauses, handle array sections in reduction
7523 clause, diagnose negative length even for pointers.
7524 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
7525 types, pass IS_OMP down to handle_omp_array_sections_1, handle
7526 array sections in reduction clause, set
7527 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
7528 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
7529 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
7530 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
7532 2015-10-06 Marek Polacek <polacek@redhat.com>
7534 * c-parser.c (c_parser_statement_after_labels): Use
7535 protected_set_expr_location.
7536 (c_parser_omp_clause_num_gangs): Likewise.
7537 (c_parser_omp_clause_num_threads): Likewise.
7538 (c_parser_omp_clause_num_workers): Likewise.
7539 (c_parser_omp_clause_vector_length): Likewise.
7540 (c_parser_omp_clause_num_teams): Likewise.
7541 (c_parser_omp_clause_thread_limit): Likewise.
7542 * c-typeck.c (build_c_cast): Likewise.
7543 (c_cast_expr): Likewise.
7545 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7547 * c-typeck.c (c_tree_equal): Use real_equal instead of
7550 2015-10-04 Jason Merrill <jason@redhat.com>
7552 * c-parser.c (c_lex_one_token): Handle @synchronized.
7553 * c-decl.c (match_builtin_function_types): A declaration of a built-in
7554 can change whether the function is transaction_safe.
7556 2015-10-02 Marek Polacek <polacek@redhat.com>
7559 * c-typeck.c (convert_for_assignment): Use the expansion point
7560 location throughout.
7562 2015-10-02 Marek Polacek <polacek@redhat.com>
7565 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
7566 and pass it down to c_parser_if_statement.
7567 (c_parser_else_body): Add CHAIN parameter and pass it down to
7568 c_parser_statement_after_labels.
7569 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
7570 duplicated if-else-if conditions.
7572 2015-10-01 Marek Polacek <polacek@redhat.com>
7574 * c-typeck.c (convert_for_assignment): Improve commentary.
7576 2015-09-30 Marek Polacek <polacek@redhat.com>
7579 * c-typeck.c (c_finish_return): Use the expansion point location for
7580 certain "return with value" warnings.
7582 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7584 * c-parser.c (pragma_lex): Add loc argument.
7586 2015-09-15 Marek Polacek <polacek@redhat.com>
7589 * c-decl.c (tag_exists_p): New function.
7590 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
7591 struct/union/enum keywords are missing.
7592 * c-tree.h (tag_exists_p): Declare.
7594 2015-09-15 Marek Polacek <polacek@redhat.com>
7596 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
7597 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
7598 Return NULL_TREE instead of 0.
7599 (lookup_name): Return NULL_TREE instead of 0.
7600 (lookup_name_in_scope): Likewise.
7601 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
7602 (parser_xref_tag): Use false instead of 0.
7603 (start_struct): Use true instead of 1.
7604 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
7606 2015-09-14 Marek Polacek <polacek@redhat.com>
7608 * c-typeck.c (set_nonincremental_init_from_string): Use
7609 HOST_WIDE_INT_M1U when shifting a negative value.
7611 2015-09-09 Mark Wielaard <mjw@redhat.com>
7613 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
7616 2015-09-10 Jakub Jelinek <jakub@redhat.com>
7619 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
7620 into OMP_FOR_PRE_BODY rather than before the loop.
7622 2015-09-09 Jakub Jelinek <jakub@redhat.com>
7625 * c-parser.c (c_parser_oacc_all_clauses,
7626 c_parser_omp_all_clauses): Remove invalid clause from
7627 list of clauses even if parser->error is set.
7630 * c-parser.c (c_parser_omp_clause_aligned,
7631 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
7633 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
7637 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
7638 instead of c_parser_unary_expression. If the result is !lvalue_p,
7639 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
7641 2015-09-04 Marek Polacek <polacek@redhat.com>
7644 * c-typeck.c (build_binary_op): Don't instrument static initializers.
7646 2015-09-03 Martin Sebor <msebor@redhat.com>
7649 * c-typeck.c (convert_arguments, parser_build_unary_op,
7650 build_conditional_expr, c_cast_expr, convert_for_assignment,
7651 build_binary_op, _objc_common_truthvalue_conversion): Call
7653 (c_decl_implicit): Define.
7655 2015-09-02 Marek Polacek <polacek@redhat.com>
7658 * c-parser.c (c_parser_enum_specifier): Give a better error for
7661 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7663 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
7665 2015-08-12 Marek Polacek <polacek@redhat.com>
7667 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
7670 2015-08-03 Marek Polacek <polacek@redhat.com>
7673 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
7675 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
7677 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7679 * c-parser.c (c_parser_if_body): Take token_indent_info
7680 argument. Call warn_for_misleading_indentation even when the
7681 body is a semicolon. Extract token_indent_infos corresponding
7682 to the guard, body and next tokens. Adjust call to
7683 warn_for_misleading_indentation accordingly.
7684 (c_parser_else_body): Likewise.
7685 (c_parser_if_statement): Likewise.
7686 (c_parser_while_statement): Likewise.
7687 (c_parser_for_statement): Likewise.
7689 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
7690 Manuel López-Ibáñez <manu@gcc.gnu.org>
7692 * c-decl.c (get_parm_info): Remove static var. Update warning
7695 2015-07-27 Marek Polacek <polacek@redhat.com>
7699 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
7701 2015-07-20 Marek Polacek <polacek@redhat.com>
7704 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
7705 (build_binary_op): Warn about left shift overflows.
7707 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7709 * c-array-notation.c: Adjust includes for flags.h changes.
7710 * c-objc-common.c: Likewise.
7712 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7714 * c-array-notation.c: Adjust includes.
7715 * c-aux-info.c: Likewise.
7716 * c-convert.c: Likewise.
7717 * c-decl.c: Likewise.
7718 * c-errors.c: Likewise.
7719 * c-lang.c: Likewise.
7720 * c-objc-common.c: Likewise.
7721 * c-parser.c: Likewise.
7722 * c-typeck.c: Likewise.
7724 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7727 * c-decl.c (finish_function): Call do_warn_unused_parameter.
7729 2015-06-29 Marek Polacek <polacek@redhat.com>
7732 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
7733 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
7734 about -Wswitch-bool here.
7735 (do_case): Update c_add_case_label call.
7736 (c_finish_case): Update c_do_switch_warnings call.
7738 2015-06-27 Marek Polacek <polacek@redhat.com>
7740 * c-typeck.c: Use VECTOR_TYPE_P throughout.
7742 2015-06-26 Marek Polacek <polacek@redhat.com>
7744 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7746 * c-typeck.c (array_to_pointer_conversion): Likewise.
7747 (build_unary_op): Likewise.
7748 (c_finish_return): Likewise.
7750 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7752 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
7753 * c-parser.c: Likewise.
7755 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7757 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
7758 instead of pointer_hash.
7759 (detect_field_duplicates): Likewise.
7761 2015-06-25 Marek Polacek <polacek@redhat.com>
7763 * c-array-notation.c: Use VAR_P throughout.
7764 * c-decl.c: Likewise.
7765 * c-objc-common.c: Likewise.
7766 * c-parser.c: Likewise.
7767 * c-typeck.c: Likewise.
7769 2015-06-25 Marek Polacek <polacek@redhat.com>
7771 * c-decl.c: Use is_global_var throughout.
7772 * c-parser.c: Likewise.
7773 * c-typeck.c: Likewise.
7775 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
7777 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
7778 * c-aux-info.c: Likewise.
7779 * c-convert.c: Likewise.
7780 * c-decl.c: Likewise.
7781 * c-errors.c: Likewise.
7782 * c-lang.c: Likewise.
7783 * c-objc-common.c: Likewise.
7784 * c-parser.c: Likewise.
7785 * c-typeck.c: Likewise.
7787 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
7790 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
7793 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
7795 * c-decl.c (pop_scope): Register the main translation unit
7796 through the new debug hook.
7798 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
7800 * c-array-notation.c : Adjust include files.
7801 * c-aux-info.c : Likewise.
7802 * c-convert.c : Likewise.
7803 * c-decl.c : Likewise.
7804 * c-errors.c : Likewise.
7805 * c-lang.c : Likewise.
7806 * c-lang.h : Likewise.
7807 * c-objc-common.c : Likewise.
7808 * c-parser.c : Likewise.
7809 * c-typeck.c : Likewise.
7811 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
7813 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7814 immediately clobber it.
7815 (c_write_global_declarations_1): Remove call to
7816 check_global_declaration_1.
7817 (c_write_global_declarations_2): Remove.
7818 (c_write_final_cleanups): Rename from c_write_global_declarations.
7819 Remove call to finalize_compilation_unit.
7820 Remove calls to debugging hooks.
7821 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7822 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7823 * c-tree.h: Remove c_write_global_declarations.
7825 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
7827 * c-array-notation.c: Adjust includes for restructured coretypes.h.
7828 * c-aux-info.c: Likewise.
7829 * c-convert.c: Likewise.
7830 * c-decl.c: Likewise.
7831 * c-errors.c: Likewise.
7832 * c-lang.c: Likewise.
7833 * c-objc-common.c: Likewise.
7834 * c-parser.c: Likewise.
7835 * c-typeck.c: Likewise.
7837 2015-06-04 Marek Polacek <polacek@redhat.com>
7840 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7843 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7845 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7846 Warn for empty struct.
7847 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7849 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
7851 * c-decl.c (start_function): Call plugin before parsing.
7852 (finish_function): Call plugin after parsing.
7854 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7857 * c-decl.c (merge_decls): Merge DECL_COMMON.
7859 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
7861 * Make-lang.in (check_gcc_pallelize): Define.
7863 2015-05-22 Marek Polacek <polacek@redhat.com>
7866 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7869 2015-05-21 Marek Polacek <polacek@redhat.com>
7871 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7874 2015-05-20 Marek Polacek <polacek@redhat.com>
7876 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7877 * c-typeck.c: Likewise.
7879 2015-05-19 Marek Polacek <polacek@redhat.com>
7881 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7883 2015-05-19 Jakub Jelinek <jakub@redhat.com>
7886 * c-parser.c (c_parser_omp_for_loop): Don't add
7887 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7888 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7889 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7892 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7894 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
7897 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7900 * c-objc-common.c (c_tree_printer): Replace locus pointer with
7903 2015-05-14 Marek Polacek <polacek@redhat.com>
7907 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7910 2015-05-12 David Malcolm <dmalcolm@redhat.com>
7912 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7913 to add a call to warn_for_misleading_indentation.
7914 (c_parser_else_body): Likewise, adding param "else_loc".
7915 (c_parser_if_statement): Check for misleading indentation.
7916 (c_parser_while_statement): Likewise.
7917 (c_parser_for_statement): Likewise.
7919 2015-05-08 Marek Polacek <polacek@redhat.com>
7922 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7923 (output_init_element): Likewise.
7925 2015-05-07 Marek Polacek <polacek@redhat.com>
7928 * c-typeck.c (build_binary_op): Warn when left shifting a negative
7931 2015-04-30 Marek Polacek <polacek@redhat.com>
7933 * c-typeck.c (set_init_label): Call error_at instead of error and
7936 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
7939 * c-typeck.c (c_build_va_arg): Clarify the error message.
7941 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
7943 * c-parser.c (c_parser_oacc_enter_exit_data): Use
7944 OMP_STANDALONE_CLAUSES.
7946 2015-04-28 Marek Polacek <polacek@redhat.com>
7948 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7950 2015-04-28 Marek Polacek <polacek@redhat.com>
7953 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7955 2015-04-25 Marek Polacek <polacek@redhat.com>
7958 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
7961 2015-04-23 Marek Polacek <polacek@redhat.com>
7964 * c-decl.c (set_labels_context_r): New function.
7965 (store_parm_decls): Call it via walk_tree_without_duplicates.
7966 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7967 instead of create_tmp_var. Build TARGET_EXPR instead of
7969 (build_atomic_assign): Use create_tmp_var_raw instead of
7970 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
7972 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
7974 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7975 (c_parser_omp_target_update): Add missed %> to error_at ().
7977 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7980 * c-decl.c (c_default_pointer_mode): Remove definition.
7981 * c-tree.h (c_default_pointer_mode): Remove declaration.
7983 2015-03-27 Tobias Burnus <burnus@net-b.de>
7986 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7988 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7989 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7990 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7992 2015-03-19 Jakub Jelinek <jakub@redhat.com>
7994 * c-decl.c (c_decl_attributes): Also add "omp declare target"
7995 attribute for DECL_EXTERNAL VAR_DECLs.
7997 2015-03-11 Jakub Jelinek <jakub@redhat.com>
7999 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
8002 2015-03-10 Jakub Jelinek <jakub@redhat.com>
8005 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
8006 before preparing arguments to warn_logical_not_parentheses.
8008 2015-03-09 Jakub Jelinek <jakub@redhat.com>
8011 * c-typeck.c (parser_build_binary_op): Don't warn for
8012 !!x == y or !b == y where b is _Bool.
8014 2015-03-09 Marek Polacek <polacek@redhat.com>
8016 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
8017 * c-decl.c (grokdeclarator): Likewise.
8018 * c-typeck.c (build_binary_op): Likewise.
8020 2015-02-27 Marek Polacek <polacek@redhat.com>
8023 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
8025 2015-02-14 Marek Polacek <polacek@redhat.com>
8028 * c-decl.c (grokdeclarator): Set the range of a flexible array member
8029 declared through a typedef name.
8031 2015-02-13 Marek Polacek <polacek@redhat.com>
8034 * c-decl.c (grokdeclarator): Print also the type when giving
8035 the error message about array's incomplete element type.
8037 2015-02-11 Jakub Jelinek <jakub@redhat.com>
8040 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
8041 check in the POP macro.
8043 2015-02-09 Marek Polacek <polacek@redhat.com>
8046 * c-typeck.c (process_init_element): Don't always wrap
8047 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
8048 initializing a range of elements.
8050 2015-02-04 Jakub Jelinek <jakub@redhat.com>
8054 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
8056 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
8058 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
8059 processing enum declaration.
8061 2015-01-29 Marek Polacek <polacek@redhat.com>
8064 * c-typeck.c (pop_init_level): If constructor_elements has
8065 exactly one element with integer_zerop value, set constructor_zeroinit
8066 to 1. Remove braces around warning_init call.
8068 2015-01-27 Jakub Jelinek <jakub@redhat.com>
8071 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
8072 of FUNCTION_DECLs with error_mark_node.
8074 2015-01-26 Jakub Jelinek <jakub@redhat.com>
8077 * c-typeck.c (convert_arguments): Return -1 if there are
8078 error_args, even if we've diagnosed too many arguments.
8080 2015-01-21 Richard Biener <rguenther@suse.de>
8083 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
8084 for builtins the user declared correctly.
8086 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8087 Bernd Schmidt <bernds@codesourcery.com>
8088 Cesar Philippidis <cesar@codesourcery.com>
8089 James Norris <jnorris@codesourcery.com>
8090 Jakub Jelinek <jakub@redhat.com>
8091 Ilmir Usmanov <i.usmanov@samsung.com>
8093 * c-parser.c: Include "gomp-constants.h".
8094 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
8095 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
8096 Use OMP_CLAUSE_SET_MAP_KIND.
8097 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
8098 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
8099 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
8100 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
8101 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
8102 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
8103 "copyout", "create", "delete", "deviceptr", "gang", "host",
8104 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
8105 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
8106 "present_or_create", "pcreate", "seq", "self", "vector",
8107 "vector_length", "wait", "worker".
8108 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
8109 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
8110 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
8111 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
8112 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
8113 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
8114 (c_parser_oacc_data_clause_deviceptr)
8115 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
8116 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
8117 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
8118 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
8119 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
8120 (c_parser_oacc_parallel, c_parser_oacc_update)
8121 (c_parser_oacc_wait): New functions.
8122 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
8123 (c_finish_oacc_data): New prototypes.
8124 * c-typeck.c: Include "gomp-constants.h".
8125 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
8126 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
8127 OMP_CLAUSE_SET_MAP_KIND.
8128 (c_finish_oacc_parallel, c_finish_oacc_kernels)
8129 (c_finish_oacc_data): New functions.
8130 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
8131 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
8132 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
8133 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
8134 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
8135 GOMP_MAP_FORCE_DEVICEPTR.
8137 2015-01-09 Michael Collison <michael.collison@linaro.org>
8139 * c-array-notation.c: Include hash-set.h, machmode.h,
8140 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8141 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8142 * c-aux-info.c: Ditto.
8143 * c-convert.c: Ditto.
8145 * c-errors.c: Ditto.
8146 * c-lang.c: Dittoxs.
8147 * c-objc-common.c: Ditto.
8148 * c-parser.c: Ditto.
8149 * c-typeck.c: Include hash-set.h, machmode.h,
8150 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8151 fold-const.h, wide-int.h, inchash.h, real.h and
8152 fixed-value.h due to flattening of tree.h.
8154 2015-01-07 Marek Polacek <polacek@redhat.com>
8157 * c-typeck.c (process_init_element): Disallow initialization of
8158 a flexible array member with a string constant if the structure
8161 2015-01-05 Jakub Jelinek <jakub@redhat.com>
8164 * c-typeck.c (convert_for_assignment, c_finish_return): For
8165 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
8166 types also set in_late_binary_op around convert call.
8167 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
8168 to integral type casts, if not in_late_binary_op, pass c_fully_fold
8169 result on expr as last argument to ubsan_instrument_float_cast,
8170 if in_late_binary_op, don't use c_save_expr but save_expr.
8172 Update copyright years.
8174 2015-01-05 Marek Polacek <polacek@redhat.com>
8177 * c-typeck.c (build_array_ref): Pass loc down to
8178 warn_array_subscript_with_type_char.
8180 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8182 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8183 (common-pointer-type): For pointers to arrays take qualifiers from
8185 (build_conditional_expr): Add warnings for lost qualifiers.
8186 (comp-target-types): Allow pointers to arrays with different qualifiers.
8187 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
8188 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8189 to PEDWARN_FOR_QUALIFIERS.
8191 2014-12-17 Jakub Jelinek <jakub@redhat.com>
8194 * c-convert.c: Include ubsan.h.
8195 (convert): For real -> integral casts and
8196 -fsanitize=float-cast-overflow don't call convert_to_integer, but
8197 instead instrument the float cast directly.
8199 2014-11-29 Jakub Jelinek <jakub@redhat.com>
8201 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
8202 c_finish_stmt_expr): Remove NULL last argument from
8203 create_tmp_var_raw and create_tmp_var calls.
8204 * c-array-notation.c (fix_builtin_array_notation_fn,
8205 build_array_notation_expr, fix_conditional_array_notations_1,
8206 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
8208 2014-11-28 Marek Polacek <polacek@redhat.com>
8211 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
8212 convert the right operand to integer type.
8214 2014-11-25 Marek Polacek <polacek@redhat.com>
8217 * c-decl.c (start_function): Disable -Wmissing-declarations warning
8218 for inline functions.
8220 2014-11-21 Jakub Jelinek <jakub@redhat.com>
8223 * c-typeck.c (build_array_ref): Adjust
8224 convert_vector_to_pointer_for_subscript caller. If it returns true,
8225 call non_lvalue_loc on the result.
8227 2014-11-11 Richard Biener <rguenther@suse.de>
8229 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
8232 2014-11-10 Andi Kleen <ak@linux.intel.com>
8235 * c-parser.c (c_parser_statement_after_labels): Call
8237 (c_parser_if_statement): Dito.
8238 (c_parser_switch_statement): Dito.
8239 (c_parser_while_statement): Dito.
8240 (c_parser_do_statement): Dito.
8241 (c_parser_for_statement): Dito.
8242 * c-typeck.c (c_finish_loop): Dito.
8244 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8246 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
8247 OPT_Wshift_count_overflow in the warnings.
8249 2014-10-30 Marek Polacek <polacek@redhat.com>
8251 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
8252 print the stripped version as well, if they're not the same.
8254 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8256 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
8259 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
8261 * c-decl.c: Adjust include files.
8262 * c-parser.c: Ditto.
8264 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
8265 Tom Tromey <tromey@redhat.com>
8267 * c-tree.h (enum c_oracle_request): New.
8268 (c_binding_oracle_function): New typedef.
8269 (c_binding_oracle, c_pushtag, c_bind): Declare.
8270 * c-decl.c (c_binding_oracle): New global.
8271 (I_SYMBOL_CHECKED): New macro.
8272 (i_symbol_binding): New function.
8273 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
8274 (I_TAG_CHECKED): New macro.
8275 (i_tag_binding): New function.
8276 (I_TAG_BINDING, I_TAG_DECL): Redefine.
8277 (I_LABEL_CHECKED): New macro.
8278 (i_label_binding): New function.
8279 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
8280 (c_print_identifier): Save and restore c_binding_oracle.
8281 (c_pushtag, c_bind): New functions.
8283 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
8285 * c-typeck.c: Adjust include files.
8287 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8290 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
8291 initialization here...
8292 (c_initialize_diagnostics): ... but here. Set defaults after
8293 building pretty-printer.
8295 2014-10-23 Marek Polacek <polacek@redhat.com>
8298 * c-decl.c (pop_scope): Don't print warning in external_scope.
8300 2014-10-19 Marek Polacek <polacek@redhat.com>
8303 * c-typeck.c (output_init_element): Allow initializing objects with
8304 static storage duration with compound literals even in C99 and add
8307 2014-10-17 Marek Polacek <polacek@redhat.com>
8310 * c-typeck.c (digest_init): Allow initializing objects with static
8311 storage duration with compound literals even in C99 and add pedwarn
8314 2014-10-17 Marek Polacek <polacek@redhat.com>
8317 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
8318 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
8319 error multiple times. Print the type.
8321 2014-10-17 Marek Polacek <polacek@redhat.com>
8324 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
8327 2014-10-17 Marek Polacek <polacek@redhat.com>
8329 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
8330 (start_function): Use OPT_Wimplicit_int instead of 0.
8331 (store_parm_decls_oldstyle): Likewise.
8333 2014-10-17 Alan Modra <amodra@gmail.com>
8336 * c-decl.c (merge_decls): Don't merge section name or tls model
8337 to newdecl symtab node, instead merge to olddecl. Override
8338 existing olddecl section name. Set tls_model for all thread-local
8339 vars, not just OMP thread-private ones. Remove incorrect comment.
8341 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
8343 * c-decl.c: Adjust include files.
8345 2014-10-14 DJ Delorie <dj@redhat.com>
8347 * c-parser.c (c_parse_init): Add RID entries for each __intN.
8348 (c_token_starts_typename): Check all __intN, not just __int128.
8349 (c_token_starts_declspecs): Likewise.
8350 (c_parser_declspecs): Likewise.
8351 (c_parser_attribute_any_word): Likewise.
8352 (c_parser_objc_selector): Likewise.
8353 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
8354 (struct c_declspecs): Add int_n_idx field to record *which* __intN
8356 * c-decl.c (declspecs_add_type): Check for all __intN, not just
8358 (finish_declspecs): Likewise.
8360 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
8362 * c-parser.c (c_parser_all_labels): New function to replace
8364 (c_parser_statement): Call the new function.
8366 2014-10-09 Marek Polacek <polacek@redhat.com>
8369 * c-typeck.c (pop_init_level): Don't warn about initializing
8372 2014-10-07 Marek Polacek <polacek@redhat.com>
8375 * c-decl.c (header_for_builtin_fn): New function.
8376 (implicitly_declare): Suggest which header to include.
8378 2014-10-07 Marek Polacek <polacek@redhat.com>
8380 * c-convert.c (convert): Use error_operand_p.
8381 * c-typeck.c (require_complete_type): Likewise.
8382 (really_atomic_lvalue): Likewise.
8383 (digest_init): Likewise.
8384 (handle_omp_array_sections_1): Likewise.
8386 2014-10-03 Marek Polacek <polacek@redhat.com>
8389 * c-decl.c (pop_scope): Don't warn about "inline function declared
8390 but never defined" for functions marked with gnu_inline attribute.
8392 2014-09-25 Jakub Jelinek <jakub@redhat.com>
8395 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
8396 on low_bound and length.
8398 2014-09-24 Marek Polacek <polacek@redhat.com>
8402 * c-parser.c: Don't define CPP_KEYWORD.
8403 (c_parser_switch_statement): Pass original type to c_finish_case.
8404 * c-tree.h (c_finish_case): Update declaration.
8405 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
8406 conditionally to c_do_switch_warnings.
8408 2014-09-03 Marek Polacek <polacek@redhat.com>
8411 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
8414 2014-09-02 Jakub Jelinek <jakub@redhat.com>
8415 Balaji V. Iyer <balaji.v.iyer@intel.com>
8416 Igor Zamyatin <igor.zamyatin@intel.com>
8418 * c-parser.c (c_parser_cilk_for): New function.
8419 (c_parser_cilk_grainsize): Likewise.
8420 (c_get_temp_regvar): Likewise.
8421 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
8422 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
8423 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
8424 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
8427 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
8429 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
8430 with using HOST_WIDE_INT without truncation to 'int'
8432 2014-08-22 Marek Polacek <polacek@redhat.com>
8435 * c-typeck.c (parser_build_binary_op): Adjust call to
8436 warn_logical_not_parentheses.
8438 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
8441 * c-parser.c (c_parser_array_notation): Check for correct
8442 type of an array added.
8444 2014-08-19 Marek Polacek <polacek@redhat.com>
8447 * c-typeck.c (build_binary_op): If either operand of a comparison
8448 is a boolean expression, call maybe_warn_bool_compare.
8450 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
8453 * c-typeck.c (build_c_cast): Do a conversion even when the
8454 TYPE_MAIN_VARIANTs are the same.
8456 2014-08-19 Marek Polacek <polacek@redhat.com>
8458 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
8459 pedwarn_c99 instead of pedwarn.
8460 (grokfield): Likewise.
8461 (warn_defaults_to): New function.
8462 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
8463 Unconditionally call pedwarn_c99 instead of pedwarn.
8464 (start_function): Call warn_defaults_to instead of pedwarn_c99.
8465 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
8466 check flag_isoc11 before.
8467 * c-errors.c (pedwarn_c99): Change the return type to bool.
8468 Handle -Wc99-c11-compat.
8469 * c-parser.c (disable_extension_diagnostics): Handle
8470 warn_c99_c11_compat.
8471 (restore_extension_diagnostics): Likewise.
8472 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
8473 instead of pedwarn, don't check flag_isoc11 before.
8474 (c_parser_declspecs): Likewise.
8475 (c_parser_alignas_specifier): Likewise.
8476 (c_parser_alignof_expression): Likewise.
8477 (c_parser_generic_selection): Likewise.
8478 * c-tree.h (pedwarn_c99): Update declaration.
8479 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
8482 2014-08-19 Marek Polacek <polacek@redhat.com>
8484 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
8486 * c-errors.c: Include "opts.h".
8487 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
8488 * c-parser.c (disable_extension_diagnostics): Handle negative value
8489 of warn_c90_c99_compat, too.
8490 (restore_extension_diagnostics): Likewise.
8491 (c_parser_compound_statement_nostart): Pass
8492 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
8494 2014-08-12 Marek Polacek <polacek@redhat.com>
8496 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
8498 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
8500 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
8502 2014-08-10 Marek Polacek <polacek@redhat.com>
8505 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
8506 Call pedwarn_c90 instead of pedwarn.
8507 (check_bitfield_type_and_width): Likewise.
8508 (declspecs_add_qual): Likewise.
8509 (declspecs_add_type): Likewise.
8510 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
8511 Adjust to only call pedwarn_c90.
8512 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
8513 pedwarn_c90 instead of pedwarn.
8514 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
8515 * c-parser.c (disable_extension_diagnostics): Handle
8516 warn_c90_c99_compat.
8517 (restore_extension_diagnostics): Likewise.
8518 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
8519 pedwarn_c90 instead of pedwarn.
8520 (c_parser_initelt): Likewise.
8521 (c_parser_postfix_expression): Likewise.
8522 (c_parser_postfix_expression_after_paren_type): Likewise.
8523 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
8524 * c-tree.h: Fix formatting.
8525 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
8526 pedwarn_c90 instead of pedwarn.
8528 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8530 * c-typeck.c: Remove include of pointer-set.h.
8532 2014-08-07 Marek Polacek <polacek@redhat.com>
8534 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
8536 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8538 * c-typeck.c: Use hash_map instead of pointer_map.
8540 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8542 * c-decl.c: Use hash_set instead of pointer_set.
8544 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8547 * c-array-notation.c (expand_array_notations): Handling
8550 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
8553 * c-typeck.c (c_finish_return): Return 0 instead of the address of
8556 2014-07-30 Tom Tromey <tromey@redhat.com>
8558 * c-typeck.c (struct constructor_stack) <designator_depth>: New
8560 (really_start_incremental_init, push_init_level): Initialize
8562 (pop_init_level): Set global designator_depth.
8563 (process_init_element): Check for designated_init attribute.
8565 2014-07-20 Marek Polacek <polacek@redhat.com>
8568 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
8569 (implicitly_declare): Pass location to implicit_decl_warning.
8571 2014-07-14 Jakub Jelinek <jakub@redhat.com>
8574 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
8575 If non-NULL, call c_parser_check_literal_zero.
8576 (c_parser_check_literal_zero): New function.
8577 (c_parser_postfix_expression_after_primary): Adjust
8578 c_parser_expr_list caller, handle -Wmemset-transposed-args.
8580 2014-07-06 Marek Polacek <polacek@redhat.com>
8583 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
8584 * c-tree.h (C_ARRAY_PARAMETER): Define.
8585 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
8588 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
8589 Chen Gang <gang.chen.5i5j@gmail.com>
8591 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
8594 2014-07-01 Marek Polacek <polacek@redhat.com>
8596 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
8597 instead of 0 to WARN_FOR_ASSIGNMENT.
8599 2014-07-01 Marek Polacek <polacek@redhat.com>
8602 * c-typeck.c (convert_for_assignment): Pass
8603 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
8605 2014-06-30 Marek Polacek <polacek@redhat.com>
8607 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
8608 has no_sanitize_undefined attribute.
8610 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
8613 * c-array-notation.c (fix_builtin_array_notation_fn):
8614 Check for 0 arguments in builtin call. Check that bultin argument is
8616 * c-parser.c (c_parser_array_notation): Check for incorrect initial
8619 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
8621 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
8622 qualifiers in __auto_type for atomic types.
8623 (c_parser_typeof_specifier): Discard all type qualifiers in
8624 __typeof__ for atomic types.
8626 2014-06-25 Marek Polacek <polacek@redhat.com>
8629 * c-parser.c (c_parser_statement_after_labels): Pass the location of
8630 the return expression to c_finish_return.
8632 2014-06-25 Jakub Jelinek <jakub@redhat.com>
8634 * c-typeck.c (c_finish_omp_clauses): Make sure
8635 OMP_CLAUSE_LINEAR_STEP has correct type.
8637 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
8641 2014-06-24 Jakub Jelinek <jakub@redhat.com>
8643 * c-parser.c (c_parser_omp_for_loop): For
8644 #pragma omp parallel for simd move lastprivate clause from parallel
8645 to for rather than simd.
8647 2014-06-23 Marek Polacek <polacek@redhat.com>
8649 * c-typeck.c (parser_build_binary_op): Don't call
8650 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
8652 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
8654 * c-parser.c (c_parser_omp_threadprivate): Likewise.
8655 * c-decl.c (merge_decls): Likewise.
8657 2014-06-09 Marek Polacek <polacek@redhat.com>
8660 * c-typeck.c (error_init): Call inform instead of error_at.
8661 (pedwarn_init): Call inform instead of pedwarn.
8662 (warning_init): Call inform instead of warning_at.
8664 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
8666 * c-decl.c (merge_decls): Use set_decl_section_name.
8667 (duplicate_decls): Remove node if it exists.
8669 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
8672 * c-typeck.c (push_init_level, process_init_element,
8673 pop_init_level): Correct check for zero initialization, move
8674 missing brace warning to respect zero initialization.
8676 2014-06-05 Marek Polacek <polacek@redhat.com>
8679 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
8681 2014-06-05 Marek Polacek <polacek@redhat.com>
8684 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
8685 on the left hand side operand of a comparison.
8687 2014-06-05 Marek Polacek <polacek@redhat.com>
8690 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
8691 Print note only if the warning was printed.
8693 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
8696 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
8699 2014-06-03 Marek Polacek <polacek@redhat.com>
8702 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
8704 * c-tree.h (c_start_case): Update.
8705 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
8706 switch condition has boolean value.
8708 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
8710 * c-decl.c: Include builtins.h.
8711 * c-parser.c: Likewise.
8713 2014-05-27 Marek Polacek <polacek@redhat.com>
8716 * c-typeck.c (convert_arguments): Get location of a parameter. Change
8717 error and warning calls to error_at and warning_at. Pass location of
8718 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
8719 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
8720 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
8722 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
8725 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
8726 function parameters.
8728 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
8730 * c-decl.c (merge_decls): Preserve symtab node pointers.
8731 (duplicate_decls): Free new decl.
8733 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
8735 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
8738 * c-parser.c (c_parser_omp_target): Return bool values.
8740 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8742 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
8743 num_teams_loc variable to num_thread_limit_loc.
8745 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8747 * c-array-notation.c (expand_array_notations): Use void_node
8748 instead of void_zero_node.
8750 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8752 * c-decl.c (finish_struct): Adjust.
8753 (finish_enum): Likewise.
8755 (record_inline_static): Likewise.
8756 (push_scope): Likewise.
8757 (make_label): Likewise.
8758 (lookup_label_for_goto): Likewise.
8759 (finish_struct): Likewise.
8760 (finish_enum): Likewise.
8761 (store_parm_decls): Likewise.
8762 (c_push_function_context): Likewise.
8763 * c-lang.h: Remove usage of variable_size gty attribute.
8764 * c-parser.c (c_parse_init): Adjust.
8765 (c_parse_file): Likewise.
8767 2014-05-13 Marek Polacek <polacek@redhat.com>
8770 * c-typeck.c (convert_for_assignment): Pass location to
8771 WARN_FOR_ASSIGNMENT instead of input_location.
8773 2014-05-10 Marek Polacek <polacek@redhat.com>
8775 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
8776 maybe_warn_string_init.
8777 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
8778 maybe_warn_string_init.
8779 * c-tree.h (maybe_warn_string_init): Update declaration.
8780 * c-typeck.c (maybe_warn_string_init): Add location parameter.
8781 Call pedwarn_init with loc instead of with input_location.
8782 (digest_init): Pass init_loc to maybe_warn_string_init.
8783 (pop_init_level): Call pedwarn_init with loc instead of with
8785 (set_init_index): Likewise.
8786 (process_init_element): Likewise.
8788 2014-05-09 Marek Polacek <polacek@redhat.com>
8791 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
8792 (c_parser_initelt): Pass location to set_init_label. Pass array index
8793 location to set_init_index.
8794 * c-tree.h (push_init_level): Update declaration.
8795 (pop_init_level): Likewise.
8796 (set_init_index): Likewise.
8797 (set_init_label): Likewise.
8798 * c-typeck.c (error_init): Add location parameter. Call error_at
8800 (digest_init): Pass init_loc to error_init.
8801 (really_start_incremental_init):
8802 (push_init_level): Add location parameter. Pass loc to pop_init_level
8804 (pop_init_level): Likewise.
8805 (set_designator): Add location parameter. Pass loc to pop_init_level,
8806 push_init_level, and error_init.
8807 (set_init_index): Add location parameter. Pass loc to error_init and
8809 (set_init_label): Likewise.
8810 (output_init_element): Pass loc to error_init.
8811 (process_init_element): Pass loc to error_init, pop_init_level,
8812 pedwarn_init, and push_init_level.
8814 2014-05-09 Marek Polacek <polacek@redhat.com>
8817 * c-parser.c (c_parser_attributes): Parse the arguments as an
8818 expression-list if the attribute takes identifier.
8820 2014-05-08 Marek Polacek <polacek@redhat.com>
8823 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8826 2014-05-08 Marek Polacek <polacek@redhat.com>
8829 * c-decl.c (start_function): Warn for _Atomic-qualified return type
8832 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8833 Mike Stump <mikestump@comcast.net>
8834 Richard Sandiford <rdsandiford@googlemail.com>
8836 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8837 (finish_enum): Use wide-int interfaces.
8838 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8839 * c-typeck.c (build_c_cast): Likewise.
8840 (set_nonincremental_init_from_string): Likewise.
8841 (c_tree_equal): Likewise.
8843 2014-05-02 Marek Polacek <polacek@redhat.com>
8846 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
8847 Return size_one_node when the type is not complete.
8848 (pointer_diff): Remove comment.
8849 (build_unary_op): Improve error messages.
8851 2014-05-02 Marek Polacek <polacek@redhat.com>
8853 * c-typeck.c (c_finish_return): Separate warning_at calls.
8855 2014-05-02 Marek Polacek <polacek@redhat.com>
8857 * c-tree.h (error_init): Remove declaration.
8858 (pedwarn_init): Likewise.
8859 * c-typeck.c (error_init): Make static and move above.
8860 (pedwarn_init): Likewise.
8861 (warning_init): Move above.
8862 (maybe_warn_string_init): Likewise.
8864 2014-05-01 Jeff Law <law@redhat.com>
8868 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8869 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8872 2014-05-02 Marek Polacek <polacek@redhat.com>
8875 * c-typeck.c (push_init_level): Set constructor_designated to
8876 p->designated for structures.
8878 2014-05-01 Marek Polacek <polacek@redhat.com>
8881 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8882 function-definition has an attribute after the declarator.
8884 2014-05-01 Marek Polacek <polacek@redhat.com>
8887 * c-typeck.c (warning_init): Add location_t parameter. Call
8888 warning_at instead of warning.
8889 (push_init_level): Pass input_location to warning_init.
8890 (add_pending_init): Add location_t parameter. Pass loc to
8892 (set_nonincremental_init): Pass input_location to add_pending_init.
8893 (set_nonincremental_init_from_string): Likewise.
8894 (output_init_element): Pass loc to warning_init and to
8897 2014-05-01 Marek Polacek <polacek@redhat.com>
8900 * c-typeck.c (c_finish_return): Distinguish between label and variable
8901 when warning about returning local address.
8903 2014-05-01 Marek Polacek <polacek@redhat.com>
8906 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8909 2014-05-01 Marek Polacek <polacek@redhat.com>
8912 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8913 instead of 0 to WARN_FOR_QUALIFIERS.
8915 2014-05-01 Marek Polacek <polacek@redhat.com>
8918 * c-typeck.c (default_conversion): Use better location for
8921 2014-04-30 Marek Polacek <polacek@redhat.com>
8923 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8924 also when SANITIZE_FLOAT_DIVIDE is on.
8926 2014-04-30 Marek Polacek <polacek@redhat.com>
8929 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8930 and pedwarn_init. Use loc insted of input_location.
8932 2014-04-30 Marek Polacek <polacek@redhat.com>
8935 * c-typeck.c (build_binary_op): Use location when warning about
8938 2014-04-25 Marek Polacek <polacek@redhat.com>
8941 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8942 always_inline/noinline and hot/cold attributes.
8944 2014-04-25 Marek Polacek <polacek@redhat.com>
8947 * c-parser.c (c_parser_initelt): Pass input_location to
8948 process_init_element.
8949 (c_parser_initval): Pass loc to process_init_element.
8950 * c-tree.h (process_init_element): Adjust declaration.
8951 * c-typeck.c (push_init_level): Pass input_location to
8952 process_init_element.
8953 (pop_init_level): Likewise.
8954 (set_designator): Likewise.
8955 (output_init_element): Add location_t parameter. Pass loc to
8957 (output_pending_init_elements): Pass input_location to
8958 output_init_element.
8959 (process_init_element): Add location_t parameter. Pass loc to
8960 output_init_element.
8962 2014-04-24 Jakub Jelinek <jakub@redhat.com>
8964 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8965 atomic-clause, allow comma in between atomic-clause and
8968 2014-04-22 Jakub Jelinek <jakub@redhat.com>
8971 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8972 fails, don't set OM_PARALLEL_COMBINED and return NULL.
8974 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8977 * c-array-notation.c (fix_builtin_array_notation_fn): Use
8978 create_tmp_var instead build_decl for creating temps.
8979 (build_array_notation_expr): Likewise.
8980 (fix_conditional_array_notations_1): Likewise.
8981 (fix_array_notation_expr): Likewise.
8982 (fix_array_notation_call_expr): Likewise.
8984 2014-03-28 Jakub Jelinek <jakub@redhat.com>
8987 * c-tree.h (c_build_function_call_vec): New prototype.
8988 * c-typeck.c (build_function_call_vec): Don't call
8989 resolve_overloaded_builtin here.
8990 (c_build_function_call_vec): New wrapper function around
8991 build_function_call_vec. Call resolve_overloaded_builtin here.
8992 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8993 Call c_build_function_call_vec instead of build_function_call_vec.
8994 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8995 * c-decl.c (finish_decl): Likewise.
8997 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
9000 * c-typeck.c: Use correct format string in cast-qual warning
9002 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
9004 * c-decl.c (c_decl_attributes): Use
9005 lang_hooks.types.omp_mappable_type.
9006 * c-typeck.c (c_finish_omp_clauses): Likewise.
9008 2014-03-06 Marek Polacek <polacek@redhat.com>
9011 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
9012 of checking tree code.
9014 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
9016 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
9017 (c_parser_parameter_declaration): Likewise.
9019 2014-02-19 Marek Polacek <polacek@redhat.com>
9022 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
9023 Call mark_exp_read on exp.value.
9024 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
9025 TREE_ADDRESSABLE on old instead of val.
9026 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
9028 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
9030 * c-parser.c (c_parser_get_builtin_args): Replace calls to
9031 C_EXPR_APPEND by vec_safe_push.
9032 * c-tree.h (C_EXPR_APPEND): Remove.
9034 2014-01-31 Marek Polacek <polacek@redhat.com>
9037 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
9038 build_function_call_vec.
9039 (build_function_call): Likewise.
9040 (build_atomic_assign): Likewise.
9041 (build_function_call_vec): Add arg_loc parameter. Use it.
9042 (convert_arguments): Likewise.
9043 (convert_for_assignment): Rename rhs_loc to expr_loc.
9044 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
9045 (c_parser_objc_keywordexpr): Likewise.
9046 (c_parser_postfix_expression_after_primary): Call
9047 build_function_call_vec with expr_loc rather than op_loc.
9048 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
9049 build_function_call_vec.
9050 (c_parser_expr_list): Add locations parameter. Fill it with locations
9051 of function arguments.
9052 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
9054 2014-01-30 Marek Polacek <polacek@redhat.com>
9057 * c-typeck.c (build_function_call_vec): Use loc parameter.
9058 (convert_arguments): Add location parameter. Use it.
9059 (ep_convert_and_check): Likewise.
9060 (build_atomic_assign): Adjust convert_for_assignment call.
9061 (build_modify_expr): Likewise.
9062 (digest_init): Likewise.
9063 (c_finish_return): Likewise.
9064 (build_conditional_expr): Adjust ep_convert_and_check calls.
9065 (convert_for_assignment): Add rhs_loc parameter. Use it.
9066 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
9069 2014-01-30 Richard Biener <rguenther@suse.de>
9072 * c-typeck.c (build_function_call_vec): Do not replace calls
9073 to a function via an incompatible type with a runtime abort.
9075 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9077 * c-parser.c (c_parser_declaration_or_fndef): Replaced
9078 flag_enable_cilkplus with flag_cilkplus.
9079 (c_parser_direct_declarator_inner): Likewise.
9080 (c_parser_attribute_any_word): Likewise.
9081 (c_parser_attributes): Likewise.
9082 (c_parser_compound_statement): Likewise.
9083 (c_parser_statement_after_labels): Likewise.
9084 (c_parser_if_statement): Likewise.
9085 (c_parser_switch_statement): Likewise.
9086 (c_parser_do_statement): Likewise.
9087 (c_parser_for_statement): Likewise.
9088 (c_parser_unary_expression): Likewise.
9089 (c_parser_postfix_expression): Likewise.
9090 (c_parser_postfix_expression_after_primary): Likewise.
9091 (c_parser_postfix_expression_after_primary): Likewise.
9092 (c_parser_omp_clause_name): Likewise.
9093 (c_finish_omp_declare_simd): Likewise.
9094 (c_parser_cilk_verify_simd): Likewise.
9095 * c-typeck.c (build_array_ref): Likewise.
9096 (build_function_call_vec): Likewise.
9097 (convert_arguments): Likewise.
9098 (build_compound_expr): Likewise.
9099 (c_finish_return): Likewise.
9100 (c_finish_if_stmt): Likewise.
9101 (c_finish_loop): Likewise.
9102 (build_binary_op): Likewise.
9104 2014-01-23 Marek Polacek <polacek@redhat.com>
9107 * c-typeck.c (parser_build_binary_op): Use location instead of
9109 (build_binary_op): Pass location to shorten_compare.
9111 2014-01-23 Marek Polacek <polacek@redhat.com>
9114 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
9117 2014-01-23 Marek Polacek <polacek@redhat.com>
9120 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
9121 of a comma expression.
9122 (emit_side_effect_warnings): Likewise.
9124 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
9127 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
9128 function to use walk_tree and moved a lot of its functionality to
9129 expand_array_notations.
9130 (expand_array_notations): New function.
9132 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
9134 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
9135 attribute an attribute without value.
9137 2014-01-23 Jakub Jelinek <jakub@redhat.com>
9140 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
9141 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
9143 2014-01-22 Marek Polacek <polacek@redhat.com>
9146 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
9147 of remove_c_maybe_const_expr on op1 and op2.
9149 2014-01-15 Jakub Jelinek <jakub@redhat.com>
9152 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
9153 effects, preevaluate rhs using SAVE_EXPR first.
9155 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
9158 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
9159 statements with if-elseif statements.
9161 2014-01-06 Marek Polacek <polacek@redhat.com>
9164 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
9165 defined bit-field types only in ISO C.
9167 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9169 Update copyright years
9171 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9173 * c-array-notation.c: Use the standard form for the copyright notice.
9175 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9177 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
9178 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
9179 field in parser is not empty. If not-empty, call the function
9180 c_parser_finish_omp_declare_simd.
9181 (c_parser_cilk_clause_vectorlength): Modified function to be shared
9182 between SIMD-enabled functions and #pragma simd. Added new parameter.
9183 (c_parser_cilk_all_clauses): Modified the usage of the function
9184 c_parser_cilk_clause_vectorlength as mentioned above.
9185 (c_parser_cilk_simd_fn_vector_attrs): New function.
9186 (c_finish_cilk_simd_fn_tokens): Likewise.
9187 (is_cilkplus_vector_p): Likewise.
9188 (c_parser_omp_clause_name): Added checking for "vectorlength,"
9189 "nomask," and "mask" strings in clause name.
9190 (c_parser_omp_all_clauses): Added 3 new case statements:
9191 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
9192 PRAGMA_CILK_CLAUSE_NOMASK.
9193 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
9194 check for vector attribute and if so call the function
9195 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
9196 called the function c_finish_cilk_simd_fn_tokens.
9197 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
9198 parser field is non-empty. If so, parse them as you would parse
9199 the omp declare simd pragma.
9200 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
9201 Added a check when step is a parameter and flag it as error.
9202 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
9203 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
9206 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
9208 * c-parser.c (c_parser_omp_parallel): Fix description.
9210 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9212 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
9213 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9214 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
9215 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
9217 2013-12-04 Joseph Myers <joseph@codesourcery.com>
9220 * c-parser.c (c_parser_alignas_specifier): Use
9221 c_sizeof_or_alignof_type instead of c_alignof.
9222 (c_parser_alignof_expression): Likewise, with min_alignof
9223 parameter depending on alignof spelling used.
9225 2013-12-04 Marek Polacek <polacek@redhat.com>
9228 * c-decl.c (start_function): Don't warn for missing prototype for
9231 2013-12-03 Marek Polacek <polacek@redhat.com>
9234 * c-decl.c (build_compound_literal): Allow compound literals with
9235 empty initial value.
9237 2013-12-02 Joseph Myers <joseph@codesourcery.com>
9240 * c-typeck.c (build_modify_expr): Diagnose assignment to
9241 expression with array type.
9243 2013-11-29 Joseph Myers <joseph@codesourcery.com>
9246 * c-typeck.c (process_init_element): Do not treat a string as
9247 initializing a whole array when used with a designator for an
9250 2013-11-29 Joseph Myers <joseph@codesourcery.com>
9253 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
9254 an inline function following a static declaration.
9256 2013-11-28 Jakub Jelinek <jakub@redhat.com>
9259 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
9260 to p_name before calling c_parser_omp_teams instead of after.
9261 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
9262 argument. Remove unused p_name variable.
9264 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
9265 Jakub Jelinek <jakub@redhat.com>
9267 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
9268 external_scope is NULL.
9270 2013-11-27 Tom de Vries <tom@codesourcery.com>
9271 Marc Glisse <marc.glisse@inria.fr>
9274 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
9276 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
9278 * c-typeck.c: Add required include files from gimple.h.
9280 2013-11-22 David Malcolm <dmalcolm@redhat.com>
9282 * c-decl.c (define_label, shadow_tag_warned)
9283 (check_bitfield_type_and_width, grokdeclarator, grokparms,
9284 store_parm_decls_newstyle, store_parm_decls_oldstyle)
9285 (declspecs_add_type): Remove use of in_system_header macro.
9286 * c-parser.c (c_parser_unary_expression): Likewise.
9287 * c-typeck.c (store_init_value, process_init_element)
9288 (c_start_case): Likewise.
9290 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
9293 * c-parser.c (c_parser_set_source_position_from_token): Remove
9294 reference to in_system_header from comment.
9296 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9298 * c-decl.c (grokdeclarator): Update comment to refer to
9299 tree_to_[su]hwi rather than tree_low_cst.
9301 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9303 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
9304 tree_to_uhwi throughout.
9306 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9308 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
9311 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9313 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
9316 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
9318 * c-parser.c (c_parser_cilk_simd): New.
9319 (c_parser_cilk_verify_simd): New.
9320 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
9321 (c_parser_omp_for_loop): Add case for NE_EXPR.
9322 Set c_break_label for CILK_SIMD.
9323 (c_parser_cilk_clause_vectorlength): New.
9324 (c_parser_cilk_clause_linear): New.
9325 (c_parser_cilk_clause_name): New.
9326 (c_parser_cilk_all_clauses): New.
9327 * c-typeck.c (build_unary_op): Pass location argument to
9329 (build_modify_expr): Same.
9330 (build_asm_expr): Same.
9331 (c_finish_bc_stmt): Error on break/continue in loops.
9333 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
9335 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
9337 2013-11-14 Diego Novillo <dnovillo@google.com>
9339 * c-decl.c: Include print-tree.h.
9340 Include stor-layout.h.
9343 Include stringpool.h.
9344 * c-lang.c: Include fold-const.h.
9345 * c-parser.c: Include stringpool.h.
9347 Include stor-layout.h.
9349 Include trans-mem.h.
9350 * c-typeck.c: Include stor-layout.h.
9351 Include trans-mem.h.
9355 2013-11-13 Joseph Myers <joseph@codesourcery.com>
9357 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
9358 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
9360 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
9361 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
9363 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
9364 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
9365 (c_parser_declarator, c_parser_direct_declarator_inner)
9366 (c_parser_parameter_declaration, c_parser_type_name): All callers
9368 (c_parser_declaration_or_fndef): Handle declarations with type
9369 determined from the initializer.
9371 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
9373 * c-typeck.c: Include gimplify.h.
9375 2013-11-12 Joseph Myers <joseph@codesourcery.com>
9377 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
9378 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
9380 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
9381 or _Thread_local as appropriate in diagnostics.
9382 (build_null_declspecs): Initialize ret->thread_gnu_p.
9383 (declspecs_add_scspec): Handle either __thread or _Thread_local
9384 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
9385 pedantic. Do not disallow _Thread_local extern and _Thread_local
9388 2013-11-07 Joseph Myers <joseph@codesourcery.com>
9389 Andrew MacLeod <amacleod@redhat.com>
9391 * c-aux-info.c (gen_type): Handle atomic qualifier.
9392 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
9393 qualifiers when compating types.
9394 (shadow_tag_warned): Handle atomic_p in declspecs.
9395 (quals_from_declspecs): Likewise.
9396 (start_decl): Use c_type_promotes_to when promoting argument
9398 (grokdeclarator): Handle _Atomic.
9399 (get_parm_info): Diagnose any qualifier on "void" as only
9401 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
9402 comparing types. Use c_type_promotes_to when promoting argument
9404 (finish_function): Use c_type_promotes_to when promoting argument
9406 (build_null_declspecs): Handle atomic_p in declspecs.
9407 (declspecs_add_qual): Handle RID_ATOMIC.
9408 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
9409 (c_token_starts_declspecs): Handle RID_ATOMIC.
9410 (c_parser_declspecs): Handle atomic type specifiers and
9412 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
9413 from types of expressions with atomic type.
9414 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
9415 (c_parser_attribute_any_word): Handle RID_ATOMIC.
9416 (c_parser_initializer, c_parser_initelt, c_parser_initval)
9417 (c_parser_statement_after_labels, c_parser_switch_statement)
9418 (c_parser_for_statement, c_parser_expr_no_commas)
9419 (c_parser_conditional_expression, c_parser_binary_expression)
9420 (c_parser_cast_expression, c_parser_unary_expression)
9421 (c_parser_postfix_expression)
9422 (c_parser_postfix_expression_after_primary, c_parser_expression):
9423 Use convert_lvalue_to_rvalue.
9424 (c_parser_expression_conv, c_parser_expr_list): Document
9425 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
9426 (c_parser_objc_synchronized_statement): Use
9427 convert_lvalue_to_rvalue.
9428 (c_parser_objc_selector): Handle RID_ATOMIC.
9429 (c_parser_objc_receiver, c_parser_array_notation): Use
9430 convert_lvalue_to_rvalue.
9431 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
9432 _Atomic (type-name).
9433 (struct c_declspecs): Add atomic_p field.
9434 (convert_lvalue_to_rvalue): Declare.
9435 * c-typeck.c (c_type_promotes_to): Promote atomic types to
9436 corresponding atomic types.
9437 (qualify_type): Don't add _Atomic qualifiers from second argument.
9438 (comp_target_types): Do not allow _Atomic mismatches.
9439 (type_lists_compatible_p): Do not remove atomic qualifiers when
9441 (really_atomic_lvalue, convert_lvalue_to_rvalue)
9442 (build_atomic_assign): New functions.
9443 (build_unary_op): Use build_atomic_assign for atomic increment and
9445 (build_conditional_expr): Do not treat _Atomic void as a qualified
9447 (build_modify_expr): Use build_atomic_assign for atomic LHS.
9448 (find_anonymous_field_with_type, convert_to_anonymous_field)
9449 (convert_for_assignment): Do not remove atomic qualifiers when
9451 (digest_init): Do not accept initialization of arrays of atomic
9452 elements by string constants.
9453 (build_asm_expr): Use convert_lvalue_to_rvalue.
9454 (build_binary_op): Do not treat _Atomic void as a qualified
9457 2013-11-06 DJ Delorie <dj@redhat.com>
9459 * c-decl.c (locate_old_decl): If a previous conflicting decl is
9460 both explicit and builtin, print the location of the explicit one.
9462 2013-11-05 Tobias Burnus <burnus@net-b.de>
9464 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
9465 c_parser_omp_distribute, c_parser_omp_teams,
9466 c_parser_omp_target, c_parser_omp_declare): Handle
9469 2013-11-03 Marek Polacek <polacek@redhat.com>
9471 * c-decl.c (grokdeclarator): Add VLA instrumentation.
9473 2013-11-01 Jakub Jelinek <jakub@redhat.com>
9475 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
9476 check_dup_generic at the end, unless remove is true.
9477 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
9479 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
9481 2013-10-31 Jakub Jelinek <jakub@redhat.com>
9483 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
9484 with decl that is not pointer nor array.
9486 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9488 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
9489 a spawning function is found.
9490 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
9491 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
9492 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9493 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
9495 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
9496 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
9498 (c_finish_return): Added a check to reject _Cilk_spawn in return
9500 (build_cilk_spawn): New function.
9501 (build_cilk_sync): Likewise.
9502 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
9504 2013-10-27 Tobias Burnus <burnus@net-b.de>
9507 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
9508 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
9509 (c_parser_statement_after_labels): Update calls.
9511 2013-10-24 Tobias Burnus <burnus@net-b.de>
9514 * c-parser.c (c_parser_pragma, c_parser_for_statement):
9515 Handle PRAGMA_IVDEP.
9516 (c_parser_statement_after_labels): Update call.
9518 2013-10-24 Marek Polacek <polacek@redhat.com>
9520 * c-parser.c (c_parser_struct_declaration): Add a comment.
9521 (c_parser_declarator): Don't allow _Alignas here.
9523 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
9525 * c-parser.c: Include omp-low.h.
9526 * c-typeck.c: Likewise.
9528 2013-10-17 Marek Polacek <polacek@redhat.com>
9531 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
9532 Document syntax of the array-declarator.
9533 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
9535 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
9536 (c_parser_struct_declaration): Likewise.
9537 (c_parser_declarator): Likewise.
9538 (c_parser_direct_declarator_inner): Likewise.
9539 (c_parser_parameter_declaration): Likewise.
9540 (c_parser_type_name): Likewise.
9542 2013-10-11 Jakub Jelinek <jakub@redhat.com>
9544 * c-lang.h (current_omp_declare_target_attribute): New extern
9546 * c-parser.c: Include c-lang.h.
9547 (struct c_parser): Change tokens to c_token *.
9548 Add tokens_buf field. Change tokens_avail type to unsigned int.
9549 (c_parser_consume_token): If parser->tokens isn't
9550 &parser->tokens_buf[0], increment parser->tokens.
9551 (c_parser_consume_pragma): Likewise.
9552 (enum pragma_context): Add pragma_struct and pragma_param.
9553 (c_parser_external_declaration): Adjust
9554 c_parser_declaration_or_fndef caller.
9555 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
9556 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
9557 Adjust recursive call.
9558 (c_parser_struct_or_union_specifier): Use pragma_struct instead
9560 (c_parser_parameter_declaration): Use pragma_param instead of
9562 (c_parser_compound_statement_nostart, c_parser_label,
9563 c_parser_for_statement): Adjust
9564 c_parser_declaration_or_fndef callers.
9565 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
9566 it through to c_parser_conditional_expression.
9567 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
9568 pass it through to c_parser_binary_expression. Adjust recursive
9570 (c_parser_binary_expression): Remove prec argument, add
9571 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
9572 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
9573 binop matches it, use build2 instead of parser_build_binary_op.
9574 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
9575 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
9576 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
9577 Handle pragma_struct and pragma_param the same as pragma_external.
9578 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
9579 (c_parser_omp_variable_list): Parse array sections for
9580 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
9581 (c_parser_omp_clause_collapse): Fully fold collapse expression.
9582 (c_parser_omp_clause_reduction): Handle user defined reductions.
9583 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
9584 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
9585 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
9586 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
9587 c_parser_omp_clause_depend, c_parser_omp_clause_map,
9588 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
9589 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
9590 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
9591 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
9592 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
9593 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
9594 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
9595 (c_parser_omp_for_loop): Add CODE argument, pass it through
9596 to c_finish_omp_for. Change last argument to cclauses,
9597 and adjust uses to grab parallel clauses from the array of all
9598 the split clauses. Adjust c_parser_binary_expression,
9599 c_parser_declaration_or_fndef and c_finish_omp_for callers.
9600 (omp_split_clauses): New function.
9601 (c_parser_omp_simd): New function.
9602 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
9603 Allow the function to be called also when parsing combined constructs,
9604 and call c_parser_omp_simd when parsing for simd.
9605 (c_parser_omp_sections_scope): If section-sequence doesn't start with
9606 #pragma omp section, require exactly one structured-block instead of
9607 sequence of statements.
9608 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
9609 Allow the function to be called also when parsing combined constructs.
9610 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
9611 Allow the function to be called also when parsing combined
9613 (c_parser_omp_taskgroup, c_parser_omp_cancel,
9614 c_parser_omp_cancellation_point, c_parser_omp_distribute,
9615 c_parser_omp_teams, c_parser_omp_target_data,
9616 c_parser_omp_target_update, c_parser_omp_target,
9617 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
9618 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
9619 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
9620 (c_parser_omp_construct): Add p_name and mask vars. Handle
9621 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
9622 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
9623 and c_parser_omp_sections callers.
9624 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
9625 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
9626 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
9627 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
9628 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
9630 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
9631 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
9632 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
9633 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
9634 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
9635 * c-typeck.c: Include tree-inline.h.
9636 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
9637 handle_omp_array_sections_1, handle_omp_array_sections,
9638 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
9639 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
9640 user defined reductions.
9641 (c_tree_equal): New function.
9642 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
9643 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
9644 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
9645 c_check_omp_declare_reduction_r): New prototypes.
9646 * c-decl.c (current_omp_declare_target_attribute): New variable.
9647 (c_decl_attributes): New function.
9648 (start_decl, start_function): Use it instead of decl_attributes.
9649 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
9650 c_omp_reduction_decl, c_omp_reduction_lookup,
9651 c_check_omp_declare_reduction_r): New functions.
9653 2013-09-25 Tom Tromey <tromey@redhat.com>
9655 * Make-lang.in (c/gccspec.o): Remove.
9656 (CFLAGS-c/gccspec.o): New variable.
9657 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
9658 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
9659 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
9661 2013-09-25 Tom Tromey <tromey@redhat.com>
9663 * Make-lang.in (c/gccspec.o): Don't use subshell.
9665 2013-09-18 Marek Polacek <polacek@redhat.com>
9668 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
9669 Remove unnecessary check.
9671 2013-09-18 Marek Polacek <polacek@redhat.com>
9674 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
9675 no_sanitize_undefined attribute.
9677 2013-09-13 Kai Tietz <ktietz@redhat.com>
9680 * c-decl.c (c_builtin_function_ext_scope): Remove
9681 wrong assumption that it is never called on prexisting
9684 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9686 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
9688 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9690 * c-objc-common.c (c_tree_printer): Tidy.
9692 2013-08-30 Marek Polacek <polacek@redhat.com>
9694 * c-typeck.c (build_binary_op): Add division by zero and shift
9697 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
9698 Joseph Myers <joseph@codesourcery.com>
9701 * c-typeck.c (c_common_type): Prefer double_type_node over
9702 other REAL_TYPE types with the same precision.
9703 (convert_arguments): Likewise.
9705 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
9707 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
9708 (c_initialize_diagnostics): Call a destructor for the early printer.
9710 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9712 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
9713 printer initialization.
9715 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
9718 * c-array-notation.c (fix_conditional_array_notations_1): Added a
9719 check for truth values.
9720 (expand_array_notation_exprs): Added truth values case. Removed an
9721 unwanted else. Added for-loop to walk through subtrees in default
9724 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9726 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
9728 2013-07-23 Joseph Myers <joseph@codesourcery.com>
9730 * c-parser.c (struct c_generic_association): Fix typo.
9732 2013-07-23 Tom Tromey <tromey@redhat.com>
9733 Joseph Myers <joseph@codesourcery.com>
9735 * c-parser.c (struct c_generic_association): New.
9736 (c_generic_association_d): New typedef.
9737 (c_parser_generic_selection): New function.
9738 (c_parser_postfix_expression): Handle RID_GENERIC.
9740 2013-07-13 Jason Merrill <jason@redhat.com>
9743 * c-decl.c (finish_struct): Check for too-large class.
9745 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
9748 * c-typeck.c (set_init_index): When folding, check for index overflow.
9750 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9752 * c-parser.c (c_parser_array_notation): Removed rejection of array
9753 notations in an array of function pointers.
9755 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9757 * c-array-notation.c (make_triplet_val_inv): New function.
9758 (create_cmp_incr): Likewise.
9759 (create_array_refs): Likewise.
9760 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
9761 Also modularized common parts between functions and called the function.
9762 (build_array_notation_expr): Likewise.
9763 (fix_conditional_array_notations_1): Likewise.
9764 (fix_array_notation_expr): Likewise.
9765 (fix_array_notation_call_expr): Likewise.
9767 2013-06-18 Marek Polacek <polacek@redhat.com>
9770 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
9772 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
9774 * c-array-notation.c (build_array_notation_expr): Reject array notation
9775 mismatch between LHS and RHS even inside a call_expr. Also, removed
9776 a couple while statements that were dead code.
9778 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
9780 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
9781 excessive precision expressions in function parameters. Also removed
9782 couple unwanted while statements.
9784 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9786 * c-array-notation.c (expand_array_notation_exprs): Added
9787 ARRAY_NOTATION_REF case.
9789 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9791 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
9792 function to c-family/array-notation-common.c.
9793 (is_cilkplus_reduce_builtin): Likewise.
9794 (find_rank): Likewise.
9795 (extract_array_notation_exprs): Likewise.
9796 (replace_array_notations): Likewise.
9797 (find_inv_trees): Likewise.
9798 (replace_inv_trees): Likewise.
9799 (contains_array_notation_expr): Likewise.
9800 (find_correct_array_notation_type): Likewise.
9801 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9802 (struct inv_list): Moved this to c-family/array-notation-common.c.
9803 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
9805 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
9807 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9808 reduction functions outside the for-loop. Added a check if the fundecl
9809 is non-NULL. Finally, removed an unwanted if-statement, and made the
9812 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9814 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9815 condition of the if-statement matches the rank of else-block and then-
9816 block when array notations are used.
9817 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9818 expression after the entire function body is parsed.
9819 (c_parser_expr_no_commas): Delayed creating array notation expressions
9820 to the end of function parsing.
9821 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9822 whole if-statement instead of just the condition.
9823 (expand_array_notation_exprs): Added MODIFY_EXPR case.
9825 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9828 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9829 array to NULL_TREE if they are unused. Also added a check for the
9830 field to be NULL before its fields are used in future.
9832 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9835 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9836 (build_array_notation_expr): Likewise.
9838 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9840 * c-typeck.c (build_array_ref): Added a check to see if array's
9841 index is greater than one. If true, then emit an error.
9842 (build_function_call_vec): Exclude error reporting and checking
9843 for builtin array-notation functions.
9844 (convert_arguments): Likewise.
9845 (c_finish_return): Added a check for array notations as a return
9846 expression. If true, then emit an error.
9847 (c_finish_loop): Added a check for array notations in a loop
9848 condition. If true then emit an error.
9849 (lvalue_p): Added a ARRAY_NOTATION_REF case.
9850 (build_binary_op): Added a check for array notation expr inside
9851 op1 and op0. If present, we call another function to find correct
9853 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9854 * c-parser.c (c_parser_compound_statement): Check if array
9855 notation code is used in tree, if so, then transform them into
9857 (c_parser_expr_no_commas): Check if array notation is used in LHS
9858 or RHS, if so, then build array notation expression instead of
9860 (c_parser_postfix_expression_after_primary): Added a check for
9861 colon(s) after square braces, if so then handle it like an array
9862 notation. Also, break up array notations in unary op if found.
9863 (c_parser_direct_declarator_inner): Added a check for array
9865 (c_parser_compound_statement): Added a check for array notation in
9866 a stmt. If one is present, then expand array notation expr.
9867 (c_parser_if_statement): Likewise.
9868 (c_parser_switch_statement): Added a check for array notations in
9869 a switch statement's condition. If true, then output an error.
9870 (c_parser_while_statement): Similarly, but for a while.
9871 (c_parser_do_statement): Similarly, but for a do-while.
9872 (c_parser_for_statement): Similarly, but for a for-loop.
9873 (c_parser_unary_expression): Check if array notation is used in a
9874 pre-increment or pre-decrement expression. If true, then expand
9876 (c_parser_array_notation): New function.
9877 * c-array-notation.c: New file.
9878 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
9880 2013-05-23 Mike Stump <mikestump@comcast.net>
9882 * c-typeck.c (convert_for_assignment): Handle references to memory
9885 2013-05-16 Jason Merrill <jason@redhat.com>
9887 * Make-lang.in (cc1$(exeext)): Use link mutex.
9889 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9891 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9892 to simply use OPT_Wpointer_arith.
9893 (build_unary_op): Likewise.
9895 2013-04-03 Jakub Jelinek <jakub@redhat.com>
9898 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9899 argument. If set, or it temporarily for parsing of the first
9900 argument into force_folding_builtin_constant_p.
9901 (c_parser_postfix_expression): Adjust callers.
9903 2013-03-21 Richard Biener <rguenther@suse.de>
9905 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9906 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
9908 2013-02-12 Marek Polacek <polacek@redhat.com>
9911 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9914 2013-01-24 Jakub Jelinek <jakub@redhat.com>
9917 * c-typeck.c (set_nonincremental_init_from_string): If
9918 constructor_max_index is NULL, treat it as if tree_int_cst_lt
9920 (process_init_element): Likewise.
9922 2012-12-20 Jakub Jelinek <jakub@redhat.com>
9925 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9926 argument, don't call default_function_array_conversion
9927 nor c_fully_fold here.
9928 (c_parser_asm_statement): Adjust callers.
9929 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9930 and outputs here, and call default_function_array_conversion
9931 on inputs that don't need to be addressable.
9933 2012-12-18 Jakub Jelinek <jakub@redhat.com>
9936 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9937 warning require that both c_common_unsigned_type as well as
9938 c_common_signed_type is the same for both mvl and mvr types.
9940 2012-11-16 Diego Novillo <dnovillo@google.com>
9942 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9944 * c-common.c: Use new vec API in vec.h.
9945 * c-common.h: Likewise.
9946 * c-gimplify.c: Likewise.
9947 * c-pragma.c: Likewise.
9948 * c-pretty-print.c: Likewise.
9949 * c-pretty-print.h: Likewise.
9950 * c-semantics.c: Likewise.
9951 * c-decl.c: Likewise.
9952 * c-parser.c: Likewise.
9953 * c-tree.h: Likewise.
9954 * c-typeck.c: Likewise.
9956 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9959 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9961 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9964 * c-decl.c (warn_if_shadowing): Do not warn if a variable
9965 shadows a function, unless the variable is a function or a
9966 pointer-to-function.
9968 2012-10-12 Jakub Jelinek <jakub@redhat.com>
9971 * c-parser.c (struct c_tree_loc_pair): Removed.
9972 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9973 add location_t * and tree * arguments, fill in array of 3
9974 sizeof_arg trees and corresponding locs.
9975 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9976 c_parser_expr_list callers.
9977 (c_parser_postfix_expression_after_primary): Likewise. Pass
9978 array of 3 sizeof_arg trees and locs (corresponding to first
9979 3 arguments) to sizeof_pointer_memaccess_warning.
9981 2012-10-09 Lawrence Crowl <crowl@google.com>
9983 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9984 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9987 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9990 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9993 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
9996 * c-typeck.c: Include c-common.h.
9997 (enum stv_conv): Moved to c-common.h.
9998 (scalar_to_vector): Moved to c-common.c.
9999 (build_binary_op): Adapt to scalar_to_vector's new prototype.
10000 * Make-lang.in: c-typeck.c depends on c-common.h.
10002 2012-10-04 Arnaud Charlet <charlet@adacore.com>
10004 * c-decl.c (c_write_global_declarations): Fix handling of
10007 2012-09-30 Sharad Singhai <singhai@google.com>
10009 * c-decl.c (c_write_global_declarations): Use a different method
10010 to determine if the dump has ben initialized.
10012 2012-09-14 Joseph Myers <joseph@codesourcery.com>
10015 * c-typeck.c (c_cast_expr): When casting to a type requiring
10016 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
10017 c_fully_fold first.
10019 2012-09-14 Joseph Myers <joseph@codesourcery.com>
10022 * c-typeck.c (build_unary_op): Pass original argument of
10023 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
10024 any C_MAYBE_CONST_EXPR, if it has integer operands.
10025 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
10026 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
10027 to c_objc_common_truthvalue_conversion, then remove any
10028 C_MAYBE_CONST_EXPR, if they have integer operands. Use
10029 c_objc_common_truthvalue_conversion not
10030 c_common_truthvalue_conversion.
10031 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
10032 call note_integer_operands for arguments with integer operands
10033 that are not integer constants.
10035 2012-09-13 Jakub Jelinek <jakub@redhat.com>
10038 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
10039 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
10041 2012-08-31 Jakub Jelinek <jakub@redhat.com>
10044 * c-convert.c (convert): Don't call fold_convert_loc if
10045 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
10046 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
10047 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
10049 2012-08-24 Jakub Jelinek <jakub@redhat.com>
10052 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
10053 for nested and empty_ok arguments in the call to
10054 c_parser_declaration_or_fndef.
10056 2012-08-17 Jakub Jelinek <jakub@redhat.com>
10058 * c-tree.h (c_last_sizeof_arg): Declare.
10059 * c-parser.c (struct c_tree_loc_pair): New type.
10060 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
10062 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
10063 (c_parser_postfix_expression_after_primary): Likewise. Call
10064 sizeof_pointer_memaccess_warning if needed.
10065 (sizeof_ptr_memacc_comptypes): New function.
10066 * c-typeck.c (c_last_sizeof_arg): New global variable.
10067 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
10069 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
10071 * c-lang.h (lang_decl): Add variable_size GTY option.
10073 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10075 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
10076 * Make-lang.in: Fix dependencies.
10078 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10080 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
10081 and add language Makefile hooks.
10082 * config-lang.in: New file.
10083 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
10084 add the required "normal" config-lang.in rules.
10085 * c-lang.h: Moved from gcc/ to here.
10086 * c-tree.h: Likewise.
10087 * c-objc-common.c: Likewise.
10088 * c-objc-common.h: Likewise.
10089 * c-typeck.c: Likewise.
10090 * c-convert.c: Likewise.
10091 * c-lang.c: Likewise.
10092 * c-aux-info.c: Likewise.
10093 * c-errors.c: Likewise.
10094 * gccspec.c: Likewise.
10095 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
10096 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
10098 Copyright (C) 2012-2024 Free Software Foundation, Inc.
10100 Copying and distribution of this file, with or without modification,
10101 are permitted in any medium without royalty provided the copyright
10102 notice and this notice are preserved.